pub struct VerifyingKey { /* private fields */ }
Available on crate feature
schnorr
only.Expand description
Taproot Schnorr verifying key.
Implementations§
Source§impl VerifyingKey
impl VerifyingKey
Sourcepub fn as_affine(&self) -> &AffinePoint
pub fn as_affine(&self) -> &AffinePoint
Borrow the inner AffinePoint
this type wraps.
Sourcepub fn to_bytes(&self) -> GenericArray<u8, <Secp256k1 as Curve>::FieldBytesSize>
pub fn to_bytes(&self) -> GenericArray<u8, <Secp256k1 as Curve>::FieldBytesSize>
Serialize as bytes.
Sourcepub fn verify_raw(
&self,
message: &[u8],
signature: &Signature,
) -> Result<(), Error>
pub fn verify_raw( &self, message: &[u8], signature: &Signature, ) -> Result<(), Error>
Compute Schnorr signature.
§⚠️ Warning
This is a low-level interface intended only for unusual use cases involving verifying pre-hashed messages, or “raw” messages where the message is not hashed at all prior to being used to generate the Schnorr signature.
The preferred interfaces are the DigestVerifier
or PrehashVerifier
traits.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<VerifyingKey, Error>
pub fn from_bytes(bytes: &[u8]) -> Result<VerifyingKey, Error>
Parse verifying key from big endian-encoded x-coordinate.
Trait Implementations§
Source§impl Clone for VerifyingKey
impl Clone for VerifyingKey
Source§fn clone(&self) -> VerifyingKey
fn clone(&self) -> VerifyingKey
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VerifyingKey
impl Debug for VerifyingKey
Source§impl<'de> Deserialize<'de> for VerifyingKey
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for VerifyingKey
Available on crate feature
serde
only.Source§fn deserialize<D>(
deserializer: D,
) -> Result<VerifyingKey, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<VerifyingKey, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<D> DigestVerifier<D, Signature> for VerifyingKey
impl<D> DigestVerifier<D, Signature> for VerifyingKey
Source§impl PartialEq for VerifyingKey
impl PartialEq for VerifyingKey
Source§impl PrehashVerifier<Signature> for VerifyingKey
impl PrehashVerifier<Signature> for VerifyingKey
Source§impl Serialize for VerifyingKey
Available on crate feature serde
only.
impl Serialize for VerifyingKey
Available on crate feature
serde
only.Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Verifier<Signature> for VerifyingKey
impl Verifier<Signature> for VerifyingKey
impl Copy for VerifyingKey
impl Eq for VerifyingKey
impl StructuralPartialEq for VerifyingKey
Auto Trait Implementations§
impl Freeze for VerifyingKey
impl RefUnwindSafe for VerifyingKey
impl Send for VerifyingKey
impl Sync for VerifyingKey
impl Unpin for VerifyingKey
impl UnwindSafe for VerifyingKey
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
Mutably borrows from an owned value. Read more