Class: MoneroWallet

MoneroWallet()

Monero wallet interface and default implementations.

Constructor

new MoneroWallet()

Source:

Methods

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

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

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

Add an address book entry.
Parameters:
Name Type Description
address string is the entry address
description string is the 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 is the public wallet address
message string is a message included with the signature to further authenticate the proof (optional)
signature string is the reserve proof signature to check
Source:
Returns:
the result of checking the signature proof
Type
MoneroCheckReserve

(async) checkSpendProof(txId, 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
txId string specifies the transaction to prove
message string is a message included with the signature to further authenticate the proof (optional)
signature string is the transaction signature to confirm
Source:
Returns:
true if the signature is good, false otherwise
Type
boolean

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

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

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

Prove a transaction by checking its signature.
Parameters:
Name Type Description
txId string specifies the transaction to prove
address string is the destination public address of the transaction
message string is a message included with the signature to further authenticate the proof (optional)
signature string is the 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() → {MoneroAccount}

Create a new account.
Source:
Returns:
the created account
Type
MoneroAccount

(async) createAccount(label) → {MoneroAccount}

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

(async) createPaymentUri(request) → {string}

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

(async) createSubaddress(accountIdx) → {MoneroSubaddress}

Create a subaddress within an account and without a label.
Parameters:
Name Type Description
accountIdx int specifies the index of the account to create the subaddress within
Source:
Returns:
the created subaddress
Type
MoneroSubaddress

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

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

(async) createTx(requestOrAccountIndex, address, amount, priority) → {MoneroTxSet}

Create a transaction to transfers funds from this wallet to a destination address. The transaction may be relayed later.
Parameters:
Name Type Description
requestOrAccountIndex MoneroSendRequest | json | uint is a send request as an object or json or a source account index
address string is the destination address to send funds to
amount BigInteger is the amount being sent
priority MoneroSendPriority is the send priority (default normal)
Source:
Returns:
a tx set for the requested transaction if possible
Type
MoneroTxSet

(async) createTxs(requestOrAccountIndex, address, sendAmount) → {MoneroTxSet}

Create one or more transactions to transfer funds from this wallet according to the given request. The transactions may later be relayed.
Parameters:
Name Type Description
requestOrAccountIndex MoneroSendRequest | json | uint is a send request as an object or json or a source account index
address string is a destination address to send to (required iff no request given)
sendAmount BigInteger is the amount to send (required iff no request given)
Source:
Returns:
a tx set with the requested transactions
Type
MoneroTxSet

(async) decodeIntegratedAddress(integratedAddress) → {MoneroIntegratedAddress}

Decode an integrated address to get its standard address and payment id.
Parameters:
Name Type Description
integratedAddress string is an 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 is the index of the entry to delete
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 is the 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) → {MoneroAccount}

Get an account without subaddress information.
Parameters:
Name Type Description
accountIdx int specifies the account to get
Source:
Returns:
the retrieved account
Type
MoneroAccount

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

Get an account.
Parameters:
Name Type Description
accountIdx int specifies the account to get
includeSubaddresses boolean specifies if subaddresses should be included
Source:
Returns:
the retrieved account
Type
MoneroAccount

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

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

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

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

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

Get all accounts.
Source:
Returns:
all accounts
Type
Array.<MoneroAccount>

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

Get all accounts.
Parameters:
Name Type Description
includeSubaddresses boolean specifies if subaddresses should be included
Source:
Returns:
all accounts
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 specifies the account index of the address's subaddress
subaddressIdx int specifies the subaddress index within the account
Source:
Returns:
the receive address of the specified subaddress
Type
string

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

Get all address book entries.
Source:
Returns:
the address book entries
Type
Array.<MoneroAddressBookEntry>

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

Get address book entries.
Parameters:
Name Type Description
entryIndices Array.<int> are 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 is the 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 is the attribute to get the value of
Source:
Returns:
the attribute's value
Type
string

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

Get a subaddress's balance.
Parameters:
Name Type Description
accountIdx int is the index of the subaddress's account to get the balance of
subaddressIdx int is the index of the subaddress to get the balance of
Source:
Returns:
the subaddress's balance
Type
BigInteger

(async) getBalance(accountIdx) → {BigInteger}

Get an account's balance.
Parameters:
Name Type Description
accountIdx int is the index of the account to get the balance of
Source:
Returns:
the account's balance
Type
BigInteger

(async) getBalance() → {BigInteger}

Get the wallet's balance.
Source:
Returns:
the wallet's balance
Type
BigInteger

(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) getIncomingTransfers(config) → {Array.<MoneroIncomingTransfer>}

Get all of the wallet's incoming transfers.
Parameters:
Name Type Description
config is 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 is the payment ID to generate an integrated address from (randomly generated if undefined)
Source:
Returns:
the integrated address
Type
MoneroIntegratedAddress

(async) getIntegratedAddress() → {MoneroIntegratedAddress}

Get an integrated address based on this wallet's primary address and a randomly generated payment ID. Generates a random payment ID if none is given.
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) getLanguages() → {Array.<string>}

Get a list of available languages for the wallet's mnemonic phrase.
Source:
Returns:
the available languages for the wallet's mnemonic phrase
Type
Array.<string>

(async) getMnemonic() → {string}

Get the wallet's mnemonic phrase derived from the seed.
Source:
Returns:
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(config) → {Array.<MoneroOutgoingTransfer>}

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

(async) getOutputs(config) → {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 configured by passing a MoneroOutputQuery. 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. TODO: add additional filtering in MoneroOutputQuery.js meetsCriteria()
Parameters:
Name Type Description
config MoneroOutputQuery | object configures the query (optional)
Properties
Name Type Description
accountIndex int gets outputs associated with a specific account index
subaddressIndex int gets outputs associated with a specific subaddress index
subaddressIndices Array.<int> gets outputs associated with specific subaddress indices
amount BigInteger gets outputs with a specific amount
isSpent boolean gets outputs that are spent or not
keyImage MoneroKeyImage is a key image whose defined fields filter outputs to get
txQuery MoneroTxQuery gets outputs whose transaction meets this filter (optional)
Source:
Returns:
are wallet outputs per the configuration
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) getReserveProofAccount(accountIdx, amount, message) → {string}

Generate a signature to prove an available amount in an account.
Parameters:
Name Type Description
accountIdx int specifies the account to prove ownership of the amount
amount BigInteger is the minimum amount to prove as available in the account
message string is a 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 is a message included with the signature to further authenticate the proof (optional)
Source:
Returns:
the reserve proof signature

(async) getSeed() → {string}

Get the wallet's seed.
Source:
Returns:
the wallet's seed
Type
string

(async) getSpendProof(txId, 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
txId string specifies the transaction to prove
message string is a 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 specifies the index of the subaddress's account
subaddressIdx int specifies 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 specifies the account to get subaddresses within
subaddressIndices Array.<int> are specific subaddresses to get (optional)
Source:
Returns:
the retrieved subaddresses
Type
Array.<MoneroSubaddress>

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

Get all subaddresses in an account.
Parameters:
Name Type Description
accountIdx int specifies the account to get subaddresses within
Source:
Returns:
the retrieved subaddresses
Type
Array.<MoneroSubaddress>

(async) getTransfers(config) → {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. Query results can be configured or filtered by passing in a configuration. Transfers must meet every criteria defined in the configuration in order to be returned. All configuration is optional and no filtering is applied when not defined.
Parameters:
Name Type Description
config MoneroTransferQuery | object configures the query (optional)
Properties
Name Type Description
isOutgoing boolean gets transfers that are outgoing or not (optional)
isIncoming boolean gets transfers that are incoming or not (optional)
address string is the wallet's address that a transfer either originated from (if outgoing) or is destined for (if incoming) (optional)
accountIndex int gets transfers that either originated from (if outgoing) or are destined for (if incoming) a specific account index (optional)
subaddressIndex int gets transfers that either originated from (if outgoing) or are destined for (if incoming) a specific subaddress index (optional)
subaddressIndices Array.<int> gets transfers that either originated from (if outgoing) or are destined for (if incoming) specific subaddress indices (optional)
amount BigInteger is the amount being transferred (optional)
destinations Array.<MoneroDestination> are individual destinations of an outgoing transfer, which is local wallet data and NOT recoverable from the blockchain (optional)
hasDestinations boolean gets transfers that have destinations or not (optional)
txQuery MoneroTxQuery gets transfers whose transaction meets this query (optional)
Source:
Returns:
are wallet transfers per the configuration
Type
Array.<MoneroTransfer>

(async) getTx(txId) → {MoneroTxWallet}

Get a wallet transaction by id.
Parameters:
Name Type Description
txId string is an id of a transaction to get
Source:
Returns:
the identified transactions
Type
MoneroTxWallet

(async) getTxKey(txId) → {string}

Get a transaction's secret key from its id.
Parameters:
Name Type Description
txId string is the transaction's id
Source:
Returns:
is the transaction's secret key
Type
string

(async) getTxNote(txId) → {string}

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

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

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

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

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

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

Get wallet transactions. Wallet transactions contain one or more transfers that are either incoming or outgoing to the wallet. Query results can be filtered by passing in a transaction query. Transactions 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. Transactions can be fetched by a MoneroTxQuery, equivalent js object, or array of tx ids.
Parameters:
Name Type Description
config MoneroTxQuery | Array.<string> | object configures the query (optional)
Properties
Name Type Description
isConfirmed boolean gets txs that are confirmed or not (optional)
inTxPool boolean get txs that are in the tx pool or not (optional)
isRelayed boolean gets txs that are relayed or not (optional)
isFailed boolean gets txs that are failed or not (optional)
isMinerTx boolean gets miner txs or not (optional)
id string gets a tx with the id (optional)
txId string gets a tx with the id (alias of id) (optional)
txIds Array.<string> gets txs with the ids (optional)
paymentId string gets transactions with the payment id (optional)
paymentIds Array.<string> gets transactions with the payment ids (optional)
hasPaymentId boolean gets transactions with a payment id or not (optional)
minHeight int gets txs with height >= the given height (optional)
maxHeight int gets txs with height <= the given height (optional)
isOutgoing boolean gets txs with an outgoing transfer or not (optional)
isIncoming boolean gets txs with an incoming transfer or not (optional)
transferQuery MoneroTransferQuery gets txs that have a transfer that meets this query (optional)
includeOutputs boolean specifies that tx vouts should be returned with tx results (optional)
Source:
Returns:
are wallet transactions per the configuration
Type
Array.<MoneroTxWallet>

(async) getUnlockedBalance(accountIdx) → {BigInteger}

Get an account's unlocked balance.
Parameters:
Name Type Description
accountIdx int is the index of the account to get the unlocked balance of
Source:
Returns:
the account's unlocked balance
Type
BigInteger

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

Get a subaddress's unlocked balance.
Parameters:
Name Type Description
accountIdx int is the index of the subaddress's account to get the unlocked balance of
subaddressIdx int is the index of the subaddress to get the unlocked balance of
Source:
Returns:
the subaddress's balance
Type
BigInteger

(async) getUnlockedBalance() → {BigInteger}

Get the wallet's unlocked balance.
Source:
Returns:
the wallet's unlocked balance
Type
BigInteger

(async) importKeyImages(keyImages) → {MoneroKeyImageImportResult}

Import signed key images and verify their spent status.
Parameters:
Name Type Description
keyImages Array.<MoneroKeyImage> are key 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> are 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 are outputs in hex format
Source:
Returns:
the number of outputs imported
Type
int

(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) makeMultisig(multisigHexes, threshold, password) → {MoneroMultisigInitResult}

Make this wallet multisig by importing multisig hex from participants.
Parameters:
Name Type Description
multisigHexes Array.<String> are multisig hex from each participant
threshold int is the number of signatures needed to sign transfers
password string is the 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) → {MoneroSendRequest}

Parses a payment URI to a send request.
Parameters:
Name Type Description
uri string is the payment uri to parse
Source:
Returns:
the send configuration parsed from the uri
Type
MoneroSendRequest

(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 is a transaction or its metadata to relay
Source:
Returns:
the id of the relayed tx
Type
string

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

Relay previously created transactions.
Parameters:
Name Type Description
txsOrMetadatas Array.<MoneroTxWallet> | Array.<string> are transactions or their metadata to relay
Source:
Returns:
the ids 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) send(requestOrAccountIndex, address, sendAmount) → {MoneroTxSet}

Create and relay a transaction to transfers funds from this wallet to a destination address.
Parameters:
Name Type Description
requestOrAccountIndex MoneroSendRequest | json | uint is a send request as an object or json or a source account index
address string is a destination address to send to (required iff no request given)
sendAmount BigInteger is the amount to send (required iff no request given)
Source:
Returns:
a tx set with the requested transactions
Type
MoneroTxSet

(async) sendSplit(requestOrAccountIndex, address, sendAmount) → {MoneroTxSet}

Create and relay one or more transactions to transfer funds from this wallet according to the given request.
Parameters:
Name Type Description
requestOrAccountIndex MoneroSendRequest | json | uint is a send request as an object or json or a source account index
address string is a destination address to send to (required iff no request given)
sendAmount BigInteger is the amount to send (required iff no request given)
Source:
Returns:
a tx set with the requested transactions
Type
MoneroTxSet

(async) setAccountTagLabel(tag, label)

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

(async) setAttribute(key, val)

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

(async) setTxNote(txId, note)

Set a note for a specific transaction.
Parameters:
Name Type Description
txId string specifies the transaction
note string specifies the note
Source:

(async) setTxNotes(txIds, notes)

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

(async) sign(msg) → {string}

Sign a message.
Parameters:
Name Type Description
msg string is the message to sign
Source:
Returns:
the signature
Type
string

(async) signMultisigTxHex(multisigTxHex) → {MoneroMultisigSignResult}

Sign previously created multisig transactions as represented by hex.
Parameters:
Name Type Description
multisigTxHex string is the hex shared among the multisig transactions when they were created
Source:
Returns:
the result of signing the multisig transactions
Type
MoneroMultisigSignResult

(async) startMining(numThreads, backgroundMining, ignoreBattery)

Start mining.
Parameters:
Name Type Description
numThreads int is the 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) submitMultisigTxHex(signedMultisigTxHex) → {Array.<string>}

Submit signed multisig transactions as represented by a hex string.
Parameters:
Name Type Description
signedMultisigTxHex string is the signed multisig hex returned from signMultisigTxs()
Source:
Returns:
the resulting transaction ids
Type
Array.<string>

(async) sweepAccount(accountIdx, address) → {MoneroTxSet}

Sweep an acount's unlocked funds to an address.
Parameters:
Name Type Description
accountIdx int is the index of the account
address string is the address to sweep the account's funds to
Source:
Returns:
a tx set with the requested transactions if possible
Type
MoneroTxSet

(async) sweepDust() → {MoneroTxSet}

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.
Source:
Returns:
a tx set with the requested transactions if possible
Type
MoneroTxSet

(async) sweepDust(doNotRelay) → {MoneroTxSet}

Sweep all unmixable dust outputs back to the wallet to make them easier to spend and mix.
Parameters:
Name Type Description
doNotRelay boolean specifies if the resulting transaction should not be relayed (defaults to false i.e. relayed)
Source:
Returns:
a tx set with the requested transactions if possible
Type
MoneroTxSet

(async) sweepOutput(requestOrAddress, keyImage, priority) → {MoneroTxSet}

Sweep an output with a given key image.
Parameters:
Name Type Description
requestOrAddress MoneroSendRequest | string is a send request or destination address
keyImage string is the key image hex of the output to sweep
priority int sets a transaction priority as an integer between 0 and 3 (see) {MoneroSendPriority})
Source:
Returns:
a tx set with the requested transaction
Type
MoneroTxSet

(async) sweepSubaddress(accountIdx, subaddressIdx, address) → {MoneroTxSet}

Sweep a subaddress's unlocked funds to an address.
Parameters:
Name Type Description
accountIdx int is the index of the account
subaddressIdx int is the index of the subaddress
address string is the address to sweep the subaddress's funds to
Source:
Returns:
a tx set with the requested transactions if possible
Type
MoneroTxSet

(async) sweepUnlocked(request) → {Array.<MoneroTxSet>}

Sweep all unlocked funds according to the given request.
Parameters:
Name Type Description
request MoneroSendRequest is the sweep configuration
Source:
Returns:
the tx sets with the requested transactions
Type
Array.<MoneroTxSet>

(async) sweepWallet(address) → {Array.<MoneroTxSet>}

Sweep the wallet's unlocked funds to an address.
Parameters:
Name Type Description
address string is the address to sweep the wallet's funds to
Source:
Returns:
the tx sets with the transactions which sweep the wallet
Type
Array.<MoneroTxSet>

(async) sync(startHeight, onProgress({percent:)

Synchronize the wallet with the daemon as a one-time synchronous process.
Parameters:
Name Type Description
startHeight int is the start height to sync from, syncs from the last synced block by default
onProgress({percent: function , message: , totalBlocks: , doneBlocks: }) is invoked as progress is made
Source:

(async) tagAccounts(tag, accountIndices)

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

(async) untagAccounts(accountIndices)

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

(async) verify(msg, address, signature) → {boolean}

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