pub struct Sig(pub Signature);
Tuple Fields§
§0: Signature
Implementations§
source§impl Sig
impl Sig
sourcepub fn to_compressed_bytes(&self) -> [u8; 96]
pub fn to_compressed_bytes(&self) -> [u8; 96]
Converts the public key to compressed bytes. ref. “avalanchego/utils/crypto/bls.SignatureToBytes”
sourcepub fn from_bytes(compressed: &[u8]) -> Result<Self>
pub fn from_bytes(compressed: &[u8]) -> Result<Self>
Loads the signature from the compressed raw scalar bytes (in big endian).
sourcepub fn verify(&self, msg: &[u8], pubkey: &PublicKey) -> bool
pub fn verify(&self, msg: &[u8], pubkey: &PublicKey) -> bool
Verifies the message and the validity of its signature. Invariant: [pubkey] and [self.0] have both been validated. ref. “avalanchego/utils/crypto/bls.Verify”
sourcepub fn verify_proof_of_possession(&self, msg: &[u8], pubkey: &PublicKey) -> bool
pub fn verify_proof_of_possession(&self, msg: &[u8], pubkey: &PublicKey) -> bool
Verifies the message and the validity of its signature. Invariant: [pubkey] and [self.0] have both been validated. ref. “avalanchego/utils/crypto/bls.VerifyProofOfPossession”
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Sig
impl Send for Sig
impl Sync for Sig
impl Unpin for Sig
impl UnwindSafe for Sig
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request