Wallet class abstract

Implementers

Constructors

Wallet()

Properties

autoSaveInterval Duration
Configurable interval used when startAutoSaving is called.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
pollingInterval Duration
Should only be set to seconds.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(WalletListener listener) → void
Add a WalletListener to the wallet.
amountFromString(String value) Future<BigInt?>
Convert a decimal amount string to atomic units. Returns null on invalid string format.
changePassword(String newPassword) Future<bool>
Change the password of the wallet
checkAndProcessInputs({required List<Output> inputs, required BigInt sendAmount, required bool sweep}) Future<List<String>>
Do not use this outside this library.
close({bool save = false}) Future<void>
Close the wallet. If save is true, save will be called before closing.
commitTx(PendingTransaction tx) Future<bool>
Commit/broadcast a transaction to the network.
connect({required String daemonAddress, required bool trusted, String? daemonUsername, String? daemonPassword, bool useSSL = false, bool isLightWallet = false, String? socksProxyAddress}) Future<bool>
Initialize and connect to a daemon.
createTx({required Recipient output, required TransactionPriority priority, required int accountIndex, List<Output>? preferredInputs, String paymentId = "", bool sweep = false}) Future<PendingTransaction>
Create a single recipient transaction.
createTxMultiDest({required List<Recipient> outputs, required TransactionPriority priority, required int accountIndex, String paymentId = "", List<Output>? preferredInputs, bool sweep = false}) Future<PendingTransaction>
Create a multi recipient transaction.
estimateFee(TransactionPriority priority, int amount) Future<int>
Rough fee estimation
exportKeyImages({required String filename, bool all = false}) Future<bool>
freezeOutput(String keyImage) Future<void>
Freeze an output given it's keyImage. Renders the output un-spendable.
getAddress({int accountIndex = 0, int addressIndex = 0}) Future<Address>
Returns a receiving address given an accountIndex and subaddressIndex. If the addressIndex is zero, the main address for the given accountIndex will be returned.
getAllTxids({bool refresh = false}) Future<List<String>>
Returns all wallet transaction ids
getAllTxs({bool refresh = false}) Future<List<Transaction>>
getBalance({int accountIndex = 0}) Future<BigInt>
Returns the wallet's full balance in atomic units.
getBlockChainHeightByDate(DateTime date) int
Returns a rough height estimate for a given date.
getCurrentWalletSyncingHeight() Future<int>
Returns the current block height of the wallet. Anything less than the getDaemonHeight value (+/- 1) likely indicates the wallet is not fully synced.
getDaemonHeight() Future<int>
Returns the current chain height as seen by the connected daemon.
getListeners() List<WalletListener>
Returns all WalletListeners.
getOutputs({bool includeSpent = false, bool refresh = false}) Future<List<Output>>
Returns all known wallet outputs. Use the includeSpent flag to ignore used outputs if desired. Setting refresh to true will ensure the internal outputs state is refreshed before fetching.
getPassword() Future<String>
Returns the wallet password.
getPath() Future<String>
Returns the location where the wallet files are stored.
getPrivateSpendKey() Future<String>
Returns the private spend key for the wallet.
getPrivateViewKey() Future<String>
Returns the private view key for the wallet.
getPublicSpendKey() Future<String>
Returns the public spend key for the wallet.
getPublicViewKey() Future<String>
Returns the public view key for the wallet.
getRefreshFromBlockHeight() Future<int>
Returns the height of the wallet used for rescanning/refreshing.
getSeed({String seedOffset = ""}) Future<String>
Returns the seed phrase (mnemonic) of the wallet.
getSeedLanguage() Future<String>
Returns the language of the seed phrase (mnemonic).
getTx(String txid, {bool refresh = false}) Future<Transaction>
Returns a transaction given it's txid/hash
getTxKey(String txid) Future<String>
getTxs({required Set<String> txids, bool refresh = false}) Future<List<Transaction>>
Returns transactions matching the given set of txids
getUnlockedBalance({int accountIndex = 0}) Future<BigInt>
Returns the wallet's unlocked balance in atomic units.
importKeyImages({required String filename}) Future<bool>
isClosed() bool
A flag to check if the wallet is closed.
isConnectedToDaemon() Future<bool>
Returns true if the wallet has an active daemon connection.
isSynced() Future<bool>
Returns true if the wallet is fully synced
isViewOnly() Future<bool>
Returns true if the wallet is a view only wallet.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
postProcessInputs({required List<String> keyImages}) Future<void>
Do not use this outside this library.
refreshOutputs() Future<void>
refreshTransactions() Future<void>
removeListener(WalletListener listener) → void
Remove a WalletListener from the wallet.
rescanBlockchain() Future<void>
Rescans the wallet from getRefreshFromBlockHeight. Rescan is async inception. This only starts it and it will continue to scan after this future completes.
save() Future<void>
Saves the current state of the wallet to disk.
setRefreshFromBlockHeight(int startHeight) Future<void>
Set the height of the wallet used for rescanning/refreshing.
signMessage(String message, String address) Future<String>
Sign a message
startAutoSaving() → void
Start periodically calling save
startListeners() Future<void>
Start polling the wallet. WalletListener objects added to this wallet using addListener will have their callbacks triggered here as appropriate.
startSyncing({Duration interval = const Duration(seconds: 20)}) Future<void>
Sets the auto refresh interval and starts refreshing/syncing.
stopAutoSaving() → void
Stop periodically calling save.
stopListeners() Future<void>
Stop polling the wallet, effectively stopping all listeners.
stopSyncing() Future<void>
Stop syncing/refreshing
thawOutput(String keyImage) Future<void>
Un freeze a frozen output.
toString() String
A string representation of this object.
inherited
transactionCount() Future<int>
validateAddress(String address, {required Network networkType}) Future<bool>
validate an address
verifyMessage(String message, String address, String signature) Future<bool>
Verify a signed message

Operators

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