pub trait WalletInterface: Send + Sync {
Show 28 methods
// Required methods
fn create_action<'life0, 'life1, 'async_trait>(
&'life0 self,
args: CreateActionArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<CreateActionResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn sign_action<'life0, 'life1, 'async_trait>(
&'life0 self,
args: SignActionArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<SignActionResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn abort_action<'life0, 'life1, 'async_trait>(
&'life0 self,
args: AbortActionArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<AbortActionResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_actions<'life0, 'life1, 'async_trait>(
&'life0 self,
args: ListActionsArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<ListActionsResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn internalize_action<'life0, 'life1, 'async_trait>(
&'life0 self,
args: InternalizeActionArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<InternalizeActionResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_outputs<'life0, 'life1, 'async_trait>(
&'life0 self,
args: ListOutputsArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<ListOutputsResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn relinquish_output<'life0, 'life1, 'async_trait>(
&'life0 self,
args: RelinquishOutputArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<RelinquishOutputResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_public_key<'life0, 'life1, 'async_trait>(
&'life0 self,
args: GetPublicKeyArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<GetPublicKeyResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn reveal_counterparty_key_linkage<'life0, 'life1, 'async_trait>(
&'life0 self,
args: RevealCounterpartyKeyLinkageArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<RevealCounterpartyKeyLinkageResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn reveal_specific_key_linkage<'life0, 'life1, 'async_trait>(
&'life0 self,
args: RevealSpecificKeyLinkageArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<RevealSpecificKeyLinkageResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn encrypt<'life0, 'life1, 'async_trait>(
&'life0 self,
args: EncryptArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<EncryptResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn decrypt<'life0, 'life1, 'async_trait>(
&'life0 self,
args: DecryptArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<DecryptResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn create_hmac<'life0, 'life1, 'async_trait>(
&'life0 self,
args: CreateHmacArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<CreateHmacResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn verify_hmac<'life0, 'life1, 'async_trait>(
&'life0 self,
args: VerifyHmacArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<VerifyHmacResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn create_signature<'life0, 'life1, 'async_trait>(
&'life0 self,
args: CreateSignatureArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<CreateSignatureResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn verify_signature<'life0, 'life1, 'async_trait>(
&'life0 self,
args: VerifySignatureArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<VerifySignatureResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn acquire_certificate<'life0, 'life1, 'async_trait>(
&'life0 self,
args: AcquireCertificateArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Certificate, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_certificates<'life0, 'life1, 'async_trait>(
&'life0 self,
args: ListCertificatesArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<ListCertificatesResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn prove_certificate<'life0, 'life1, 'async_trait>(
&'life0 self,
args: ProveCertificateArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<ProveCertificateResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn relinquish_certificate<'life0, 'life1, 'async_trait>(
&'life0 self,
args: RelinquishCertificateArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<RelinquishCertificateResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn discover_by_identity_key<'life0, 'life1, 'async_trait>(
&'life0 self,
args: DiscoverByIdentityKeyArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<DiscoverCertificatesResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn discover_by_attributes<'life0, 'life1, 'async_trait>(
&'life0 self,
args: DiscoverByAttributesArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<DiscoverCertificatesResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn is_authenticated<'life0, 'life1, 'async_trait>(
&'life0 self,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<AuthenticatedResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn wait_for_authentication<'life0, 'life1, 'async_trait>(
&'life0 self,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<AuthenticatedResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_height<'life0, 'life1, 'async_trait>(
&'life0 self,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<GetHeightResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_header_for_height<'life0, 'life1, 'async_trait>(
&'life0 self,
args: GetHeaderArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<GetHeaderResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_network<'life0, 'life1, 'async_trait>(
&'life0 self,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<GetNetworkResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_version<'life0, 'life1, 'async_trait>(
&'life0 self,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<GetVersionResult, WalletError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
The core wallet interface with all 28 async methods.
Uses #[async_trait] for object safety – supports both static dispatch
(W: WalletInterface) and dynamic dispatch (dyn WalletInterface).
Every method takes originator: Option<&str> as the last parameter,
identifying the calling application domain.
Required Methods§
fn create_action<'life0, 'life1, 'async_trait>(
&'life0 self,
args: CreateActionArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<CreateActionResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sign_action<'life0, 'life1, 'async_trait>(
&'life0 self,
args: SignActionArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<SignActionResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn abort_action<'life0, 'life1, 'async_trait>(
&'life0 self,
args: AbortActionArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<AbortActionResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_actions<'life0, 'life1, 'async_trait>(
&'life0 self,
args: ListActionsArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<ListActionsResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn internalize_action<'life0, 'life1, 'async_trait>(
&'life0 self,
args: InternalizeActionArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<InternalizeActionResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_outputs<'life0, 'life1, 'async_trait>(
&'life0 self,
args: ListOutputsArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<ListOutputsResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn relinquish_output<'life0, 'life1, 'async_trait>(
&'life0 self,
args: RelinquishOutputArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<RelinquishOutputResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_public_key<'life0, 'life1, 'async_trait>(
&'life0 self,
args: GetPublicKeyArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<GetPublicKeyResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn reveal_counterparty_key_linkage<'life0, 'life1, 'async_trait>(
&'life0 self,
args: RevealCounterpartyKeyLinkageArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<RevealCounterpartyKeyLinkageResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn reveal_specific_key_linkage<'life0, 'life1, 'async_trait>(
&'life0 self,
args: RevealSpecificKeyLinkageArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<RevealSpecificKeyLinkageResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn encrypt<'life0, 'life1, 'async_trait>(
&'life0 self,
args: EncryptArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<EncryptResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn decrypt<'life0, 'life1, 'async_trait>(
&'life0 self,
args: DecryptArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<DecryptResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_hmac<'life0, 'life1, 'async_trait>(
&'life0 self,
args: CreateHmacArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<CreateHmacResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn verify_hmac<'life0, 'life1, 'async_trait>(
&'life0 self,
args: VerifyHmacArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<VerifyHmacResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_signature<'life0, 'life1, 'async_trait>(
&'life0 self,
args: CreateSignatureArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<CreateSignatureResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn verify_signature<'life0, 'life1, 'async_trait>(
&'life0 self,
args: VerifySignatureArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<VerifySignatureResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn acquire_certificate<'life0, 'life1, 'async_trait>(
&'life0 self,
args: AcquireCertificateArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Certificate, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_certificates<'life0, 'life1, 'async_trait>(
&'life0 self,
args: ListCertificatesArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<ListCertificatesResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn prove_certificate<'life0, 'life1, 'async_trait>(
&'life0 self,
args: ProveCertificateArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<ProveCertificateResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn relinquish_certificate<'life0, 'life1, 'async_trait>(
&'life0 self,
args: RelinquishCertificateArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<RelinquishCertificateResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn discover_by_identity_key<'life0, 'life1, 'async_trait>(
&'life0 self,
args: DiscoverByIdentityKeyArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<DiscoverCertificatesResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn discover_by_attributes<'life0, 'life1, 'async_trait>(
&'life0 self,
args: DiscoverByAttributesArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<DiscoverCertificatesResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_authenticated<'life0, 'life1, 'async_trait>(
&'life0 self,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<AuthenticatedResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn wait_for_authentication<'life0, 'life1, 'async_trait>(
&'life0 self,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<AuthenticatedResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_height<'life0, 'life1, 'async_trait>(
&'life0 self,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<GetHeightResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_header_for_height<'life0, 'life1, 'async_trait>(
&'life0 self,
args: GetHeaderArgs,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<GetHeaderResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_network<'life0, 'life1, 'async_trait>(
&'life0 self,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<GetNetworkResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_version<'life0, 'life1, 'async_trait>(
&'life0 self,
originator: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<GetVersionResult, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<W: WalletInterface + ?Sized> WalletInterface for Arc<W>
Blanket impl so Arc<W> is itself a WalletInterface.
impl<W: WalletInterface + ?Sized> WalletInterface for Arc<W>
Blanket impl so Arc<W> is itself a WalletInterface.
§Why this exists
In the TS SDK a wallet is passed by reference — new AuthFetch(wallet)
imposes nothing on the caller. The Rust translation of that call site is
AuthFetch<W: WalletInterface + Clone + 'static>, and the natural wallet to
hand it, ProtoWallet, is not
Clone: its KeyDeriver owns an RwLock shared-secret cache, and that
type’s own documentation says it is “Send + Sync, safe to share via
Arc”. Arc-sharing is the intended mechanism; the Clone bound was the
only thing standing between callers and it.
Without this impl every consumer writes the same newtype-over-Arc plus a
28-method delegation block just to satisfy the bound. That happened three
separate times in one downstream repo alone — ~750 lines of pure ceremony,
none of it copy-paste drift, all of it patching this one gap.
With it, Arc<ProtoWallet> satisfies WalletInterface + Clone directly and
those wrappers delete. No existing impl changes meaning: a type that was
already WalletInterface + Clone keeps working exactly as before.