Skip to main content

SessionSigner

Trait SessionSigner 

Source
pub trait SessionSigner: Send + Sync {
    // Required methods
    fn public_key(&self) -> &str;
    fn sign_message<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn sign_transaction<'life0, 'life1, 'async_trait>(
        &'life0 self,
        transaction_base64: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn public_key(&self) -> &str

Canonical base58 Ed25519 public key registered as the Vault delegate.

Source

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

Sign the exact SDK-validated public operation authorization. Only the two-step challenge path needs it; the one-call execute_* helpers and the order command channel are one signature over the transaction and never call it.

Source

fn sign_transaction<'life0, 'life1, 'async_trait>( &'life0 self, transaction_base64: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add only the session signature to an already-verified transaction.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§