# Class: MoneroWalletRpc

## MoneroWalletRpc

Implements a MoneroWallet as a client of monero-wallet-rpc.

Implements:
  - MoneroWallet
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 72

### Methods

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

Add an address book entry.

##### Parameters:

Name | Type | Description
--- | --- | ---
`address` | string | entry address
`description` | string | entry description (optional)

Implements:
  - MoneroWallet#addAddressBookEntry
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1379

##### Returns:

the index of the added entry

Type
  int

#### (async) addListener(listener)

Register a listener to receive wallet notifications.

##### Parameters:

Name | Type | Description
--- | --- | ---
`listener` | MoneroWalletListener | listener to receive wallet notifications

Implements:
  - MoneroWallet#addListener
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 469

#### (async) changePassword(oldPassword, newPassword)

Change the wallet password.

##### Parameters:

Name | Type | Description
--- | --- | ---
`oldPassword` | string | the wallet's old password
`newPassword` | string | the wallet's new password

Implements:
  - MoneroWallet#changePassword
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1542

#### (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

Implements:
  - MoneroWallet#checkReserveProof
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1341

##### 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

Implements:
  - MoneroWallet#checkSpendProof
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1310

##### 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

Implements:
  - MoneroWallet#checkTxKey
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1243

##### 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

Implements:
  - MoneroWallet#checkTxProof
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1272

##### 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)

Implements:
  - MoneroWallet#close
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1550

#### (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)

Implements:
  - MoneroWallet#createAccount
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 723

##### Returns:

the created account

Type
  MoneroAccount

#### (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)

Implements:
  - MoneroWallet#createSubaddress
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 794

##### 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)

Implements:
  - MoneroWallet#createTx
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1579

##### 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)

Implements:
  - MoneroWallet#createTxs
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1002

##### Returns:

the created transactions

Type
  Array.<MoneroTxWallet>

#### (async) createWallet(config) → {MoneroWalletRpc}

Create and open a wallet on the monero-wallet-rpc server.

Example:

`// construct client to monero-wallet-rpc
let walletRpc = new MoneroWalletRpc("http://localhost:38084", "rpc_user", "abc123");
// create and open wallet on monero-wallet-rpc
await walletRpc.createWallet({
path: "mywallet",
password: "abc123",
mnemonic: "coexist igloo pamphlet lagoon...",
restoreHeight: 1543218l
});`

##### Parameters:

Name | Type | Description
--- | --- | ---
`config` | object | MoneroWalletConfig | MoneroWalletConfig or equivalent JS object ###### Properties
Name | Type | Description
--- | --- | ---
`path` | string | path of the wallet to create (optional, in-memory wallet if not given)
`password` | string | password of the wallet to create
`mnemonic` | string | mnemonic of the wallet to create (optional, random wallet created if neither mnemonic nor keys given)
`seedOffset` | string | the offset used to derive a new seed from the given mnemonic to recover a secret wallet from the mnemonic phrase
`primaryAddress` | string | primary address of the wallet to create (only provide if restoring from keys)
`privateViewKey` | string | private view key of the wallet to create (optional)
`privateSpendKey` | string | private spend key of the wallet to create (optional)
`restoreHeight` | number | block height to start scanning from (defaults to 0 unless generating random wallet)
`language` | string | language of the wallet's mnemonic phrase (defaults to "English" or auto-detected)
`serverUri` | string | uri of a daemon to use (optional, monero-wallet-rpc usually started with daemon config)
`serverUsername` | string | username to authenticate with the daemon (optional)
`serverPassword` | string | password to authenticate with the daemon (optional)
`rejectUnauthorized` | boolean | reject self-signed server certificates if true (defaults to true)
`server` | MoneroRpcConnection | object | MoneroRpcConnection or equivalent JS object providing daemon configuration (optional)
`saveCurrent` | boolean | specifies if the current RPC wallet should be saved before being closed (default true)

Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 303

##### Returns:

this wallet client

Type
  MoneroWalletRpc

#### (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

Implements:
  - MoneroWallet#decodeIntegratedAddress
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 588

##### 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

Implements:
  - MoneroWallet#deleteAddressBookEntry
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1394

#### (async) describeTxSet(txSet) → {MoneroTxSet}

Describe 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

Implements:
  - MoneroWallet#describeTxSet
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1184

##### Returns:

the tx set containing structured transactions

Type
  MoneroTxSet

#### (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

Implements:
  - MoneroWallet#editAddressBookEntry
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1384

#### (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-project: redundant? wallet is created with password

Implements:
  - MoneroWallet#exchangeMultisigKeys
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1506

##### 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) exportKeyImages(all) → {Array.<MoneroKeyImage>}

Export signed key images.

##### Parameters:

Name | Type | Description
--- | --- | ---
`all` | boolean | export all key images if true, else export the key images since the last export

Implements:
  - MoneroWallet#exportKeyImages
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 965

##### Returns:

the wallet's signed key images

Type
  Array.<MoneroKeyImage>

#### (async) exportMultisigHex() → {string}

Export this wallet's multisig info as hex for other participants.

Implements:
  - MoneroWallet#exportMultisigHex
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1517

##### Returns:

this wallet's multisig info as hex for other participants

Type
  string

#### (async) exportOutputs(all) → {string}

Export outputs in hex format.

##### Parameters:

Name | Type | Description
--- | --- | ---
`all` | boolean | export all outputs if true, else export the outputs since the last export

Implements:
  - MoneroWallet#exportOutputs
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 956

##### Returns:

outputs in hex format

Type
  string

#### (async) freezeOutput(keyImage)

Freeze an output.

##### Parameters:

Name | Type | Description
--- | --- | ---
`keyImage` | string | key image of the output to freeze

Implements:
  - MoneroWallet#freezeOutput
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 989

#### (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

Implements:
  - MoneroWallet#getAccount
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 712

##### Returns:

the retrieved account

Type
  MoneroAccount

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

Return all account tags.

Implements:
  - MoneroWallet#getAccountTags
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1406

##### Returns:

the wallet's account tags

Type
  Array.<MoneroAccountTag>

#### (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

Implements:
  - MoneroWallet#getAccounts
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 662

##### Returns:

all accounts with the given tag

Type
  Array.<MoneroAccount>

#### (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

Implements:
  - MoneroWallet#getAddress
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 545

##### 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

Implements:
  - MoneroWallet#getAddressBookEntries
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1369

##### 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

Implements:
  - MoneroWallet#getAddressIndex
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 560

##### 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

Implements:
  - MoneroWallet#getAttribute
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1447

##### 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 (default all accounts)
`subaddressIdx` | int | index of the subaddress to get the balance of (default all subaddresses)

Implements:
  - MoneroWallet#getBalance
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 654

##### Returns:

the balance of the wallet, account, or subaddress

Type
  BigInteger

#### (async) getDaemonConnection() → {MoneroRpcConnection}

Get the wallet's daemon connection.

Implements:
  - MoneroWallet#getDaemonConnection
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 463

##### Returns:

the wallet's daemon connection

Type
  MoneroRpcConnection

#### (async) getDaemonHeight() → {int}

Get the blockchain's height.

Implements:
  - MoneroWallet#getDaemonHeight
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 597

##### Returns:

the blockchain's height

Type
  int

#### (async) getHeight() → {int}

Get the block height that the wallet is synced to.

Implements:
  - MoneroWallet#getHeight
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 593

##### Returns:

the block height that the wallet is synced to

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

Implements:
  - MoneroWallet#getHeightByDate
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 601

##### Returns:

the blockchain's approximate height at the given date

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

Get incoming transfers.

##### Parameters:

Name | Type | Description
--- | --- | ---
`query` | MoneroTransferQuery | object | configures the query (optional) ###### Properties
Name | Type | Description
--- | --- | ---
`address` | string | get incoming transfers to a specific address in the wallet (optional)
`accountIndex` | int | get incoming transfers to a specific account index (optional)
`subaddressIndex` | int | get incoming transfers to a specific subaddress index (optional)
`subaddressIndices` | Array.<int> | get transfers destined for specific subaddress indices (optional)
`amount` | BigInteger | amount being transferred (optional)
`txQuery` | MoneroTxQuery | get transfers whose transaction meets this query (optional)

Implements:
  - MoneroWallet#getIncomingTransfers
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1577

##### Returns:

incoming transfers that meet the query

Type
  Array.<MoneroIncomingTransfer>

#### (async) getIntegratedAddress(standardAddress, paymentId) → {MoneroIntegratedAddress}

Get an integrated address based on the given standard address and payment ID. Uses the wallet's primary address if an address is not given. Generates a random payment ID if a payment ID is not given.

##### Parameters:

Name | Type | Description
--- | --- | ---
`standardAddress` | string | is the standard address to generate the integrated address from (wallet's primary address if undefined)
`paymentId` | string | is the payment ID to generate an integrated address from (randomly generated if undefined)

Implements:
  - MoneroWallet#getIntegratedAddress
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 578

##### Returns:

the integrated address

Type
  MoneroIntegratedAddress

#### getListeners() → {Array.<MoneroWalletListener>}

Get the listeners registered with the wallet.

Implements:
  - MoneroWallet#getListeners
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 482

##### Returns:

the registered listeners

Type
  Array.<MoneroWalletListener>

#### (async) getMnemonic() → {string}

Get the wallet's mnemonic phrase derived from the seed.

Implements:
  - MoneroWallet#getMnemonic
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 504

##### Returns:

the wallet's mnemonic phrase

Type
  string

#### (async) getMnemonicLanguage() → {string}

Get the language of the wallet's mnemonic phrase.

Implements:
  - MoneroWallet#getMnemonicLanguage
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 514

##### Returns:

the language of the wallet's mnemonic phrase

Type
  string

#### (async) getMnemonicLanguages() → {Array.<string>}

Get a list of available languages for the wallet's mnemonic phrase.

Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 524

##### Returns:

the available languages for the wallet's mnemonic phrase

Type
  Array.<string>

#### (async) getMultisigInfo() → {MoneroMultisigInfo}

Get multisig info about this wallet.

Implements:
  - MoneroWallet#getMultisigInfo
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1478

##### Returns:

multisig info about this wallet

Type
  MoneroMultisigInfo

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

Get new key images from the last imported outputs.

Implements:
  - MoneroWallet#getNewKeyImagesFromLastImport
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 985

##### Returns:

the key images from the last imported outputs

Type
  Array.<MoneroKeyImage>

#### (async) getNumBlocksToUnlock() → {Array.<int>}

Get the number of blocks until the next and last funds unlock.

Implements:
  - MoneroWallet#getNumBlocksToUnlock
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1575

##### Returns:

the number of blocks until the next and last funds unlock in elements 0 and 1, respectively, or undefined if no balance

Type
  Array.<int>

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

Get outgoing transfers.

##### Parameters:

Name | Type | Description
--- | --- | ---
`query` | MoneroTransferQuery | object | configures the query (optional) ###### Properties
Name | Type | Description
--- | --- | ---
`address` | string | get outgoing transfers from a specific address in the wallet (optional)
`accountIndex` | int | get outgoing transfers from a specific account index (optional)
`subaddressIndex` | int | get outgoing transfers from a specific subaddress index (optional)
`subaddressIndices` | Array.<int> | get outgoing transfers from 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)

Implements:
  - MoneroWallet#getOutgoingTransfers
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1578

##### Returns:

outgoing transfers that meet the query

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)

Implements:
  - MoneroWallet#getOutputs
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 937

##### Returns:

the queried outputs

Type
  Array.<MoneroOutputWallet>

#### (async) getPath() → {string}

Get the wallet's path.

Implements:
  - MoneroWallet#getPath
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 500

##### Returns:

the path the wallet can be opened with

Type
  string

#### (async) getPaymentUri(config) → {string}

Creates a payment URI from a send configuration.

##### Parameters:

Name | Type | Description
--- | --- | ---
`config` | MoneroTxConfig | specifies configuration for a potential tx

Implements:
  - MoneroWallet#getPaymentUri
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1421

##### Returns:

the payment uri

Type
  string

#### (async) getPrivateSpendKey() → {string}

Get the wallet's private spend key.

Implements:
  - MoneroWallet#getPrivateSpendKey
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 533

##### Returns:

the wallet's private spend key

Type
  string

#### (async) getPrivateViewKey() → {string}

Get the wallet's private view key.

Implements:
  - MoneroWallet#getPrivateViewKey
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 528

##### Returns:

the wallet's private view key

Type
  string

#### getProcess()

Get the internal process running monero-wallet-rpc.

Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 197

##### Returns:

the process running monero-wallet-rpc, undefined if not created from new process

#### (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)

Implements:
  - MoneroWallet#getReserveProofAccount
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1332

##### 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)

Implements:
  - MoneroWallet#getReserveProofWallet
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1324

##### Returns:

the reserve proof signature

#### getRpcConnection() → {MoneroWalletRpc}

Get the wallet's RPC connection.

Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 219

##### Returns:

the wallet's rpc connection

Type
  MoneroWalletRpc

#### (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)

Implements:
  - MoneroWallet#getSpendProof
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1300

##### 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

Implements:
  - MoneroWallet#getSubaddress
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 788

##### 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)

Implements:
  - MoneroWallet#getSubaddresses
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 729

##### 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)

Implements:
  - MoneroWallet#getTransfers
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 918

##### Returns:

wallet transfers that meet the query

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

Implements:
  - MoneroWallet#getTx
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1576

##### 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

Implements:
  - MoneroWallet#getTxKey
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1234

##### 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

Implements:
  - MoneroWallet#getTxNote
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1581

##### 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

Implements:
  - MoneroWallet#getTxNotes
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1361

##### 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)

Implements:
  - MoneroWallet#getTxProof
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1262

##### 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)

Implements:
  - MoneroWallet#getTxs
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 817

##### 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)

Implements:
  - MoneroWallet#getUnlockedBalance
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 658

##### Returns:

the unlocked balance of the wallet, account, or subaddress

Type
  BigInteger

#### (async) getVersion() → {MoneroVersion}

Gets the version of the wallet.

Implements:
  - MoneroWallet#getVersion
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 495

##### 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)

Implements:
  - MoneroWallet#importKeyImages
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 969

##### 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

Implements:
  - MoneroWallet#importMultisigHex
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1522

##### Returns:

the number of outputs signed with the given multisig hex

Type
  int

#### (async) importOutputs(outputsHex) → {int}

Import outputs in hex format.

##### Parameters:

Name | Type | Description
--- | --- | ---
`outputsHex` | string | outputs in hex format

Implements:
  - MoneroWallet#importOutputs
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 960

##### Returns:

the number of outputs imported

Type
  int

#### (async) isClosed() → {boolean}

Indicates if this wallet is closed or not.

Implements:
  - MoneroWallet#isClosed
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1556

##### Returns:

true if the wallet is closed, false otherwise

Type
  boolean

#### (async) isConnectedToDaemon() → {boolean}

Indicates if the wallet is connected to daemon.

Implements:
  - MoneroWallet#isConnectedToDaemon
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 486

##### Returns:

true if the wallet is connected to a daemon, false otherwise

Type
  boolean

#### (async) isMultisigImportNeeded() → {boolean}

Indicates if importing multisig data is needed for returning a correct balance.

Implements:
  - MoneroWallet#isMultisigImportNeeded
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1473

##### Returns:

true if importing multisig data is needed for returning a correct balance, false otherwise

Type
  boolean

#### (async) isOutputFrozen(keyImage) → {boolean}

Check if an output is frozen.

##### Parameters:

Name | Type | Description
--- | --- | ---
`keyImage` | string | key image of the output to check if frozen

Implements:
  - MoneroWallet#isOutputFrozen
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 997

##### Returns:

true if the output is frozen, false otherwise

Type
  boolean

#### (async) isViewOnly() → {bool}

Indicates if the wallet is view-only, meaning it does not have the private spend key and can therefore only observe incoming outputs.

Implements:
  - MoneroWallet#isViewOnly
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 427

##### Returns:

true if the wallet is view-only, false otherwise

Type
  bool

#### (async) makeMultisig(multisigHexes, threshold, password) → {string}

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

Implements:
  - MoneroWallet#makeMultisig
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1496

##### Returns:

this wallet's multisig hex to share with participants

Type
  string

#### (async) openWallet(pathOrConfig, password) → {MoneroWalletRpc}

Open an existing wallet on the monero-wallet-rpc server.

Example:

`let wallet = new MoneroWalletRpc("http://localhost:38084", "rpc_user", "abc123");
await wallet.openWallet("mywallet1", "supersecretpassword");
await wallet.openWallet({
path: "mywallet2",
password: "supersecretpassword",
serverUri: "http://locahost:38081",
rejectUnauthorized: false
});
`

##### Parameters:

Name | Type | Description
--- | --- | ---
`pathOrConfig` | string | object | MoneroWalletConfig | the wallet's name or configuration to open ###### Properties
Name | Type | Description
--- | --- | ---
`path` | string | path of the wallet to create (optional, in-memory wallet if not given)
`password` | string | password of the wallet to create
`serverUri` | string | uri of a daemon to use (optional, monero-wallet-rpc usually started with daemon config)
`serverUsername` | string | username to authenticate with the daemon (optional)
`serverPassword` | string | password to authenticate with the daemon (optional)
`rejectUnauthorized` | boolean | reject self-signed server certificates if true (defaults to true)
`server` | MoneroRpcConnection | object | MoneroRpcConnection or equivalent JS object providing daemon configuration (optional)
`password` | string | is the wallet's password

Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 250

##### Returns:

this wallet client

Type
  MoneroWalletRpc

#### (async) parsePaymentUri(uri) → {MoneroTxConfig}

Parses a payment URI to a tx config.

##### Parameters:

Name | Type | Description
--- | --- | ---
`uri` | string | payment uri to parse

Implements:
  - MoneroWallet#parsePaymentUri
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1433

##### Returns:

the send configuration parsed from the uri

Type
  MoneroTxConfig

#### (async) prepareMultisig() → {string}

Get multisig info as hex to share with participants to begin creating a multisig wallet.

Implements:
  - MoneroWallet#prepareMultisig
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1489

##### 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

Implements:
  - MoneroWallet#relayTx
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1580

##### 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

Implements:
  - MoneroWallet#relayTxs
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1172

##### Returns:

the hashes of the relayed txs

Type
  Array.<string>

#### (async) removeListener(listener)

Unregister a listener to receive wallet notifications.

##### Parameters:

Name | Type | Description
--- | --- | ---
`listener` | MoneroWalletListener | listener to unregister

Implements:
  - MoneroWallet#removeListener
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 475

#### (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.

Implements:
  - MoneroWallet#rescanBlockchain
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 650

#### (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.

Implements:
  - MoneroWallet#rescanSpent
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 646

#### (async) save()

Save the wallet at its current path.

Implements:
  - MoneroWallet#save
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1546

#### (async) scanTxs(txHashes)

Scan transactions by their hash/id.

##### Parameters:

Name | Type | Description
--- | --- | ---
`txHashes` | Array.<string> | tx hashes to scan

Implements:
  - MoneroWallet#scanTxs
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 640

#### (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

Implements:
  - MoneroWallet#setAccountTagLabel
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1417

#### (async) setAttribute(key, val)

Set an arbitrary attribute.

##### Parameters:

Name | Type | Description
--- | --- | ---
`key` | string | attribute key
`val` | string | attribute value

Implements:
  - MoneroWallet#setAttribute
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1457

#### (async) setDaemonConnection(uriOrConnection, isTrusted, sslOptions)

Set the wallet's daemon connection.

##### Parameters:

Name | Type | Description
--- | --- | ---
`uriOrConnection` | string | MoneroRpcConnection | the daemon's URI or connection (defaults to offline)
`isTrusted` | boolean | indicates if the daemon in trusted
`sslOptions` | SslOptions | custom SSL configuration

Implements:
  - MoneroWallet#setDaemonConnection
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 445

#### (async) setSubaddressLabel(accountIdx, subaddressIdx, label)

Set a subaddress label.

##### Parameters:

Name | Type | Description
--- | --- | ---
`accountIdx` | number | index of the account to set the label for
`subaddressIdx` | number | index of the subaddress to set the label for
`label` | string | the label to set

Implements:
  - MoneroWallet#setSubaddressLabel
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 813

#### (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

Implements:
  - MoneroWallet#setTxNote
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1582

#### (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

Implements:
  - MoneroWallet#setTxNotes
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1365

#### (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)

Implements:
  - MoneroWallet#signMessage
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1209

##### 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

Implements:
  - MoneroWallet#signMultisigTxHex
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1528

##### 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

Implements:
  - MoneroWallet#signTxs
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1192

##### 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)

Implements:
  - MoneroWallet#startMining
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1461

#### (async) startSyncing(syncPeriodInMs)

Start background synchronizing with a maximum period between syncs.

##### Parameters:

Name | Type | Description
--- | --- | ---
`syncPeriodInMs` | int | maximum period between syncs in milliseconds (default is wallet-specific)

Implements:
  - MoneroWallet#startSyncing
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 617

#### (async) stop()

Save and close the current wallet and stop the RPC server.

Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1568

#### (async) stopMining()

Stop mining.

Implements:
  - MoneroWallet#stopMining
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1469

#### (async) stopProcess(force) → {Promise.<(number|undefined)>}

Stop the internal process running monero-wallet-rpc, if applicable.

##### Parameters:

Name | Type | Description
--- | --- | ---
`force` | boolean | specifies if the process should be destroyed forcibly

Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 207

##### Returns:

the exit code from stopping the process

Type
  Promise.<(number|undefined)>

#### (async) stopSyncing()

Stop synchronizing the wallet with the daemon.

Implements:
  - MoneroWallet#stopSyncing
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 636

#### (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()

Implements:
  - MoneroWallet#submitMultisigTxHex
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1537

##### 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()

Implements:
  - MoneroWallet#submitTxs
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1201

##### 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)

Implements:
  - MoneroWallet#sweepDust
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1158

##### 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)

Implements:
  - MoneroWallet#sweepOutput
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1065

##### 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 (optional, defaults to all accounts)
`subaddressIndex` | int | source subaddress index to sweep from (optional, defaults to all subaddresses)
`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)
`sweepEachSubaddress` | boolean | sweep each subaddress individually if true (default false)

Implements:
  - MoneroWallet#sweepUnlocked
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1099

##### 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)

Implements:
  - MoneroWallet#sync
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 605

#### (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

Implements:
  - MoneroWallet#tagAccounts
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1398

#### (async) thawOutput(keyImage)

Thaw a frozen output.

##### Parameters:

Name | Type | Description
--- | --- | ---
`keyImage` | string | key image of the output to thaw

Implements:
  - MoneroWallet#thawOutput
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 993

#### (async) untagAccounts(accountIndices)

Untag accounts.

##### Parameters:

Name | Type | Description
--- | --- | ---
`accountIndices` | Array.<int> | indices of the accounts to untag

Implements:
  - MoneroWallet#untagAccounts
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1402

#### (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

Implements:
  - MoneroWallet#verifyMessage
Source:
  - src/main/js/wallet/MoneroWalletRpc.js, line 1219

##### Returns:

true if the signature is good, false otherwise

Type
  MoneroMessageSignatureResult