Struct jormungandr_lib::crypto::account::SigningKey
source · pub struct SigningKey(EitherEd25519SecretKey);
Expand description
account Singing key. Used to sign transaction. Any owner of this key can utilise the associated values or stake.
Tuple Fields§
§0: EitherEd25519SecretKey
Implementations§
source§impl SigningKey
impl SigningKey
sourcepub fn identifier(&self) -> Identifier
pub fn identifier(&self) -> Identifier
get the identifier associated to this key.
sourcepub fn generate<RNG>(rng: RNG) -> Selfwhere
RNG: RngCore + CryptoRng,
pub fn generate<RNG>(rng: RNG) -> Selfwhere RNG: RngCore + CryptoRng,
generate a new Account SigningKey
This function will generate a normal Ed25519 secret key. If you wished to use
an Ed25519Extended secret key, use generate_extended
.
sourcepub fn generate_extended<RNG>(rng: RNG) -> Selfwhere
RNG: RngCore + CryptoRng,
pub fn generate_extended<RNG>(rng: RNG) -> Selfwhere RNG: RngCore + CryptoRng,
generate a new Account SigningKey
This function will generate an extended Ed25519 secret key. If you wished to use
an Ed25519 secret key, use generate
.
pub fn to_bech32_str(&self) -> String
pub fn to_hex(&self) -> String
pub fn from_bech32_str(s: &str) -> Result<Self, SigningKeyParseError>
Trait Implementations§
source§impl AsRef<EitherEd25519SecretKey> for SigningKey
impl AsRef<EitherEd25519SecretKey> for SigningKey
source§impl Clone for SigningKey
impl Clone for SigningKey
source§fn clone(&self) -> SigningKey
fn clone(&self) -> SigningKey
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 SigningKey
impl Debug for SigningKey
source§impl<'de> Deserialize<'de> for SigningKey
impl<'de> Deserialize<'de> for SigningKey
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<SecretKey<Ed25519>> for SigningKey
impl From<SecretKey<Ed25519>> for SigningKey
source§impl From<SecretKey<Ed25519Extended>> for SigningKey
impl From<SecretKey<Ed25519Extended>> for SigningKey
Auto Trait Implementations§
impl RefUnwindSafe for SigningKey
impl Send for SigningKey
impl Sync for SigningKey
impl Unpin for SigningKey
impl UnwindSafe for SigningKey
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