[][src]Enum stellar_base::signature::SignerKey

pub enum SignerKey {
    Ed25519(PublicKey),
    PreAuthTx(PreAuthTxHash),
    HashX(HashX),
}

A transaction signer key.

Variants

Ed25519(PublicKey)
PreAuthTx(PreAuthTxHash)
HashX(HashX)

Implementations

impl SignerKey[src]

pub fn new_from_public_key(key: PublicKey) -> SignerKey[src]

Creates a SignerKey with ed25519 key.

pub fn new_from_hashx(hashx: HashX) -> SignerKey[src]

Creates a SignerKey with hash(x) key.

pub fn new_with_hashx(preimage: &[u8]) -> SignerKey[src]

Creates a SignerKey with the hash of the preimage as key.

pub fn new_from_pre_authorized_transaction(
    preauthtx: PreAuthTxHash
) -> SignerKey
[src]

Creates a SignerKey from the pre authorized transaction hash.

pub fn new_from_transaction_envelope(
    tx: &TransactionEnvelope,
    network: &Network
) -> Result<SignerKey>
[src]

Creates a SignerKey from the transaction envelope as pre authorized transaction.

pub fn as_ed25519(&self) -> Option<&PublicKey>[src]

If the signer is a Ed25519 key, returns its value. Returns None otherwise.

pub fn as_ed25519_mut(&mut self) -> Option<&mut PublicKey>[src]

If the signer is a Ed25519 key, returns its mutable value. Returns None otherwise.

pub fn is_ed25519(&self) -> bool[src]

Returns true if the signer is a Ed25519 key.

pub fn as_pre_authorized_transaction(&self) -> Option<&PreAuthTxHash>[src]

If the signer is a PreAuthTx, returns its value. Returns None otherwise.

pub fn as_pre_authorized_transaction_mut(
    &mut self
) -> Option<&mut PreAuthTxHash>
[src]

If the signer is a PreAuthTx, returns its mutable value. Returns None otherwise.

pub fn is_pre_authorized_transaction(&self) -> bool[src]

Returns true if the signer is a PreAuthTx.

pub fn as_hashx(&self) -> Option<&HashX>[src]

If the signer is a HashX, returns its value. Returns None otherwise.

pub fn as_hashx_mut(&mut self) -> Option<&mut HashX>[src]

If the signer is a HashX, returns its mutable value. Returns None otherwise.

pub fn is_hashx(&self) -> bool[src]

Returns true if the signer is a HashX.

pub fn to_xdr(&self) -> Result<SignerKey>[src]

Returns the xdr object.

pub fn from_xdr(x: &SignerKey) -> Result<SignerKey>[src]

Creates from xdr object.

Trait Implementations

impl Clone for SignerKey[src]

impl Debug for SignerKey[src]

impl Eq for SignerKey[src]

impl PartialEq<SignerKey> for SignerKey[src]

impl StructuralEq for SignerKey[src]

impl StructuralPartialEq for SignerKey[src]

impl XDRDeserialize for SignerKey[src]

impl XDRSerialize for SignerKey[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.