[−][src]Struct stellar_base::KeyPair
The secret and public key pair of the account.
Implementations
impl KeyPair[src]
pub fn from_secret_seed(data: &str) -> Result<KeyPair>[src]
Create the key pair from the secret seed, e.g. SDAKFNYEIAORZKKCYRILFQKLLOCNPL5SWJ3YY5NM3ZH6GJSZGXHZEPQS.
pub fn random() -> Result<KeyPair>[src]
Create a random key pair.
pub fn from_network(network: &Network) -> Result<KeyPair>[src]
Create a key pair from the network passphrase.
pub fn from_seed_bytes(data: &[u8]) -> Result<KeyPair>[src]
Crete a key pair from raw bytes.
pub fn public_key(&self) -> &PublicKey[src]
Return the public key.
pub fn secret_key(&self) -> &SecretKey[src]
Return the secret key.
pub fn sign(&self, message: &[u8]) -> Signature[src]
Sign the message.
pub fn sign_decorated(&self, message: &[u8]) -> DecoratedSignature[src]
Sign the message together with the signature hint.
pub fn verify(&self, message: &[u8], signature: &Signature) -> bool[src]
Verify the signature against the message.
pub 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]
impl Debug for KeyPair[src]
impl Eq for KeyPair[src]
impl PartialEq<KeyPair> for KeyPair[src]
impl StructuralEq for KeyPair[src]
impl StructuralPartialEq for KeyPair[src]
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
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,