```{eval-rst} .. meta:: :title: Wallet RPCs :description: A list of remote procedure calls in Dash that are used to perform wallet operations such as sending, creating and categorizing addresses, etc. ``` # Wallet RPCs >❗️ Wallet Support > > RPCs that require wallet support are **not available on masternodes** for security reasons. Such RPCs are designated with a "_Requires wallet support_" message. ## AbandonTransaction _Added in Bitcoin Core 0.12.0_ The [`abandontransaction` RPC](../api/remote-procedure-calls-wallet.md#abandontransaction) marks an in-wallet transaction and all its in-wallet descendants as abandoned. This allows their inputs to be respent. _Parameter #1---a transaction identifier (TXID)_ | Name | Type | Presence | Description | | ---- | ------------ | ----------------------- | -------------------------------------------------------------------------------------------------------- | | TXID | string (hex) | Required
(exactly 1) | The TXID of the transaction that you want to abandon. The TXID must be encoded as hex in RPC byte order | _Result---`null` on success_ | Name | Type | Presence | Description | | -------- | ---- | ----------------------- | ------------------------------------------------------------------- | | `result` | null | Required
(exactly 1) | JSON `null` when the transaction and all descendants were abandoned | _Example from Dash Core 0.12.2_ Abandons the transaction on your node. ```bash dash-cli abandontransaction fa3970c341c9f5de6ab13f128cbfec58d732e736a505fe32137ad551c799ecc4 ``` Result (no output from `dash-cli` because result is set to `null`). _See also_ * [SendRawTransaction](../api/remote-procedure-calls-raw-transactions.md#sendrawtransaction): validates a transaction and broadcasts it to the peer-to-peer network. ## AbortRescan The [`abortrescan` RPC](../api/remote-procedure-calls-wallet.md#abortrescan) Stops current wallet rescan Stops current wallet rescan triggered e.g. by an [`importprivkey` RPC](../api/remote-procedure-calls-wallet.md#importprivkey) call. _Parameters: none_ _Result---`true` on success_ | Name | Type | Presence | Description | | -------- | ---- | ----------------------- | -------------------------------------------------------------------- | | `result` | null | Required
(exactly 1) | `true` when the command was successful or `false` if not successful. | _Example from Dash Core 0.15.0_ Abort the running wallet rescan ```bash dash-cli -testnet abortrescan ``` Result: ```text true ``` _See also: none_ ## AddMultiSigAddress > πŸ“˜ > > Requires [wallet](../resources/glossary.md#wallet) support (**unavailable on masternodes**) The [`addmultisigaddress` RPC](../api/remote-procedure-calls-wallet.md#addmultisigaddress) adds a P2SH multisig address to the wallet. Each key is a Dash address or hex-encoded public key. This functionality is only intended for use with non-watchonly addresses. See [`importaddress` RPC](../api/remote-procedure-calls-wallet.md#importaddress) for watchonly p2sh address support. If 'label' is specified, assign address to that label. _Parameter #1---the number of signatures required_ | Name | Type | Presence | Description | | -------- | ------------ | ----------------------- | ------------------------------------------------------------------------------------ | | Required | number (int) | Required
(exactly 1) | The minimum (_m_) number of signatures required to spend this m-of-n multisig script | _Parameter #2---the full public keys, or addresses for known public keys_ | Name | Type | Presence | Description | | ------------------- | ------ | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Keys Or Addresses | array | Required
(exactly 1) | An array of strings with each string being a public key or address | | β†’
Key Or Address | string | Required
(1 or more) | A public key against which signatures will be checked. Alternatively, this may be a P2PKH address belonging to the wallet---the corresponding public key will be substituted. There must be at least as many keys as specified by the Required parameter, and there may be more keys | _Parameter #3---label_ | Name | Type | Presence | Description | | ----- | ------ | -------------------- | ----------------------------------- | | Label | string | Optional
(0 or 1) | A label to assign the addresses to. | _Result---P2SH address and hex-encoded redeem script_ | Name | Type | Presence | Description | | ------------------- | --------------- | ----------------------- | ------------------------------------------------ | | `result` | object | Required
(exactly 1) | An object describing the multisig address | | β†’
`address` | string (base58) | Required
(exactly 1) | The P2SH address for this multisig redeem script | | β†’
`redeemScript` | string (hex) | Required
(exactly 1) | The multisig redeem script encoded as hex | _Example from Dash Core 20.0.0_ Adding a 1-of-2 P2SH multisig address with the label "test label" by combining one P2PKH address and one full public key: ```bash dash-cli -testnet -rpcwallet="" addmultisigaddress 1 ''' [ "ySxkBWzPwMrZLAY9ZPitMnSwf4NSUBPbiH", "02594523b004e82849a66b3da096b1e680bf2ed5f7d03a3443c027aa5777bb6223" ] ''' 'test label' ``` Result: ```json { "address": "8jYUv8hJcbSUPbwYmzp1XMPU6SXoic3hwi", "redeemScript": "512103283a224c2c014d1d0ef82b00470b6b277d71e227c0e2394f9baade5d666e57d32102594523b004e82849a66b3da096b1e680bf2ed5f7d03a3443c027aa5777bb622352ae", "descriptor": "sh(multi(1,[48de9d39]03283a224c2c014d1d0ef82b00470b6b277d71e227c0e2394f9baade5d666e57d3,[dec361f1]02594523b004e82849a66b3da096b1e680bf2ed5f7d03a3443c027aa5777bb6223))#vtc5zmh2" } ``` (New P2SH multisig address also stored in wallet.) _See also_ * [CreateMultiSig](../api/remote-procedure-calls-util.md#createmultisig): creates a P2SH multi-signature address. * [DecodeScript](../api/remote-procedure-calls-raw-transactions.md#decodescript): decodes a hex-encoded P2SH redeem script. ## BackupWallet > πŸ“˜ > > Requires [wallet](../resources/glossary.md#wallet) support (**unavailable on masternodes**) The [`backupwallet` RPC](../api/remote-procedure-calls-wallet.md#backupwallet) safely copies `wallet.dat` to the specified file, which can be a directory or a path with filename. _Parameter #1---destination directory or filename_ | Name | Type | Presence | Description | | ----------- | ------ | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Destination | string | Required
(exactly 1) | A filename or directory name. If a filename, it will be created or overwritten. If a directory name, the file `wallet.dat` will be created or overwritten within that directory | _Result---`null` or error_ | Name | Type | Presence | Description | | -------- | ---- | ----------------------- | ------------------------------------------------------------------------------------------------------------------ | | `result` | null | Required
(exactly 1) | Always `null` whether success or failure. The JSON-RPC error and message fields will be set if a failure occurred | _Example from Dash Core 0.12.2_ ```bash dash-cli -testnet backupwallet /tmp/backup.dat ``` _See also_ * [DumpWallet](../api/remote-procedure-calls-wallet.md#dumpwallet): creates or overwrites a file with all wallet keys in a human-readable format. * [ImportWallet](../api/remote-procedure-calls-wallet.md#importwallet): imports private keys from a file in wallet dump file format (see the [`dumpwallet` RPC](../api/remote-procedure-calls-wallet.md#dumpwallet)). These keys will be added to the keys currently in the wallet. This call may need to rescan all or parts of the block chain for transactions affecting the newly-added keys, which may take several minutes. ## CreateWallet > πŸ‘ > > Added in Dash Core 0.17.0 > πŸ“˜ > > Requires [wallet](../resources/glossary.md#wallet) support (**unavailable on masternodes**) The [`createwallet` RPC](../api/remote-procedure-calls-wallet.md#createwallet) creates and loads a new wallet. _Parameter #1---wallet name_ | Name | Type | Presence | Description | | ------------- | ------ | ----------------------- | ------------------------------------------------------------------------------------------------ | | `wallet_name` | string | Required
(exactly 1) | The name for the new wallet. If this is a path, the wallet will be created at the path location. | _Parameter #2---disable private keys_ | Name | Type | Presence | Description | | ---------------------- | ---- | -------------------- | ----------------------------------------------------------------------------------- | | `disable_private_keys` | bool | Optional
(0 or 1) | Disable the possibility of private keys. Only watchonlys are possible in this mode. | _Parameter #3---blank_ | Name | Type | Presence | Description | | ------- | ---- | -------------------- | ------------------------------------------------------------------------------------------------------------------ | | `blank` | bool | Optional
(0 or 1) | Create a blank wallet. A blank wallet has no keys or HD seed. Use [`upgradetohd`](#upgradetohd) to add an HD seed. | _Parameter #4---passphrase_ | Name | Type | Presence | Description | | ------------ | ------ | -------------------- | ---------------------------------------- | | `passphrase` | string | Optional
(0 or 1) | Encrypt the wallet with this passphrase. | _Parameter #5---avoid coin reuse_ | Name | Type | Presence | Description | | ------------- | ---- | -------------------- | ---------------------------------------------------------------------------------------------------------- | | `avoid_reuse` | bool | Optional
(0 or 1) | Keep track of coin reuse, and treat dirty and clean coins differently with privacy considerations in mind. | _Parameter #6---load on startup_ | Name | Type | Presence | Description | | ----------------- | ---- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `load_on_startup` | bool | Optional
(0 or 1) | Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged. | _Result---wallet name and any warnings_ | Name | Type | Presence | Description | | -------------- | ------ | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | `result` | object | Required
(exactly 1) | An object containing information about wallet creation | | β†’
`name` | string | Required
(exactly 1) | The wallet name if created successfully. If the wallet was created using a full path, the `wallet_name` will be the full path | | β†’
`warning` | string | Required
(exactly 1) | Warning message if wallet was not loaded cleanly. | _Example from Dash Core 0.17.0_ ```bash dash-cli -testnet createwallet new-wallet ``` Result: ```json { "name": "new-wallet", "warning": "" } ``` > πŸ“˜ > > In the example above, a new directory named `new-wallet` was created in the current data directory (`~/.dashcore/testnet3/`). This new directory contains the wallet.dat file and other related wallet files for the new wallet. _See also_ * [LoadWallet](../api/remote-procedure-calls-wallet.md#loadwallet): loads a wallet from a wallet file or directory. ## DumpHDInfo The [`dumphdinfo` RPC](../api/remote-procedure-calls-wallet.md#dumphdinfo) returns an object containing sensitive private info about this HD wallet _Parameters: none_ _Result---HD wallet information_ | Name | Type | Presence | Description | | -------------------------- | ------ | ----------------------- | ----------------------------------------------------------------- | | Result | object | Required
(exactly 1) | An object containing sensitive private info about this HD wallet. | | β†’
`hdseed` | string | Required
(exactly 1) | The BIP-32 HD seed (in hex) | | β†’
`mnemonic` | string | Required
(exactly 1) | The BIP-39 mnemonic for this HD wallet (English words) | | β†’
`mnemonicpassphrase` | string | Required
(exactly 1) | The BIP-39 mnemonic passphrase for this HD wallet (may be empty) | _Example from Dash Core 0.12.2_ ```bash dash-cli -testnet dumphdinfo ``` Result (truncated for security reasons): ```json { "hdseed": "20c63c3fb298ebd52de3 ...", "mnemonic": "cost circle shiver ...", "mnemonicpassphrase": "" } ``` _See also: none_ ## DumpPrivKey > πŸ“˜ > > Requires [wallet](../resources/glossary.md#wallet) support (**unavailable on masternodes**). Requires an unlocked wallet or an unencrypted wallet. The [`dumpprivkey` RPC](../api/remote-procedure-calls-wallet.md#dumpprivkey) returns the wallet-import-format (WIP) private key corresponding to an address. (But does not remove it from the wallet.) _Parameter #1---the address corresponding to the private key to get_ | Name | Type | Presence | Description | | ------------- | --------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | P2PKH Address | string (base58) | Required
(exactly 1) | The P2PKH address corresponding to the private key you want returned. Must be the address corresponding to a private key in this wallet | _Result---the private key_ | Name | Type | Presence | Description | | -------- | --------------- | ----------------------- | ----------------------------------------------------------------- | | `result` | string (base58) | Required
(exactly 1) | The private key encoded as base58check using wallet import format | _Example from Dash Core 0.12.2_ ```bash dash-cli -testnet dumpprivkey ycBuREgSskHHkWLxDa9A5WppCki6PfFycL ``` Result: ```text cQZZ4awQvcXXyES3CmUJqSgeTobQm9t9nyUr337kvUtsWsnvvMyw ``` _See also_ * [ImportPrivKey](../api/remote-procedure-calls-wallet.md#importprivkey): adds a private key to your wallet. The key should be formatted in the wallet import format created by the [`dumpprivkey` RPC](../api/remote-procedure-calls-wallet.md#dumpprivkey). * [DumpWallet](../api/remote-procedure-calls-wallet.md#dumpwallet): creates or overwrites a file with all wallet keys in a human-readable format. ## DumpWallet > πŸ“˜ > > Requires [wallet](../resources/glossary.md#wallet) support (**unavailable on masternodes**). Requires an unlocked wallet or an unencrypted wallet. The [`dumpwallet` RPC](../api/remote-procedure-calls-wallet.md#dumpwallet) creates or overwrites a file with all wallet keys in a human-readable format. _Parameter #1---a filename_ | Name | Type | Presence | Description | | -------- | ------ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Filename | string | Required
(exactly 1) | The filename with path (either absolute or relative to Dash Core) into which the wallet dump will be placed. An existing file with that name will be overwritten. | _Result---information about exported wallet_ | Name | Type | Presence | Description | | ---------------------- | ------------ | ----------------------- | ------------------------------------------------------------------- | | `result` | object | Required
(exactly 1) | An object describing dumped wallet file | | β†’
`dashcoreversion` | string | Required
(exactly 1) | Dash Core build details | | β†’
`lastblockheight` | int | Required
(exactly 1) | Height of the most recent block received | | β†’
`lastblockhash` | string (hex) | Required
(exactly 1) | Hash of the most recent block received | | β†’
`lastblocktime` | string | Required
(exactly 1) | Timestamp of the most recent block received | | β†’
`keys` | int | Required
(exactly 1) | Number of keys dumped | | β†’
`filename` | string | Required
(exactly 1) | Name of the file the wallet was dumped to | | β†’
`warning` | string | Required
(exactly 1) | Warning to not share the file due to it containing the private keys | _Example from Dash Core 0.13.0_ Create a wallet dump and then print its first 10 lines. ```bash dash-cli -testnet dumpwallet /tmp/dump.txt head /tmp/dump.txt ``` Results: ```json { "dashcoreversion": "v0.17.0.0", "lastblockheight": 250186, "lastblockhash": "0000000000a82fb1890de5da4740d0671910a436fe6fc4503a3e553adef073b4", "lastblocktime": "2018-10-23T12:50:44Z", "keys": 8135, "file": "/tmp/dump.txt", "warning": "/tmp/dump.txt file contains all private keys from this wallet. Do not share it with anyone!" } ``` Results (the first 10 lines of the file): ```bash >>>>>>>># Wallet dump created by Dash Core v0.13.0.0 >>>>>>>># * Created on 2020-12-09T18:40:52Z >>>>>>>># * Best block at time of backup was 405635 (000000b2304f57eefd42cdd943e7736d479468beb08049b8f88d11ebc7cf6f02), >>>>>>>># mined on 2020-12-09T18:40:23Z cQZZ4awQvcXXyES3CmUJqSgeTobQm9t9nyUr337kvUtsWsnvvMyw 2018-12-14T17:24:37Z change=1 # addr=ycBuREgSskHHkWLxDa9A5WppCki6PfFycL cTBRPnJoPjEMh67v1zes437v8Po5bFLDWKgEudTJMhVaLs1ZVGJe 2018-12-14T17:24:37Z change=1 # addr=yNsWkgPLN1u7p5dfWYnasYdgirU2J3tjUj cRkkwrFnQUrih3QiT87sNy1AxyfjzqVYSyVYuL3qnJcSiQfE4QJa 2018-12-14T17:24:37Z change=1 # addr=yRkHzRbRKn8gBp5826mbaBvxLuBBNDVQg3 cQM7KoqQjHCCTrDhnfBEY1vpW9W65zRvaQeTb41UbFb6WX8Q8UkQ 2018-12-14T17:24:37Z change=1 # addr=yVEdefApUYiDLHApvvWCK5afTtJeQada8Y cTGSKYaQTQabnjNSwCqpjYXiucVujTXiwp9dzmJV9cNAiayAJusi 2018-12-14T17:24:37Z change=1 # addr=ybQYgp21ZyZK8JuMLb2CVwG4TaWrXVXD5M ``` _See also_ * [BackupWallet](../api/remote-procedure-calls-wallet.md#backupwallet): safely copies `wallet.dat` to the specified file, which can be a directory or a path with filename. * [ImportWallet](../api/remote-procedure-calls-wallet.md#importwallet): imports private keys from a file in wallet dump file format (see the [`dumpwallet` RPC](../api/remote-procedure-calls-wallet.md#dumpwallet)). These keys will be added to the keys currently in the wallet. This call may need to rescan all or parts of the block chain for transactions affecting the newly-added keys, which may take several minutes. ## EncryptWallet > πŸ“˜ > > Requires [wallet](../resources/glossary.md#wallet) support (**unavailable on masternodes**). The [`encryptwallet` RPC](../api/remote-procedure-calls-wallet.md#encryptwallet) encrypts the wallet with a passphrase. This is only to enable encryption for the first time. After encryption is enabled, you will need to enter the passphrase to use private keys. > 🚧 > > **Warning:** if using this RPC on the command line, remember that your shell probably saves your command lines (including the value of the passphrase parameter). In addition, there is no RPC to completely disable encryption. If you want to return to an unencrypted wallet, you must create a new wallet and restore your data from a backup made with the [`dumpwallet` RPC](../api/remote-procedure-calls-wallet.md#dumpwallet). _Parameter #1---a passphrase_ | Name | Type | Presence | Description | | ---------- | ------ | ----------------------- | ------------------------------------------------------------------------------- | | Passphrase | string | Required
(exactly 1) | The passphrase to use for the encrypted wallet. Must be at least one character | _Result---a notice (with program shutdown)_ | Name | Type | Presence | Description | | -------- | ------ | ----------------------- | --------------------------------------------------------------------------------------------------------- | | `result` | string | Required
(exactly 1) | A notice that the server is stopping and that you need to make a new backup. The wallet is now encrypted | _Example from Dash Core 0.12.2_ ```bash dash-cli -testnet encryptwallet "test" ``` Result: ```text Wallet encrypted; Dash Core server stopping, restart to run with encrypted wallet. The keypool has been flushed and a new HD seed was generated (if you are using HD). You need to make a new backup. ``` _See also_ * [WalletPassphrase](../api/remote-procedure-calls-wallet.md#walletpassphrase): stores the wallet decryption key in memory for the indicated number of seconds. Issuing the `walletpassphrase` command while the wallet is already unlocked will set a new unlock time that overrides the old one. * [WalletLock](../api/remote-procedure-calls-wallet.md#walletlock): removes the wallet encryption key from memory, locking the wallet. After calling this method, you will need to call `walletpassphrase` again before being able to call any methods which require the wallet to be unlocked. * [WalletPassphraseChange](../api/remote-procedure-calls-wallet.md#walletpassphrasechange): changes the wallet passphrase from 'old passphrase' to 'new passphrase'. ## GetAddressInfo *Added in Dash Core 0.17.0* > πŸ“˜ > > Requires [wallet](../resources/glossary.md#wallet) support (**unavailable on masternodes**). The [`getaddressinfo` RPC](../api/remote-procedure-calls-wallet.md#getaddressinfo) returns information about the given Dash address. Note: Some information requires the address to be in the wallet. _Parameter #1---a P2PKH or P2SH address_ | Name | Type | Presence | Description | | ------- | --------------- | ----------------------- | ----------- | | Address | string (base58) | Required
(exactly 1) | The P2PKH or P2SH address encoded in base58check format | _Result---returns information about the address_ | Name | Type | Presence | Description | | -------------------------- | ---------------- | ----------------------- | ----------- | | `result` | object | Required
(exactly 1) | Information about the address | | β†’
`address` | string (base58) | Required
(exactly 1) | The Dash address given as parameter | | β†’
`scriptPubKey` | string (hex) | Required
(exactly 1) | The hex encoded scriptPubKey generated by the address | | β†’
`ismine` | bool | Required
(exactly 1) | Set to `true` if the address belongs to the wallet; set to false if it does not. Only returned if wallet support enabled | | β†’
`iswatchonly` | bool | Required
(exactly 1) | Set to `true` if the address is watch-only. Otherwise set to `false`. Only returned if address is in the wallet | | β†’
`solvable` | bool | Required
(exactly 1) | Whether we know how to spend coins sent to this address, ignoring the possible lack of private keys | | β†’
`desc` | string | Optional
(0 or 1) | A descriptor for spending coins sent to this address (only present when `solvable` is `true`) | | β†’
`isscript` | bool | Required
(exactly 1) | Set to `true` if a P2SH address; otherwise set to `false`. Only returned if the address is in the wallet | | β†’
`ischange` | bool | Required
(exactly 1) | Set to `true` if the address was used for change output. | | β†’
`script` | string | Optional
(0 or 1) | Only returned for P2SH addresses belonging to this wallet. This is the type of script:
β€’ `pubkey` for a P2PK script inside P2SH
β€’ `pubkeyhash` for a P2PKH script inside P2SH
β€’ `multisig` for a multisig script inside P2SH
β€’ `nonstandard` for unknown scripts | | β†’
`hex` | string (hex) | Optional
(0 or 1) | Only returned for P2SH addresses belonging to this wallet. This is the redeem script encoded as hex | | β†’
`pubkeys` | array | Optional
(0 or 1) | Array of pubkeys associated with the known redeemscript (only if `script` is "multisig") | | β†’ β†’
Pubkey | string | Optional
(0 or more) | A public key | | β†’
`addresses` | array | Optional
(0 or 1) | Array of addresses associated with the known redeemscript (only if "script" is "multisig"). | | β†’ β†’
Address | string | Optional
(0 or more) | An address. | | β†’
`sigsrequired` | number (int) | Optional
(0 or 1) | Only returned for multisig P2SH addresses belonging to the wallet. The number of signatures required by this script | | β†’
`pubkey` | string (hex) | Optional
(0 or 1) | The public key corresponding to this address. Only returned if the address is a P2PKH address in the wallet | | β†’
`iscompressed` | bool | Optional
(0 or 1) | Set to `true` if a compressed public key or set to `false` if an uncompressed public key. Only returned if the address is a P2PKH address in the wallet | | β†’
`label` | string | Optional
(0 or 1) | **Deprecated in Dash Core 20.0.0**
The label associated with the address. Defaults to "". Replaced by the labels array below. | | β†’
`timestamp` | number (int) | Optional
(0 or 1) | The creation time of the key if available in seconds since epoch (Jan 1 1970 GMT) | | β†’
`hdchainid` | string (hash160) | Optional
(0 or 1) | The ID of the HD chain | | β†’
`hdkeypath` | string | Optional
(0 or 1) | The HD keypath if the key is HD and available | | β†’
`hdmasterfingerprint` | string | Optional
(0 or 1) | The fingerprint of the master key | | β†’
`labels` | array | Optional
(0 or 1) | **Updated in Dash Core 20.0.0**
Array of labels associated with the address. The field now returns an array of label name strings. Previously, it returned an array of JSON objects containing `name` and `purpose` key/value pairs, which is now deprecated and will be removed. To re-enable the previous behavior, launch with `-deprecatedrpc=labelspurpose`. | | β†’β†’
Label Data | object | Optional
(0 or 1) | JSON object containing label data | | β†’β†’β†’
`name` | string | Optional
(0 or 1) | The label | | β†’β†’β†’
`purpose` | string | Optional
(0 or 1) | **Deprecated in Dash Core 20.0.0**
Purpose of address (`send` for sending address, `receive` for receiving address) | _Example from Dash Core 20.0.0_ Get info for the following P2PKH address from the wallet: ```bash dash-cli getaddressinfo "yYvsn6vdnkeq9VG1JbkfqKbjv3gUmFmnny" ``` Result: ```json { "address": "yYvsn6vdnkeq9VG1JbkfqKbjv3gUmFmnny", "scriptPubKey": "76a9148a54e0c51084f0e5819a66bb1c4d01191f5caa3888ac", "ismine": true, "solvable": true, "desc": "pkh([654bd9ab/44'/1'/0'/1/137]0214889c34100d00aca6e7cbfe0fa72d83c28857585740bff5f3db6b37e51d9aaa)#v9ze3g5v", "iswatchonly": false, "isscript": false, "pubkey": "0214889c34100d00aca6e7cbfe0fa72d83c28857585740bff5f3db6b37e51d9aaa", "iscompressed": true, "ischange": true, "timestamp": 1612374776, "hdchainid": "a1f28726e62a7766153dac6c90242b712dbb98f4d457b7fb46e09136461dca7e", "hdkeypath": "m/44'/1'/0'/1/137", "hdmasterfingerprint": "654bd9ab", "labels": [ ] } ``` Get info for the following P2SH multisig address from the wallet: ```bash dash-cli -testnet getaddressinfo 8uJLxDxk2gEMbidF5vT8XLS2UCgQmVcroW ``` Result: ```json { "address": "8uJLxDxk2gEMbidF5vT8XLS2UCgQmVcroW", "scriptPubKey": "a914a33155e490d146e656a9bac2cbee9c625ef42f0a87", "ismine": false, "solvable": false, "iswatchonly": false, "isscript": true, "ischange": false, "labels": [ ] } ``` _See also_ * [ImportAddress](../api/remote-procedure-calls-wallet.md#importaddress): adds an address or pubkey script to the wallet without the associated private key, allowing you to watch for transactions affecting that address or pubkey script without being able to spend any of its outputs. * [GetNewAddress](../api/remote-procedure-calls-wallet.md#getnewaddress): returns a new Dash address for receiving payments. If an account is specified, payments received with the address will be credited to that account. * [ValidateAddress](../api/remote-procedure-calls-util.md#validateaddress): returns information about the given Dash address. ## GetAddressesByLabel > πŸ“˜ > > Requires [wallet](../resources/glossary.md#wallet) support (**unavailable on masternodes**) The [`getaddressesbylabel` RPC](../api/remote-procedure-calls-wallet.md#getaddressesbylabel) returns a list of every address assigned to a particular label. _Parameter #1---the label name_ | Name | Type | Presence | Description | | ----- | ------ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | Label | string | Required
(exactly 1) | The name of the label associated with the addresses to get. To get addresses from the default account, pass an empty string (`""`). | _Result---a list of addresses_ | Name | Type | Presence | Description | | ----------- | ------ | ----------------------- | ----------------------------------------------------------------------------------- | | `result` | object | Required
(exactly 1) | A JSON object containing all addresses belonging to the specified label as keys. | | β†’Address | object | Optional
(1 or more) | A JSON object with information about a P2PKH or P2SH address belonging to the label | | β†’β†’`purpose` | string | Optional
(1 or more) | Purpose of address (`send` for sending address, `receive` for receiving address) | _Example from Dash Core 0.17.0_ Get the addresses assigned to the label "doc test": ```bash dash-cli -testnet getaddressesbylabel "doc test" ``` Result: ```json { "yacJKd6tRz2JSn8Wfp9GKgCbuowAEBivrA": { "purpose": "receive" } } ``` _See also_ * [GetAccount](../api/remote-procedure-calls-wallet-deprecated.md#getaccount): returns the name of the account associated with the given address. * [GetBalance](../api/remote-procedure-calls-wallet.md#getbalance): gets the balance in decimal dash across all accounts or for a particular account. ## GetBalance > πŸ“˜ > > Requires [wallet](../resources/glossary.md#wallet) support (**unavailable on masternodes**) The [`getbalance` RPC](../api/remote-procedure-calls-wallet.md#getbalance) gets the total _available balance_ in Dash. The _available balance_ is what the wallet considers currently spendable, and is thus affected by options which limit spendability such as `-spendzeroconfchange`. _Parameter #1---unused parameter_ | Name | Type | Presence | Description | | ------ | ------ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Unused | string | Optional
(0 or 1) | **Deprecated: (previously account) will be removed in a later version of Dash Core**

Remains for backward compatibility. Must be excluded or set to `"*"`. | _Parameter #2---the minimum number of confirmations_ | Name | Type | Presence | Description | | ------------- | ------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Confirmations | number (int) | Optional
(0 or 1) | The minimum number of confirmations an externally-generated transaction must have before it is counted towards the balance. Transactions generated by this node are counted immediately. Typically, externally-generated transactions are payments to this wallet and transactions generated by this node are payments to other wallets. Use `0` to count unconfirmed transactions. Default is `1` | _Parameter #3---whether to add the balance from transactions locked via InstantSend_ | Name | Type | Presence | Description | | --------- | ---- | ----------------------- | ---------------------------------------------------- | | addlocked | bool | Optional
(exactly 1) | Add the balance from InstantSend locked transactions | _Parameter #4---whether to include watch-only addresses_ | Name | Type | Presence | Description | | ------------------ | ---- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Include Watch-Only | bool | Optional
(0 or 1) | If set to `true`, include watch-only addresses in details and calculations as if they were regular addresses belonging to the wallet. If set to `false` (the default for non-watching only wallets), treat watch-only addresses as if they didn't belong to this wallet.
As of Dash Core 18.1, `true` is used as the default for watching-only wallets. | _Parameter #5---avoids partial respends_ | Name | Type | Presence | Description | | ----------- | ---- | -------------------- | --------------------------------------------------------------------------------------------------------------------------- | | avoid_reuse | bool | Optional
(0 or 1) | Do not include balance in dirty outputs; addresses are considered dirty if they have previously been used in a transaction. | _Result---the balance in Dash_ | Name | Type | Presence | Description | | -------- | ------------- | ----------------------- | ---------------------------------------------------- | | `result` | number (dash) | Required
(exactly 1) | The balance of the account (or all accounts) in dash | _Examples from Dash Core 0.17.0_ Get the balance, including transactions with at least three confirmations and those spent to watch-only addresses. Do not include InstantSend locked transactions. ```bash dash-cli -testnet getbalance "*" 3 false true ``` Result: ```json 0.00000000 ``` Get the balance, including transactions with at least three confirmations and those spent to watch-only addresses. Include the balance from InstantSend locked transactions. ```bash dash-cli -testnet getbalance "" 3 true true ``` Result: ```json 1.00000000 ``` _See also_ * [GetBalances](../api/remote-procedure-calls-wallet.md#getbalances): returns an object with all balances denominated in DASH. * [ListAccounts](../api/remote-procedure-calls-removed.md#listaccounts): lists accounts and their balances. * [GetReceivedByAccount](../api/remote-procedure-calls-removed.md#getreceivedbyaccount): returns the total amount received by addresses in a particular account from transactions with the specified number of confirmations. It does not count coinbase transactions. * [GetReceivedByAddress](../api/remote-procedure-calls-wallet.md#getreceivedbyaddress): returns the total amount received by the specified address in transactions with the specified number of confirmations. It does not count coinbase transactions. ## GetBalances The `getbalances` RPC returns an object with all available balances denominated in DASH. _Result---balances in Dash_ | Name | Type | Presence | Description | | --------------------- | ------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | `result` | object | Required
(exactly 1) | A JSON object returns an object with all balances in DASH. | | β†’ `mine` | object | Optional
(1 or more) | A JSON object that has balances from outputs that the wallet can sign. | | β†’β†’`trusted` | numeric | Optional
(1 or more) | Trusted balance (outputs created by the wallet or confirmed outputs) | | β†’β†’`untrusted_pending` | numeric | Optional
(1 or more) | Untrusted pending balance (outputs created by others that are in the mempool) | | β†’β†’`immature` | numeric | Optional
(1 or more) | Balance from immature coinbase outputs | | β†’β†’`used` | numeric | Only present if avoid_reuse is set | Balance from coins sent to addresses that were previously spent from (potentially privacy violating) | | β†’β†’`coinjoin` | numeric | Optional
(1 or more) | CoinJoin balance (outputs with enough rounds created by the wallet via mixing). | | β†’`watchonly` | object | not present if wallet does not watch anything | Watchonly balances. | | β†’β†’`trusted` | numeric | Optional
(1 or more) | Trusted balance (outputs created by the wallet or confirmed outputs). | | β†’β†’`untrusted_pending` | numeric | Optional
(1 or more) | Untrusted pending balance (outputs created by others that are in the mempool). | | β†’β†’`immature` | numeric | Optional
(1 or more) | Balance from immature coinbase outputs. | _Example from Dash Core 18.2.0_ ```bash dash-cli getbalances ``` Result: ``` "mine": { "trusted": 0.00000000, "untrusted_pending": 0.00000000, "immature": 0.00000000, "used": 0.00000000, "coinjoin": 0.00000000 } ``` _See also_ * [GetBalance](../api/remote-procedure-calls-wallet.md#getbalance): gets the balance in decimal dash across all accounts or for a particular account. * [ListAccounts](../api/remote-procedure-calls-removed.md#listaccounts): lists accounts and their balances. * [GetReceivedByAccount](../api/remote-procedure-calls-removed.md#getreceivedbyaccount): returns the total amount received by addresses in a particular account from transactions with the specified number of confirmations. It does not count coinbase transactions. * [GetReceivedByAddress](../api/remote-procedure-calls-wallet.md#getreceivedbyaddress): returns the total amount received by the specified address in transactions with the specified number of confirmations. It does not count coinbase transactions. ## GetNewAddress > πŸ“˜ > > Requires [wallet](../resources/glossary.md#wallet) support (**unavailable on masternodes**) The [`getnewaddress` RPC](../api/remote-procedure-calls-wallet.md#getnewaddress) returns a new Dash address for receiving payments. If `label` is specified, the address is added to the address book so payments received with the address will be associated with `label`. _Parameter #1---an account name_ | Name | Type | Presence | Description | | ------- | ------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `label` | string | Optional
(0 or 1) | The label name for the address to be linked to. If not provided, the default label `""` is used. It can also be set to the empty string `""` to represent the default label. The label does not need to exist, it will be created if there is no label by the given name. | _Result---a dash address never previously returned_ | Name | Type | Presence | Description | | -------- | --------------- | ----------------------- | --------------------- | | `result` | string (base58) | Required
(exactly 1) | The new Dash address. | _Example from Dash Core 0.17.0_ Create a new address in the "doc test" account: ```bash dash-cli -testnet getnewaddress "doc test" ``` Result: ```text yPuNTqCGzXtU3eEV5jHvhhJkzEPyJLmVkb ``` _See also_ * [GetAccountAddress](../api/remote-procedure-calls-wallet-deprecated.md#getaccountaddress): returns the current Dash address for receiving payments to this account. If the account doesn't exist, it creates both the account and a new address for receiving payment. Once a payment has been received to an address, future calls to this RPC for the same account will return a different address. * [GetRawChangeAddress](../api/remote-procedure-calls-wallet.md#getrawchangeaddress): returns a new Dash address for receiving change. This is for use with raw transactions, not normal use. * [GetBalance](../api/remote-procedure-calls-wallet.md#getbalance): gets the balance in decimal dash across all accounts or for a particular account. ## GetRawChangeAddress > πŸ“˜ > > Requires [wallet](../resources/glossary.md#wallet) support (**unavailable on masternodes**) The [`getrawchangeaddress` RPC](../api/remote-procedure-calls-wallet.md#getrawchangeaddress) returns a new Dash address for receiving change. This is for use with raw transactions, not normal use. _Parameters: none_ _Result---a P2PKH address which can be used in raw transactions_ | Name | Type | Presence | Description | | -------- | --------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `result` | string (base58) | Required
(exactly 1) | A P2PKH address which has not previously been returned by this RPC. The address will be removed from the keypool but not marked as a receiving address, so RPCs such as the [`dumpwallet` RPC](../api/remote-procedure-calls-wallet.md#dumpwallet) will show it as a change address. The address may already have been part of the keypool, so other RPCs such as the [`dumpwallet` RPC](../api/remote-procedure-calls-wallet.md#dumpwallet) may have disclosed it previously. If the wallet is unlocked, its keypool will also be filled to its max (by default, 100 unused keys). If the wallet is locked and its keypool is empty, this RPC will fail | _Example from Dash Core 0.12.2_ ```bash dash-cli -testnet getrawchangeaddress ``` Result: ```text yXBr9BiJmugTzHPgByDmvjJMAkvhTmXVJ8 ``` _See also_ * [GetNewAddress](../api/remote-procedure-calls-wallet.md#getnewaddress): returns a new Dash address for receiving payments. If an account is specified, payments received with the address will be credited to that account. * [GetAccountAddress](../api/remote-procedure-calls-wallet-deprecated.md#getaccountaddress): returns the current Dash address for receiving payments to this account. If the account doesn't exist, it creates both the account and a new address for receiving payment. Once a payment has been received to an address, future calls to this RPC for the same account will return a different address. ## GetReceivedByAddress > πŸ“˜ > > Requires [wallet](../resources/glossary.md#wallet) support (**unavailable on masternodes**) ![Warning icon](https://raw.githubusercontent.com/dashpay/docs-core/main/img/icons/icon_warning.svg) Note: This RPC only returns a balance for addresses contained in the local wallet. The [`getreceivedbyaddress` RPC](../api/remote-procedure-calls-wallet.md#getreceivedbyaddress) returns the total amount received by the specified address in transactions with the specified number of confirmations. It does not count coinbase transactions. _Parameter #1---the address_ | Name | Type | Presence | Description | | ------- | ------ | ----------------------- | ------------------------------------------------------------------------------------------------------------------ | | Address | string | Required
(exactly 1) | **Only works for addresses contained in the local wallet**

The address whose transactions should be tallied | _Parameter #2---the minimum number of confirmations_ | Name | Type | Presence | Description | | ------------- | ------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Confirmations | number (int) | Optional
(0 or 1) | The minimum number of confirmations an externally-generated transaction must have before it is counted towards the balance. Transactions generated by this node are counted immediately. Typically, externally-generated transactions are payments to this wallet and transactions generated by this node are payments to other wallets. Use `0` to count unconfirmed transactions. Default is `1` | _Parameter #3---whether to include transactions locked via InstantSend_ | Name | Type | Presence | Description | | --------- | ---- | ----------------------- | ---------------------------------------------------- | | addlocked | bool | Optional
(exactly 1) | Add the balance from InstantSend locked transactions | _Result---the amount of dash received_ | Name | Type | Presence | Description | | -------- | ------------- | ----------------------- | ---------------------------------------------------------------------------------------- | | `result` | number (dash) | Required
(exactly 1) | The amount of dash received by the address, excluding coinbase transactions. May be `0` | _Example from Dash Core 0.13.0_ Get the dash received for a particular address, only counting transactions with six or more confirmations (ignore InstantSend locked transactions): ```bash dash-cli -testnet getreceivedbyaddress yYoCWcjbykWsQJ7MVJrTMeQd8TZe5N4Q7g 6 ``` Result: ```json 0.00000000 ``` Get the dash received for a particular address, only counting transactions with six or more confirmations (include InstantSend locked transactions): ```bash dash-cli -testnet getreceivedbyaddress yYoCWcjbykWsQJ7MVJrTMeQd8TZe5N4Q7g 6 true ``` Result: ```json 0.30000000 ``` _See also_ * [GetReceivedByAccount](../api/remote-procedure-calls-removed.md#getreceivedbyaccount): returns the total amount received by addresses in a particular account from transactions with the specified number of confirmations. It does not count coinbase transactions. * [GetAddressesByAccount](../api/remote-procedure-calls-wallet-deprecated.md#getaddressesbyaccount): returns a list of every address assigned to a particular account. * [ListAccounts](../api/remote-procedure-calls-removed.md#listaccounts): lists accounts and their balances. ## GetReceivedByLabel > πŸ“˜ > > Requires [wallet](../resources/glossary.md#wallet) support (**unavailable on masternodes**) The [`getreceivedbylabel` RPC](../api/remote-procedure-calls-wallet.md#getreceivedbylabel) returns the total amount received by addresses with