OptionalautoAutomatically unlock the wallet, tokens and history as they load
A couch used to keep tokens safe during multi-step operations
OptionaldecryptionAn optional persistent cache of decrypted event content keyed by event id. When provided, the wallet restores encrypted content from the cache before decrypting and persists newly decrypted content back to it, avoiding repeated expensive NIP-44 decryptions across sessions.
The event store that holds all wallet, token and history events
OptionalloggerA custom debug logger (defaults to the "applesauce:nut-wallet" namespace)
The relay pool used for loading, syncing and publishing wallet events
The pubkey of the wallet owner
OptionalrelaysOverride the relay set used for loading and publishing. When omitted, the relays are derived from the wallet's own relay list plus the user's outbox relays.
A signer used to sign events and decrypt the wallet (must support NIP-44 to unlock)
OptionaluseWhether to load, subscribe to and publish NIP-09 delete events for the wallet's events (default false).
When false the wallet completely ignores kind-5 delete events: the loader never fetches or subscribes to
them (so the event store never applies a delete to a wallet, token or history event), and
spend/rollover/consolidate operations rely on each new token event's del field to reconcile the balance
instead of publishing a delete. NutWallet.cleanupDeletedTokens still publishes a delete event when
called explicitly. The publishing half can be toggled at runtime with NutWallet.setUseDeleteEvents;
the loading half is fixed when the wallet starts and only changes on the next NutWallet.resync.
Options for constructing a NutWallet