Wallet class

A user's wallet built from a verified credential. chain is the SDK chain code; instance methods use this wallet's bound signer.

Constructors

Wallet({required String id, required String chain, required String address, DynamicClient? client, required bool isEmbedded, required String walletProviderKey, WalletSigner? signer})
const

Properties

address → String
final
chain → String
final
client → DynamicClient?
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
isEmbedded → bool
Whether walletProvider is embeddedWallet. Determines signer selection independently of installed extensions.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
signer → WalletSigner?
The signer bound to this wallet when it was built. Null when no WalletSigner is installed on the client it came from (call useWaas()).
final
walletProviderKey → String
Raw walletProvider value, or an empty string when absent. Identifies providers such as turnkey for migration.
final

Methods

exportPrivateKey() → Future<void>
Reveals this wallet's private key to the user via whatever ExportPrivateKeyCapability is installed on the client it was built from (useExportPrivateKey(...) — see that capability's docstring for the exact UX contract: a visible, screenshot-protected reveal the user must explicitly dismiss, never surfaced to this SDK or its host app). PRECONDITION: same single-implementation caveat as signMessage — see that method's doc; today there is exactly one ExportPrivateKeyCapability implementation (ExportPrivateKeyExtension), so this is safe.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
signMessage(String message) → Future<String>
Signs message with this wallet, through the signer bound to it when it was built (WaaS today). Fails when no WalletSigner was installed on the client this wallet came from — see signer.
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromJson(Map<String, dynamic> json) → Wallet