Skip to main content

SiwxSigner

Trait SiwxSigner 

Source
pub trait SiwxSigner: Send + Sync {
    // Required methods
    fn signature_type(&self) -> &'static str;
    fn address(&self) -> CompactString;
    fn sign_message<'a>(
        &'a self,
        message: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<CompactString, SiwxError>> + Send + 'a>>;
}
Available on crate features server and siwx only.
Expand description

Wallet that can produce a CAIP-122 SIWX proof.

Required Methods§

Source

fn signature_type(&self) -> &'static str

eip191 or ed25519. Matched against supportedChains[].type.

Source

fn address(&self) -> CompactString

Wallet address (hex for EVM, Base58 for Solana).

Source

fn sign_message<'a>( &'a self, message: &'a str, ) -> Pin<Box<dyn Future<Output = Result<CompactString, SiwxError>> + Send + 'a>>

Signs the canonical CAIP-122 message. EVM returns 0x hex; Solana Base58.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§