Struct shuttle_core::KeyPair
[−]
[src]
pub struct KeyPair { /* fields omitted */ }
The secret and public key pair of the account.
Methods
impl KeyPair
[src]
fn from_secret_seed(data: &str) -> Result<KeyPair>
[src]
Create the key pair from the secret seed, e.g. SDAKFNYEIAORZKKCYRILFQKLLOCNPL5SWJ3YY5NM3ZH6GJSZGXHZEPQS
.
fn random() -> Result<KeyPair>
[src]
Create a random key pair.
fn from_network(network: &Network) -> Result<KeyPair>
[src]
Create a key pair from the network
passphrase.
fn from_seed_bytes(data: &[u8]) -> Result<KeyPair>
[src]
Crete a key pair from raw bytes.
fn public_key(&self) -> &PublicKey
[src]
Return the public key.
fn secret_key(&self) -> &SecretKey
[src]
Return the secret key.
fn sign(&self, message: &[u8]) -> Signature
[src]
Sign the message
.
fn sign_decorated(&self, message: &[u8]) -> DecoratedSignature
[src]
Sign the message
together with the signature hint.
fn verify(&self, message: &[u8], signature: &Signature) -> bool
[src]
Verify the signature
against the message
.
fn signature_hint(&self) -> SignatureHint
[src]
Return the signature hint, that is the last 4 bytes of the public key.
Trait Implementations
impl Debug for KeyPair
[src]
impl Clone for KeyPair
[src]
fn clone(&self) -> KeyPair
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for KeyPair
[src]
fn eq(&self, __arg_0: &KeyPair) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &KeyPair) -> bool
[src]
This method tests for !=
.