Interface: MoneroWallet

MoneroWallet

Monero wallet interface and default implementations.

Methods

(async) addAddressBookEntry(address, description) → {int}

Add an address book entry.
Parameters:
Name Type Description
address string entry address
description string entry description (optional)
Source:
Returns:
the index of the added entry
Type
int

(async) checkReserveProof(address, message, signature) → {MoneroCheckReserve}

Proves a wallet has a disposable reserve using a signature.
Parameters:
Name Type Description
address string public wallet address
message string message included with the signature to further authenticate the proof (optional)
signature string reserve proof signature to check
Source:
Returns:
the result of checking the signature proof
Type
MoneroCheckReserve

(async) checkSpendProof(txHash, message, signature) → {boolean}

Prove a spend using a signature. Unlike proving a transaction, it does not require the destination public address.
Parameters:
Name Type Description
txHash string transaction to prove
message string message included with the signature to further authenticate the proof (optional)
signature string transaction signature to confirm
Source:
Returns:
true if the signature is good, false otherwise
Type
boolean

(async) checkTxKey(txHash, txKey, address) → {MoneroCheckTx}

Check a transaction in the blockchain with its secret key.
Parameters:
Name Type Description
txHash string transaction to check
txKey string transaction's secret key
address string destination public address of the transaction
Source:
Returns:
the result of the check
Type
MoneroCheckTx

(async) checkTxProof(txHash, address, message, signature) → {MoneroCheckTx}

Prove a transaction by checking its signature.
Parameters:
Name Type Description
txHash string transaction to prove
address string destination public address of the transaction
message string message included with the signature to further authenticate the proof (optional)
signature string transaction signature to confirm
Source:
Returns:
the result of the check
Type
MoneroCheckTx

(async) close(save)

Optionally save then close the wallet.
Parameters:
Name Type Description
save boolean specifies if the wallet should be saved before being closed (default false)
Source:

(async) createAccount(label) → {MoneroAccount}

Create a new account with a label for the first subaddress.
Parameters:
Name Type Description
label string label for account's first subaddress (optional)
Source:
Returns:
the created account
Type
MoneroAccount

(async) createPaymentUri(config) → {string}

Creates a payment URI from a send configuration.
Parameters:
Name Type Description
config MoneroTxConfig specifies configuration for a potential tx
Source:
Returns:
the payment uri
Type
string

(async) createSubaddress(accountIdx, label) → {MoneroSubaddress}

Create a subaddress within an account.
Parameters:
Name Type Description
accountIdx int index of the account to create the subaddress within
label string the label for the subaddress (optional)
Source:
Returns:
the created subaddress
Type
MoneroSubaddress

(async) createTx(config) → {MoneroTxWallet}

Create a transaction to transfer funds from this wallet.
Parameters:
Name Type Description
config MoneroTxConfig | object configures the transaction to create (required)
Properties
Name Type Description
address string single destination address (required unless `destinations` provided)
amount BigInteger | string single destination amount (required unless `destinations` provided)
accountIndex int source account index to transfer funds from (required)
subaddressIndex int source subaddress index to transfer funds from (optional)
subaddressIndices Array.<int> source subaddress indices to transfer funds from (optional)
relay boolean relay the transaction to peers to commit to the blockchain (default false)
priority MoneroTxPriority transaction priority (default MoneroTxPriority.NORMAL)
destinations Array.<MoneroDestination> addresses and amounts in a multi-destination tx (required unless `address` and `amount` provided)
paymentId string transaction payment ID (optional)
unlockHeight int minimum height for the transaction to unlock (default 0)
Source:
Returns:
the created transaction
Type
MoneroTxWallet

(async) createTxs(config) → {Array.<MoneroTxWallet>}

Create one or more transactions to transfer funds from this wallet.
Parameters:
Name Type Description
config MoneroTxConfig | object configures the transactions to create (required)
Properties
Name Type Description
address string single destination address (required unless `destinations` provided)
amount BigInteger | string single destination amount (required unless `destinations` provided)
accountIndex int source account index to transfer funds from (required)
subaddressIndex int source subaddress index to transfer funds from (optional)
subaddressIndices Array.<int> source subaddress indices to transfer funds from (optional)
relay boolean relay the transactions to peers to commit to the blockchain (default false)
priority MoneroTxPriority transaction priority (default MoneroTxPriority.NORMAL)
destinations Array.<MoneroDestination> addresses and amounts in a multi-destination tx (required unless `address` and `amount` provided)
paymentId string transaction payment ID (optional)
unlockHeight int minimum height for the transactions to unlock (default 0)
canSplit boolean allow funds to be transferred using multiple transactions (default true)
Source:
Returns:
the created transactions
Type
Array.<MoneroTxWallet>

(async) decodeIntegratedAddress(integratedAddress) → {MoneroIntegratedAddress}

Decode an integrated address to get its standard address and payment id.
Parameters:
Name Type Description
integratedAddress string integrated address to decode
Source:
Returns:
the decoded integrated address including standard address and payment id
Type
MoneroIntegratedAddress

(async) deleteAddressBookEntry(entryIdx)

Delete an address book entry.
Parameters:
Name Type Description
entryIdx int index of the entry to delete
Source:

(async) editAddressBookEntry(index, setAddress, address, setDescription, description)

Edit an address book entry.
Parameters:
Name Type Description
index number index of the address book entry to edit
setAddress boolean specifies if the address should be updated
address string updated address
setDescription boolean specifies if the description should be updated
description string updated description
Source:

(async) exchangeMultisigKeys(multisigHexes, password) → {MoneroMultisigInitResult}

Exchange multisig hex with participants in a M/N multisig wallet. This process must be repeated with participants exactly N-M times.
Parameters:
Name Type Description
multisigHexes Array.<string> are multisig hex from each participant
password string wallet's password // TODO monero core: redundant? wallet is created with password
Source:
Returns:
the result which has the multisig's address xor this wallet's multisig hex to share with participants iff not done
Type
MoneroMultisigInitResult

(async) getAccount(accountIdx, includeSubaddresses) → {MoneroAccount}

Get an account.
Parameters:
Name Type Description
accountIdx int index of the account to get
includeSubaddresses boolean include subaddresses if true
Source:
Returns:
the retrieved account
Type
MoneroAccount

(async) getAccounts(includeSubaddresses, tag) → {Array.<MoneroAccount>}

Get accounts with a given tag.
Parameters:
Name Type Description
includeSubaddresses boolean include subaddresses if true
tag string tag for filtering accounts, all accounts if undefined
Source:
Returns:
all accounts with the given tag
Type
Array.<MoneroAccount>

(async) getAccountTags() → {Array.<MoneroAccountTag>}

Return all account tags.
Source:
Returns:
the wallet's account tags
Type
Array.<MoneroAccountTag>

(async) getAddress(accountIdx, subaddressIdx) → {string}

Get the address of a specific subaddress.
Parameters:
Name Type Description
accountIdx int the account index of the address's subaddress
subaddressIdx int the subaddress index within the account
Source:
Returns:
the receive address of the specified subaddress
Type
string

(async) getAddressBookEntries(entryIndices) → {Array.<MoneroAddressBookEntry>}

Get address book entries.
Parameters:
Name Type Description
entryIndices Array.<int> indices of the entries to get
Source:
Returns:
the address book entries
Type
Array.<MoneroAddressBookEntry>

(async) getAddressIndex(address) → {MoneroSubaddress}

Get the account and subaddress index of the given address.
Parameters:
Name Type Description
address string address to get the account and subaddress index from
Source:
Returns:
the account and subaddress indices
Type
MoneroSubaddress

(async) getAttribute(key) → {string}

Get an attribute.
Parameters:
Name Type Description
key string attribute to get the value of
Source:
Returns:
the attribute's value
Type
string

(async) getBalance(accountIdx, subaddressIdx) → {BigInteger}

Get the balance of the wallet, account, or subaddress.
Parameters:
Name Type Description
accountIdx int index of the account to get the balance of (optional)
subaddressIdx int index of the subaddress to get the balance of (optional)
Source:
Returns:
the balance of the wallet, account, or subaddress
Type
BigInteger

(async) getDaemonConnection() → {MoneroRpcConnection}

Get the wallet's daemon connection.
Source:
Returns:
the wallet's daemon connection
Type
MoneroRpcConnection

(async) getDaemonHeight() → {int}

Get the blockchain's height.
Source:
Returns:
the blockchain's height
Type
int

(async) getHeight() → {int}

Get the height of the last block processed by the wallet (its index + 1).
Source:
Returns:
the height of the last block processed by the wallet
Type
int

(async) getHeightByDate(year, month, day)

Get the blockchain's height by date as a conservative estimate for scanning.
Parameters:
Name Type Description
year int year of the height to get
month int month of the height to get as a number between 1 and 12
day int day of the height to get as a number between 1 and 31
Source:
Returns:
the blockchain's approximate height at the given date

(async) getIncomingTransfers(query) → {Array.<MoneroIncomingTransfer>}

Get all of the wallet's incoming transfers.
Parameters:
Name Type Description
query passed to getTransfers() with isIncoming=true
Source:
Returns:
the wallet's incoming transfers
Type
Array.<MoneroIncomingTransfer>

(async) getIntegratedAddress(paymentId) → {MoneroIntegratedAddress}

Get an integrated address based on this wallet's primary address and the given payment ID. Generates a random payment ID if none is given.
Parameters:
Name Type Description
paymentId string payment ID to generate an integrated address from (randomly generated if undefined)
Source:
Returns:
the integrated address
Type
MoneroIntegratedAddress

(async) getKeyImages() → {Array.<MoneroKeyImage>}

Get all signed key images.
Source:
Returns:
the wallet's signed key images
Type
Array.<MoneroKeyImage>

(async) getMnemonic() → {string}

Get the wallet's mnemonic phrase derived from the seed.
Source:
Returns:
the wallet's mnemonic phrase
Type
string

(async) getMnemonicLanguage() → {string}

Get the language of the wallet's mnemonic phrase.
Source:
Returns:
the language of the wallet's mnemonic phrase
Type
string

(async) getMultisigHex() → {string}

Export this wallet's multisig info as hex for other participants.
Source:
Returns:
this wallet's multisig info as hex for other participants
Type
string

(async) getMultisigInfo() → {MoneroMultisigInfo}

Get multisig info about this wallet.
Source:
Returns:
multisig info about this wallet
Type
MoneroMultisigInfo

(async) getNewKeyImagesFromLastImport() → {Array.<MoneroKeyImage>}

Get new key images from the last imported outputs.
Source:
Returns:
the key images from the last imported outputs
Type
Array.<MoneroKeyImage>

(async) getOutgoingTransfers(query) → {Array.<MoneroOutgoingTransfer>}

Get all of the wallet's outgoing transfers.
Parameters:
Name Type Description
query passed to getTransfers() with isOutgoing=true
Source:
Returns:
the wallet's outgoing transfers
Type
Array.<MoneroOutgoingTransfer>

(async) getOutputs(query) → {Array.<MoneroOutputWallet>}

Get outputs created from previous transactions that belong to the wallet (i.e. that the wallet can spend one time). Outputs are part of transactions which are stored in blocks on the blockchain.

Results can be filtered by passing a query object. Outputs must meet every criteria defined in the query in order to be returned. All filtering is optional and no filtering is applied when not defined.

Parameters:
Name Type Description
query MoneroOutputQuery | object configures the query (optional)
Properties
Name Type Description
accountIndex int get outputs associated with a specific account index (optional)
subaddressIndex int get outputs associated with a specific subaddress index (optional)
subaddressIndices Array.<int> get outputs associated with specific subaddress indices (optional)
amount BigInteger get outputs with a specific amount (optional)
minAmount BigInteger get outputs greater than or equal to a minimum amount (optional)
maxAmount BigInteger get outputs less than or equal to a maximum amount (optional)
isSpent boolean get outputs that are spent or not (optional)
keyImage string | MoneroKeyImage get output with a key image or which matches fields defined in a MoneroKeyImage (optional)
txQuery MoneroTxQuery get outputs whose transaction meets this filter (optional)
Source:
Returns:
are queried outputs
Type
Array.<MoneroOutputWallet>

(async) getOutputsHex() → {string}

Export all outputs in hex format.
Source:
Returns:
all outputs in hex format, undefined if no outputs
Type
string

(async) getPath() → {string}

Get the wallet's path.
Source:
Returns:
the path the wallet can be opened with
Type
string

(async) getPrimaryAddress() → {string}

Get the wallet's primary address.
Source:
Returns:
the wallet's primary address
Type
string

(async) getPrivateSpendKey() → {string}

Get the wallet's private spend key.
Source:
Returns:
the wallet's private spend key
Type
string

(async) getPrivateViewKey() → {string}

Get the wallet's private view key.
Source:
Returns:
the wallet's private view key
Type
string

(async) getPublicSpendKey() → {string}

Get the wallet's public spend key.
Source:
Returns:
the wallet's public spend key
Type
string

(async) getPublicViewKey() → {string}

Get the wallet's public view key.
Source:
Returns:
the wallet's public view key
Type
string

(async) getReserveProofAccount(accountIdx, amount, message) → {string}

Generate a signature to prove an available amount in an account.
Parameters:
Name Type Description
accountIdx int account to prove ownership of the amount
amount BigInteger minimum amount to prove as available in the account
message string message to include with the signature to further authenticate the proof (optional)
Source:
Returns:
the reserve proof signature
Type
string

(async) getReserveProofWallet(message)

Generate a signature to prove the entire balance of the wallet.
Parameters:
Name Type Description
message message included with the signature to further authenticate the proof (optional)
Source:
Returns:
the reserve proof signature

(async) getSpendProof(txHash, message) → {string}

Generate a signature to prove a spend. Unlike proving a transaction, it does not require the destination public address.
Parameters:
Name Type Description
txHash string transaction to prove
message string message to include with the signature to further authenticate the proof (optional)
Source:
Returns:
the transaction signature
Type
string

(async) getSubaddress(accountIdx, subaddressIdx) → {MoneroSubaddress}

Get a subaddress.
Parameters:
Name Type Description
accountIdx int index of the subaddress's account
subaddressIdx int index of the subaddress within the account
Source:
Returns:
the retrieved subaddress
Type
MoneroSubaddress

(async) getSubaddresses(accountIdx, subaddressIndices) → {Array.<MoneroSubaddress>}

Get subaddresses in an account.
Parameters:
Name Type Description
accountIdx int account to get subaddresses within
subaddressIndices Array.<int> indices of subaddresses to get (optional)
Source:
Returns:
the retrieved subaddresses
Type
Array.<MoneroSubaddress>

(async) getTransfers(query) → {Array.<MoneroTransfer>}

Get incoming and outgoing transfers to and from this wallet. An outgoing transfer represents a total amount sent from one or more subaddresses within an account to individual destination addresses, each with their own amount. An incoming transfer represents a total amount received into a subaddress within an account. Transfers belong to transactions which are stored on the blockchain.

Results can be filtered by passing a query object. Transfers must meet every criteria defined in the query in order to be returned. All criteria are optional and no filtering is applied when not defined.

Parameters:
Name Type Description
query MoneroTransferQuery | object configures the query (optional)
Properties
Name Type Description
isOutgoing boolean get transfers that are outgoing or not (optional)
isIncoming boolean get transfers that are incoming or not (optional)
address string wallet's address that a transfer either originated from (if outgoing) or is destined for (if incoming) (optional)
accountIndex int get transfers that either originated from (if outgoing) or are destined for (if incoming) a specific account index (optional)
subaddressIndex int get transfers that either originated from (if outgoing) or are destined for (if incoming) a specific subaddress index (optional)
subaddressIndices Array.<int> get transfers that either originated from (if outgoing) or are destined for (if incoming) specific subaddress indices (optional)
amount BigInteger amount being transferred (optional)
destinations Array.<MoneroDestination> individual destinations of an outgoing transfer, which is local wallet data and NOT recoverable from the blockchain (optional)
hasDestinations boolean get transfers that have destinations or not (optional)
txQuery MoneroTxQuery get transfers whose transaction meets this query (optional)
Source:
Returns:
are wallet transfers per the configuration
Type
Array.<MoneroTransfer>

(async) getTx(txHash) → {MoneroTxWallet}

Get a wallet transaction by hash.
Parameters:
Name Type Description
txHash string hash of a transaction to get
Source:
Returns:
the identified transactions
Type
MoneroTxWallet

(async) getTxKey(txHash) → {string}

Get a transaction's secret key from its hash.
Parameters:
Name Type Description
txHash string transaction's hash
Source:
Returns:
- transaction's secret key
Type
string

(async) getTxNote(txHash) → {string}

Get a transaction note.
Parameters:
Name Type Description
txHash string transaction to get the note of
Source:
Returns:
the tx note
Type
string

(async) getTxNotes(txHashes) → {Array.<string>}

Get notes for multiple transactions.
Parameters:
Name Type Description
txHashes Array.<string> hashes of the transactions to get notes for
Source:
Returns:
notes for the transactions
Type
Array.<string>

(async) getTxProof(txHash, address, message) → {string}

Get a transaction signature to prove it.
Parameters:
Name Type Description
txHash string transaction to prove
address string destination public address of the transaction
message string message to include with the signature to further authenticate the proof (optional)
Source:
Returns:
the transaction signature
Type
string

(async) getTxs(query, missingTxHashes) → {Array.<MoneroTxWallet>}

Get wallet transactions. Wallet transactions contain one or more transfers that are either incoming or outgoing to the wallet.

Results can be filtered by passing a query object. Transactions must meet every criteria defined in the query in order to be returned. All criteria are optional and no filtering is applied when not defined.

Parameters:
Name Type Description
query MoneroTxQuery | Array.<string> | object configures the query (optional)
Properties
Name Type Description
isConfirmed boolean get txs that are confirmed or not (optional)
inTxPool boolean get txs that are in the tx pool or not (optional)
isRelayed boolean get txs that are relayed or not (optional)
isFailed boolean get txs that are failed or not (optional)
isMinerTx boolean get miner txs or not (optional)
hash string get a tx with the hash (optional)
hashes Array.<string> get txs with the hashes (optional)
paymentId string get transactions with the payment id (optional)
paymentIds Array.<string> get transactions with the payment ids (optional)
hasPaymentId boolean get transactions with a payment id or not (optional)
minHeight int get txs with height >= the given height (optional)
maxHeight int get txs with height <= the given height (optional)
isOutgoing boolean get txs with an outgoing transfer or not (optional)
isIncoming boolean get txs with an incoming transfer or not (optional)
transferQuery MoneroTransferQuery get txs that have a transfer that meets this query (optional)
includeOutputs boolean specifies that tx outputs should be returned with tx results (optional)
missingTxHashes Array.<string> populated with hashes of unfound or unmet transactions that were queried by hash (throws error if undefined and queried transaction hashes are unfound or unmet)
Source:
Returns:
wallet transactions per the configuration
Type
Array.<MoneroTxWallet>

(async) getUnlockedBalance(accountIdx, subaddressIdx) → {BigInteger}

Get the unlocked balance of the wallet, account, or subaddress.
Parameters:
Name Type Description
accountIdx int index of the account to get the unlocked balance of (optional)
subaddressIdx int index of the subaddress to get the unlocked balance of (optional)
Source:
Returns:
the unlocked balance of the wallet, account, or subaddress
Type
BigInteger

(async) getVersion() → {MoneroVersion}

Gets the version of the wallet.
Source:
Returns:
the version of the wallet
Type
MoneroVersion

(async) importKeyImages(keyImages) → {MoneroKeyImageImportResult}

Import signed key images and verify their spent status.
Parameters:
Name Type Description
keyImages Array.<MoneroKeyImage> images to import and verify (requires hex and signature)
Source:
Returns:
results of the import
Type
MoneroKeyImageImportResult

(async) importMultisigHex(multisigHexes) → {int}

Import multisig info as hex from other participants.
Parameters:
Name Type Description
multisigHexes Array.<string> multisig hex from each participant
Source:
Returns:
the number of outputs signed with the given multisig hex
Type
int

(async) importOutputsHex(outputsHex) → {int}

Import outputs in hex format.
Parameters:
Name Type Description
outputsHex string outputs in hex format
Source:
Returns:
the number of outputs imported
Type
int

(async) isClosed() → {boolean}

Indicates if this wallet is closed or not.
Source:
Returns:
true if the wallet is closed, false otherwise
Type
boolean

(async) isConnected() → {boolean}

Indicates if the wallet is connected to daemon.
Source:
Returns:
true if the wallet is connected to a daemon, false otherwise
Type
boolean

(async) isMultisig() → {boolean}

Indicates if this wallet is a multisig wallet.
Source:
Returns:
true if this is a multisig wallet, false otherwise
Type
boolean

(async) isMultisigImportNeeded() → {boolean}

Indicates if importing multisig data is needed for returning a correct balance.
Source:
Returns:
true if importing multisig data is needed for returning a correct balance, false otherwise
Type
boolean

(async) isViewOnly() → {bool}

Indicates if the wallet is view-only, meaning it does have the private spend key and can therefore only observe incoming outputs.
Source:
Returns:
true if the wallet is view-only, false otherwise
Type
bool

(async) makeMultisig(multisigHexes, threshold, password) → {MoneroMultisigInitResult}

Make this wallet multisig by importing multisig hex from participants.
Parameters:
Name Type Description
multisigHexes Array.<String> multisig hex from each participant
threshold int number of signatures needed to sign transfers
password string wallet password
Source:
Returns:
the result which has the multisig's address xor this wallet's multisig hex to share with participants iff not N/N
Type
MoneroMultisigInitResult

(async) parsePaymentUri(uri) → {MoneroTxConfig}

Parses a payment URI to a tx config.
Parameters:
Name Type Description
uri string payment uri to parse
Source:
Returns:
the send configuration parsed from the uri
Type
MoneroTxConfig

(async) parseTxSet(txSet) → {MoneroTxSet}

Parse a tx set containing unsigned or multisig tx hex to a new tx set containing structured transactions.
Parameters:
Name Type Description
txSet MoneroTxSet a tx set containing unsigned or multisig tx hex
Source:
Returns:
the parsed tx set containing structured transactions
Type
MoneroTxSet

(async) prepareMultisig() → {string}

Get multisig info as hex to share with participants to begin creating a multisig wallet.
Source:
Returns:
this wallet's multisig hex to share with participants
Type
string

(async) relayTx(txOrMetadata) → {string}

Relay a previously created transaction.
Parameters:
Name Type Description
txOrMetadata MoneroTxWallet | string transaction or its metadata to relay
Source:
Returns:
the hash of the relayed tx
Type
string

(async) relayTxs(txsOrMetadatas) → {Array.<string>}

Relay previously created transactions.
Parameters:
Name Type Description
txsOrMetadatas Array.<MoneroTxWallet> | Array.<string> transactions or their metadata to relay
Source:
Returns:
the hashes of the relayed txs
Type
Array.<string>

(async) rescanBlockchain()

Rescan the blockchain from scratch, losing any information which cannot be recovered from the blockchain itself.

WARNING: This method discards local wallet data like destination addresses, tx secret keys, tx notes, etc.

Source:

(async) rescanSpent()

Rescan the blockchain for spent outputs.

Note: this can only be called with a trusted daemon.

Example use case: peer multisig hex is import when connected to an untrusted daemon, so the wallet will not rescan spent outputs. Then the wallet connects to a trusted daemon. This method should be manually invoked to rescan outputs.

Source:

save()

Save the wallet at its current path.
Source:

(async) setAccountTagLabel(tag, label)

Sets a human-readable description for a tag.
Parameters:
Name Type Description
tag string tag to set a description for
label string label to set for the tag
Source:

(async) setAttribute(key, val)

Set an arbitrary attribute.
Parameters:
Name Type Description
key string attribute key
val string attribute value
Source:

(async) setDaemonConnection(uriOrConnection, username, password)

Set the wallet's daemon connection.
Parameters:
Name Type Description
uriOrConnection string | MoneroRpcConnection daemon's URI or connection (defaults to offline)
username string username to authenticate with the daemon (optional)
password string password to authenticate with the daemon (optional)
Source:

(async) setTxNote(txHash, note)

Set a note for a specific transaction.
Parameters:
Name Type Description
txHash string hash of the transaction to set a note for
note string the transaction note
Source:

(async) setTxNotes(txHashes, notes)

Set notes for multiple transactions.
Parameters:
Name Type Description
txHashes Array.<string> transactions to set notes for
notes Array.<string> notes to set for the transactions
Source:

(async) signMessage(message, signatureType, accountIdx, subaddressIdx) → {string}

Sign a message.
Parameters:
Name Type Description
message string the message to sign
signatureType MoneroMessageSignatureType sign with spend key or view key (default spend key)
accountIdx int the account index of the message signature (default 0)
subaddressIdx int the subaddress index of the message signature (default 0)
Source:
Returns:
the signature
Type
string

(async) signMultisigTxHex(multisigTxHex) → {MoneroMultisigSignResult}

Sign multisig transactions from a multisig wallet.
Parameters:
Name Type Description
multisigTxHex string unsigned multisig transactions as hex
Source:
Returns:
the result of signing the multisig transactions
Type
MoneroMultisigSignResult

(async) signTxs(unsignedTxHex) → {string}

Sign unsigned transactions from a view-only wallet.
Parameters:
Name Type Description
unsignedTxHex string unsigned transaction hex from when the transactions were created
Source:
Returns:
the signed transaction hex
Type
string

(async) startMining(numThreads, backgroundMining, ignoreBattery)

Start mining.
Parameters:
Name Type Description
numThreads int number of threads created for mining (optional)
backgroundMining boolean specifies if mining should occur in the background (optional)
ignoreBattery boolean specifies if the battery should be ignored for mining (optional)
Source:

(async) startSyncing()

Start an asynchronous thread to continuously synchronize the wallet with the daemon.
Source:

(async) stopMining()

Stop mining.
Source:

(async) stopSyncing()

Stop synchronizing the wallet with the daemon.
Source:

(async) submitMultisigTxHex(signedMultisigTxHex) → {Array.<string>}

Submit signed multisig transactions from a multisig wallet.
Parameters:
Name Type Description
signedMultisigTxHex string signed multisig hex returned from signMultisigTxHex()
Source:
Returns:
the resulting transaction hashes
Type
Array.<string>

(async) submitTxs(signedTxHex) → {Array.<string>}

Submit signed transactions from a view-only wallet.
Parameters:
Name Type Description
signedTxHex string signed transaction hex from signTxs()
Source:
Returns:
the resulting transaction hashes
Type
Array.<string>

(async) sweepDust(relay) → {Array.<MoneroTxWallet>}

Sweep all unmixable dust outputs back to the wallet to make them easier to spend and mix.

NOTE: Dust only exists pre RCT, so this method will throw "no dust to sweep" on new wallets.

Parameters:
Name Type Description
relay boolean specifies if the resulting transaction should be relayed (default false)
Source:
Returns:
the created transactions
Type
Array.<MoneroTxWallet>

(async) sweepOutput(config) → {MoneroTxWallet}

Sweep an output by key image.
Parameters:
Name Type Description
config MoneroTxConfig configures the transaction to create (required)
Properties
Name Type Description
address string single destination address (required)
keyImage string key image to sweep (required)
relay boolean relay the transaction to peers to commit to the blockchain (default false)
unlockHeight int minimum height for the transaction to unlock (default 0)
priority MoneroTxPriority transaction priority (default MoneroTxPriority.NORMAL)
Source:
Returns:
the created transaction
Type
MoneroTxWallet

(async) sweepUnlocked(config) → {Array.<MoneroTxWallet>}

Sweep all unlocked funds according to the given configuration.
Parameters:
Name Type Description
config MoneroTxConfig | object configures the transactions to create (required)
Properties
Name Type Description
address string single destination address (required)
accountIndex int source account index to sweep from from (required)
subaddressIndex int source subaddress index to sweep from (optional)
subaddressIndices Array.<int> source subaddress indices to sweep from (optional)
relay boolean relay the transactions to peers to commit to the blockchain (default false)
priority MoneroTxPriority transaction priority (default MoneroTxPriority.NORMAL)
unlockHeight int minimum height for the transactions to unlock (default 0)
Source:
Returns:
the created transactions
Type
Array.<MoneroTxWallet>

(async) sync(listenerOrStartHeight, startHeight)

Synchronize the wallet with the daemon as a one-time synchronous process.
Parameters:
Name Type Description
listenerOrStartHeight MoneroWalletListener | number listener xor start height (defaults to no sync listener, the last synced block)
startHeight number startHeight if not given in first arg (defaults to last synced block)
Source:

(async) tagAccounts(tag, accountIndices)

Tag accounts.
Parameters:
Name Type Description
tag string tag to apply to the specified accounts
accountIndices Array.<int> indices of the accounts to tag
Source:

(async) untagAccounts(accountIndices)

Untag accounts.
Parameters:
Name Type Description
accountIndices Array.<int> indices of the accounts to untag
Source:

(async) verifyMessage(message, address, signature) → {MoneroMessageSignatureResult}

Verify a signature on a message.
Parameters:
Name Type Description
message string signed message
address string signing address
signature string signature
Source:
Returns:
true if the signature is good, false otherwise
Type
MoneroMessageSignatureResult