pub enum PublicKey {
EcdsaSecp256k1(VerifyingKey<Secp256k1>),
EcdsaRecoverableSecp256k1(VerifyingKey<Secp256k1>),
EcdsaSecp256r1(VerifyingKey<NistP256>),
Ed25519(PublicKey),
Sr25519(PublicKey),
}
Expand description
Public key used for verifying signatures.
Variants§
EcdsaSecp256k1(VerifyingKey<Secp256k1>)
ECDSA with secp256k1.
EcdsaRecoverableSecp256k1(VerifyingKey<Secp256k1>)
ECDSA with secp256k1 in Ethereum compatible format.
EcdsaSecp256r1(VerifyingKey<NistP256>)
ECDSA with NIST P-256.
Ed25519(PublicKey)
Ed25519.
Sr25519(PublicKey)
Schnorrkel used by substrate/polkadot.
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn to_address(&self, format: AddressFormat) -> Address
pub fn to_address(&self, format: AddressFormat) -> Address
Returns the address of a public key.
Source§impl PublicKey
impl PublicKey
Trait Implementations§
impl Copy for PublicKey
impl Eq for PublicKey
impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnwindSafe for PublicKey
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