Enum taple_core::crypto::KeyPair
source · pub enum KeyPair {
Ed25519(Ed25519KeyPair),
Secp256k1(Secp256k1KeyPair),
}
Expand description
Asymmetric key pair
Variants§
Ed25519(Ed25519KeyPair)
Secp256k1(Secp256k1KeyPair)
Implementations§
source§impl KeyPair
impl KeyPair
pub fn get_key_derivator(&self) -> KeyDerivator
Trait Implementations§
source§impl BorshDeserialize for KeyPair
impl BorshDeserialize for KeyPair
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where R: Read,
source§impl<'de> Deserialize<'de> for KeyPair
impl<'de> Deserialize<'de> for KeyPair
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<BaseKeyPair<PublicKey, SecretKey>> for KeyPair
impl From<BaseKeyPair<PublicKey, SecretKey>> for KeyPair
source§fn from(key_pair: Ed25519KeyPair) -> Self
fn from(key_pair: Ed25519KeyPair) -> Self
Converts to this type from the input type.
source§impl From<BaseKeyPair<PublicKey, SecretKey>> for KeyPair
impl From<BaseKeyPair<PublicKey, SecretKey>> for KeyPair
source§fn from(key_pair: Secp256k1KeyPair) -> Self
fn from(key_pair: Secp256k1KeyPair) -> Self
Converts to this type from the input type.
source§impl KeyMaterial for KeyPair
impl KeyMaterial for KeyPair
Auto Trait Implementations§
impl RefUnwindSafe for KeyPair
impl Send for KeyPair
impl Sync for KeyPair
impl Unpin for KeyPair
impl UnwindSafe for KeyPair
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