pub struct Bls12381Signature { /* private fields */ }bls only.Expand description
A BLS12-381 signature.
Implementations§
Source§impl Bls12381Signature
impl Bls12381Signature
Sourcepub fn from_bytes(bytes: &[u8]) -> AptosResult<Self>
pub fn from_bytes(bytes: &[u8]) -> AptosResult<Self>
Creates a signature from compressed bytes (96 bytes).
§Errors
Returns an error if the bytes length is not 96 bytes or if the signature deserialization fails.
Sourcepub fn from_hex(hex_str: &str) -> AptosResult<Self>
pub fn from_hex(hex_str: &str) -> AptosResult<Self>
Creates a signature from a hex string.
§Errors
Returns an error if hex decoding fails or if the resulting bytes are invalid.
Source§impl Bls12381Signature
impl Bls12381Signature
Sourcepub fn aggregate(
signatures: &[&Bls12381Signature],
) -> AptosResult<Bls12381Signature>
pub fn aggregate( signatures: &[&Bls12381Signature], ) -> AptosResult<Bls12381Signature>
Aggregates multiple signatures into a single aggregated signature.
The aggregated signature can be verified against an aggregated public key for the same message, or against individual public keys for different messages.
§Errors
Returns an error if the list of signatures is empty or if aggregation fails.
Trait Implementations§
Source§impl Clone for Bls12381Signature
impl Clone for Bls12381Signature
Source§fn clone(&self) -> Bls12381Signature
fn clone(&self) -> Bls12381Signature
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Bls12381Signature
impl Debug for Bls12381Signature
Source§impl<'de> Deserialize<'de> for Bls12381Signature
impl<'de> Deserialize<'de> for Bls12381Signature
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Display for Bls12381Signature
impl Display for Bls12381Signature
Source§impl PartialEq for Bls12381Signature
impl PartialEq for Bls12381Signature
Source§impl Serialize for Bls12381Signature
impl Serialize for Bls12381Signature
Source§impl Signature for Bls12381Signature
impl Signature for Bls12381Signature
Source§fn from_bytes(bytes: &[u8]) -> AptosResult<Self>
fn from_bytes(bytes: &[u8]) -> AptosResult<Self>
Creates a signature from compressed bytes (96 bytes).
§Errors
Returns an error if the bytes length is not 96 bytes or if the signature deserialization fails.
Source§type PublicKey = Bls12381PublicKey
type PublicKey = Bls12381PublicKey
impl Eq for Bls12381Signature
impl StructuralPartialEq for Bls12381Signature
Auto Trait Implementations§
impl Freeze for Bls12381Signature
impl RefUnwindSafe for Bls12381Signature
impl Send for Bls12381Signature
impl Sync for Bls12381Signature
impl Unpin for Bls12381Signature
impl UnsafeUnpin for Bls12381Signature
impl UnwindSafe for Bls12381Signature
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoMoveArg for Twhere
T: Serialize,
impl<T> IntoMoveArg for Twhere
T: Serialize,
Source§fn into_move_arg(self) -> Result<Vec<u8>, AptosError>
fn into_move_arg(self) -> Result<Vec<u8>, AptosError>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.