pub struct DynamicWalletClient { /* private fields */ }Expand description
Top-level WaaS client. Authenticate once, then pass it around. All
per-wallet state is supplied explicitly to each method.
Implementations§
Source§impl DynamicWalletClient
impl DynamicWalletClient
Sourcepub fn new(opts: DynamicWalletClientOpts) -> Result<Self>
pub fn new(opts: DynamicWalletClientOpts) -> Result<Self>
Construct a fresh, unauthenticated client. Call
authenticate_api_token before any operation.
pub fn environment_id(&self) -> &str
pub fn is_authenticated(&self) -> bool
Sourcepub async fn authenticate_api_token(&mut self, auth_token: &str) -> Result<()>
pub async fn authenticate_api_token(&mut self, auth_token: &str) -> Result<()>
Exchange the customer-provided API token for a JWT and store it on the inner API client. All subsequent calls are authenticated.
Mirrors python/dynamic_wallet_sdk/wallet_client.py:authenticate_api_token.
Sourcepub async fn fetch_wallet_metadata(
&self,
account_address: &str,
) -> Result<WalletProperties>
pub async fn fetch_wallet_metadata( &self, account_address: &str, ) -> Result<WalletProperties>
Cold-path identity lookup by wallet address. Returns
identity-only WalletProperties — external_server_key_shares_backup_info
is None.
Operations that require backup info will return
Error::StaleWalletProperties if you bootstrap from this method
alone. Customers must persist the FULL WalletProperties returned
by create_wallet_account / import_private_key.