Trait solana_sdk::signer::Signer [−][src]
pub trait Signer { fn try_pubkey(&self) -> Result<Pubkey, SignerError>; fn try_sign_message(&self, message: &[u8]) -> Result<Signature, SignerError>; fn pubkey(&self) -> Pubkey { ... } fn sign_message(&self, message: &[u8]) -> Signature { ... } }
Expand description
The Signer
trait declares operations that all digital signature providers
must support. It is the primary interface by which signers are specified in
Transaction
signing interfaces
Required methods
fn try_pubkey(&self) -> Result<Pubkey, SignerError>
[src]
Expand description
Fallibly gets the implementor’s public key
fn try_sign_message(&self, message: &[u8]) -> Result<Signature, SignerError>
[src]
Expand description
Fallibly produces an Ed25519 signature over the provided message
bytes.
Provided methods
fn pubkey(&self) -> Pubkey
[src]
Expand description
Infallibly gets the implementor’s public key. Returns the all-zeros
Pubkey
if the implementor has none.
fn sign_message(&self, message: &[u8]) -> Signature
[src]
Expand description
Infallibly produces an Ed25519 signature over the provided message
bytes. Returns the all-zeros Signature
if signing is not possible.
Trait Implementations
Implementors
impl Signer for Keypair
[src]
impl Signer for Keypair
[src]fn pubkey(&self) -> Pubkey
[src]
fn try_pubkey(&self) -> Result<Pubkey, SignerError>
[src]
fn sign_message(&self, message: &[u8]) -> Signature
[src]
fn try_sign_message(&self, message: &[u8]) -> Result<Signature, SignerError>
[src]
impl Signer for NullSigner
[src]
impl Signer for NullSigner
[src]fn try_pubkey(&self) -> Result<Pubkey, SignerError>
[src]
fn try_sign_message(&self, _message: &[u8]) -> Result<Signature, SignerError>
[src]
impl Signer for Presigner
[src]
impl Signer for Presigner
[src]