pub struct SecretKeyV1 {
pub version: u8,
pub wallet: Wallet,
pub signer: String,
pub signature: String,
pub metadata: MetadataV1,
}Expand description
Secret key format
Fields§
§version: u8§wallet: Wallet§signer: String§signature: String§metadata: MetadataV1Implementations§
Source§impl SecretKeyV1
impl SecretKeyV1
Sourcepub fn into_string(self, scope: &str) -> Result<String>
pub fn into_string(self, scope: &str) -> Result<String>
Encode the secret key into a string in the form of:
aimo-sk-{scope}-{base58_encoded_secret_key_json}
pub fn decode(sk: &str) -> Result<(String, Self)>
pub fn verify_signature(&self) -> Result<()>
pub fn into_hash(self) -> Result<[u8; 32]>
Trait Implementations§
Source§impl Clone for SecretKeyV1
impl Clone for SecretKeyV1
Source§fn clone(&self) -> SecretKeyV1
fn clone(&self) -> SecretKeyV1
Returns a duplicate 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 SecretKeyV1
impl Debug for SecretKeyV1
Source§impl<'de> Deserialize<'de> for SecretKeyV1
impl<'de> Deserialize<'de> for SecretKeyV1
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 Serialize for SecretKeyV1
impl Serialize for SecretKeyV1
Source§impl TryFrom<SecretKeyRawV1> for SecretKeyV1
impl TryFrom<SecretKeyRawV1> for SecretKeyV1
Source§impl TryFrom<SecretKeyV1> for SecretKeyRawV1
impl TryFrom<SecretKeyV1> for SecretKeyRawV1
Auto Trait Implementations§
impl Freeze for SecretKeyV1
impl RefUnwindSafe for SecretKeyV1
impl Send for SecretKeyV1
impl Sync for SecretKeyV1
impl Unpin for SecretKeyV1
impl UnwindSafe for SecretKeyV1
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more