Skip to main content

ExternalSigningSigner

Trait ExternalSigningSigner 

Source
pub trait ExternalSigningSigner: Send + Sync {
    // Required methods
    fn derive_public_key<'life0, 'async_trait>(
        &'life0 self,
        path: String,
    ) -> Pin<Box<dyn Future<Output = Result<PublicKeyBytes, SignerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sign_ecdsa<'life0, 'async_trait>(
        &'life0 self,
        message: MessageBytes,
        path: String,
    ) -> Pin<Box<dyn Future<Output = Result<EcdsaSignatureBytes, SignerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sign_ecdsa_recoverable<'life0, 'async_trait>(
        &'life0 self,
        message: MessageBytes,
        path: String,
    ) -> Pin<Box<dyn Future<Output = Result<RecoverableEcdsaSignatureBytes, SignerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sign_hash_schnorr<'life0, 'async_trait>(
        &'life0 self,
        hash: Vec<u8>,
        path: String,
    ) -> Pin<Box<dyn Future<Output = Result<SchnorrSignatureBytes, SignerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

External signer that provides signing only, without the SDK’s local ECIES/HMAC operations.

Implement this instead of ExternalBreezSigner for a signer that can’t release key material for local encryption (for example a policy-restricted enclave). The capability is declared by the type: the SDK keeps session tokens in plaintext and the features that rely on ECIES/HMAC are unavailable.

Required Methods§

Source

fn derive_public_key<'life0, 'async_trait>( &'life0 self, path: String, ) -> Pin<Box<dyn Future<Output = Result<PublicKeyBytes, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Derives a public key for the given BIP32 derivation path.

§Arguments
  • path - BIP32 derivation path as a string (e.g., “m/44’/0’/0’/0/0”)
§Returns

The derived public key as 33 bytes, or a SignerError

See also: JavaScript getPublicKeyFromDerivation

Source

fn sign_ecdsa<'life0, 'async_trait>( &'life0 self, message: MessageBytes, path: String, ) -> Pin<Box<dyn Future<Output = Result<EcdsaSignatureBytes, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Signs a message using ECDSA at the given derivation path.

The message should be a 32-byte digest (typically a hash of the original data).

§Arguments
  • message - The 32-byte message digest to sign
  • path - BIP32 derivation path as a string
§Returns

64-byte compact ECDSA signature, or a SignerError

Source

fn sign_ecdsa_recoverable<'life0, 'async_trait>( &'life0 self, message: MessageBytes, path: String, ) -> Pin<Box<dyn Future<Output = Result<RecoverableEcdsaSignatureBytes, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Signs a message using recoverable ECDSA at the given derivation path.

The message should be a 32-byte digest (typically a hash of the original data).

§Arguments
  • message - The 32-byte message digest to sign
  • path - BIP32 derivation path as a string
§Returns

65 bytes: recovery ID (31 + recovery_id) + 64-byte signature, or a SignerError

Source

fn sign_hash_schnorr<'life0, 'async_trait>( &'life0 self, hash: Vec<u8>, path: String, ) -> Pin<Box<dyn Future<Output = Result<SchnorrSignatureBytes, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Signs a hash using Schnorr signature at the given derivation path.

§Arguments
  • hash - The 32-byte hash to sign (must be 32 bytes)
  • path - BIP32 derivation path as a string
§Returns

64-byte Schnorr signature, or a SignerError

Implementors§