openzeppelin_relayer::services

Trait SolanaSignTrait

Source
pub trait SolanaSignTrait: Sync + Send {
    // Required methods
    fn pubkey(&self) -> Result<Address, SignerError>;
    fn sign<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<Signature, SignerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait defining Solana-specific signing operations

This trait extends the basic signing functionality with methods specific to the Solana blockchain, including public key retrieval and message signing.

Required Methods§

Source

fn pubkey(&self) -> Result<Address, SignerError>

Returns the public key of the Solana signer as an Address

Source

fn sign<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<Signature, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Signs a message using the Solana signing scheme

§Arguments
  • message - The message bytes to sign
§Returns

A Result containing either the Solana Signature or a SignerError

Implementors§