Enum rosetta_crypto::PublicKey
source · 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.
Trait Implementations§
source§impl PartialEq<PublicKey> for PublicKey
impl PartialEq<PublicKey> for PublicKey
impl Copy for PublicKey
impl Eq for PublicKey
impl StructuralEq for PublicKey
impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
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