pub trait ExternalSparkSigner: Send + Sync {
Show 16 methods
// Required methods
fn get_identity_public_key<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PublicKeyBytes, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_public_key_for_leaf<'life0, 'async_trait>(
&'life0 self,
leaf_id: ExternalTreeNodeId,
) -> Pin<Box<dyn Future<Output = Result<PublicKeyBytes, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_static_deposit_public_key<'life0, 'async_trait>(
&'life0 self,
index: u32,
) -> Pin<Box<dyn Future<Output = Result<PublicKeyBytes, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sign_authentication_challenge<'life0, 'async_trait>(
&'life0 self,
challenge: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<EcdsaSignatureBytes, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sign_message<'life0, 'async_trait>(
&'life0 self,
message: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<EcdsaSignatureBytes, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sign_frost<'life0, 'async_trait>(
&'life0 self,
jobs: Vec<ExternalFrostJob>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ExternalFrostShareResult>, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn prepare_transfer<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareTransferRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedTransfer, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn prepare_claim<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareClaimRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedClaim, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn prepare_lightning_receive<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareLightningReceiveRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedLightningReceive, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn prepare_static_deposit<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareStaticDepositRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedStaticDeposit, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn start_static_deposit_refund<'life0, 'async_trait>(
&'life0 self,
request: ExternalStartStaticDepositRefundRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalStartedStaticDepositRefund, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sign_static_deposit_refund<'life0, 'async_trait>(
&'life0 self,
request: ExternalSignStaticDepositRefundRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalFrostSignature, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sign_spark_invoice<'life0, 'async_trait>(
&'life0 self,
request: ExternalSignSparkInvoiceRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalSignedSparkInvoice, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn prepare_token_transaction<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareTokenTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedTokenTransaction, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn prepare_static_deposit_claim<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareStaticDepositClaimRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedStaticDepositClaim, SignerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn is_remote(&self) -> bool { ... }
}Expand description
FFI-compatible mirror of spark_wallet::SparkSigner.
Required Methods§
Sourcefn get_identity_public_key<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PublicKeyBytes, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_identity_public_key<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PublicKeyBytes, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The wallet identity public key (33 bytes compressed).
Sourcefn get_public_key_for_leaf<'life0, 'async_trait>(
&'life0 self,
leaf_id: ExternalTreeNodeId,
) -> Pin<Box<dyn Future<Output = Result<PublicKeyBytes, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_public_key_for_leaf<'life0, 'async_trait>(
&'life0 self,
leaf_id: ExternalTreeNodeId,
) -> Pin<Box<dyn Future<Output = Result<PublicKeyBytes, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The signing public key for a tree leaf.
Sourcefn get_static_deposit_public_key<'life0, 'async_trait>(
&'life0 self,
index: u32,
) -> Pin<Box<dyn Future<Output = Result<PublicKeyBytes, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_static_deposit_public_key<'life0, 'async_trait>(
&'life0 self,
index: u32,
) -> Pin<Box<dyn Future<Output = Result<PublicKeyBytes, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The static-deposit signing public key at index.
Sourcefn sign_authentication_challenge<'life0, 'async_trait>(
&'life0 self,
challenge: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<EcdsaSignatureBytes, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign_authentication_challenge<'life0, 'async_trait>(
&'life0 self,
challenge: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<EcdsaSignatureBytes, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
ECDSA-sign a server authentication challenge with the identity key.
Sourcefn sign_message<'life0, 'async_trait>(
&'life0 self,
message: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<EcdsaSignatureBytes, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign_message<'life0, 'async_trait>(
&'life0 self,
message: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<EcdsaSignatureBytes, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
ECDSA-sign an arbitrary user message with the identity key.
Sourcefn sign_frost<'life0, 'async_trait>(
&'life0 self,
jobs: Vec<ExternalFrostJob>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ExternalFrostShareResult>, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign_frost<'life0, 'async_trait>(
&'life0 self,
jobs: Vec<ExternalFrostJob>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ExternalFrostShareResult>, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Produce FROST shares for a batch of jobs.
Sourcefn prepare_transfer<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareTransferRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedTransfer, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prepare_transfer<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareTransferRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedTransfer, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Prepare an outbound transfer (key-tweak + packages + payload signature).
Sourcefn prepare_claim<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareClaimRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedClaim, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prepare_claim<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareClaimRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedClaim, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Claim an inbound transfer (key-tweak step).
Sourcefn prepare_lightning_receive<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareLightningReceiveRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedLightningReceive, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prepare_lightning_receive<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareLightningReceiveRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedLightningReceive, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Prepare a Lightning receive (in-enclave preimage + Feldman split).
Sourcefn prepare_static_deposit<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareStaticDepositRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedStaticDeposit, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prepare_static_deposit<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareStaticDepositRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedStaticDeposit, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Prepare a static deposit (export secret to SSP + FROST-sign tree txs).
Sourcefn start_static_deposit_refund<'life0, 'async_trait>(
&'life0 self,
request: ExternalStartStaticDepositRefundRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalStartedStaticDepositRefund, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_static_deposit_refund<'life0, 'async_trait>(
&'life0 self,
request: ExternalStartStaticDepositRefundRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalStartedStaticDepositRefund, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Begin a static-deposit refund (user-commits-first).
Sourcefn sign_static_deposit_refund<'life0, 'async_trait>(
&'life0 self,
request: ExternalSignStaticDepositRefundRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalFrostSignature, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign_static_deposit_refund<'life0, 'async_trait>(
&'life0 self,
request: ExternalSignStaticDepositRefundRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalFrostSignature, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Finish a static-deposit refund (aggregate into the final signature).
Sourcefn sign_spark_invoice<'life0, 'async_trait>(
&'life0 self,
request: ExternalSignSparkInvoiceRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalSignedSparkInvoice, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign_spark_invoice<'life0, 'async_trait>(
&'life0 self,
request: ExternalSignSparkInvoiceRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalSignedSparkInvoice, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Schnorr-sign a Spark invoice (sats or tokens) with the identity key.
Sourcefn prepare_token_transaction<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareTokenTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedTokenTransaction, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prepare_token_transaction<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareTokenTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedTokenTransaction, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Schnorr-sign a token-transaction digest with the identity key.
Sourcefn prepare_static_deposit_claim<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareStaticDepositClaimRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedStaticDepositClaim, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prepare_static_deposit_claim<'life0, 'async_trait>(
&'life0 self,
request: ExternalPrepareStaticDepositClaimRequest,
) -> Pin<Box<dyn Future<Output = Result<ExternalPreparedStaticDepositClaim, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Prepare a static-deposit claim (export secret in the clear + sign).
Provided Methods§
Sourcefn is_remote(&self) -> bool
fn is_remote(&self) -> bool
Whether this signer is backed by a remote service, so its operations are network round-trips rather than local computation. Local signers return false; a hosted signer like Turnkey returns true so the SDK can avoid redundant calls, e.g. re-deriving keys for leaves it has already verified.