MoneroWallet class

Inheritance

Properties

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

Methods

addListener(WalletListener listener) → void
Add a WalletListener to the wallet.
inherited
amountFromString(String value) Future<BigInt?>
Convert a decimal amount string to atomic units. Returns null on invalid string format.
override
changePassword(String newPassword) Future<bool>
Change the password of the wallet
override
checkAndProcessInputs({required List<Output> inputs, required BigInt sendAmount, required bool sweep}) Future<List<String>>
Do not use this outside this library.
inherited
close({bool save = false}) Future<void>
Close the wallet. If save is true, save will be called before closing.
override
commitTx(PendingTransaction tx) Future<bool>
Commit/broadcast a transaction to the network.
override
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.
override
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.
override
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.
override
estimateFee(TransactionPriority priority, int amount) Future<int>
Rough fee estimation
inherited
exportKeyImages({required String filename, bool all = false}) Future<bool>
override
freezeOutput(String keyImage) Future<void>
Freeze an output given it's keyImage. Renders the output un-spendable.
override
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.
override
getAllTxids({bool refresh = false}) Future<List<String>>
Returns all wallet transaction ids
override
getAllTxs({bool refresh = false}) Future<List<Transaction>>
override
getBalance({int accountIndex = 0}) Future<BigInt>
Returns the wallet's full balance in atomic units.
override
getBlockChainHeightByDate(DateTime date) int
Returns a rough height estimate for a given date.
override
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.
override
getDaemonHeight() Future<int>
Returns the current chain height as seen by the connected daemon.
override
getListeners() List<WalletListener>
Returns all WalletListeners.
inherited
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.
override
getPassword() Future<String>
Returns the wallet password.
override
getPath() Future<String>
Returns the location where the wallet files are stored.
override
getPrivateSpendKey() Future<String>
Returns the private spend key for the wallet.
override
getPrivateViewKey() Future<String>
Returns the private view key for the wallet.
override
getPublicSpendKey() Future<String>
Returns the public spend key for the wallet.
override
getPublicViewKey() Future<String>
Returns the public view key for the wallet.
override
getRefreshFromBlockHeight() Future<int>
Returns the height of the wallet used for rescanning/refreshing.
override
getSeed({String seedOffset = ""}) Future<String>
Returns the seed phrase (mnemonic) of the wallet.
override
getSeedLanguage() Future<String>
Returns the language of the seed phrase (mnemonic).
override
getTx(String txid, {bool refresh = false}) Future<Transaction>
Returns a transaction given it's txid/hash
override
getTxKey(String txid) Future<String>
override
getTxs({required Set<String> txids, bool refresh = false}) Future<List<Transaction>>
Returns transactions matching the given set of txids
override
getUnlockedBalance({int accountIndex = 0}) Future<BigInt>
Returns the wallet's unlocked balance in atomic units.
override
importKeyImages({required String filename}) Future<bool>
override
isClosed() bool
A flag to check if the wallet is closed.
override
isConnectedToDaemon() Future<bool>
Returns true if the wallet has an active daemon connection.
override
isSynced() Future<bool>
Returns true if the wallet is fully synced
override
isViewOnly() Future<bool>
Returns true if the wallet is a view only wallet.
override
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.
inherited
refreshOutputs() Future<void>
override
refreshTransactions() Future<void>
override
removeListener(WalletListener listener) → void
Remove a WalletListener from the wallet.
inherited
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.
override
save() Future<void>
Saves the current state of the wallet to disk.
override
setRefreshFromBlockHeight(int startHeight) Future<void>
Set the height of the wallet used for rescanning/refreshing.
override
signMessage(String message, String address) Future<String>
Sign a message
override
startAutoSaving() → void
Start periodically calling save
inherited
startListeners() Future<void>
Start polling the wallet. WalletListener objects added to this wallet using addListener will have their callbacks triggered here as appropriate.
override
startSyncing({Duration interval = const Duration(seconds: 10)}) Future<void>
Sets the auto refresh interval and starts refreshing/syncing.
override
stopAutoSaving() → void
Stop periodically calling save.
inherited
stopListeners() Future<void>
Stop polling the wallet, effectively stopping all listeners.
override
stopSyncing() Future<void>
Stop syncing/refreshing
override
thawOutput(String keyImage) Future<void>
Un freeze a frozen output.
override
toString() String
A string representation of this object.
inherited
transactionCount() Future<int>
override
validateAddress(String address, {required Network networkType}) Future<bool>
validate an address
override
verifyMessage(String message, String address, String signature) Future<bool>
Verify a signed message
override

Operators

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

Static Methods

create({required String path, required String password, String language = "English", required MoneroSeedType seedType, required Network networkType, String seedOffset = ""}) Future<MoneroWallet>
Creates a new Monero wallet with the specified parameters and seed type.
createViewOnlyWallet({required String path, required String password, required String address, required String viewKey, required Network networkType, int restoreHeight = 0}) Future<MoneroWallet>
Creates a view-only Monero wallet.
isWalletExist(String path) bool
loadWallet({required String path, required String password, required Network networkType}) Future<MoneroWallet>
Loads an existing Monero wallet from the specified path with the provided password.
restoreDeterministicWalletFromSpendKey({required String path, required String password, required String language, required String spendKey, required Network networkType, int restoreHeight = 0}) Future<MoneroWallet>
Restores a Monero wallet and creates a seed from a private spend key.
restoreWalletFromKeys({required String path, required String password, required String language, required String address, required String viewKey, required String spendKey, required Network networkType, int restoreHeight = 0}) Future<MoneroWallet>
Restores a Monero wallet from private keys and address.
restoreWalletFromSeed({required String path, required String password, required String seed, required Network networkType, int restoreHeight = 0, String seedOffset = ""}) Future<MoneroWallet>
Restores a Monero wallet from a mnemonic seed phrase.