Wallet class abstract

Base interface for all wallet types Provides common properties and methods that all wallets must implement

Implementers
Available extensions

Constructors

Wallet({required String id, required String name, required WalletType type, required Set<String> supportedUnits, required Map<String, dynamic> metadata})

Properties

canReceive → bool
Indicates if the wallet can receive funds
no setter
canSend → bool
Indicates if the wallet can send funds
no setter
hashCode → int
The hash code for this object.
no setteroverride
id → String
Local wallet identifier
final
metadata → Map<String, dynamic>
Metadata for storing wallet-specific information e.g., mintUrl for Cashu, nwcUrl for NWC
final
name ↔ String
User-defined name for the wallet
getter/setter pair
receivePaymentProtocols → Set<WalletPaymentProtocol>
Payment protocols this wallet can receive.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sendPaymentProtocols → Set<WalletPaymentProtocol>
Payment protocols this wallet can send.
no setter
supportedUnits → Set<String>
Supported currency units (sat, usd, etc.)
final
supportsBip321Pay → bool
Whether this wallet can use the NWC-321/BIP-321 pay operation.
no setter
supportsBip321Receive → bool
Whether this wallet can use the NWC-321/BIP-321 receive operation.
no setter
supportsBolt11InvoicePay → bool
Whether this wallet can directly pay a BOLT11 invoice.
no setter
supportsBolt11InvoiceReceive → bool
Whether this wallet can directly create a BOLT11 invoice.
no setter
type → WalletType
The type of wallet (NWC, Cashu, etc.)
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJsonForStorage() → Map<String, Object?>

Available on Wallet, provided by the WalletExtension extension

toMetadata() → Map<String, dynamic>
Converts wallet data to metadata map for storage Each implementation must define how it serializes to metadata
toString() → String
A string representation of this object.
inherited

Operators

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