Enum bc_components::SigningPublicKey
source · pub enum SigningPublicKey {
Schnorr(SchnorrPublicKey),
ECDSA(ECPublicKey),
}Expand description
A public key that can be used for signing. Supports both ECDSA and Schnorr.
Variants§
Schnorr(SchnorrPublicKey)
ECDSA(ECPublicKey)
Implementations§
source§impl SigningPublicKey
impl SigningPublicKey
sourcepub fn from_schnorr(key: SchnorrPublicKey) -> Self
pub fn from_schnorr(key: SchnorrPublicKey) -> Self
Restores a SigningPublicKey from a SchnorrPublicKey.
sourcepub fn from_ecdsa(key: ECPublicKey) -> Self
pub fn from_ecdsa(key: ECPublicKey) -> Self
Restores a SigningPublicKey from an ECPublicKey.
sourcepub fn schnorr(&self) -> Option<&SchnorrPublicKey>
pub fn schnorr(&self) -> Option<&SchnorrPublicKey>
Returns the SchnorrPublicKey of this SigningPublicKey, if it is a Schnorr key.
sourcepub fn ecdsa(&self) -> Option<&ECPublicKey>
pub fn ecdsa(&self) -> Option<&ECPublicKey>
Returns the ECPublicKey of this SigningPublicKey, if it is an ECDSA key.
Trait Implementations§
source§impl AsRef<SigningPublicKey> for PublicKeyBase
impl AsRef<SigningPublicKey> for PublicKeyBase
source§fn as_ref(&self) -> &SigningPublicKey
fn as_ref(&self) -> &SigningPublicKey
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<SigningPublicKey> for SigningPublicKey
impl AsRef<SigningPublicKey> for SigningPublicKey
source§fn as_ref(&self) -> &SigningPublicKey
fn as_ref(&self) -> &SigningPublicKey
Converts this type into a shared reference of the (usually inferred) input type.
source§impl CBORDecodable for SigningPublicKey
impl CBORDecodable for SigningPublicKey
source§impl CBOREncodable for SigningPublicKey
impl CBOREncodable for SigningPublicKey
source§impl CBORTagged for SigningPublicKey
impl CBORTagged for SigningPublicKey
source§impl CBORTaggedDecodable for SigningPublicKey
impl CBORTaggedDecodable for SigningPublicKey
source§fn from_untagged_cbor(untagged_cbor: &CBOR) -> Result<Self>
fn from_untagged_cbor(untagged_cbor: &CBOR) -> Result<Self>
Creates an instance of this type by decoding it from untagged CBOR.
source§fn from_tagged_cbor(cbor: &CBOR) -> Result<Self, Error>where
Self: Sized,
fn from_tagged_cbor(cbor: &CBOR) -> Result<Self, Error>where
Self: Sized,
Creates an instance of this type by decoding it from tagged CBOR.
source§impl CBORTaggedEncodable for SigningPublicKey
impl CBORTaggedEncodable for SigningPublicKey
source§fn untagged_cbor(&self) -> CBOR
fn untagged_cbor(&self) -> CBOR
Returns the untagged CBOR encoding of this instance.
source§fn tagged_cbor(&self) -> CBOR
fn tagged_cbor(&self) -> CBOR
Returns the tagged CBOR encoding of this instance.
source§impl Clone for SigningPublicKey
impl Clone for SigningPublicKey
source§fn clone(&self) -> SigningPublicKey
fn clone(&self) -> SigningPublicKey
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 SigningPublicKey
impl Debug for SigningPublicKey
source§impl From<SigningPublicKey> for CBOR
impl From<SigningPublicKey> for CBOR
source§fn from(value: SigningPublicKey) -> Self
fn from(value: SigningPublicKey) -> Self
Converts to this type from the input type.
source§impl Hash for SigningPublicKey
impl Hash for SigningPublicKey
source§impl PartialEq for SigningPublicKey
impl PartialEq for SigningPublicKey
source§fn eq(&self, other: &SigningPublicKey) -> bool
fn eq(&self, other: &SigningPublicKey) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TryFrom<&CBOR> for SigningPublicKey
impl TryFrom<&CBOR> for SigningPublicKey
source§impl TryFrom<CBOR> for SigningPublicKey
impl TryFrom<CBOR> for SigningPublicKey
source§impl URDecodable for SigningPublicKey
impl URDecodable for SigningPublicKey
source§impl UREncodable for SigningPublicKey
impl UREncodable for SigningPublicKey
impl Eq for SigningPublicKey
impl StructuralEq for SigningPublicKey
impl StructuralPartialEq for SigningPublicKey
impl URCodable for SigningPublicKey
Auto Trait Implementations§
impl RefUnwindSafe for SigningPublicKey
impl Send for SigningPublicKey
impl Sync for SigningPublicKey
impl Unpin for SigningPublicKey
impl UnwindSafe for SigningPublicKey
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