Struct shuttle_sdk::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, Error>[src]
Create the key pair from the secret seed, e.g. SDAKFNYEIAORZKKCYRILFQKLLOCNPL5SWJ3YY5NM3ZH6GJSZGXHZEPQS.
fn random() -> Result<KeyPair, Error>[src]
Create a random key pair.
fn from_network(network: &Network) -> Result<KeyPair, Error>[src]
Create a key pair from the network passphrase.
fn from_seed_bytes(data: &[u8]) -> Result<KeyPair, Error>[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 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