solana_sdk::signature

Trait Signable

Source
pub trait Signable {
    // Required methods
    fn pubkey(&self) -> Pubkey;
    fn signable_data(&self) -> Cow<'_, [u8]>;
    fn get_signature(&self) -> Signature;
    fn set_signature(&mut self, signature: Signature);

    // Provided methods
    fn sign(&mut self, keypair: &Keypair) { ... }
    fn verify(&self) -> bool { ... }
}

Required Methods§

Source

fn pubkey(&self) -> Pubkey

Source

fn signable_data(&self) -> Cow<'_, [u8]>

Source

fn get_signature(&self) -> Signature

Source

fn set_signature(&mut self, signature: Signature)

Provided Methods§

Source

fn sign(&mut self, keypair: &Keypair)

Source

fn verify(&self) -> bool

Implementors§