Wallet RPCs#

Attention

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

dash-cli abandontransaction fa3970c341c9f5de6ab13f128cbfec58d732e736a505fe32137ad551c799ecc4

Result (no output from dash-cli because result is set to null).

See also

  • SendRawTransaction: validates a transaction and broadcasts it to the peer-to-peer network.

AbortRescan#

The abortrescan RPC Stops current wallet rescan

Stops current wallet rescan triggered e.g. by an importprivkey RPC call.

Parameters: none

Result—true on success

Name

Type

Presence

Description

result

bool

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

dash-cli -testnet abortrescan

Result:

true

See also: none

AddMultiSigAddress#

Note

Requires wallet support (unavailable on masternodes).

Note

This command is only compatible with legacy wallets.

The addmultisigaddress RPC 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 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

→
descriptor

string

Required
(exactly 1)

The descriptor for this multisig

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:

dash-cli -testnet -rpcwallet="" addmultisigaddress 1 '''
  [
    "ySxkBWzPwMrZLAY9ZPitMnSwf4NSUBPbiH",
    "02594523b004e82849a66b3da096b1e680bf2ed5f7d03a3443c027aa5777bb6223"
  ]
'''  'test label'

Result:

{
  "address": "8jYUv8hJcbSUPbwYmzp1XMPU6SXoic3hwi",
  "redeemScript": "512103283a224c2c014d1d0ef82b00470b6b277d71e227c0e2394f9baade5d666e57d32102594523b004e82849a66b3da096b1e680bf2ed5f7d03a3443c027aa5777bb622352ae",
  "descriptor": "sh(multi(1,[48de9d39]03283a224c2c014d1d0ef82b00470b6b277d71e227c0e2394f9baade5d666e57d3,[dec361f1]02594523b004e82849a66b3da096b1e680bf2ed5f7d03a3443c027aa5777bb6223))#vtc5zmh2"
}

(New P2SH multisig address also stored in wallet.)

See also

BackupWallet#

Note

Requires wallet support (unavailable on masternodes).

The backupwallet RPC 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

dash-cli -testnet backupwallet /tmp/backup.dat

See also

  • DumpWallet: creates a file with all wallet keys in a human-readable format.

  • ImportWallet: imports private keys from a file in wallet dump file format (see the dumpwallet RPC). 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.

  • RestoreWallet: restores and loads a wallet from a backup file.

CreateWallet#

Note

Requires wallet support (unavailable on masternodes).

The createwallet RPC creates and loads a new wallet.

As of Dash Core 24.0.0, creating a wallet that is not blank and has private keys enabled fails if the -mnemonicpassphrase startup option is longer than 248 bytes (not characters). Passphrases of 249 to 256 bytes are only accepted if the node is started with -allow-deprecated-long-mnemonics, which should only be used to recover a wallet created with such a passphrase by Dash Core 19.2.0 or later.

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 (mnemonic) or sethdseed (WIF private key) 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—descriptors

Name

Type

Presence

Description

descriptors

bool

Optional
(0 or 1)

Updated in Dash Core 24.0.0
Create a native descriptor wallet. The wallet will use descriptors internally to handle address creation. Default is true (was false prior to Dash Core 24.0.0). If descriptors is specified (true or false), load_on_startup must also be specified; prior to Dash Core 24.0.0 this was only required for descriptors=true

Parameter #7—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.

Parameter #8—external signer

Name

Type

Presence

Description

external_signer

bool

Optional
(0 or 1)

Use an external signer such as a hardware wallet. Requires -signer to be configured. Wallet creation will fail if keys cannot be fetched. Requires disable_private_keys and descriptors set to true.

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

Optional
(0 or 1)

Deprecated in Dash Core 24.0.0, returned only if config option -deprecatedrpc=walletwarningfield is passed
Warning messages, if any, related to creating the wallet. Multiple messages will be delimited by newlines.

→
warnings

array

Optional
(0 or 1)

Added in Dash Core 24.0.0
Warning messages, if any, related to creating the wallet.

→ →
Warning

string

Optional
(0 or more)

A warning message

Example from Dash Core 0.17.0

dash-cli -testnet createwallet new-wallet

Result:

{
  "name": "new-wallet",
  "warning": ""
}

Note

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: loads a wallet from a wallet file or directory.

  • RestoreWallet: restores and loads a wallet from a backup file.

DumpHDInfo#

Note

This command is only compatible with legacy wallets.

The dumphdinfo RPC 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

dash-cli -testnet dumphdinfo

Result (truncated for security reasons):

{
  "hdseed": "20c63c3fb298ebd52de3 ...",
  "mnemonic": "cost circle shiver ...",
  "mnemonicpassphrase": ""
}

See also: none

DumpPrivKey#

Note

Requires wallet support (unavailable on masternodes) and an unlocked or unencrypted wallet.

Note

This command is only compatible with legacy wallets.

The dumpprivkey RPC 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

dash-cli -testnet dumpprivkey ycBuREgSskHHkWLxDa9A5WppCki6PfFycL

Result:

cQZZ4awQvcXXyES3CmUJqSgeTobQm9t9nyUr337kvUtsWsnvvMyw

See also

  • ImportPrivKey: adds a private key to your wallet. The key should be formatted in the wallet import format created by the dumpprivkey RPC.

  • DumpWallet: creates a file with all wallet keys in a human-readable format.

DumpWallet#

Note

Requires wallet support (unavailable on masternodes) and an unlocked or unencrypted wallet.

Note

This command is only compatible with legacy wallets.

The dumpwallet RPC creates a file with all wallet keys in a human-readable format. It does not overwrite an existing file.

Parameter #1—a filename

Name

Type

Presence

Description

Filename

string

Required
(exactly 1)

The filename with path (absolute path recommended) into which the wallet dump will be placed. The call fails if a file with that name already exists.

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

number (int)

Required
(exactly 1)

The time of the last block processed by the wallet, expressed in UNIX epoch time

→
hdaccounts

number (int)

Optional
(0 or 1)

The number of HD accounts contained in the wallet dump (only present if the wallet is HD)

→
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 24.0.0

Create a wallet dump and then print its first 10 lines.

dash-cli -testnet dumpwallet /tmp/dump.txt
head /tmp/dump.txt

Results:

{
  "dashcoreversion": "v24.0.0",
  "lastblockheight": 1568042,
  "lastblockhash": "00000060b0cc3caf80d53fb548816beb2ab9bdc32c326aba0b44c1ad60fc162e",
  "lastblocktime": 1791392929,
  "hdaccounts": 1,
  "keys": 2184,
  "filename": "/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):

>>>>>>>># 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: safely copies wallet.dat to the specified file, which can be a directory or a path with filename.

  • ImportWallet: imports private keys from a file in wallet dump file format (see the dumpwallet RPC). 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#

Note

Requires wallet support (unavailable on masternodes).

The encryptwallet RPC 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.

As of Dash Core 24.0.0, the wallet cannot be encrypted while a rescan started by the rescanblockchain RPC or importdescriptors RPC is running. Call the abortrescan RPC first.

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.

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

Name

Type

Presence

Description

result

string

Required
(exactly 1)

A string with further instructions. The wallet is now encrypted and the server keeps running

Example from Dash Core 24.0.0

dash-cli -testnet encryptwallet "test"

Result:

wallet encrypted; If you forget the passphrase, you will lose access to your funds. Make sure that you have backup of your seed or mnemonic.

See also

  • 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: 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: changes the wallet passphrase from ‘old passphrase’ to ‘new passphrase’.

EnumerateSigners#

Added in version 23.1.0.

The enumeratesigners RPC returns a list of external signers from -signer.

Parameters: none

Result—the available external signers

Name

Type

Presence

Description

result

object

Required
(exactly 1)

An object containing the available external signers

→
signers

array

Required
(exactly 1)

Array of external signers

→ →
Signer

object

Optional
(0 or more)

JSON object describing an external signer

→ → →
fingerprint

string (hex)

Required
(exactly 1)

Master key fingerprint

→ → →
name

string

Required
(exactly 1)

Device name

GetAddressInfo#

Added in Dash Core 0.17.0

Note

Requires wallet support (unavailable on masternodes).

The getaddressinfo RPC returns information about the given Dash address. Note: Some information requires the address to be in the wallet.

A DIP-18 Dash Platform address is described against the credit output script an asset lock would carry for it; fields like ismine and solvable then refer to that script, not to ownership of a Platform identity.

Parameter #1—a P2PKH or P2SH address

Name

Type

Presence

Description

Address

string

Required
(exactly 1)

Updated in Dash Core 24.0.0
The P2PKH or P2SH address encoded in base58check format, or a DIP-18 Dash Platform address

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

→
isplatform

bool

Optional
(0 or 1)

Added in Dash Core 24.0.0
If the address is a DIP-18 Dash Platform address.

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

→
parent_desc

string

Optional
(0 or 1)

The descriptor used to derive this address if this is a descriptor wallet.

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

The output script type. Possible types include: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata. Only returned if isscript is true and the redeemscript is known.

→
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

→
embedded

object

Optional
(0 or 1)

Added in Dash Core 23.0.0
Information about the address embedded in P2SH, if relevant and known. Includes all getaddressinfo output fields for the embedded address, excluding metadata (timestamp, hdkeypath, hdseedid) and relation to the wallet (ismine, iswatchonly).

→
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

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

Updated in Dash Core 24.0.0
The HD keypath if the key is HD and available. Descriptor wallets show hardened steps with h (for example, m/44h/1h/0h/0/1); legacy wallets still use '

→
hdseedid

string (hex)

Optional
(0 or 1)

The Hash160 of the HD seed.

→
hdmasterfingerprint

string

Optional
(0 or 1)

The fingerprint of the master key

→
labels

array

Optional
(0 or 1)

Updated in Dash Core 21.0.0
An array of labels associated with the address. Currently limited to one label but returned as an array to keep the API stable if multiple labels are enabled in the future.

Example from Dash Core 21.0.0

Get info for the following P2PKH address from the wallet:

dash-cli getaddressinfo "yZ9fa6vzAS5yz3QjA8etgA4ka1GD2X9ouq"

Result:

{
  "address": "yZ9fa6vzAS5yz3QjA8etgA4ka1GD2X9ouq",
  "scriptPubKey": "76a9148cc018804bcca348bae6c8cdf8c0890b09cc42ca88ac",
  "ismine": true,
  "solvable": true,
  "desc": "pkh([2849fa86/44'/1'/0'/0/1]03ad075b0b163e9cd17a24143f8914c51abc697e0706c7a0d54594b3487f0ff15c)#k2juu6h5",
  "iswatchonly": false,
  "isscript": false,
  "pubkey": "03ad075b0b163e9cd17a24143f8914c51abc697e0706c7a0d54594b3487f0ff15c",
  "iscompressed": true,
  "ischange": false,
  "timestamp": 1692213593,
  "hdchainid": "51cbaf0337e7f59ae8ad81360b20ebbb68019bab8d9d2d84ce39e20dc635b940",
  "hdkeypath": "m/44'/1'/0'/0/1",
  "hdmasterfingerprint": "2849fa86",
  "labels": [
    ""
  ]
}

Note

This example predates Dash Core 24.0.0. Dash Core 24.0.0 shows hardened derivation steps in desc with h instead of ' (for example, [2849fa86/44h/1h/0h/0/1]), with a different checksum. hdkeypath is unchanged for this legacy wallet.

Get info for the following P2SH multisig address from the wallet:

dash-cli -testnet getaddressinfo 8uJLxDxk2gEMbidF5vT8XLS2UCgQmVcroW

Result:

{
  "address": "8uJLxDxk2gEMbidF5vT8XLS2UCgQmVcroW",
  "scriptPubKey": "a914a33155e490d146e656a9bac2cbee9c625ef42f0a87",
  "ismine": false,
  "solvable": false,
  "iswatchonly": false,
  "isscript": true,
  "ischange": false,
  "labels": [
    ""
  ]
}

See also

  • 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: 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: returns information about the given Dash address.

GetAddressesByLabel#

Note

Requires wallet support (unavailable on masternodes).

The getaddressesbylabel RPC 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
(0 or more)

A JSON object with information about a P2PKH or P2SH address belonging to the label

→→purpose

string

Required
(exactly 1)

Purpose of address: send for sending address, receive for receiving address, refund (only found in older wallets), or unknown if no purpose is recorded or it is not one of these values

Example from Dash Core 0.17.0

Get the addresses assigned to the label “doc test”:

dash-cli -testnet getaddressesbylabel "doc test"

Result:

{
  "yacJKd6tRz2JSn8Wfp9GKgCbuowAEBivrA": {
    "purpose": "receive"
  }
}

See also

  • GetBalance: gets the balance in decimal dash across all accounts or for a particular account.

GetBalance#

Note

Requires wallet support (unavailable on masternodes).

The getbalance RPC 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 0

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.

dash-cli -testnet getbalance "*" 3 false true

Result:

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.

dash-cli -testnet getbalance "" 3 true true

Result:

1.00000000

See also

  • GetBalances: returns an object with all balances denominated in DASH.

  • GetReceivedByAddress: returns the total amount received by the specified address in transactions with the specified number of confirmations.

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

Required
(exactly 1)

A JSON object that has balances from outputs that the wallet can sign.

→→trusted

numeric

Required
(exactly 1)

Trusted balance (outputs created by the wallet or confirmed outputs)

→→untrusted_pending

numeric

Required
(exactly 1)

Untrusted pending balance (outputs created by others that are in the mempool)

→→immature

numeric

Required
(exactly 1)

Balance from immature coinbase outputs

→→used

numeric

Optional
(0 or 1)

Balance from coins sent to addresses that were previously spent from (potentially privacy violating). Only present if avoid_reuse is set

→→coinjoin

numeric

Required
(exactly 1)

CoinJoin balance (outputs with enough rounds created by the wallet via mixing).

→watchonly

object

Optional
(0 or 1)

Watchonly balances. Only present for legacy wallets that watch scripts

→→trusted

numeric

Required
(exactly 1)

Trusted balance (outputs created by the wallet or confirmed outputs).

→→untrusted_pending

numeric

Required
(exactly 1)

Untrusted pending balance (outputs created by others that are in the mempool).

→→immature

numeric

Required
(exactly 1)

Balance from immature coinbase outputs.

→
lastprocessedblock

object

Required
(exactly 1)

Hash and height of the block this information was generated on

→ →
hash

string

Required
(exactly 1)

Hash of the block this information was generated on

→ →
height

numeric

Required
(exactly 1)

Height of the block this information was generated on

Example from Dash Core 23.1.7

dash-cli getbalances

Result:

"mine": {
    "trusted": 0.00000000,
    "untrusted_pending": 0.00000000,
    "immature": 0.00000000,
    "used": 0.00000000,
    "coinjoin": 0.00000000
  },
  "lastprocessedblock": {
    "hash": "000000523a483b6e2e1756ea1f4f6b1a3cd0934b2fdc01a2f71031a3bf7a9eb1",
    "height": 1518273
  }

See also

  • GetBalance: gets the balance in decimal dash across all accounts or for a particular account.

  • GetReceivedByAddress: returns the total amount received by the specified address in transactions with the specified number of confirmations.

GetNewAddress#

Note

Requires wallet support (unavailable on masternodes).

The getnewaddress RPC 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:

dash-cli -testnet getnewaddress "doc test"

Result:

yPuNTqCGzXtU3eEV5jHvhhJkzEPyJLmVkb

See also

  • GetRawChangeAddress: returns a new Dash address for receiving change. This is for use with raw transactions, not normal use.

  • GetBalance: gets the balance in decimal dash across all accounts or for a particular account.

GetRawChangeAddress#

Note

Requires wallet support (unavailable on masternodes).

The getrawchangeaddress RPC 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 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 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

dash-cli -testnet getrawchangeaddress

Result:

yXBr9BiJmugTzHPgByDmvjJMAkvhTmXVJ8

See also

  • 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.

GetReceivedByAddress#

Note

Requires wallet support (unavailable on masternodes).

Warning icon Note: This RPC only returns a balance for addresses contained in the local wallet.

The getreceivedbyaddress RPC returns the total amount received by the specified address in transactions with the specified number of confirmations. Mature coinbase outputs are always counted; immature coinbase outputs are counted only if include_immature_coinbase is true.

As of Dash Core 24.0.0, the -deprecatedrpc=exclude_coinbase option has been removed, so coinbase outputs can no longer be excluded.

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

Parameter #4—whether to include immature coinbase transactions

Name

Type

Presence

Description

include_immature_coinbase

bool

Optional
(0 or 1)

Added in Dash Core 23.0.0
Include immature coinbase transactions. Default is false

Result—the amount of dash received

Name

Type

Presence

Description

result

number (dash)

Required
(exactly 1)

The amount of dash received by the address. 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):

dash-cli -testnet getreceivedbyaddress yYoCWcjbykWsQJ7MVJrTMeQd8TZe5N4Q7g 6

Result:

0.00000000

Get the dash received for a particular address, only counting
transactions with six or more confirmations (include InstantSend locked transactions):

dash-cli -testnet getreceivedbyaddress yYoCWcjbykWsQJ7MVJrTMeQd8TZe5N4Q7g 6 true

Result:

0.30000000

See also: none

GetReceivedByLabel#

Note

Requires wallet support (unavailable on masternodes).

The getreceivedbylabel RPC returns the total amount received by addresses with

As of Dash Core 24.0.0, the call fails with error -4 (Label not found in wallet) if no address in the address book has this label, or with error -4 (Address not found in wallet) if none of the label’s addresses belong to the wallet. Previously, 0 was returned in both cases.

Parameter #1—the label name

Name

Type

Presence

Description

Label

string

Required
(exactly 1)

The selected label, may be the default label using "".

Parameter #2—the minimum number of confirmations

Name

Type

Presence

Description

Confirmations

number (int)

Optional
(0 or 1)

The minimum number of confirmations a transaction must have before it is counted towards the balance. 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 (default=false)

Parameter #4—whether to include immature coinbase transactions

Name

Type

Presence

Description

include_immature_coinbase

bool

Optional
(0 or 1)

Added in Dash Core 23.0.0
Include immature coinbase transactions. Default is false

Result—the number of DASH received

Name

Type

Presence

Description

result

number (dash)

Required
(exactly 1)

The total amount of DASH received for this label. May be 0

Example from Dash Core 0.17.0

Get the DASH received by the “doc test” label with six or more confirmations:

dash-cli -testnet getreceivedbylabel "doc test" 6

Result:

0.30000000

See also

  • GetReceivedByAddress: returns the total amount received by the specified address in transactions with the specified number of confirmations.

  • GetAddressesByLabel: returns a list of every address assigned to a particular label.

  • ListLabels: lists labels.

GetTransaction#

Note

Requires wallet support (unavailable on masternodes).

The gettransaction RPC gets detailed information about an in-wallet transaction.

Parameter #1—a transaction identifier (TXID)

Name

Type

Presence

Description

TXID

string (hex)

Required
(exactly 1)

The TXID of the transaction to get details about. The TXID must be encoded as hex in RPC byte order

Parameter #2—whether to include watch-only addresses in details and calculations

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 the default for watching-only wallets.

Parameter #3—whether or not to include the decoded transaction

Name

Type

Presence

Description

verbose

bool

Optional
(0 or 1)

Whether to include a decoded field containing the decoded transaction (equivalent to RPC decoderawtransaction)

Result—a description of the transaction

Name

Type

Presence

Description

result

object

Required
(exactly 1)

An object describing how the transaction affects the wallet

→
amount

number (dash)

Required
(exactly 1)

A positive number of dash if this transaction increased the total wallet balance; a negative number of dash if this transaction decreased the total wallet balance, or 0 if the transaction had no net effect on wallet balance

→
fee

number (dash)

Optional
(0 or 1)

If an outgoing transaction, this is the fee paid by the transaction reported as negative dash

→
confirmations

number (int)

Required
(exactly 1)

The number of confirmations the transaction has received. Will be 0 for unconfirmed and -1 for conflicted

→
instantlock

bool

Required
(exactly 1)

If set to true, this transaction is either protected by an InstantSend lock or it is in a block that has received a ChainLock

→
instantlock_internal

bool

Required
(exactly 1)

If set to true, this transaction has an InstantSend lock. Available for ‘send’ and ‘receive’ category of transactions.

→
chainlock

bool

Required
(exactly 1)

If set to true, this transaction is in a block that is locked (not susceptible to a chain re-org)

→
trusted

bool

Optional
(0 or 1)

Whether we consider the outputs of this unconfirmed transaction safe to spend. Only returned for unconfirmed transactions

→
generated

bool

Optional
(0 or 1)

Updated in Dash Core 23.0.0
Set to true if the transaction’s only input is a coinbase one. Only present if the transaction’s only input is a coinbase one.

→
platform-transfer

bool

Optional
(0 or 1)

Only present if the transaction is a Platform Transfer.

→
blockhash

string (hex)

Optional
(0 or 1)

The hash of the block on the local best block chain which includes this transaction, encoded as hex in RPC byte order. Only returned for confirmed transactions

→
blockheight

number (int)

Optional
(0 or 1)

The block height containing the transaction. Only returned for confirmed transactions

→
blockindex

number (int)

Optional
(0 or 1)

The index of the transaction in the block that includes it. Only returned for confirmed transactions

→
blocktime

number (int)

Optional
(0 or 1)

The block header time (Unix epoch time) of the block on the local best block chain which includes this transaction. Only returned for confirmed transactions

→
txid

string (hex)

Required
(exactly 1)

The TXID of the transaction, encoded as hex in RPC byte order

→
walletconflicts

array

Required
(exactly 1)

An array containing the TXIDs of other transactions that spend the same inputs (UTXOs) as this transaction. Array may be empty

→ →
TXID

string (hex)

Optional
(0 or more)

The TXID of a conflicting transaction, encoded as hex in RPC byte order

→
time

number (int)

Required
(exactly 1)

A Unix epoch time when the transaction was added to the wallet

→
timereceived

number (int)

Required
(exactly 1)

A Unix epoch time when the transaction was detected by the local node, or the time of the block on the local best block chain that included the transaction

→
comment

string

Optional
(0 or 1)

For transaction originating with this wallet, a locally-stored comment added to the transaction. Only returned if a comment was added

→
to

string

Optional
(0 or 1)

For transaction originating with this wallet, a locally-stored comment added to the transaction identifying who the transaction was sent to. Only returned if a comment-to was added

→
DS

string

Optional
(0 or 1)

Set to “1” if the transaction is a CoinJoin send.

→
details

array

Required
(exactly 1)

An array containing one object for each input or output in the transaction which affected the wallet

→ →
involvesWatchonly

bool

Optional
(0 or 1)

Set to true if the input or output involves a watch-only address. Otherwise not returned

→ →
address

string (base58)

Optional
(0 or 1)

If an output, the address paid (may be someone else’s address not belonging to this wallet). If an input, the address paid in the previous output. May be empty if the address is unknown, such as when paying to a non-standard pubkey script

→ →
category

string

Required
(exactly 1)

Set to one of the following values:
• send if sending payment normally
• coinjoin if sending CoinJoin payment
• receive if this wallet received payment in a regular transaction
• generate if a matured and spendable coinbase
• immature if a coinbase that is not spendable yet
• orphan if a coinbase from a block that’s not in the local best block chain
• platform-transfer if a Platform Transfer transaction was received

→ →
amount

number (dash)

Required
(exactly 1)

A negative dash amount if sending payment; a positive dash amount if receiving payment (including coinbases)

→ →
label

string

Optional
(0 or 1)

An optional comment for the address/transaction

→ →
vout

number (int)

Required
(exactly 1)

For an output, the output index (vout) for this output in this transaction. For an input, the output index for the output being spent in its transaction. Because inputs list the output indexes from previous transactions, more than one entry in the details array may have the same output index

→ →
fee

number (dash)

Optional
(0 or 1)

If sending payment, the fee paid as a negative dash value. May be 0. Not returned if receiving payment

→ →
abandoned

bool

Required
(exactly 1)

Added in Bitcoin Core 0.12.1

Indicates if a transaction is was abandoned:
• true if it was abandoned (inputs are respendable)
• false if it was not abandoned

→ →
parent_descs

array

Optional
(0 or 1)

Added in Dash Core 24.0.0
Only if ‘category’ is ‘received’. List of parent descriptors for the scriptPubKey of this coin.

→ → →
Descriptor

string

Optional
(0 or more)

The descriptor string.

→
hex

string (hex)

Required
(exactly 1)

The transaction in serialized transaction format

→
decoded

object

Optional
(0 or 1)

The decoded transaction (only present when verbose is passed), equivalent to the RPC decoderawtransaction method, or the RPC getrawtransaction method when verbose is passed.

→
lastprocessedblock

object

Required
(exactly 1)

Hash and height of the block this information was generated on

→ →
hash

string (hex)

Required
(exactly 1)

Hash of the block this information was generated on

→ →
height

number (int)

Required
(exactly 1)

Height of the block this information was generated on

Example from Dash Core 21.1.0

dash-cli -testnet gettransaction \
  88a3fe6bf2ab4425dbf57d75ce761efa2e45556ec36b4fd5b6af6c00f01ebd63

Result:

{
  "amount": 2.37570000,
  "confirmations": 192419,
  "instantlock": true,
  "instantlock_internal": false,
  "chainlock": true,
  "blockhash": "0000009f3480f5e2b6821af57ccbfeb064d9e18b6e9e669aad238f2b0059df1a",
  "blockheight": 886992,
  "blockindex": 1,
  "blocktime": 1692025132,
  "txid": "88a3fe6bf2ab4425dbf57d75ce761efa2e45556ec36b4fd5b6af6c00f01ebd63",
  "walletconflicts": [
  ],
  "time": 1692025132,
  "timereceived": 1692213632,
  "details": [
    {
      "address": "ygU1vv8a2fhiM2gYUF1GjQAcjxgZUKY5MD",
      "category": "receive",
      "amount": 2.37570000,
      "label": "First address",
      "vout": 1
    }
  ],
  "hex": "02000000016634e15fe22fe84554833f109916fced5af30fac0849a211f17f326162280f14010000006a47304402207b8f61bebe3560b6ef70de3e10b59bdc60931d09cf0626026bfe3064dcfcf1c00220048ad98398cb294fa19335110db3ce5a466b74cbbf234bf2b4855b264a03ef790121027b90f229e7027758f0c8b39d2d485b88ed5b63b34e58e0dad2a07e3e8eb03373feffffff0278f51104000000001976a9148907e625c343ac9c6b56e8180f73af1d23350d0c88acd007290e000000001976a914dd01754e43690f41feef2cc7974bc2e5101e9f2788accf880d00"
}

See also

  • GetRawTransaction: gets a hex-encoded serialized transaction or a JSON object describing the transaction. By default, Dash Core only stores complete transaction data for UTXOs and your own transactions, so the RPC may fail on historic transactions unless you use the non-default txindex=1 in your Dash Core startup settings.

GetUnconfirmedBalance#

Note

Requires wallet support (unavailable on masternodes).

The getunconfirmedbalance RPC returns the wallet’s total unconfirmed balance. Deprecated: identical to getbalances().mine.untrusted_pending (see the getbalances RPC).

Parameters: none

Result—the balance of unconfirmed transactions paying this wallet

Name

Type

Presence

Description

result

number (dash)

Required
(exactly 1)

The total number of dash paid to this wallet in unconfirmed transactions

Example from Dash Core 0.12.2

dash-cli -testnet getunconfirmedbalance

Result (no unconfirmed incoming payments):

0.00000000

See also

  • GetBalance: gets the balance in decimal dash across all accounts or for a particular account.

GetWalletInfo#

Note

Requires wallet support (unavailable on masternodes).

The getwalletinfo RPC provides information about the wallet.

Parameters: none

Result—information about the wallet

Name

Type

Presence

Description

result

object

Required
(exactly 1)

An object describing the wallet

→
walletname

string

Required
(exactly 1)

The name of the wallet

→
walletversion

number (int)

Required
(exactly 1)

The version

→
format

string

Required
(exactly 1)

Added in Dash Core 20.0.0

The database format (bdb or sqlite)

→
balance

number (dash)

Required
(exactly 1)

Deprecated The total confirmed balance of the wallet. The same as returned by the getbalance RPC with default parameters

→
coinjoin_balance

number (dash)

Required
(exactly 1)

Deprecated Added in Dash Core 0.12.3

The total CoinJoin balance of the wallet. Identical to getbalances().mine.coinjoin.

→
unconfirmed_balance

number (dash)

Required
(exactly 1)

Deprecated The total unconfirmed balance of the wallet. The same as returned by the getunconfirmedbalance RPC with default parameters. Identical to getbalances().mine.untrusted_pending.

→
immature_balance

number (dash)

Required
(exactly 1)

Deprecated The total immature balance of the wallet. This includes mining/masternode rewards that cannot be spent yet. Identical to getbalances().mine.immature.

→
txcount

number (int)

Required
(exactly 1)

The total number of transactions in the wallet (both spends and receives)

→
timefirstkey

number (int)

Optional
(0 or 1)

The timestamp (seconds since Unix epoch) of the oldest known key in the wallet. Legacy wallets only

→
keypoololdest

number (int)

Optional
(0 or 1)

The date as Unix epoch time when the oldest key in the wallet key pool was created; useful for only scanning blocks created since this date for transactions. Legacy wallets only

→
keypoolsize

number (int)

Required
(exactly 1)

The number of keys in the wallet keypool

→
keypoolsize_hd_internal

number (int)

Required
(exactly 1)

How many new keys are pre-generated for internal use (used for change outputs and mobile coinjoin)

→
keys_left

number (int)

Required
(exactly 1)

The number of unused keys left since the last automatic backup

→
unlocked_until

number (int)

Optional
(0 or 1)

Only returned if the wallet was encrypted with the encryptwallet RPC. A Unix epoch date when the wallet will be locked, or 0 if the wallet is currently locked

→
paytxfee

number (float)

Required
(exactly 1)

The transaction fee configuration, set in DASH/kB

→
hdchainid

string (hash)

Optional
(0 or 1)

The ID of the HD chain. Only present if the wallet is HD

→
hdaccountcount

number (int)

Optional
(0 or 1)

How many accounts of the HD chain are in this wallet. Only present if the wallet is HD

→
hdaccounts

array of objects

Optional
(0 or 1)

Array of JSON objects containing account info. Only present if the wallet is HD

→ →
Account

object

Optional
(1 or more)

JSON object containing info about a specific account

→ → →
hdaccountindex

number (int)

Required
(exactly 1)

The index of the account

→ → →
hdexternalkeyindex

number (int)

Optional
(0 or 1)

Current external child key index

→ → →
hdinternalkeyindex

number (int)

Optional
(0 or 1)

Current internal child key index

→ → →
error

string

Optional
(0 or 1)

Description of why the account could not be read

→
avoid_reuse

boolean

Required
(exactly 1)

Whether this wallet tracks clean/dirty coins in terms of reuse

→
scanning

object

Required
(exactly 1)

Added in Dash Core 0.16.1

JSON object containing current scanning details (false (0) if no scan is in progress)

→ →
duration

number (int)

Optional
(0 or 1)

Elapsed seconds since scan start

→ →
progress

number (int)

Optional
(0 or 1)

Scanning progress percentage 0.0 to 1.0

→
private_keys_enabled

boolean

Required
(exactly 1)

false if private keys are disabled for this wallet (enforced watch-only wallet)

→
descriptors

boolean

Required
(exactly 1)

Whether this wallet uses descriptors for scriptPubKey management

→
external_signer

boolean

Required
(exactly 1)

Whether this wallet is configured to use an external signer such as a hardware wallet

→
lastprocessedblock

object

Required
(exactly 1)

Hash and height of the block this information was generated on

→ →
hash

string (hex)

Required
(exactly 1)

Hash of the block this information was generated on

→ →
height

number (int)

Required
(exactly 1)

Height of the block this information was generated on

Example from Dash Core 23.1.7

dash-cli -testnet getwalletinfo

Result:

{
  "walletname": "",
  "walletversion": 120200,
  "format": "bdb",
  "balance": 178659.22849018,
  "coinjoin_balance": 0.00100001,
  "unconfirmed_balance": 0.00000000,
  "immature_balance": 13.38239278,
  "txcount": 37712,
  "timefirstkey": 1544808277,
  "keypoololdest": 1659558297,
  "keypoolsize": 1000,
  "keypoolsize_hd_internal": 1000,
  "keys_left": 1000,
  "paytxfee": 0.00000000,
  "hdchainid": "xxxxxxxxe62a7766153dac6c90242b712dbb98f4d457b7fb46e09136zzzzzzzz",
  "hdaccountcount": 1,
  "hdaccounts": [
    {
      "hdaccountindex": 0,
      "hdexternalkeyindex": 2838,
      "hdinternalkeyindex": 7669
    }
  ],
  "avoid_reuse": false,
  "scanning": false,
  "private_keys_enabled": true,
  "descriptors": false,
  "external_signer": false,
  "lastprocessedblock": {
    "hash": "000000523a483b6e2e1756ea1f4f6b1a3cd0934b2fdc01a2f71031a3bf7a9eb1",
    "height": 1518273
  }
}

See also

  • ListTransactions: returns the most recent transactions that affect the wallet.

ImportAddress#

Note

Requires wallet support (unavailable on masternodes).

Note

This command is only compatible with legacy wallets. Use the importdescriptors RPC with addr(X) for descriptor wallets.

The importaddress RPC 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.

Parameter #1—the address or pubkey script to watch

Name

Type

Presence

Description

Address or Script

string (base58 or hex)

Required
(exactly 1)

Either a P2PKH or P2SH address encoded in base58check, or a pubkey script encoded as hex

Parameter #2—The account into which to place the address or pubkey script

Name

Type

Presence

Description

Label

string

Optional
(0 or 1)

An optional label. Default is an empty string(")”

Parameter #3—whether to rescan the block chain

Name

Type

Presence

Description

Rescan

bool

Optional
(0 or 1)

Set to true (the default) to rescan the entire local block database for transactions affecting any address or pubkey script in the wallet (including transaction affecting the newly-added address or pubkey script). Set to false to not rescan the block database (rescanning can be performed at any time with the rescanblockchain RPC). Rescanning may take several minutes.

Parameter #4—whether to rescan the block chain

Name

Type

Presence

Description

P2SH

bool

Optional
(0 or 1)

Add the P2SH version of the script as well

Result—null on success

Name

Type

Presence

Description

result

null

Required
(exactly 1)

If the address or pubkey script is added to the wallet (or is already part of the wallet), JSON null will be returned

Example from Dash Core 0.12.2

Add an address, rescanning the local block database for any transactions
matching it.

dash-cli -testnet importaddress \
  yg89Yt5Tjzs9nRpX3wJCuvr7KuQvgkvmeC "watch-only test" true

Result:

(No output; success.)

Show that the address has been added:

dash-cli -testnet getaddressesbylabel "watch-only test"

Result:

{
  "yg89Yt5Tjzs9nRpX3wJCuvr7KuQvgkvmeC": {
    "purpose": "receive"
  }
}

See also

ImportDescriptors#

Note

Requires wallet support (unavailable on masternodes). Wallet must be unlocked.

Note: Importing descriptors can take a significant amount of time if a rescan is triggered, particularly if a timestamp far back in the past is used. During this time, other RPC calls may report that the imported keys, addresses, or scripts exist but related transactions are still missing. As of Dash Core 24.0.0, the rescan is significantly faster if block filters are available (using startup option -blockfilterindex=1).

Added in Dash Core 21.0.0

The importdescriptors RPC imports multiple descriptors into the wallet, each with specific attributes. This action triggers a blockchain rescan from the specified start time to update the wallet with all relevant transactions.

This command is only available for descriptor wallets (the default as of Dash Core 24.0.0). As of Dash Core 24.0.0, descriptors containing hybrid public keys are rejected.

Parameter #1—descriptors to import

Name

Type

Presence

Description

requests

array

Required
(exactly 1)

An array of JSON objects, each representing a descriptor to be imported.

→Request

object

Required
(1 or more)

JSON object containing descriptor data.

→ →
desc

string

Required
(exactly 1)

Descriptor string to import.

→ →
active

bool

Optional
(0 or 1)

If true, sets this descriptor as active for generating new addresses. Defaults to false.

→ →
range

numeric or array

Optional
(0 or 1)

If a ranged descriptor is used, this specifies the end or the range (in the form [begin,end]) to import.

→ →
next_index

numeric

Optional
(0 or 1)

For active ranged descriptors, the next index from which to generate addresses.

→ →
timestamp

integer / string

Required
(exactly 1)

Time from which to start rescanning the blockchain for this descriptor, in UNIX epoch time. Use the string “now” to substitute the current synced blockchain time. “now” can be specified to bypass scanning, for outputs which are known to never have been used, and 0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest timestamp of all descriptors being imported will be scanned.

→ →
internal

bool

Optional
(0 or 1)

If true, treats outputs as change (not incoming payments). Defaults to false.

→ →
label

string

Optional
(0 or 1)

Label for the addresses. Only applicable if internal is false. Defaults to an empty string.

Result—execution result

Name

Type

Presence

Description

result

array

Required
(exactly 1)

An array of objects containing results for each import request, mirroring the structure of the input array.

→ Result

object

Required
(1 or more)

Each result corresponding to an import request.

→ →
success

bool

Required
(exactly 1)

Indicates whether the import was successful.

→ →
warnings

array

Optional
(0 or more)

Lists any warnings related to the import.

→ →
error

object

Optional
(0 or 1)

Contains error details if the import failed.

Examples

dash-cli importdescriptors '[{ "desc": "<descriptor>", "timestamp": 1455191478, "internal": true }, { "desc": "<descriptor 2>", "label": "example 2", "timestamp": 1455191480 }]'
dash-cli importdescriptors '[{ "desc": "<descriptor>", "timestamp": "now", "active": true, "range": [0,100], "label": "my wallet" }]'

See also

  • ImportPrivKey: adds a private key to your wallet.

  • ImportAddress: adds an address or script to the wallet without the associated private key.

  • ImportWallet: imports keys from a wallet dump file, potentially triggering a rescan.

ImportElectrumWallet#

Note

This command is only compatible with legacy wallets.

The importelectrumwallet RPC imports keys from an Electrum wallet export file (.csv or .json)

Parameter #1—file name

Name

Type

Presence

Description

File Name

string

Required
(exactly 1)

The Electrum wallet export file (should be in csv or json format)

Parameter #2—index

Name

Type

Presence

Description

Index

number (int)

Optional
(0 or 1)

Updated in Dash Core 24.0.0
Rescan the wallet for transactions starting from this block index (default: 0). Must be non-negative

Result—null on success

Name

Type

Presence

Description

result

null

Required
(exactly 1)

If the Electrum keys are imported successfully, JSON null will be returned

Example from Dash Core 0.12.2

dash-cli importelectrumwallet /tmp/electrum-export.csv

(Success: no result displayed.)

See also: none

ImportMulti#

Note

Requires wallet support (unavailable on masternodes). Wallet must be unlocked.

Note

This command is only compatible with legacy wallets. Use the importdescriptors RPC for descriptor wallets.

Added in Dash Core 0.12.3 / Bitcoin Core 0.14.0

The importmulti RPC imports addresses or scripts (with private keys, public keys, or P2SH redeem scripts) and optionally performs the minimum necessary rescan for all imports.

Parameter #1—the addresses/scripts to import

Name

Type

Presence

Description

Imports

array

Required
(exactly 1)

An array of JSON objects, each one being an address or script to be imported

→ Import

object

Required
(1 or more)

A JSON object describing a particular import

→ →
desc

string

Optional
(0 or 1)

Descriptor to import. If using a descriptor, do not also provide scriptPubKey, redeemscript or pubkeys

→ →
scriptPubKey

string (hex) / object

Optional
(0 or 1)

The script (string) to be imported, or an object of the form {"address": "<address>"} to import a P2PKH or P2SH address. Required unless desc is provided

→ → →
address

string (base58)

Optional
(0 or 1)

The P2PKH or P2SH address to be imported, passed inside the scriptPubKey object

→ →
timestamp

number (int) / string

Required
(exactly 1)

The creation time of the key in Unix epoch time or the string “now” to substitute the current synced block chain time. The timestamp of the oldest key will determine how far back block chain rescans need to begin. Specify now to bypass scanning for keys which are known to never have been used. Specify 0 to scan the entire block chain. Blocks up to 2 hours before the earliest key creation time will be scanned

→ →
redeemscript

string

Optional
(0 or 1)

A redeem script. Only allowed if either the address field is a P2SH address or the scriptPubKey field is a P2SH scriptPubKey

→ →
pubkeys

array

Optional
(0 or 1)

Array of strings giving pubkeys that must occur in the scriptPubKey or redeemscript

→ →
keys

array

Optional
(0 or 1)

Array of strings giving private keys whose corresponding public keys must occur in the scriptPubKey or redeemscript

→ →
range

number (int) / array

Optional
(0 or 1)

If a ranged descriptor is used, this specifies the end or the range (in the form [begin,end]) to import

→ →
internal

bool

Optional
(0 or 1)

Stating whether matching outputs should be treated as change rather than incoming payments. The default is false

→ →
watchonly

bool

Optional
(0 or 1)

Stating whether matching outputs should be considered watched even when they’re not spendable. This is only allowed if keys are empty. The default is false

→ →
label

string

Optional
(0 or 1)

Label to assign to the address, only allowed with internal set to false. The default is an empty string (“”)

→ →
keypool

bool

Optional
(0 or 1)

Stating whether imported public keys should be added to the keypool for when users request new addresses. Only allowed when wallet private keys are disabled. The default is false

Parameter #2—options regarding the import

Name

Type

Presence

Description

Option

object

Optional
(0 or 1)

JSON object with options regarding the import

→
rescan

bool

Optional
(0 or 1)

Set to true (the default) to rescan the entire local block chain for transactions affecting any imported address or script. Set to false to not rescan after the import. Rescanning may take a considerable amount of time and may require re-downloading blocks if using block chain pruning

Result—execution result

Name

Type

Presence

Description

result

array

Required
(exactly 1)

An array of JSON objects, with each object describing the execution result of each import

→ Result

object

Required
(1 or more)

A JSON object describing the execution result of an imported address or script

→ →
success

bool

Required
(exactly 1)

Displays true if the import has been successful or false if it failed

→ →
warnings

array

Optional
(0 or 1)

Warnings about the import

→ → →
Warning

string

Required
(1 or more)

A warning

→ →
error

string : object

Optional
(0 or 1)

A JSON object containing details about the error. Only displayed if the import fails

→ → →
code

number (int)

Optional
(0 or 1)

The error code

→ → →
message

string

Optional
(0 or 1)

The error message

Example from Dash Core 0.12.3

Import the address ycCsAUKsjdmoP4qAXiS1cjYA4ixM48zJWe (giving it a label and scanning the entire block chain) and the scriptPubKey 76a9146cf5870411edc31ba5630d61c7cddff55b884fda88ac (giving a specific timestamp and label):

dash-cli importmulti '
  [
    {
      "scriptPubKey" : { "address": "ycCsAUKsjdmoP4qAXiS1cjYA4ixM48zJWe" },
      "timestamp" : 0,
      "label" : "Personal"
    },
    {
      "scriptPubKey" : "76a9146cf5870411edc31ba5630d61c7cddff55b884fda88ac",
      "timestamp" : 1493912405,
      "label" : "TestFailure"
    }
  ]' '{ "rescan": true }'

Result (scriptPubKey import failed because internal was not set to true):

[
  {
    "success": true
  },
  {
    "success": false,
    "error": {
      "code": -8,
      "message": "Internal must be set for hex scriptPubKey"
    }
  }
]

See also

  • ImportPrivKey: adds a private key to your wallet. The key should be formatted in the wallet import format created by the dumpprivkey RPC.

  • 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.

  • ImportWallet: imports private keys from a file in wallet dump file format (see the dumpwallet RPC). 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.

ImportPrivKey#

Note

Requires wallet support (unavailable on masternodes). Wallet must be unlocked.

Note

This command is only compatible with legacy wallets. Use the importdescriptors RPC with combo(X) for descriptor wallets.

The importprivkey RPC adds a private key to your wallet. The key should be formatted in the wallet import format created by the dumpprivkey RPC.

Parameter #1—the private key to import

Name

Type

Presence

Description

Private Key

string (base58)

Required
(exactly 1)

The private key to import into the wallet encoded in base58check using wallet import format (WIF)

Parameter #2—the account into which the key should be placed

Name

Type

Presence

Description

Account

string

Optional
(0 or 1)

The name of an account to which transactions involving the key should be assigned. The default is the default account, an empty string (")”

Parameter #3—whether to rescan the block chain

Name

Type

Presence

Description

Rescan

bool

Optional
(0 or 1)

Set to true (the default) to rescan the entire local block database for transactions affecting any address or pubkey script in the wallet (including transaction affecting the newly-added address for this private key). Set to false to not rescan the block database (rescanning can be performed at any time with the rescanblockchain RPC). Rescanning may take several minutes. Notes: if the address for this key is already in the wallet, the block database will not be rescanned even if this parameter is set

Result—null on success

Name

Type

Presence

Description

result

null

Required
(exactly 1)

If the private key is added to the wallet (or is already part of the wallet), JSON null will be returned

Example from Dash Core 0.12.2

Import the private key for the address
ycBuREgSskHHkWLxDa9A5WppCki6PfFycL, giving it a label and scanning the
entire block chain:

dash-cli -testnet importprivkey \
              cQZZ4awQvcXXyES3CmUJqSgeTobQm9t9nyUr337kvUtsWsnvvMyw \
              "test label" \
              true

(Success: no result displayed.)

See also

  • DumpPrivKey: returns the wallet-import-format (WIP) private key corresponding to an address. (But does not remove it from the wallet.)

  • 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.

  • ImportPubKey: imports a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend

  • ImportWallet: imports private keys from a file in wallet dump file format (see the dumpwallet RPC). 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.

ImportPrunedFunds#

Note

Requires wallet support (unavailable on masternodes).

Added in Dash Core 0.12.3 / Bitcoin Core 0.13.0

The importprunedfunds RPC imports funds without the need of a rescan. Meant for use with pruned wallets. Corresponding address or script must previously be included in wallet.
The end-user is responsible to import additional transactions that subsequently spend the imported
outputs or rescan after the point in the blockchain the transaction is included.

Parameter #1—the raw transaction to import

Name

Type

Presence

Description

Raw Transaction

string
(hex)

Required
(exactly 1)

A raw transaction in hex funding an already-existing address in wallet

Parameter #2—the tx out proof that cointains the transaction

Name

Type

Presence

Description

TX Out Proof

string
(hex)

Required
(exactly 1)

The hex output from gettxoutproof that contains the transaction

Result—null on success

Name

Type

Presence

Description

result

null

Required
(exactly 1)

If the funds are added to wallet, JSON null will be returned

Example from Dash Core 0.12.3

bitcoin-cli importprunedfunds "txhex" "txoutproof"

(Success: no result displayed.)

See also

  • ImportPrivKey: adds a private key to your wallet. The key should be formatted in the wallet import format created by the dumpprivkey RPC.

  • RemovePrunedFunds: deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds.

ImportPubKey#

Note

This command is only compatible with legacy wallets. Use the importdescriptors RPC with combo(X) for descriptor wallets.

The importpubkey RPC imports a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend

Parameter #1—the public key to import

Name

Type

Presence

Description

Public Key

string (hex)

Required
(exactly 1)

The public key to import

Parameter #2—the account into which the key should be placed

Name

Type

Presence

Description

Label

string

Optional
(0 or 1)

The label the key should be assigned

Parameter #3—whether to rescan the block chain

Name

Type

Presence

Description

Rescan

bool

Optional
(0 or 1)

Set to true (the default) to rescan the entire local block database for transactions affecting any address or pubkey script in the wallet. Set to false to not rescan the block database (rescanning can be performed at any time with the rescanblockchain RPC). Rescanning may take several minutes. Notes: if the address for this key is already in the wallet, the block database will not be rescanned even if this parameter is set

Result—null on success

Name

Type

Presence

Description

result

null

Required
(exactly 1)

If the public key is added to the wallet (or is already part of the wallet), JSON null will be returned

Example from Dash Core 0.12.2

Import the public key for the address, giving it a label and scanning the
entire block chain:

dash-cli -testnet importpubkey \
    0210c1349657c1253d3d64d1b31d3500b09335bf12b8df061666e216f550a43249 \
    "test label" \
    true

(Success: no result displayed.)

See also:

  • 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.

  • ImportPrivKey: adds a private key to your wallet. The key should be formatted in the wallet import format created by the dumpprivkey RPC.

  • ImportWallet: imports private keys from a file in wallet dump file format (see the dumpwallet RPC). 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.

ImportWallet#

Note

Requires wallet support (unavailable on masternodes) and an unlocked or unencrypted wallet.

Note

This command is only compatible with legacy wallets.

The importwallet RPC imports private keys from a file in wallet dump file format (see the dumpwallet RPC). 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.

As of Dash Core 24.0.0, importwallet also works on pruned nodes, as long as the blocks back to the oldest key’s timestamp (minus 2 hours) have not been pruned.

Parameter #1—the file to import

Name

Type

Presence

Description

Filename

string

Required
(exactly 1)

The file to import. The path is relative to Dash Core’s working directory

Result—null on success

Name

Type

Presence

Description

result

null

Required
(exactly 1)

If all the keys in the file are added to the wallet (or are already part of the wallet), JSON null will be returned

Example from Dash Core 0.12.2

Import the file shown in the example subsection of the dumpwallet RPC.

dash-cli -testnet importwallet /tmp/dump.txt

(Success: no result displayed.)

See also

  • DumpWallet: creates a file with all wallet keys in a human-readable format.

  • ImportPrivKey: adds a private key to your wallet. The key should be formatted in the wallet import format created by the dumpprivkey RPC.

KeyPoolRefill#

Note

Requires wallet support (unavailable on masternodes) and an unlocked or unencrypted wallet.

The keypoolrefill RPC fills the cache of unused pre-generated keys (the keypool).

Parameter #1—the new keypool size

Name

Type

Presence

Description

Key Pool Size

number (int)

Optional
(0 or 1)

The new size of the keypool; if the number of keys in the keypool is less than this number, new keys will be generated. Default is 1000. The value 0 also equals the default. The value specified is for this call only—the default keypool size is not changed

Result—null on success

Name

Type

Presence

Description

result

null

Required
(exactly 1)

If the keypool is successfully filled, JSON null will be returned

Example from Dash Core 0.12.2

Generate one extra key than the default:

dash-cli -testnet keypoolrefill 1001

(No result shown: success.)

See also

  • 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.

  • GetWalletInfo: provides information about the wallet.

  • NewKeyPool: entirely clears and refills the keypool.

ListAddressBalances#

The listaddressbalances RPC lists addresses of this wallet and their balances

Parameter #1—Minimum Amount

Name

Type

Presence

Description

Minimum Amount

number (DASH) or string

Optional
(0 or 1)

Minimum balance in DASH an address should have to be shown in the list (default=0)

Result—an object containing the addresses and their balances

Name

Type

Presence

Description

result

object

Required
(exactly 1)

An object containing key/value pairs corresponding to the addresses with balances > the minimum amount. May be empty

→
Address/Amount

string (base58):
number (DASH)

Optional
(1 or more)

A key/value pair with a base58check-encoded string containing the address as the key, and an amount of DASH as the value

Example from Dash Core 0.12.3

dash-cli -testnet listaddressbalances 25

Result:

{
  "yMQtQkcMBXrAZyqTGZeg7tQHzmbypGEP4w": 299.99990000,
  "yRyfgrHm4f5A8GGvqpqTFvbCrCQHJm1L4V": 99.13570000,
  "ybePwhPzUbiWzFhkgxPgP6iHnTLTyFH6sU": 123.45600000,
  "ycCdPQnjNEVRgrQY8j6mxEx9h7oaQpo5Ge": 500.00000000
}

See also:

  • ListAddressGroupings: lists groups of addresses that may have had their common ownership made public by common use as inputs in the same transaction or from being used as change from a previous transaction.

ListAddressGroupings#

Note

Requires wallet support (unavailable on masternodes).

The listaddressgroupings RPC lists groups of addresses that may have had their common ownership made public by common use as inputs in the same transaction or from being used as change from a previous transaction.

Parameters: none

Result—an array of arrays describing the groupings

Name

Type

Presence

Description

result

array

Required
(exactly 1)

An array containing the groupings. May be empty

→
Groupings

array

Optional
(0 or more)

An array containing arrays of addresses which can be associated with each other

→ →
Address Details

array

Required
(1 or more)

An array containing information about a particular address

→ → →
Address

string (base58)

Required
(exactly 1)

The address in base58check format

→ → →
Amount

number (bitcoins)

Required
(exactly 1)

The amount in DASH

→ → →
Label

string

Optional
(0 or 1)

Replaced “Account” in Dash Core 0.17.0
The label the address belongs to, if any.

Example from Dash Core 0.17.0

dash-cli -testnet listaddressgroupings

Result (edited to only three results):

[
  [
    [
      "yacJKd6tRz2JSn8Wfp9GKgCbuowAEBivrA",
      10.00000000,
      "Doc test"
    ]
  ],
  [
    [
      "ye5XTjKqXyrVizEzky255NXUsaNSPC2W7k",
      5.00000000,
      ""
    ]
  ]
]

See also

ListDescriptors#

Note

Requires wallet support (unavailable on masternodes). Wallet must be unlocked if private is true.

Added in Dash Core 21.0.0

The listdescriptors RPC lists descriptors imported into a descriptor-enabled wallet.

Parameter #1—show private descriptors

Name

Type

Presence

Description

private

boolean

Optional
(0 or 1)

Show private descriptors (default: false). When set to true, the result will include mnemonic and mnemonicpassphrase for mnemonic wallets.

Result—execution result

Name

Type

Presence

Description

wallet_name

string

Required
(exactly 1)

Name of wallet this operation was performed on

descriptors

array

Required
(exactly 1)

An array of JSON objects, each describing a descriptor

→ Descriptor

object

Required
(1 or more)

A JSON object describing a particular descriptor

→ →
desc

string

Required
(exactly 1)

Updated in Dash Core 24.0.0
Descriptor string representation. Hardened derivation steps are shown with h instead of ', which changes the checksum. With private=true, the marker used when the descriptor was created or imported is kept

→ →
mnemonic

string

Optional
(0 or 1)

Added in Dash Core 23.0.0
The mnemonic for this descriptor wallet (BIP39, english words). Presented only if private=true and created with a mnemonic.

→ →
mnemonicpassphrase

string

Optional
(0 or 1)

Added in Dash Core 23.0.0
The mnemonic passphrase for this descriptor wallet (BIP39). Presented only if private=true and created with a mnemonic.

→ →
timestamp

number (int)

Required
(exactly 1)

The creation time of the descriptor in Unix epoch time

→ →
active

bool

Required
(exactly 1)

Indicates whether this descriptor is currently used to generate new addresses

→ →
internal

bool

Optional
(0 or 1)

True if this descriptor is used to generate change addresses; False if used for receiving

→ →
coinjoin

bool

Optional
(0 or 1)

Added in Dash Core 23.0.0
Whether this descriptor is used for CoinJoin transactions

→ →
range

array

Optional
(0 or 1)

Defined only for ranged descriptors

→ →→
start

number (int)

Required
(exactly 1)

Range start inclusive

→ →→
end

number (int)

Required
(exactly 1)

Range end inclusive

→ →
next

number (int)

Optional
(0 or 1)

The next index to generate addresses from; defined only for ranged descriptors

→ →
next_index

number (int)

Optional
(0 or 1)

Added in Dash Core 23.0.0
The next index for key derivation

Example from Dash Core 23.0.0

List all descriptors in a descriptor-enabled wallet:

dash-cli listdescriptors

Result (example output):

{
  "wallet_name": "test-descriptor",
  "descriptors": [
    {
      "desc": "pkh([c7fe8acb/44'/1'/0']tpubDDgGSmowbmYWepHK5PJYCfzUFrKy1c7PHVumScWELYwwjaGBf73ZD1JD1xc2y4hKQDp4qHUKjxz8HQyJXmM5UQh797enQQSpq8vife8yva8/0/*)#tz4w30l2",
      "timestamp": 1715259431,
      "active": true,
      "internal": false,
      "range": [
        0,
        999
      ],
      "next": 0,
      "next_index": 0
    }
  ]
}

Note

This example predates Dash Core 24.0.0. Dash Core 24.0.0 shows hardened derivation steps in desc with h instead of ' (for example, [c7fe8acb/44h/1h/0h]), with a different checksum.

See also

  • ImportDescriptors: imports multiple descriptors into the wallet, each with specific attributes.

ListLabels#

Note

Requires wallet support (unavailable on masternodes).

The listlabels RPC returns the list of all labels, or labels that are assigned to addresses with a specific purpose.

Parameter #1—purpose

Name

Type

Presence

Description

Purpose

string

Optional
(0 or 1)

Updated in Dash Core 24.0.0
Address purpose to list labels for (send, receive, refund). An empty string is the same as not providing this argument. Any other value now returns an error.

Result—a list of labels

Name

Type

Presence

Description

result

array

Required
(exactly 1)

A JSON array containing label names. Must include, at the very least, the default account ("").

→
Label

string

Required
(1 or more)

The name of a label.

Example from Dash Core 0.17.0

Display labels used for receiving.

dash-cli -testnet listlabels "receive"

Result:

[
  "",
  "Doc test"
]

See also

ListLockUnspent#

Note

Requires wallet support (unavailable on masternodes).

The listlockunspent RPC returns a list of temporarily unspendable (locked) outputs.

Parameters: none

Result—an array of locked outputs

Name

Type

Presence

Description

result

array

Required
(exactly 1)

An array containing all locked outputs. May be empty

→
Output

object

Optional
(1 or more)

An object describing a particular locked output

→ →
txid

string (hex)

Required
(exactly 1)

The TXID of the transaction containing the locked output, encoded as hex in RPC byte order

→ →
vout

number (int)

Required
(exactly 1)

The output index number (vout) of the locked output within the transaction. Output index 0 is the first output within the transaction

Example from Dash Core 0.12.2

dash-cli -testnet listlockunspent

Result:

[
  {
    "txid": "d3d57ec5e4168b7145e911d019e9713563c1f2db5b2d6885739ea887feca4c87",
    "vout": 0
  }
]

See also

  • LockUnspent: temporarily locks or unlocks specified transaction outputs. A locked transaction output will not be chosen by automatic coin selection when spending dash. Locks are stored in memory only unless persistent is true.

ListReceivedByAddress#

Note

Requires wallet support (unavailable on masternodes).

The listreceivedbyaddress RPC lists the total number of dash received by each address.

Parameter #1—the minimum number of confirmations a transaction must have to be counted

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 #2—whether to include transactions locked via InstantSend

Name

Type

Presence

Description

addlocked

bool

Optional
(exactly 1)

Add the balance from InstantSend locked transactions

Parameter #3—whether to include empty accounts

Name

Type

Presence

Description

Include Empty

bool

Optional
(0 or 1)

Set to true to display accounts which have never received a payment. Set to false (the default) to only include accounts which have received a payment. Any account which has received a payment will be displayed even if its current balance is 0

Parameter #4—whether to include watch-only addresses in results

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 the default for watching-only wallets.

Parameter #5—limit returned information to a specific address

Added in Dash Core 0.17.0

Name

Type

Presence

Description

Address Filter

string

Optional
(0 or 1)

If present, only return information for this address

Parameter #6—whether to include immature coinbase transactions

Name

Type

Presence

Description

include_immature_coinbase

bool

Optional
(0 or 1)

Added in Dash Core 23.0.0
Include immature coinbase transactions. Default is false

Result—addresses, account names, balances, and minimum confirmations

Name

Type

Presence

Description

result

array

Required
(exactly 1)

An array containing objects each describing a particular address

→
Address

object

Optional
(0 or more)

An object describing an address

→ →
involvesWatchonly

bool

Optional
(0 or 1)

Set to true if this address is a watch-only address which has received a spendable payment (that is, a payment with at least the specified number of confirmations and which is not an immature coinbase). Otherwise not returned

→ →
address

string (base58)

Required
(exactly 1)

The address being described encoded in base58check

→ →
amount

number (dash)

Required
(exactly 1)

The total amount the address has received in dash

→ →
confirmations

number (int)

Required
(exactly 1)

The number of confirmations of the latest transaction to the address. May be 0 for unconfirmed

→ →
label

string

Required
(exactly 1)

The account the address belongs to. May be the default account, an empty string (")”

→ →
txids

array

Required
(exactly 1)

An array of TXIDs belonging to transactions that pay the address

→ → →
TXID

string

Optional
(0 or more)

The TXID of a transaction paying the address, encoded as hex in RPC byte order

Example from Dash Core 0.13.0

List addresses with balances confirmed by at least six blocks, including
watch-only addresses. Also include the balance from InstantSend locked transactions:

dash-cli -testnet listreceivedbyaddress 6 true false true

Result (edit to show only two entries):

[
  {
    "address": "yV3ZTfwyfUmpspncMSitiwzh7EvqSGrqZA",
    "amount": 1000.00000000,
    "confirmations": 26779,
    "label": "",
    "txids": [
      "0456aaf51a8df21dd47c2a06ede046a5bf7403bcb95d14d1d71b178c189fb933"
    ]
  },
  {
    "involvesWatchonly" : true,
    "address": "yfoR9uM3rcDfUc7AEfUNm5BjVYGFw7uQ9w",
    "amount": 1877.78476068,
    "confirmations": 26876,
    "label": "Watching",
    "txids": [
      "cd64114c803a2a243cb6ce4eb5c98e60cd2c688be8e900b3b957fe520cf42601",
      "83d3f7f31926908962e336341b1895d5f734f9d7149bdb35f0381cc78019bd83"
    ]
  }
]

See also

  • GetReceivedByAddress: returns the total amount received by the specified address in transactions with the specified number of confirmations.

ListReceivedByLabel#

Note

Requires wallet support (unavailable on masternodes).

The listreceivedbylabel RPC lists the total number of Dash received by each label.

Parameter #1—the minimum number of confirmations a transaction must have to be counted

Name

Type

Presence

Description

Confirmations

number (int)

Optional
(0 or 1)

The minimum number of confirmations a transaction must have before it is counted towards the balance. Use 0 to count unconfirmed transactions. Default is 1

Parameter #2—whether to include transactions locked via InstantSend

Name

Type

Presence

Description

addlocked

bool

Optional
(exactly 1)

Add the balance from InstantSend locked transactions

Parameter #3—whether to include empty accounts

Name

Type

Presence

Description

Include Empty

bool

Optional
(0 or 1)

Set to true to display accounts which have never received a payment. Set to false (the default) to only include accounts which have received a payment. Any account which has received a payment will be displayed even if its current balance is 0

Parameter #4—whether to include watch-only addresses in results

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 the default for watching-only wallets.

Parameter #5—whether to include immature coinbase transactions

Name

Type

Presence

Description

include_immature_coinbase

bool

Optional
(0 or 1)

Added in Dash Core 23.0.0
Include immature coinbase transactions. Default is false

Result—account names, balances, and minimum confirmations

Name

Type

Presence

Description

result

array

Required
(exactly 1)

An array containing objects each describing an account. At the very least, the default account (") will be included”

→
Label

object

Required
(1 or more)

An object describing a label

→ →
involvesWatchonly

bool

Optional
(0 or 1)

Set to true if the balance of this account includes a watch-only address which has received a spendable payment (that is, a payment with at least the specified number of confirmations and which is not an immature coinbase). Otherwise not returned

→ →
amount

number (dash)

Required
(exactly 1)

The total amount received by this account in dash

→ →
confirmations

number (int)

Required
(exactly 1)

The number of confirmations received by the last transaction received by this account. May be 0

→ →
label

string

Required
(exactly 1)

The label of the receiving address. The default label is "".

Example from Dash Core 0.17.0

Get the balances for all non-empty accounts, including transactions which have been confirmed at least six times and InstantSend locked transactions:

dash-cli -testnet listreceivedbylabel 6 true false true

Result:

[
  {
    "amount": 5.00000000,
    "confirmations": 33,
    "label": ""
  },
  {
    "amount": 10.00000000,
    "confirmations": 47,
    "label": "Doc test"
  }
]

See also

  • ListReceivedByAddress: lists the total number of dash received by each address.

  • GetReceivedByAddress: returns the total amount received by the specified address in transactions with the specified number of confirmations.

ListSinceBlock#

Note

Requires wallet support (unavailable on masternodes).

The listsinceblock RPC gets all transactions affecting the wallet which have occurred since a particular block, plus the header hash of a block at a particular depth.

Parameter #1—a block header hash

Name

Type

Presence

Description

Header Hash

string (hex)

Optional
(0 or 1)

The hash of a block header encoded as hex in RPC byte order. All transactions affecting the wallet which are not in that block or any earlier block will be returned, including unconfirmed transactions. Default is the hash of the genesis block, so all transactions affecting the wallet are returned by default

Parameter #2—the target confirmations for the lastblock field

Name

Type

Presence

Description

Target Confirmations

number (int)

Optional
(0 or 1)

Sets the lastblock field of the results to the header hash of a block with this many confirmations. This does not affect which transactions are returned. Default is 1, so the hash of the most recent block on the local best block chain is returned

Parameter #3—whether to include watch-only addresses in details and calculations

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 the default for watching-only wallets.

Parameter #4—include_removed

Name

Type

Presence

Description

include_removed

bool

Optional
(0 or 1)

Show transactions that were removed due to a reorg in the removed array (not guaranteed to work on pruned nodes). Default is true

Parameter #5—include_change

Name

Type

Presence

Description

include_change

bool

Optional
(0 or 1)

Added in Dash Core 24.0.0
Also add entries for change outputs. Default is false

Parameter #6—label

Name

Type

Presence

Description

label

string

Optional
(0 or 1)

Added in Dash Core 24.0.0
Return only incoming transactions paying to addresses with the specified label.

Result

Name

Type

Presence

Description

result

object

Required
(exactly 1)

An object containing an array of transactions and the lastblock field

→
transactions

array

Required
(exactly 1)

An array of objects each describing a particular payment to or from this wallet. The objects in this array do not describe an actual transactions, so more than one object in this array may come from the same transaction. This array may be empty

→ →
Payment

object

Optional
(0 or more)

An payment which did not appear in the specified block or an earlier block

→ → →
involvesWatchonly

bool

Optional
(0 or 1)

Set to true if the payment involves a watch-only address. Otherwise not returned

→ → →
address

string (base58)

Optional
(0 or 1)

The address paid in this payment, which may be someone else’s address not belonging to this wallet. May be empty if the address is unknown, such as when paying to a non-standard pubkey script

→ → →
category

string

Required
(exactly 1)

Set to one of the following values:
• send if sending payment normally
• coinjoin if sending CoinJoin payment
• receive if this wallet received payment in a regular transaction
• generate if a matured and spendable coinbase
• immature if a coinbase that is not spendable yet
• orphan if a coinbase from a block that’s not in the local best block chain
• platform-transfer if a Platform Transfer transaction was received

→ → →
amount

number (dash)

Required
(exactly 1)

A negative dash amount if sending payment; a positive dash amount if receiving payment (including coinbases)

→ → →
vout

number (int)

Required
(exactly 1)

For an output, the output index (vout) for this output in this transaction. For an input, the output index for the output being spent in its transaction. Because inputs list the output indexes from previous transactions, more than one entry in the details array may have the same output index

→ → →
fee

number (dash)

Optional
(0 or 1)

If sending payment, the fee paid as a negative dash value. May be 0. Not returned if receiving payment

→ → →
confirmations

number (int)

Required
(exactly 1)

The number of confirmations the transaction has received. Will be 0 for unconfirmed and -1 for conflicted

→ → →
instantlock

bool

Required
(exactly 1)

If set to true, this transaction is either protected by an InstantSend lock or it is in a block that has received a ChainLock

→ → →
instantlock_internal

bool

Required
(exactly 1)

If set to true, this transaction has an InstantSend lock

→ → →
chainlock

bool

Required
(exactly 1)

If set to true, this transaction is in a block that is locked (not susceptible to a chain re-org)

→ → →
generated

bool

Optional
(0 or 1)

Set to true if the transaction is a coinbase. Not returned for regular transactions

→ → →
platform-transfer

bool

Optional
(0 or 1)

Only present if the transaction is a Platform Transfer.

→ → →
trusted

bool

Optional
(0 or 1)

Whether we consider the transaction to be trusted and safe to spend from. Only present when the transaction has 0 confirmations (or negative confirmations, if conflicted)

→ → →
blockhash

string (hex)

Optional
(0 or 1)

The hash of the block on the local best block chain which includes this transaction, encoded as hex in RPC byte order. Only returned for confirmed transactions

→ → →
blockheight

number (int)

Optional
(0 or 1)

The block height containing the transaction.

→ → →
blockindex

number (int)

Optional
(0 or 1)

The index of the transaction in the block that includes it. Only returned for confirmed transactions

→ → →
blocktime

number (int)

Optional
(0 or 1)

The block header time (Unix epoch time) of the block on the local best block chain which includes this transaction. Only returned for confirmed transactions

→ → →
txid

string (hex)

Required
(exactly 1)

The TXID of the transaction, encoded as hex in RPC byte order

→ → →
walletconflicts

array

Required
(exactly 1)

An array containing the TXIDs of other transactions that spend the same inputs (UTXOs) as this transaction. Array may be empty

→ → → →
TXID

string (hex)

Optional
(0 or more)

The TXID of a conflicting transaction, encoded as hex in RPC byte order

→ → →
time

number (int)

Required
(exactly 1)

A Unix epoch time when the transaction was added to the wallet

→ → →
timereceived

number (int)

Required
(exactly 1)

A Unix epoch time when the transaction was detected by the local node, or the time of the block on the local best block chain that included the transaction

→ → →
abandoned

bool

Required
(exactly 1)

true if the transaction has been abandoned (inputs are respendable).

→ → →
comment

string

Optional
(0 or 1)

For transaction originating with this wallet, a locally-stored comment added to the transaction. Only returned if a comment was added

→ → →
to

string

Optional
(0 or 1)

For transaction originating with this wallet, a locally-stored comment added to the transaction identifying who the transaction was sent to. Only returned if a comment-to was added

→ → →
DS

string

Optional
(0 or 1)

Set to “1” if the transaction is a CoinJoin send.

→ → →
parent_descs

array

Optional
(0 or 1)

Added in Dash Core 24.0.0
Only if ‘category’ is ‘received’. List of parent descriptors for the scriptPubKey of this coin.

→ → → →
Descriptor

string

Optional
(0 or more)

The descriptor string.

→ → →
label

string

Optional
(0 or 1)

A comment for the address/transaction, if any

→
removed

array

Optional
(0 or 1)

Structure is the same as transactions. Only present if include_removed is true.
Note: transactions that were re-added in the active chain will appear as-is in this array, and may thus have a positive confirmation count.

→
lastblock

string (hex)

Required
(exactly 1)

The header hash of the block with the number of confirmations specified in the target confirmations parameter, encoded as hex in RPC byte order

Example from Dash Core 20.0.0

Get all transactions since a particular block (including watch-only transactions) and the header hash of the sixth most recent block.

dash-cli -testnet listsinceblock 0000015fb32d785efb2f792a194a14c11ef04141bb2778c04cea447cdccb4b6e 6 true true

Result (edited to show only two payments):

{
  "transactions": [
    {
      "address": "yeTgphnEhKjfTx2f57Ncf4AHLPhGKo1pyN",
      "category": "send",
      "amount": -0.10000000,
      "label": "",
      "vout": 0,
      "fee": -0.00000225,
      "confirmations": 1090,
      "instantlock": true,
      "instantlock_internal": false,
      "chainlock": true,
      "blockhash": "000000f57f3228da3c544cd9a44e9b869648f0acd5e4cddcda10d576545a6363",
      "blockheight": 874910,
      "blockindex": 2,
      "blocktime": 1690306466,
      "txid": "54843571f544a46a2901a499857bbb79a340eba57f0c31e0c7cc8883ccdbc719",
      "walletconflicts": [
      ],
      "time": 1690306444,
      "timereceived": 1690306444,
      "abandoned": false
    },
    {
      "address": "yeTgphnEhKjfTx2f57Ncf4AHLPhGKo1pyN",
      "category": "receive",
      "amount": 0.10000000,
      "label": "",
      "vout": 0,
      "confirmations": 1090,
      "instantlock": true,
      "instantlock_internal": false,
      "chainlock": true,
      "blockhash": "000000f57f3228da3c544cd9a44e9b869648f0acd5e4cddcda10d576545a6363",
      "blockheight": 874910,
      "blockindex": 2,
      "blocktime": 1690306466,
      "txid": "54843571f544a46a2901a499857bbb79a340eba57f0c31e0c7cc8883ccdbc719",
      "walletconflicts": [
      ],
      "time": 1690306444,
      "timereceived": 1690306444
    },
  ],
  "removed": [
  ],
  "lastblock": "0000017d9ae3c1e4a53b5871936a09912aca5d6131b0cc0aeb886145abefc4e7"
}

See also

ListTransactions#

Note

Requires wallet support (unavailable on masternodes).

The listtransactions RPC returns the most recent transactions that affect the wallet. If a label name is provided, this will return only incoming transactions paying to addresses with the specified label.

Parameter #1—a label name

Name

Type

Presence

Description

Label

string

Optional
(0 or 1)

If set, should be a valid label name to return only incoming transactions with the specified label, or "*" to disable filtering and return all transactions.

Parameter #2—the number of transactions to get

Name

Type

Presence

Description

Count

number (int)

Optional
(0 or 1)

The number of the most recent transactions to list. Default is 10

Parameter #3—the number of transactions to skip

Name

Type

Presence

Description

Skip

number (int)

Optional
(0 or 1)

The number of the most recent transactions which should not be returned. Allows for pagination of results. Default is 0

Parameter #4—whether to include watch-only addresses in details and calculations

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 the default for watching-only wallets.

Result—payment details

Name

Type

Presence

Description

result

array

Required
(exactly 1)

An array containing objects, with each object describing a payment or internal accounting entry (not a transaction). More than one object in this array may come from a single transaction. Array may be empty

→
Payment

object

Optional
(0 or more)

A payment or internal accounting entry

→ →
address

string (base58)

Optional
(0 or 1)

The address paid in this payment, which may be someone else’s address not belonging to this wallet. May be empty if the address is unknown, such as when paying to a non-standard pubkey script or if this is in the move category

→ →
category

string

Required
(exactly 1)

Set to one of the following values:
• send if sending payment
• coinjoin if sending CoinJoin funds
• receive if this wallet received payment in a regular transaction
• generate if a matured and spendable coinbase
• immature if a coinbase that is not spendable yet
• orphan if a coinbase from a block that’s not in the local best block chain
• platform-transfer if a Platform Transfer transaction was received

→ →
amount

number (dash)

Required
(exactly 1)

A negative dash amount if sending payment; a positive dash amount if receiving payment (including coinbases)

→ →
label

string

Optional
(0 or 1)

A comment for the address/transaction

→ →
vout

number (int)

Optional
(0 or 1)

For an output, the output index (vout) for this output in this transaction. For an input, the output index for the output being spent in its transaction. Because inputs list the output indexes from previous transactions, more than one entry in the details array may have the same output index. Not returned for move category payments

→ →
fee

number (dash)

Optional
(0 or 1)

If sending payment, the fee paid as a negative dash value. May be 0. Not returned if receiving payment or for move category payments

→ →
confirmations

number (int)

Optional
(0 or 1)

The number of confirmations the transaction has received. Will be 0 for unconfirmed and -1 for conflicted. Not returned for move category payments

→ →
instantlock

bool

Required
(exactly 1)

If set to true, this transaction is either protected by an InstantSend lock or it is in a block that has received a ChainLock

→ →
instantlock_internal

bool

Required
(exactly 1)

If set to true, this transaction has an InstantSend lock

→ →
chainlock

bool

Required
(exactly 1)

If set to true, this transaction is in a block that is locked (not susceptible to a chain re-org)

→ →
generated

bool

Optional
(0 or 1)

Updated in Dash Core 23.0.0
Set to true if the transaction’s only input is a coinbase one. Only present if the transaction’s only input is a coinbase one.

→ →
platform-transfer

bool

Optional
(0 or 1)

Only present if the transaction is a Platform Transfer.

→ →
trusted

bool

Optional
(0 or 1)

Indicates whether we consider the outputs of this unconfirmed transaction safe to spend. Only returned for unconfirmed transactions

→ →
blockhash

string (hex)

Optional
(0 or 1)

The hash of the block on the local best block chain which includes this transaction, encoded as hex in RPC byte order. Only returned for confirmed transactions

→ →
blockheight

number (int)

Optional
(0 or 1)

The block height containing the transaction.

→ →
blockindex

number (int)

Optional
(0 or 1)

The index of the transaction in the block that includes it. Only returned for confirmed transactions

→ →
blocktime

number (int)

Optional
(0 or 1)

The block header time (Unix epoch time) of the block on the local best block chain which includes this transaction. Only returned for confirmed transactions

→ →
txid

string (hex)

Optional
(0 or 1)

The TXID of the transaction, encoded as hex in RPC byte order. Not returned for move category payments

→ →
walletconflicts

array

Optional
(0 or 1)

An array containing the TXIDs of other transactions that spend the same inputs (UTXOs) as this transaction. Array may be empty. Not returned for move category payments

→ → →
TXID

string (hex)

Optional
(0 or more)

The TXID of a conflicting transaction, encoded as hex in RPC byte order

→ →
time

number (int)

Required
(exactly 1)

A Unix epoch time when the transaction was added to the wallet

→ →
timereceived

number (int)

Optional
(0 or 1)

A Unix epoch time when the transaction was detected by the local node, or the time of the block on the local best block chain that included the transaction. Not returned for move category payments

→ →
comment

string

Optional
(0 or 1)

For transaction originating with this wallet, a locally-stored comment added to the transaction. Only returned in regular payments if a comment was added. Always returned in move category payments. May be an empty string

→ →
to

string

Optional
(0 or 1)

For transaction originating with this wallet, a locally-stored comment added to the transaction identifying who the transaction was sent to. Only returned if a comment-to was added. Never returned by move category payments. May be an empty string

→ →
DS

string

Optional
(0 or 1)

Set to “1” if the transaction is a CoinJoin send.

→ →
parent_descs

array

Optional
(0 or 1)

Added in Dash Core 24.0.0
Only if ‘category’ is ‘received’. List of parent descriptors for the scriptPubKey of this coin.

→ → →
Descriptor

string

Optional
(0 or more)

The descriptor string.

→ →
abandoned

bool

Required
(exactly 1)

Added in Bitcoin Core 0.12.1

Indicates if a transaction is was abandoned:
• true if it was abandoned (inputs are respendable)
• false if it was not abandoned

Example from Dash Core 0.17.0

List the most recent transaction including watch-only addresses.

dash-cli listtransactions "*" 1 0 true

Result:

[
  {
    "address": "yeTgphnEhKjfTx2f57Ncf4AHLPhGKo1pyN",
    "category": "send",
    "amount": -0.10000000,
    "label": "",
    "vout": 1,
    "fee": -0.00002136,
    "confirmations": 641,
    "instantlock": true,
    "instantlock_internal": false,
    "chainlock": true,
    "blockhash": "000000f57f3228da3c544cd9a44e9b869648f0acd5e4cddcda10d576545a6363",
    "blockheight": 874910,
    "blockindex": 11,
    "blocktime": 1690306466,
    "txid": "14974ceb63f214fbb6a6876944a03b2c9e8a519b5115b3f18c76ef27994486df",
    "walletconflicts": [
    ],
    "time": 1690306449,
    "timereceived": 1690306449,
    "abandoned": false
  }
]

See also

  • GetTransaction: gets detailed information about an in-wallet transaction.

  • ListSinceBlock: gets all transactions affecting the wallet which have occurred since a particular block, plus the header hash of a block at a particular depth.

ListUnspent#

Note

Requires wallet support (unavailable on masternodes).

The listunspent RPC returns an array of unspent transaction outputs belonging to this wallet. Note: as of Bitcoin Core 0.10.0, outputs affecting watch-only addresses will be returned; see the spendable field in the results described below.

Parameter #1—the minimum number of confirmations an output must have

Name

Type

Presence

Description

Minimum Confirmations

number (int)

Optional
(0 or 1)

The minimum number of confirmations the transaction containing an output must have in order to be returned. Use 0 to return outputs from unconfirmed transactions. Default is 1

Parameter #2—the maximum number of confirmations an output may have

Name

Type

Presence

Description

Maximum Confirmations

number (int)

Optional
(0 or 1)

The maximum number of confirmations the transaction containing an output may have in order to be returned. Default is 9999999 (~10 million)

Parameter #3—the addresses an output must pay

Name

Type

Presence

Description

Addresses

array

Optional
(0 or 1)

If present, only outputs which pay an address in this array will be returned

→
Address

string (base58)

Required
(1 or more)

A P2PKH or P2SH address

Parameter #4—include unsafe outputs

Name

Type

Presence

Description

Include Unsafe

bool

Optional
(0 or 1)

Include outputs that are not safe to spend . See description of safe attribute below. Default is true

Parameter #5—query options

Name

Type

Presence

Description

Query Options

json

Optional

JSON with query options. Available options:
- minimumAmount: Minimum value of each UTXO in DASH
- maximumAmount: Maximum value of each UTXO in DASH
- maximumCount: Maximum number of UTXOs
- minimumSumAmount: Minimum sum value of all UTXOs in DASH
- coinType: Filter coinTypes as follows:
0 = ALL_COINS,
1 = ONLY_FULLY_MIXED,
2 = ONLY_READY_TO_MIX,
3 = ONLY_NONDENOMINATED,
4 = ONLY_MASTERNODE_COLLATERAL,
5 = ONLY_COINJOIN_COLLATERAL
- include_immature_coinbase: Added in Dash Core 24.0.0 Include immature coinbase UTXOs. Default is false

Result—the list of unspent outputs

Name

Type

Presence

Description

result

array

Required
(exactly 1)

An array of objects each describing an unspent output. May be empty

→
Unspent Output

object

Optional
(0 or more)

An object describing a particular unspent output belonging to this wallet

→ →
txid

string (hex)

Required
(exactly 1)

The TXID of the transaction containing the output, encoded as hex in RPC byte order

→ →
vout

number (int)

Required
(exactly 1)

The output index number (vout) of the output within its containing transaction

→ →
address

string (base58)

Optional
(0 or 1)

The P2PKH or P2SH address the output paid. Only returned for P2PKH or P2SH output scripts

→ →
label

string

Optional
(0 or 1)

The associated label, or "" for the default label

→ →
scriptPubKey

string (hex)

Required
(exactly 1)

The output script paid, encoded as hex

→ →
redeemScript

string (hex)

Optional
(0 or 1)

If the output is a P2SH whose script belongs to this wallet, this is the redeem script

→ →
amount

number (dash)

Required
(exactly 1)

The amount paid to the output in dash

→ →
confirmations

number (int)

Required
(exactly 1)

The number of confirmations received for the transaction containing this output

→ →
ancestorcount

number (int)

Optional
(0 or 1)

Added in Dash Core 23.0.0
The number of in-mempool ancestor transactions, including this one (if transaction is in the mempool)

→ →
ancestorsize

number (int)

Optional
(0 or 1)

Added in Dash Core 23.0.0
The virtual transaction size of in-mempool ancestors, including this one (if transaction is in the mempool)

→ →
ancestorfees

number (int)

Optional
(0 or 1)

Added in Dash Core 23.0.0
The total fees of in-mempool ancestors (including this one) with fee deltas used for mining priority in duffs (if transaction is in the mempool)

→ →
spendable

bool

Required
(exactly 1)

Set to true if the private key or keys needed to spend this output are part of the wallet. Set to false if not (such as for watch-only addresses)

→ →
solvable

bool

Required
(exactly 1)

Added in Bitcoin Core 0.13.0

Set to true if the wallet knows how to spend this output. Set to false if the wallet does not know how to spend the output. It is ignored if the private keys are available

→ →
desc

string

Optional
(0 or 1)

A descriptor for spending this output

→ →
reused

bool

Optional
(0 or 1)

Added in Dash Core 18.1.0
Whether this output is reused/dirty (sent to an address that was previously spent from)

→ →
parent_descs

array

Required
(exactly 1)

Added in Dash Core 24.0.0
List of parent descriptors for the scriptPubKey of this coin.

→ → →
Descriptor

string

Optional
(0 or more)

The descriptor string.

→ →
safe

bool

Required
(exactly 1)

Added in Bitcoin Core 0.15.0

Whether this output is considered safe to spend. Unconfirmed transactions from outside keys are considered unsafe and are not eligible for spending by fundrawtransaction and sendtoaddress.

→ →
coinjoin_rounds

number (int)

Required
(exactly 1)

The number of rounds

Example from Dash Core 18.0.0

Get all outputs confirmed at least 6 times for a particular address:

dash-cli -testnet listunspent 6 99999999 '''
  [
    "yYvsn6vdnkeq9VG1JbkfqKbjv3gUmFmnny"
  ]
'''

Result:

[
  {
    "txid": "8181ac201ef2ff896f666589e98924f7cbbc885f1c42c766629f677e37cafc47",
    "vout": 0,
    "address": "yYvsn6vdnkeq9VG1JbkfqKbjv3gUmFmnny",
    "scriptPubKey": "76a9148a54e0c51084f0e5819a66bb1c4d01191f5caa3888ac",
    "amount": 0.01274051,
    "confirmations": 16007,
    "spendable": true,
    "solvable": true,
    "desc": "pkh([8a54e0c5]0214889c34100d00aca6e7cbfe0fa72d83c28857585740bff5f3db6b37e51d9aaa)#wyvgzv2k",
    "safe": true,
    "coinjoin_rounds": -2
  }
]

Get all outputs for a particular address that have at least 1 confirmation and a maximum value of 10:

dash-cli -testnet listunspent 1 9999999 '''
  [
    "yYvsn6vdnkeq9VG1JbkfqKbjv3gUmFmnny"
  ]
  ''' true '''
  {
    "maximumAmount": "10"
  }
  '''

Result:

[
  {
    "txid": "8181ac201ef2ff896f666589e98924f7cbbc885f1c42c766629f677e37cafc47",
    "vout": 0,
    "address": "yYvsn6vdnkeq9VG1JbkfqKbjv3gUmFmnny",
    "scriptPubKey": "76a9148a54e0c51084f0e5819a66bb1c4d01191f5caa3888ac",
    "amount": 0.01274051,
    "confirmations": 16008,
    "spendable": true,
    "solvable": true,
    "desc": "pkh([8a54e0c5]0214889c34100d00aca6e7cbfe0fa72d83c28857585740bff5f3db6b37e51d9aaa)#wyvgzv2k",
    "safe": true,
    "coinjoin_rounds": -2
  }
]

See also

  • ListTransactions: returns the most recent transactions that affect the wallet.

  • LockUnspent: temporarily locks or unlocks specified transaction outputs. A locked transaction output will not be chosen by automatic coin selection when spending dash. Locks are stored in memory only unless persistent is true.

ListWallets#

The listwallets RPC returns a list of currently loaded wallets.

For full information on the wallet, use the getwalletinfo RPC.

Parameters: none

Result

Name

Type

Presence

Description

result

array

Required
(exactly 1)

An array of strings containing a list of currently loaded wallet files

→
Wallet

string

Required
(0 or more)

The name of a wallet file

Example from Dash Core 0.15.0

dash-cli -testnet listwallets

Result:

[
  "wallet.dat"
]

See also: none

ListWalletDir#

The listwalletdir RPC returns a list of wallets in the wallet directory.

For full information on the wallet, use the getwalletinfo RPC.

Parameters: none

Result

Name

Type

Presence

Description

result

object

Required
(exactly 1)

An object containing the wallets in the wallet directory

→
wallets

array

Required
(exactly 1)

An array of wallet objects

→ →
Wallet

object

Optional
(0 or more)

A wallet

→ → →
name

string

Required
(exactly 1)

The wallet name

Example from Dash Core 18.0.0

dash-cli -testnet listwalletdir

Result:

{
  "wallets": [
    {
      "name": "demo"
    }
  ]
}

See also

LoadWallet#

Note

Requires wallet support (unavailable on masternodes).

The loadwallet RPC loads a wallet from a wallet file or directory. Note that all wallet command-line options used when starting dashd will be applied to the new wallet.

Parameter #1—wallet name

Name

Type

Presence

Description

Filename

string

Required
(exactly 1)

The wallet directory or .dat file. The wallet can be specified as file/directory basename (which must be located in the walletdir directory), or as an absolute path to a file/directory.

Parameter #2—load on startup

Name

Type

Presence

Description

load_on_startup

boolean

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—operation status

Name

Type

Presence

Description

result

object

Required
(exactly 1)

An object containing the wallet name or warning message related to the operation

→
name

string

Required
(exactly 1)

The wallet name if loaded successfully

→
warning

string

Optional
(0 or 1)

Deprecated in Dash Core 24.0.0, returned only if config option -deprecatedrpc=walletwarningfield is passed
Warning messages, if any, related to loading the wallet. Multiple messages will be delimited by newlines.

→
warnings

array

Optional
(0 or 1)

Added in Dash Core 24.0.0
Warning messages, if any, related to loading the wallet.

→ →
Warning

string

Optional
(0 or more)

A warning message

Example from Dash Core 0.16.0

dash-cli -testnet loadwallet wallet-test.dat

Result:

{
  "name": "wallet-test.dat",
  "warning": ""
}

See also

LockUnspent#

Note

Requires wallet support (unavailable on masternodes).

The lockunspent RPC temporarily locks or unlocks specified transaction outputs. A locked transaction output will not be chosen by automatic coin selection when spending dash. Locks are stored in memory only unless persistent is true, in which case they are written to the wallet database and restored on startup.

As of Dash Core 24.0.0, the wallet also locks some outputs itself, and these locks are persistent: dust received from external transactions when -dustprotectionthreshold is set, and inputs of a completed CoinJoin session until the mixing transaction spending them is seen (or for at most about an hour if it never propagates). Unlocking a pending CoinJoin input with lockunspent also stops the wallet from tracking it.

Parameter #1—whether to lock or unlock the outputs

Name

Type

Presence

Description

Unlock

bool

Required
(exactly 1)

Set to false to lock the outputs specified in the following parameter. Set to true to unlock the outputs specified. If this is the only argument specified and it is set to true, all outputs will be unlocked; if it is the only argument and is set to false, there will be no change

Parameter #2—the outputs to lock or unlock

Name

Type

Presence

Description

Outputs

array

Optional
(0 or 1)

An array of outputs to lock or unlock

→
Output

object

Required
(1 or more)

An object describing a particular output

→ →
txid

string

Required
(exactly 1)

The TXID of the transaction containing the output to lock or unlock, encoded as hex in internal byte order

→ →
vout

number (int)

Required
(exactly 1)

The output index number (vout) of the output to lock or unlock. The first output in a transaction has an index of 0

Parameter #3—whether to keep the lock in memory only or in the wallet database

Name

Type

Presence

Description

persistent

bool

Optional
(0 or 1)

Whether to write/erase this lock in the wallet database, or keep the change in memory only. Ignored for unlocking. Defaults to false.

Result—true if successful

Name

Type

Presence

Description

result

bool

Required
(exactly 1)

Set to true if the outputs were successfully locked or unlocked. If the outputs were already locked or unlocked, it will also return true

Example from Dash Core 0.12.2

Lock two outputs:

dash-cli -testnet lockunspent false '''
  [
    {
      "txid": "d3d57ec5e4168b7145e911d019e9713563c1f2db5b2d6885739ea887feca4c87",
      "vout": 0
    },
    {
      "txid": "607897611b2f7c5b23297b2a352a8d6f4383f8d0782585f93220082d361f8db9",
      "vout": 1
    }
  ]
'''

Result:

true

Verify the outputs have been locked:

dash-cli -testnet listlockunspent

Result

[
  {
    "txid": "d3d57ec5e4168b7145e911d019e9713563c1f2db5b2d6885739ea887feca4c87",
    "vout": 0
  },
  {
    "txid": "607897611b2f7c5b23297b2a352a8d6f4383f8d0782585f93220082d361f8db9",
    "vout": 1
  }
]

Unlock one of the above outputs:

dash-cli -testnet lockunspent true '''
[
  {
    "txid": "607897611b2f7c5b23297b2a352a8d6f4383f8d0782585f93220082d361f8db9",
    "vout": 1
  }
]
'''

Result:

true

Verify the output has been unlocked:

dash-cli -testnet listlockunspent

Result:

[
  {
    "txid": "d3d57ec5e4168b7145e911d019e9713563c1f2db5b2d6885739ea887feca4c87",
    "vout": 0
  }
]

See also

  • ListLockUnspent: returns a list of temporarily unspendable (locked) outputs.

  • ListUnspent: returns an array of unspent transaction outputs belonging to this wallet.

MigrateWallet#

Added in version 24.0.0.

Attention

EXPERIMENTAL warning: This call may not work as expected and may be changed in future releases.

Note

Requires wallet support (unavailable on masternodes).

The migratewallet RPC migrates a legacy (non-descriptor) wallet to a descriptor wallet. A new wallet backup will need to be made after migration.

The migrated wallet has the same name as the original wallet and contains all of its addresses and private keys. Because descriptor wallets cannot hold both private keys and watch-only scripts, up to two additional wallets may be created:

  • <name>_watchonly contains all of the watch-only scripts

  • <name>_solvables contains any scripts which the wallet knows but is not watching the corresponding P2SH scripts

For the unnamed (default) wallet, <name> is default_wallet.

Migration is a best-effort process, and some unusual script configurations may not be captured. Before migrating, the RPC creates a backup of the wallet named <name>_<timestamp>.legacy.bak in the wallet’s directory. If the migration is incorrect, the backup can be restored using the restorewallet RPC. Encrypted wallets must have the passphrase provided as an argument to this call.

Parameter #1—wallet name

Name

Type

Presence

Description

wallet_name

string

Optional
(0 or 1)

The name of the wallet to migrate. If provided both here and in the RPC endpoint (-rpcwallet), the two must be identical. Default: the wallet name from the RPC endpoint. Required if no RPC endpoint wallet is given

Parameter #2—passphrase

Name

Type

Presence

Description

passphrase

string

Optional
(0 or 1)

The wallet passphrase. Required for encrypted wallets

Result—migration details

Name

Type

Presence

Description

result

object

Required
(exactly 1)

Migration details

→
wallet_name

string

Required
(exactly 1)

The name of the primary migrated wallet

→
watchonly_name

string

Optional
(0 or 1)

The name of the migrated wallet containing the watch-only scripts

→
solvables_name

string

Optional
(0 or 1)

The name of the migrated wallet containing solvable but not watched scripts

→
backup_path

string

Required
(exactly 1)

The location of the backup of the original wallet

Example from Dash Core 24.0.0

dash-cli -testnet migratewallet "my-legacy-wallet"

See also

NewKeyPool#

Added in version 23.0.0.

Warning

On non-HD wallets, this will require a new backup immediately to include the new keys. When restoring a backup of an HD wallet created before the newkeypool command is run, funds received to new addresses may not appear automatically. They have not been lost, but the wallet may not find them. This can be fixed by running the newkeypool command on the backup and then rescanning, so the wallet re-generates the required keys.

Note

Requires wallet support (unavailable on masternodes) and an unlocked or unencrypted wallet.

The newkeypool RPC entirely clears and refills the keypool. This command is only compatible with legacy wallets.

Parameters: none

Result—null on success

Name

Type

Presence

Description

result

null

Required
(exactly 1)

JSON null when the keypool is successfully cleared and refilled

Example from Dash Core 23.0.0

dash-cli newkeypool

(No result shown: success.)

See also

  • KeyPoolRefill: fills the cache of unused pre-generated keys (the keypool).

  • GetWalletInfo: provides information about the wallet.

RemovePrunedFunds#

Note

Requires wallet support (unavailable on masternodes).

Added in Dash Core 0.12.3 / Bitcoin Core 0.13.0

The removeprunedfunds RPC deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will effect wallet balances.

Parameter #1—the raw transaction to import

Name

Type

Presence

Description

TXID

string
(hex)

Required
(exactly 1)

The hex-encoded id of the transaction you are removing

Result—null on success

Name

Type

Presence

Description

result

null

Required
(exactly 1)

If the funds are removed from the wallet, JSON null will be returned

Example from Dash Core 0.12.3

dash-cli removeprunedfunds bb7daff525b83fa6a847ab50bf7f8f14d6\
22761a19f69157b362ef3f25bda687

(Success: no result displayed.)

See also

  • ImportPrivKey: adds a private key to your wallet. The key should be formatted in the wallet import format created by the dumpprivkey RPC.

  • ImportPrunedFunds: imports funds without the need of a rescan. Meant for use with pruned wallets.

RescanBlockChain#

The rescanblockchain RPC rescans the local blockchain for wallet related transactions.

As of Dash Core 24.0.0, an encrypted wallet must first be unlocked with the walletpassphrase RPC (otherwise the call fails with error -13), because the keypool may need to be topped up during the rescan. The wallet cannot be locked while the rescan runs.

As of Dash Core 24.0.0, the rescan is significantly faster when used on a descriptor wallet and block filters are available (using startup option -blockfilterindex=1).

Parameter #1—the start block height

Name

Type

Presence

Description

Start Height

integer

Optional
(0 or 1)

The block height where the rescan should start

Parameter #2—the stop block height

Name

Type

Presence

Description

Stop Height

integer

Optional
(0 or 1)

The last block height that should be scanned

Result—null or start/end height details if parameters provided

Name

Type

Presence

Description

result

object

Required
(exactly 1)

An object containing the start/end heights depending on the range of blocks scanned

→
start_height

integer

Required
(exactly 1)

The block height where the rescan started (the requested height or 0)

→
stop_height

integer/null

Required
(exactly 1)

The height of the last rescanned block. May be null in rare cases if there was a reorg and the call didn’t scan any blocks because they were already scanned in the background.

Example from Dash Core 0.16.0

dash-cli rescanblockchain

Result:

{
  "start_height": 293600,
  "stop_height": 293602
}

See also

RestoreWallet#

Added in version 21.0.0.

Note

Requires wallet support (unavailable on masternodes).

The restorewallet RPC restores and loads a wallet from a backup file. The backup file is copied into a new wallet named wallet_name in the wallet directory, and the wallet is then loaded. The call fails if the backup file does not exist or if a wallet database already exists at the target path. As of Dash Core 24.0.0, an existing wallet directory that does not contain a wallet.dat file is accepted.

As of Dash Core 24.0.0, the rescan is significantly faster if a descriptor wallet is restored and block filters are available (using startup option -blockfilterindex=1).

Parameter #1—wallet name

Name

Type

Presence

Description

wallet_name

string

Required
(exactly 1)

The name that will be applied to the restored wallet

Parameter #2—backup file

Name

Type

Presence

Description

backup_file

string

Required
(exactly 1)

The backup file that will be used to restore the wallet

Parameter #3—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 the wallet name and any warnings related to the operation

→
name

string

Required
(exactly 1)

The wallet name if restored successfully

→
warning

string

Optional
(0 or 1)

Deprecated in Dash Core 24.0.0, returned only if config option -deprecatedrpc=walletwarningfield is passed
Warning messages, if any, related to restoring the wallet. Multiple messages will be delimited by newlines.

→
warnings

array

Optional
(0 or 1)

Added in Dash Core 24.0.0
Warning messages, if any, related to restoring the wallet.

→ →
Warning

string

Optional
(0 or more)

A warning message

Example from Dash Core 24.0.0

dash-cli -testnet restorewallet "restored-wallet" /tmp/backup.dat

See also

  • BackupWallet: safely copies wallet.dat to the specified file, which can be a directory or a path with filename.

  • LoadWallet: loads a wallet from a wallet file or directory.

ScanTXOutset#

Attention

Experimental warning: this call may be removed or changed in future releases.

The scantxoutset RPC scans the unspent transaction output set for entries that match certain output descriptors.

Parameter #1—action

Name

Type

Presence

Description

Action

string

Required
(exactly 1)

The action to execute:
- “start” for starting a scan,
- “abort” for aborting the current scan (returns true when abort was successful),
- “status” for progress report (in %) of the current scan

Parameter #2—scan objects

Name

Type

Presence

Description

Scan Objects

array

Optional
(0 or 1)

An array of scan objects (required for the start action). Every scan object is either a string descriptor or an object.

→
descriptor

string: object

Required
(1 or more)

An output descriptor; an object with output descriptor and metadata.
Examples of output descriptors are:
- addr(<address>): Outputs whose scriptPubKey corresponds to the specified address (does not include P2PK)
- raw(<hex script>): Outputs whose scriptPubKey equals the specified hex scripts
- combo(<pubkey>): P2PK and P2PKH outputs for the given pubkey
- pkh(<pubkey>): P2PKH outputs for the given pubkey
- sh(multi(<n>,<pubkey>,<pubkey>,...)): P2SH-multisig outputs for the given threshold and pubkeys

→ →
desc

string

Required
(exactly 1)

An output descriptor

→ →
range

int / array

Optional
(0 or 1)

The range of HD chain indexes to explore, either an end index or [begin,end] (default: 1000)

In the above, either refers to a fixed public key in hexadecimal notation, or to an xpub/xprv optionally followed by one or more path elements separated by “/”, and optionally ending in “/” (unhardened), or “/’” or “/*h” (hardened) to specify all unhardened or hardened child keys. In the latter case, a range needs to be specified by below if different from 1000.

Result—The unspent and total amount

Name

Type

Presence

Description

result

object

Required
(exactly 1)

An object containing the the unspent and total amounts.

→
success

bool

Required
(exactly 1)

Whether the scan was completed

→
txouts

number (int)

Required
(exactly 1)

The number of unspent transaction outputs scanned

→
height

number (int)

Required
(exactly 1)

The current block height (index)

→
bestblock

string (hex)

Required
(exactly 1)

The hash of the block at the tip of the chain

→
unspents

array

Required
(exactly 1)

An array containing unspent output objects

→ →
Unspent output

array

Required
(1 or more)

An object containing unspent output information

→ → →
txid

string (hex)

Required
(exactly 1)

The TXID of the transaction the output appeared in. The TXID must be encoded in hex in RPC byte order

→ → →
vout

number (int)

Required
(exactly 1)

The index number of the output (vout) as it appeared in its transaction, with the first output being 0

→ → →
scriptPubKey

string (hex)

Required
(exactly 1)

The output’s pubkey script encoded as hex

→ → →
desc

string

Required
(exactly 1)

A specialized descriptor for the matched scriptPubKey

→ → →
amount

number (int)

Required
(exactly 1)

The total amount in DASH of the unspent output

→ → →
coinbase

bool

Required
(exactly 1)

Added in Dash Core 23.0.0
Whether this is a coinbase output

→ → →
height

number (int)

Required
(exactly 1)

The height of the unspent transaction output

→
total_amount

numeric

Required
(exactly 1)

The total amount of all found unspent outputs in DASH

Example from Dash Core 18.0.0

dash-cli -testnet scantxoutset start '["addr(yWjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ)"]'

Result:

{
  "success": true,
  "txouts": 639756,
  "height": 667140,
  "bestblock": "000000ec777dd903c5a378ab209a7815b24a5365b5c53a0c22e64ef3350d33db",
  "unspents": [
    {
      "txid": "571028a9a2f69c5eec75dbae10c8724b8afd44530fac97936ae6676a9c61e03c",
      "vout": 0,
      "scriptPubKey": "76a914724c86a5dc23ecac05474d9be3ac76a6aa4bcb4488ac",
      "desc": "addr(yWjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ)#sycxjztu",
      "amount": 1.00000000,
      "height": 494777
    },
    {
      "txid": "3e76165230a3ff5bb8df0a9e278caa81f9a653c2b7a075f8dc16e56103c8f68e",
      "vout": 0,
      "scriptPubKey": "76a914724c86a5dc23ecac05474d9be3ac76a6aa4bcb4488ac",
      "desc": "addr(yWjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ)#sycxjztu",
      "amount": 7.76020488,
      "height": 494777
    }
  ],
  "total_amount": 8.76020488
}

See also

  • ListUnspent: returns an array of unspent transaction outputs belonging to this wallet.

Send#

Note

Requires wallet support (unavailable on masternodes).

EXPERIMENTAL warning: This call may be changed in future releases.

The send RPC sends a transaction with specified outputs. This command creates and optionally broadcasts a transaction where none of the keys are duplicated in the output JSON array.

As of Dash Core 24.0.0, a wallet unlocked only for mixing (with the walletpassphrase RPC and mixingonly set to true) cannot sign the transaction; an incomplete PSBT is returned until the wallet is fully unlocked.

Parameter #1—Outputs

Name

Type

Presence

Description

outputs

json array

Required
(exactly 1)

A JSON array with outputs as key-value pairs. Each address can only appear once, and only one ‘data’ object is allowed.

→ Output

object

Required
(1 or more)

Each object in the array represents an output of the transaction.

→ →
address

string: number (DASH)

Optional
(0 or 1)

A key-value pair where the key is the Dash address and the value is the amount in DASH. The value can be specified as a numeric value or a string representing the amount.

→ →
data

string: string (hex)

Optional
(0 or 1)

A key-value pair where the key must be "data", and the value is hex-encoded data.

Parameter #2—conf_target

Name

Type

Presence

Description

conf_target

numeric (int)

Optional
(0 or 1)

Confirmation target (in blocks) for the transaction. Uses wallet’s default configuration.

Parameter #3—estimate_mode

Name

Type

Presence

Description

estimate_mode

string

Optional
(0 or 1)

The fee estimate mode. Must be one of (case insensitive): unset, economical, conservative. Default is unset.

Parameter #4—Fee rate

Name

Type

Presence

Description

fee_rate

number or string

Optional
(0 or 1)

Added in Dash Core 22.0.0
Specify a fee rate in duffs/B (default=not set, fall back to wallet fee estimation).

Parameter #5—Options

Name

Type

Presence

Description

options

json object

Optional
(0 or 1)

Additional configuration settings for the transaction.

→
add_inputs

bool

Optional
(0 or 1)

Automatically include coins from the wallet to cover the target amount. Defaults to false when inputs are specified, true otherwise.

→
include_unsafe

bool

Optional
(0 or 1)

Include inputs that are not safe to spend (unconfirmed transactions from outside keys and unconfirmed replacement transactions). Defaults to false.
Warning: the resulting transaction may become invalid if one of the unsafe inputs disappears. If that happens, you will need to fund the transaction with different inputs and republish it.

→
minconf

numeric (int)

Optional
(0 or 1)

Added in Dash Core 24.0.0
If add_inputs is specified, require inputs with at least this many confirmations. Defaults to 0.

→
maxconf

numeric (int)

Optional
(0 or 1)

Added in Dash Core 24.0.0
If add_inputs is specified, require inputs with at most this many confirmations.

→
add_to_wallet

bool

Optional
(0 or 1)

If false, returns the transaction as a serialized hex string and does not add it to the wallet or broadcast it. Defaults to true.

→
change_address

string

Optional
(0 or 1)

Updated in Dash Core 23.0.0
The Dash address to receive the change. If not set, the address is chosen automatically.

→
change_position

numeric (int)

Optional
(0 or 1)

The index of the change output.

→
conf_target

numeric (int)

Optional
(0 or 1)

Confirmation target (in blocks) for the transaction. Defaults to wallet’s default configuration.

→
estimate_mode

string

Optional
(0 or 1)

The fee estimate mode. Must be one of (case insensitive): unset, economical, conservative. Default is unset.

→
fee_rate

numeric or string

Optional
(0 or 1)

Added in Dash Core 22.0.0
Specify a fee rate in duff/B. If not set, falls back to wallet fee estimation

→
include_watching

bool

Optional
(0 or 1)

Also select inputs which are watch only. Only solvable inputs can be used. Watch-only destinations are solvable if the public key and/or output script was imported, e.g. with importpubkey or importmulti with the ‘pubkeys’ or ‘desc’ field.

→ inputs

array

Optional
(0 or 1)

Specify inputs instead of adding them automatically. Array of JSON objects

→ → Input

object

Required
(1 or more)

Each object in the array represents an input of the transaction.

→ → →
txid

string (hex)

Required
(exactly 1)

The transaction ID of the outpoint to be spent.

→ → →
vout

numeric (int)

Required
(exactly 1)

The output number (vout) of the outpoint to be spent.

→ → →
sequence

numeric (int)

Optional
(0 or 1)

The sequence number to use for the input.

→ → →
size

numeric (int)

Optional
(0 or 1)

Added in Dash Core 23.1.0
The maximum size for this input, including the size of the outpoint and sequence number. Note that signature sizes are not guaranteed to be consistent, so the maximum DER signatures size of 73 bytes should be used when considering ECDSA signatures. Default: calculated from wallet and solving data

→
locktime

numeric

Optional
(0 or 1)

Sets the transaction’s locktime. If non-zero, it also activates the inputs. Default is 0.

→
lock_unspents

bool

Optional
(0 or 1)

If true, locks the selected unspent outputs. Defaults to false.

→
psbt

bool

Optional
(0 or 1)

If true, always returns the transaction as a PSBT. Implies add_to_wallet is false. Default is automatic.

→ subtract_fee_from_outputs

array

Optional
(0 or 1)

A JSON array of integers. The fee will be equally deducted from the amount of each specified output. Those recipients will receive less funds than you enter in their corresponding amount field. If no outputs are specified here, the sender pays the fee.

→ → Output index

numeric (int)

Required
(1 or more)

The zero-based output index, before a change output is added.

→
use_cj

bool

Optional
(0 or 1)

Added in Dash Core 24.0.0
Use CoinJoin funds only. Defaults to false.

→
solving_data

object

Optional
(0 or 1)

Added in Dash Core 23.0.0

Keys and scripts needed for producing a final transaction with a dummy signature. Used for fee estimation during coin selection.

→ →
pubkeys

array

Optional
(0 or 1)

Public keys involved in this transaction

→ → →
pubkey

string

Optional
(0 or more)

A public key

→ →
scripts

array

Optional
(0 or 1)

Scripts involved in this transaction

→ → →
script

string

Optional
(0 or more)

A script

→ →
descriptors

array

Optional
(0 or 1)

Descriptors that provide solving data for this transaction

→ → →
descriptor

string

Optional
(0 or more)

A descriptor

Result—transaction details

Name

Type

Presence

Description

Result

object

Required
(exactly 1)

JSON object containing transaction details

→ complete

bool

Required
(exactly 1)

If the transaction has a complete set of signatures.

→ txid

string (hex)

Optional
(0 or 1)

The transaction id for the send. Only 1 transaction is created regardless of the number of addresses.

→ hex

string (hex)

Optional
(0 or 1)

If add_to_wallet is false, the hex-encoded raw transaction with signatures.

→ psbt

string

Optional
(0 or 1)

If more signatures are needed, or if add_to_wallet is false, the base64-encoded (partially) signed transaction.

Examples from Dash Core 24.0.0

# Send with a fee rate of 1 duff/B
dash-cli send '{"XunLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPw0": 0.1}' null "unset" 1
# Create a transaction that should confirm in the next block, specify a particular input, and return result without adding to wallet or broadcasting
dash-cli send '{"XunLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPw0": 0.1}' 1 "economical" null '{"add_to_wallet": false, "inputs": [{"txid":"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0", "vout":1}]}'

See also

  • SendMany: creates and broadcasts a transaction which sends outputs to multiple addresses.

  • SendToAddress: spends an amount to a given address.

SendAll#

Added in version 24.0.0.

Attention

EXPERIMENTAL warning: This call may be changed in future releases.

Note

Requires wallet support (unavailable on masternodes).

The sendall RPC spends the value of all (or specific) confirmed UTXOs in the wallet to one or more recipients without creating change. Unconfirmed inbound UTXOs and locked UTXOs are not spent. sendall respects the avoid_reuse wallet flag. As of Dash Core 24.0.0, a wallet unlocked only for mixing cannot sign the transaction; an incomplete PSBT is returned until the wallet is fully unlocked.

sendall is useful for emptying a wallet or creating a changeless payment from selected UTXOs. To make a payment of a specific amount where the recipient pays the transaction fee, use the fee-subtraction option of the send (subtract_fee_from_outputs), sendtoaddress (subtractfeefromamount), or sendmany (subtractfeefrom) RPCs instead.

If the wallet contains many small inputs (for example, from tiny payments or accumulated change), consider using the send_max option to exclude inputs that are worth less than the fees needed to spend them.

Parameter #1—recipients

Name

Type

Presence

Description

recipients

array

Required
(exactly 1)

The sendall destinations. Each address may only appear once. Some recipients can optionally be given an amount to make payments, but at least one address must appear without an amount

→
Address

string

Optional
(0 or more)

A Dash address which receives an equal share of the unspecified amount

→
Payment

object

Optional
(0 or more)

A payment of a specified amount

→ →
Address/amount pair

string : number (DASH) or string

Required
(exactly 1)

A key-value pair. The key is the Dash address and the value is the amount in DASH (as a number or string)

Parameter #2—confirmation target

Name

Type

Presence

Description

conf_target

number (int)

Optional
(0 or 1)

Confirmation target in blocks. Default: wallet -txconfirmtarget

Parameter #3—estimate mode

Name

Type

Presence

Description

estimate_mode

string

Optional
(0 or 1)

The fee estimate mode. Must be one of (case insensitive): unset, economical, conservative. Default: unset

Parameter #4—fee rate

Name

Type

Presence

Description

fee_rate

number or string

Optional
(0 or 1)

Specify a fee rate in duff/B. Default: not set, falls back to wallet fee estimation

Parameter #5—options

Name

Type

Presence

Description

options

object

Optional
(0 or 1)

Additional options

→
add_to_wallet

bool

Optional
(0 or 1)

When false, returns the serialized transaction without broadcasting it or adding it to the wallet. Default: true

→
fee_rate

number or string

Optional
(0 or 1)

Specify a fee rate in duff/B. Default: not set, falls back to wallet fee estimation

→
include_watching

bool

Optional
(0 or 1)

Also select inputs which are watch-only. Only solvable inputs can be used. Watch-only destinations are solvable if the public key and/or output script was imported, e.g. with importpubkey or importmulti with the pubkeys or desc field. Default: true for watch-only wallets, otherwise false

→
inputs

array

Optional
(0 or 1)

Use exactly the specified inputs to build the transaction. Specifying inputs is incompatible with the send_max, minconf, and maxconf options. Default: []

→ →
Input

object

Required
(1 or more)

An input to spend

→ → →
txid

string (hex)

Required
(exactly 1)

The transaction ID

→ → →
vout

number (int)

Required
(exactly 1)

The output number

→ → →
sequence

number (int)

Optional
(0 or 1)

The sequence number. Default: depends on the value of the locktime option

→
locktime

number (int)

Optional
(0 or 1)

Raw locktime. A non-zero value also locktime-activates inputs. Default: 0

→
lock_unspents

bool

Optional
(0 or 1)

Lock selected unspent outputs. Default: false

→
psbt

bool

Optional
(0 or 1)

Always return a PSBT. Implies add_to_wallet is false. Default: automatic

→
send_max

bool

Optional
(0 or 1)

When true, only use UTXOs that can pay for their own fees to maximize the output amount. When false, no UTXO is left behind. Incompatible with specifying inputs. Default: false

→
use_cj

bool

Optional
(0 or 1)

Use CoinJoin funds only. The resulting transaction is recorded as a CoinJoin spend (DS in gettransaction). Default: false

→
minconf

number (int)

Optional
(0 or 1)

Require inputs with at least this many confirmations. Default: 0

→
maxconf

number (int)

Optional
(0 or 1)

Require inputs with at most this many confirmations

→
conf_target

number (int)

Optional
(0 or 1)

Confirmation target in blocks. Default: wallet -txconfirmtarget

→
estimate_mode

string

Optional
(0 or 1)

The fee estimate mode. Must be one of (case insensitive): unset, economical, conservative. Default: unset

→
solving_data

object

Optional
(0 or 1)

Keys and scripts needed for producing a final transaction with a dummy signature. Used for fee estimation during coin selection

→ →
pubkeys

array

Optional
(0 or 1)

Public keys involved in this transaction. Default: []

→ → →
pubkey

string

Optional
(0 or more)

A public key

→ →
scripts

array

Optional
(0 or 1)

Scripts involved in this transaction. Default: []

→ → →
script

string

Optional
(0 or more)

A script

→ →
descriptors

array

Optional
(0 or 1)

Descriptors that provide solving data for this transaction. Default: []

→ → →
descriptor

string

Optional
(0 or more)

A descriptor

Result—transaction details

Name

Type

Presence

Description

result

object

Required
(exactly 1)

Transaction details

→
complete

bool

Required
(exactly 1)

If the transaction has a complete set of signatures

→
txid

string (hex)

Optional
(0 or 1)

The transaction ID. Only one transaction is created regardless of the number of addresses. Returned when the transaction is complete

→
hex

string (hex)

Optional
(0 or 1)

The hex-encoded raw transaction with signatures. Returned when the transaction is complete and add_to_wallet is false (or psbt is true)

→
psbt

string (base64)

Optional
(0 or 1)

The base64-encoded (partially) signed transaction. Returned if more signatures are needed, if add_to_wallet is false, or if psbt is true

Examples from Dash Core 24.0.0

Spend all UTXOs from the wallet with a fee rate of 1 duff/B using named arguments:

dash-cli -testnet -named sendall recipients='["yLdTVpyYfEV827SjFbTRskRqvyGyELPG4Y"]' fee_rate=1

Spend all UTXOs split into equal amounts to two addresses with a fee rate of 1.5 duff/B using the options argument:

dash-cli -testnet sendall '["yLdTVpyYfEV827SjFbTRskRqvyGyELPG4Y", "yMgJ8zEfhRW6rXZtz1uQFAUj3971JH2Qt6"]' null "unset" null '{"fee_rate": 1.5}'

Spend all UTXOs with a fee rate of 1.3 duff/B, sending 0.25 DASH to one recipient and the rest to another:

dash-cli -testnet -named sendall recipients='[{"yMgJ8zEfhRW6rXZtz1uQFAUj3971JH2Qt6": 0.25}, "yLdTVpyYfEV827SjFbTRskRqvyGyELPG4Y"]' fee_rate=1.3

Spend two specific UTXOs to one address without broadcasting the transaction or adding it to the wallet:

dash-cli -testnet sendall '["yLdTVpyYfEV827SjFbTRskRqvyGyELPG4Y"]' null "unset" null \
 '{"fee_rate": 1, "add_to_wallet": false, "inputs": [{"txid":"3e8e3dcc25b1a3887556c1bd9ffe35439ce02b53817d5de0ae68daa5188d3381","vout":82},{"txid":"3e8e3dcc25b1a3887556c1bd9ffe35439ce02b53817d5de0ae68daa5188d3381","vout":83}]}'

Result (psbt truncated):

{
  "psbt": "cHNidP8BAH4CAAAAAoEzjRil2miu4F19gVMr4JxDNf6fvcFWdYijsSXMPY4+UgAAAAD/////gTONGKXaaK7gXX2BUyvgnEM1/p+9wVZ1iKOxJcw9jj5TAAAAAP////8BdiwxAQAAAAAZdqkUA2gHYQYku6xmuqifcEQvbgXHxzqIrAAAAAAAAQD9NxECAAAAAY5X3e+3iwSb7xo03IKddxKohg9DWbolQOU0feBl...",
  "txid": "62c292a3cb35e46896d45af507256ff1b3255fcc59724ebd82b1d8ba788a1600",
  "hex": "020000000281338d18a5da68aee05d7d81532be09c4335fe9fbdc1567588a3b125cc3d8e3e520000006a47304402206058dd83a30d089dadaa28ea4a8e729f65574f1270fca96dc2fa71e5a502b8ff02206836038fdcdd84b46d1040fd00368d9b869a9a1ab8bb9db83625e5745e37f6ba01210237e944aa957520fb2c823d0207d52d8aaf1f3b6dd8baf8e34236a4a476283a90ffffffff81338d18a5da68aee05d7d81532be09c4335fe9fbdc1567588a3b125cc3d8e3e530000006a473044022047023c9ed4d1118d76d0d28f9a373fdd261f406dbde73c49cd9141cc5d70a5d0022004f9e66701e8343a6d97e7195d6ec8484dd01365d5aa3733cae2bb189737397801210298e48d6517c8a969d7629b86e5fd52318ab749ed5a3461daebaf4993dadffdffffffffff01762c3101000000001976a914036807610624bbac66baa89f70442f6e05c7c73a88ac00000000",
  "complete": true
}

See also

  • Send: sends a transaction with specified outputs.

  • SendMany: creates and broadcasts a transaction which sends outputs to multiple addresses.

SendMany#

Note

Requires wallet support (unavailable on masternodes) and an unlocked or unencrypted wallet.

The sendmany RPC creates and broadcasts a transaction which sends outputs to multiple addresses.

Parameter #1—unused parameter

Name

Type

Presence

Description

Unused

string

Optional
(0 or 1)

Updated in Dash Core 24.0.0
Now optional (default="").
Deprecated: (previously account) will be removed in a later version of Dash Core

Must be set to "" for backwards compatibility.

Parameter #2—the addresses and amounts to pay

Name

Type

Presence

Description

Outputs

object

Required
(exactly 1)

An object containing key/value pairs corresponding to the addresses and amounts to pay

→
Address/Amount

string : number (dash)

Required
(1 or more)

Updated in Dash Core 24.0.0
A key/value pair with a base58check-encoded P2PKH or P2SH address (or a DIP-18 Dash Platform address) to pay as the key, and an amount of dash to pay as the value. A DIP-18 Dash Platform address makes this an asset lock transaction (version 2 payload). Paying a Platform address is refused before the v24 hard fork activates, and a Platform recipient cannot be listed in subtractfeefrom. Version 2 asset locks are currently non-standard, so under default policy the send fails with Transaction is non-standard (assetlocktx-version-2) (on testnet, devnets and regtest, -acceptnonstdtxn=1 allows them)

Parameter #3—minimum confirmations

Name

Type

Presence

Description

Confirmations

number (int)

Optional
(0 or 1)

Deprecated and ignored since Dash Core 18.0.0

Parameter #4–whether to add the balance from transactions locked via InstantSend

Name

Type

Presence

Description

addlocked

bool

Optional
(0 or 1)

Deprecated and ignored since Dash Core 18.0.0

Parameter #5—a comment

Name

Type

Presence

Description

Comment

string

Optional
(0 or 1)

A locally-stored (not broadcast) comment assigned to this transaction. Default is no comment

Parameter #6—automatic fee subtraction

Name

Type

Presence

Description

Subtract Fee From Amount

array

Optional
(0 or 1)

An array of addresses. The fee will be equally divided by as many addresses as are entries in this array and subtracted from each address. If this array is empty or not provided, the fee will be paid by the sender

→
Address

string (base58)

Optional (0 or more)

An address previously listed as one of the recipients.

Parameter #7—use InstantSend

Name

Type

Presence

Description

Use InstantSend

bool

Optional
(0 or 1)

Deprecated and ignored since Dash Core 0.15.0

Parameter #8—use CoinJoin

Name

Type

Presence

Description

Use CoinJoin

bool

Optional
(0 or 1)

If set to true, use CoinJoin funds only (default: false).

Parameter #9—confirmation target

Name

Type

Presence

Description

conf_target

number (int)

Optional
(0 or 1)

Confirmation target (in blocks)

Parameter #10—fee estimate mode

Name

Type

Presence

Description

estimate_mode

string

Optional
(0 or 1)

The fee estimate mode, must be one of (case insensitive):
unset
economical
conservative

Parameter #11—fee rate

Name

Type

Presence

Description

fee_rate

number or string

Optional
(0 or 1)

Added in Dash Core 22.0.0
Specify a fee rate in duffs/B (default=not set, fall back to wallet fee estimation).

Parameter #12—verbose

Name

Type

Presence

Description

verbose

boolean

Optional
(0 or 1)

If true, return extra information about the transaction. Default is false

Result—execution result

If verbose is not set or set to false:

Name

Type

Presence

Description

hex

string

Required
(exactly 1)

The transaction id for the send. Only one transaction is created regardless of the number of addresses

If verbose is set to true:

Name

Type

Presence

Description

result

json object

Required
(exactly 1)

A JSON object containing transaction details

→ txid

string

Required
(exactly 1)

The transaction id for the send. Only one transaction is created regardless of the number of addresses

→ fee_reason

string

Required
(exactly 1)

Updated in Dash Core 23.0.0 (renamed from fee reason)
The transaction fee reason

Example from Dash Core 0.17.0

Send 0.1 DASH to the first address and 0.2 DASH to the second address, with a comment of “Example Transaction”.

dash-cli -testnet sendmany \
  "" \
  '''
    {
      "ySutkc49Khpz1HQN8AfWNitVBLwqtyaxvv": 0.1,
      "yhQrX8CZTTfSjKmaq5h7DgSShyEsumCRBi": 0.2
    } ''' \
  6       \
  false   \
  "Example Transaction"

Result:

a7c0194a005a220b9bfeb5fdd12d5b90979c10f53de4f8a48a1495aa198a6b95

Example from Dash Core 0.12.2 (CoinJoin)

Send 0.1 DASH to the first address and 0.2 DASH to the second address using CoinJoin, with a comment of “Example Transaction”.

dash-cli -testnet sendmany \
  "" \
  '''
    {
      "ySutkc49Khpz1HQN8AfWNitVBLwqtyaxvv": 0.1,
      "yhQrX8CZTTfSjKmaq5h7DgSShyEsumCRBi": 0.2
    } ''' \
  6       \
  false   \
  "Example Transaction"
  '''
    [""]
  '''    \
  false  \
  true

Result:

43337c8e4f3b21bedad7765fa851a6e855e4bb04f60d6b3e4c091ed21ffc5753

See also

  • Send: sends a transaction with specified outputs.

  • SendToAddress: spends an amount to a given address.

SendToAddress#

Note

Requires wallet support (unavailable on masternodes) and an unlocked or unencrypted wallet.

The sendtoaddress RPC spends an amount to a given address.

Parameter #1—to address

Name

Type

Presence

Description

To Address

string

Required
(exactly 1)

Updated in Dash Core 24.0.0
A P2PKH or P2SH address to which the dash should be sent. A DIP-18 Dash Platform address makes this an asset lock transaction (version 2 payload). Paying a Platform address is refused before the v24 hard fork activates, and subtractfeefromamount is not supported for it. Version 2 asset locks are currently non-standard, so under default policy the send fails with Transaction is non-standard (assetlocktx-version-2) (on testnet, devnets and regtest, -acceptnonstdtxn=1 allows them).

Parameter #2—amount to spend

Name

Type

Presence

Description

Amount

number (dash)

Required
(exactly 1)

The amount to spent in dash

Parameter #3—a comment

Name

Type

Presence

Description

Comment

string

Optional
(0 or 1)

A locally-stored (not broadcast) comment assigned to this transaction. Default is no comment

Parameter #4—a comment about who the payment was sent to

Name

Type

Presence

Description

Comment To

string

Optional
(0 or 1)

A locally-stored (not broadcast) comment assigned to this transaction. Meant to be used for describing who the payment was sent to. Default is no comment

Parameter #5—automatic fee subtraction

Name

Type

Presence

Description

Subtract Fee From Amount

boolean

Optional
(0 or 1)

The fee will be deducted from the amount being sent. The recipient will receive less dash than you enter in the amount field. Default is false

Parameter #6—use InstantSend

Name

Type

Presence

Description

Use InstantSend

bool

Optional
(0 or 1)

Deprecated and ignored since Dash Core 0.15.0

Parameter #7—use CoinJoin

Name

Type

Presence

Description

Use CoinJoin

bool

Optional
(0 or 1)

If set to true, use CoinJoin funds only (default: false).

Parameter #8—confirmation target

Name

Type

Presence

Description

conf_target

number (int)

Optional
(0 or 1)

Confirmation target (in blocks)

Parameter #9—fee estimate mode

Name

Type

Presence

Description

estimate_mode

string

Optional
(0 or 1)

The fee estimate mode, must be one of (case insensitive):
unset
economical
conservative

Parameter #10—avoids partial respends

Name

Type

Presence

Description

avoid_reuse

boolean

Optional
(0 or 1)

Avoid spending from dirty addresses; addresses are considered dirty if they have previously been used in a transaction.

Parameter #11—fee rate

Name

Type

Presence

Description

fee_rate

number or string

Optional
(0 or 1)

Added in Dash Core 22.0.0
Specify a fee rate in duffs/B (default=not set, fall back to wallet fee estimation).

Parameter #12—verbose

Name

Type

Presence

Description

verbose

boolean

Optional
(0 or 1)

If true, return extra information about the transaction. Default is false

Result—execution result

If verbose is not set or set to false:

Name

Type

Presence

Description

hex

string

Required
(exactly 1)

The transaction id for the send

If verbose is set to true:

Name

Type

Presence

Description

result

json object

Required
(exactly 1)

A JSON object containing transaction details

→ txid

string

Required
(exactly 1)

The transaction id for the send

→ fee_reason

string

Required
(exactly 1)

Updated in Dash Core 23.0.0 (renamed from fee reason)
The transaction fee reason

Example from Dash Core 0.12.2

Spend 0.1 dash to the address below with the comment “sendtoaddress
example” and the comment-to “Nemo From Example.com”:

dash-cli -testnet sendtoaddress ySutkc49Khpz1HQN8AfWNitVBLwqtyaxvv \
  1.0 "sendtoaddress example" "Nemo From Example.com"

Result:

70e2029d363f0110fe8a0aa2ba7bd771a579453135568b2aa559b2cb30f875aa

Example from Dash Core 0.12.2 (InstantSend)

Spend 0.1 dash via InstantSend to the address below with the comment “sendtoaddress
example” and the comment-to “Nemo From Example.com”:

dash-cli -testnet sendtoaddress ySutkc49Khpz1HQN8AfWNitVBLwqtyaxvv \
  1.0 "sendtoaddress example" "Nemo From Example.com" false true

Result:

af002b9c931b5efb5b2852df3d65efd48c3b9ac2ba0ef8a4cf97b894f3ff08c2

Example from Dash Core 0.12.2 (CoinJoin)

Spend 0.1 dash via CoinJoin to the address below with the comment “sendtoaddress
example” and the comment-to “Nemo From Example.com”:

dash-cli -testnet sendtoaddress ySutkc49Khpz1HQN8AfWNitVBLwqtyaxvv \
  1.0 "sendtoaddress example" "Nemo From Example.com" false false true

Result:

949833bc49e0643f63e2afed1704ccccf005a93067a4e46165b06ace42544694

Example from Dash Core 0.12.2 (InstantSend + CoinJoin)

Spend 0.1 dash via InstantSend and CoinJoin to the address below with the
comment “sendtoaddressexample” and the comment-to “Nemo From Example.com”:

dash-cli -testnet sendtoaddress ySutkc49Khpz1HQN8AfWNitVBLwqtyaxvv \
  1.008 "sendtoaddress example" "Nemo From Example.com" false true true

Result:

ba4bbe29fa06b67d6f3f3a73e381627e66abe22e217ce329aefad41ea72c3922

See also

  • Send: sends a transaction with specified outputs.

  • SendMany: creates and broadcasts a transaction which sends outputs to multiple addresses.

SetHDSeed#

Note

Requires wallet support (unavailable on masternodes).

Note

This command is only compatible with legacy wallets.

Added in Dash Core 21.0.0

The sethdseed RPC sets or generates a new HD wallet seed. Non-HD wallets will not be upgraded to HD wallets. Wallets that are already HD cannot be updated to a new HD seed.

Note: You will need to make a new backup of your wallet after setting the HD wallet seed. Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

Parameter #1—newkeypool

Name

Type

Presence

Description

newkeypool

boolean

Optional
(0 or 1)

Whether to flush old unused addresses, including change addresses, from the keypool and regenerate it. Default is true. If true, the next address from getnewaddress and change address from getrawchangeaddress will be from this new seed. If false, addresses from the existing keypool will be used until it has been depleted.

Parameter #2—seed

Name

Type

Presence

Description

seed

string

Optional
(0 or 1)

The WIF private key to use as the new HD seed. The seed value can be retrieved using the dumpwallet command. It is the private key marked hdseed=1. Default is a random seed.

Result—execution result

Name

Type

Presence

Description

null

json null

Required
(exactly 1)

No result

Examples

Set a new HD seed:

dash-cli sethdseed

See also

SetLabel#

Note

Requires wallet support (unavailable on masternodes).

The setlabel RPC sets the label associated with the given address.

Parameter #1—a Dash address

Name

Type

Presence

Description

Address

string (base58)

Required
(exactly 1)

The P2PKH or P2SH Dash address to be associated with a label.

Parameter #2—a label

Name

Type

Presence

Description

Label

string

Required
(exactly 1)

The label to assign to the address.

Result—null if successful

Name

Type

Presence

Description

result

null

Required
(exactly 1)

Set to JSON null if the address was successfully placed in the account

Example from Dash Core 0.17.0

Assign the “doc test” label to the provided address.

dash-cli -testnet setlabel yMTFRnrfJ4NpnYVeidDNHVwT7uuNsVjevq "doc test"

(Success: no result displayed.)

See also

  • ListLabels: returns the list of all labels, or labels that are assigned to addresses with a specific purpose.

  • GetAddressesByLabel: returns the list of addresses assigned the specified label.

SetCoinJoinAmount#

The setcoinjoinamount RPC sets the amount of DASH to be processed with CoinJoin (previously named setprivatesendamount prior to Dash Core 0.17.0)

Parameter #1—amount to process

Name

Type

Presence

Description

Amount

int

Required
(exactly 1)

The number of DASH to process (minimum: 2, maximum: 21,000,000)

Result—null on success

Example from Dash Core 0.13.0

dash-cli -testnet setcoinjoinamount 2000

(Success: no result displayed.)

See also:

SetCoinJoinRounds#

The setcoinjoinrounds RPC sets the number of rounds to use (previously named setprivatesendrounds prior to Dash Core 0.17.0)

Parameter #1—number of rounds to use

Name

Type

Presence

Description

Rounds

int

Required
(exactly 1)

The number of rounds to use (minimum: 2, maximum: 16)

Result—null on success

Example from Dash Core 0.13.0

dash-cli -testnet setcoinjoinrounds 4

(Success: no result displayed.)

See also:

SetTxFee#

Note

Requires wallet support (unavailable on masternodes).

The settxfee RPC sets the transaction fee per kilobyte paid by transactions created by this wallet.

Parameter #1—the transaction fee amount per kilobyte

Name

Type

Presence

Description

Transaction Fee Per Kilobyte

number (dash)

Required
(exactly 1)

The transaction fee to pay, in dash, for each kilobyte of transaction data. Be careful setting the fee too low—your transactions may not be relayed or included in blocks

Result: true on success

Name

Type

Presence

Description

result

bool (true)

Required
(exactly 1)

Set to true if the fee was successfully set

Example from Dash Core 0.12.2

Set the transaction fee per kilobyte to 10,000 duffs.

dash-cli -testnet settxfee 0.00010000

Result:

true

See also

  • GetWalletInfo: provides information about the wallet.

  • GetNetworkInfo: returns information about the node’s connection to the network.

SetWalletFlag#

The SetWalletFlag RPC changes the state of the given wallet flag for a wallet.

*Parameter #1—states the name of the flag to change

Name

Type

Presence

Description

flag

string

Required
(exactly 1)

The name of the flag to change. Current available flags: avoid_reuse

*Parameter #2—defining the new state

Name

Type

Presence

Description

value

boolean

Optional
(default TRUE)

The new state.

Result

Name

Type

Presence

Description

result

object

Required
(exactly 1)

An object describing the flag change

→
flag_name

str (string)

Required
(exactly 1)

the name of the flag that was modified

→
flag_state

true|false (boolean)

Required
(exactly 1)

the new state of the flag

→
warnings

str (string)

Optional
(0 or 1)

Any warnings associated with the change

Example from Dash Core 18.1.0

dash-cli setwalletflag avoid_reuse

Result:

{
  "flag_name": "avoid_reuse",
  "flag_state": true,
  "warnings": "You need to rescan the blockchain in order to correctly mark used destinations in the past. Until this is done, some destinations may be considered unused, even if the opposite is the case."
}

See also: none

SignMessage#

Note

Requires wallet support (unavailable on masternodes) and an unlocked or unencrypted wallet.

The signmessage RPC signs a message with the private key of an address.

Parameter #1—the address corresponding to the private key to sign with

Name

Type

Presence

Description

Address

string (base58)

Required
(exactly 1)

A P2PKH address whose private key belongs to this wallet

Parameter #2—the message to sign

Name

Type

Presence

Description

Message

string

Required
(exactly 1)

The message to sign

Result—the message signature

Name

Type

Presence

Description

result

string (base64)

Required
(exactly 1)

The signature of the message, encoded in base64.

Example from Dash Core 0.12.2

Sign a the message “Hello, World!” using the following address:

dash-cli -testnet signmessage yNpezfFDfoikDuT1f4iK75AiLp2YLPsGAb "Hello, World!"

Result:

H4XULzfHCf16In2ECk9Ta9QxQPq639zQto2JA3OLlo3JbUdrClvJ89+A1z+Z9POd6l8LJhn1jGpQYF8mX4jkQvE=

See also

SignRawTransactionWithWallet#

Note

Requires wallet support (unavailable on masternodes) and an unlocked wallet.

The signrawtransactionwithwallet RPC signs a transaction in the serialized transaction format using private keys stored in the wallet.

Parameter #1—the transaction to sign

Name

Type

Presence

Description

Transaction

string (hex)

Required
(exactly 1)

The transaction to sign as a serialized transaction

Parameter #2—unspent transaction output details

Name

Type

Presence

Description

Dependencies

array

Optional
(0 or 1)

The previous outputs being spent by this transaction

→
Output

object

Optional
(0 or more)

An output being spent

→ →
txid

string (hex)

Required
(exactly 1)

The TXID of the transaction the output appeared in. The TXID must be encoded in hex in RPC byte order

→ →
vout

number (int)

Required
(exactly 1)

The index number of the output (vout) as it appeared in its transaction, with the first output being 0

→ →
scriptPubKey

string (hex)

Required
(exactly 1)

The output’s pubkey script encoded as hex

→ →
redeemScript

string (hex)

Optional
(0 or 1)

If the pubkey script was a script hash, this must be the corresponding redeem script

→ →
amount

numeric

Required
(exactly 1)

The amount of Dash spent

Parameter #3—signature hash type

Name

Type

Presence

Description

SigHash

string

Optional
(0 or 1)

The type of signature hash to use for all of the signatures performed. (You must use separate calls to the signrawtransactionwithwallet RPC if you want to use different signature hash types for different signatures. The allowed values are: ALL, NONE, SINGLE, ALL|ANYONECANPAY, NONE|ANYONECANPAY, and SINGLE|ANYONECANPAY. Default is ALL. As of Dash Core 24.0.0, an invalid value fails with error -8 (invalid parameter) instead of -1

Result—the transaction with any signatures made

Name

Type

Presence

Description

result

object

Required
(exactly 1)

The results of the signature

→
hex

string (hex)

Required
(exactly 1)

The resulting serialized transaction encoded as hex with any signatures made inserted. If no signatures were made, this will be the same transaction provided in parameter #1

→
complete

bool

Required
(exactly 1)

The value true if transaction is fully signed; the value false if more signatures are required

→
errors

array

Optional
(0 or 1)

Script verification errors (if there are any)

→ →
Error

object

Required
(1 or more)

An error for one input

→ → →
txid

string (hex)

Required
(exactly 1)

The hash of the referenced, previous transaction

→ → →
vout

number (int)

Required
(exactly 1)

The index of the output to spent and used as input

→ → →
scriptSig

string (hex)

Required
(exactly 1)

The hex-encoded signature script

→ → →
sequence

number (int)

Required
(exactly 1)

Script sequence number

→ → →
error

string

Required
(exactly 1)

Verification or signing error related to the input

Example from Dash Core 0.17.0

Sign the hex generated from the createrawtransaction RPC:

dash-cli -testnet signrawtransactionwithwallet 020000000121f39228a11ddf19\
7ac3658e93bd264d0afd927f0cdfc7caeb760537e529c94a0100000000ffffffff0180969\
800000000001976a914fe64a96d6660e30c433e1189082466a95bdf9ceb88ac00000000

Result:

{
  "hex": "020000000121f39228a11ddf197ac3658e93bd264d0afd927f0cdfc7caeb760537e529c94a010000006b483045022100811c5679ef097b0e5a338fc3cd05ee50e1802680ea8a172d0fd3a81da3c1fc2002204804b18a44e888ac1ee9b6a7cbadc211ecdc30f8c889938c95125206e39554220121025d81ce6581e547dd34194385352053abb17f0246768d75443b25ded5e37d594fffffffff0180969800000000001976a914fe64a96d6660e30c433e1189082466a95bdf9ceb88ac00000000",
  "complete": true
}

See also

  • CombineRawTransaction: combine multiple partially signed transactions into one transaction.

  • CreateRawTransaction: creates an unsigned serialized transaction that spends a previous output to a new output with a P2PKH or P2SH address. The transaction is not stored in the wallet or transmitted to the network.

  • DecodeRawTransaction: decodes a serialized transaction hex string into a JSON object describing the transaction.

  • SendRawTransaction: validates a transaction and broadcasts it to the peer-to-peer network.

  • SignRawTransactionWithKey: signs inputs for a transaction in the serialized transaction format using private keys provided in the call.

SimulateRawTransaction#

Added in version 23.0.0.

Note

Requires wallet support (unavailable on masternodes).

The simulaterawtransaction RPC calculates the balance change resulting from signing and broadcasting the given transaction(s).

Parameter #1—raw transactions

Name

Type

Presence

Description

rawtxs

array

Optional
(0 or 1)

An array of hex strings of raw transactions

→
Raw Transaction

string

Optional
(0 or more)

A hex-encoded raw transaction

Parameter #2—options

Name

Type

Presence

Description

options

object

Optional
(0 or 1)

Options

→
include_watchonly

bool

Optional
(0 or 1)

Whether to include watch-only addresses (default=true for watch-only wallets, otherwise false)

Result—balance change

Name

Type

Presence

Description

result

object

Required
(exactly 1)

The simulation result

→
balance_change

number

Required
(exactly 1)

The wallet balance change (negative means decrease)

Example from Dash Core 23.0.0

dash-cli simulaterawtransaction '["02000000000100205fa0120000001976a914485485425fa99504ec1638ac4213f3cfc9f32ef388ac00000000"]'

Result:

{
  "balance_change": 0.00000000
}

See also

  • CreateRawTransaction: creates an unsigned serialized transaction that spends a previous output to a new output with a P2PKH or P2SH address.

  • SignRawTransactionWithWallet: signs a transaction in the serialized transaction format using private keys stored in the wallet.

  • SendRawTransaction: validates a transaction and broadcasts it to the peer-to-peer network.

UnloadWallet#

Note

Requires wallet support (unavailable on masternodes).

The unloadwallet RPC unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument. Specifying the wallet name on a wallet endpoint is invalid.

Parameter #1—wallet name

Name

Type

Presence

Description

Filename

string

Optional
(0 or 1)

The name of the wallet to unload. If provided both here and in the RPC endpoint, the two must be identical. Default: the wallet name from the RPC endpoint

Parameter #2—load of startup

Name

Type

Presence

Description

load_on_startup

boolean

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—any warnings

Name

Type

Presence

Description

result

object

Required
(exactly 1)

An object containing any warnings related to unloading the wallet

→
warning

string

Optional
(0 or 1)

Deprecated in Dash Core 24.0.0, returned only if config option -deprecatedrpc=walletwarningfield is passed
Warning messages, if any, related to unloading the wallet. Multiple messages will be delimited by newlines.

→
warnings

array

Optional
(0 or 1)

Added in Dash Core 24.0.0
Warning messages, if any, related to unloading the wallet.

→ →
Warning

string

Optional
(0 or more)

A warning message

Example from Dash Core 0.17.0

dash-cli -testnet unloadwallet wallet-test.dat

Result:

null

See also

  • LoadWallet: loads a wallet from a wallet file or directory.

UpgradeToHD#

Note

Requires wallet support (unavailable on masternodes).

The upgradetohd RPC upgrades non-HD wallets to HD.

Parameters

Name

Type

Presence

Description

mnemonic

string

Optional
(0 or 1)

Mnemonic as defined in BIP39 to use for the new HD wallet. Use an empty string "" to generate a new random mnemonic.

mnemonicpassphrase

string

Optional
(0 or 1)

Updated in Dash Core 24.0.0
Optional mnemonic passphrase as defined in BIP39. Must be at most 248 bytes (not characters). Passphrases of 249 to 256 bytes are only accepted if the node is started with -allow-deprecated-long-mnemonics, which should only be used to recover a wallet created with such a passphrase by Dash Core 19.2.0 or later. Seed derivation ignores every byte after the 248th

walletpassphrase

string

Optional
(0 or 1)

If your wallet is encrypted you must have your wallet passphrase here. If your wallet is not encrypted, specifying wallet passphrase will trigger wallet encryption.

rescan

boolean

Optional
(0 or 1)

Whether to rescan the blockchain for missing transactions or not (default=false if mnemonic is empty)

Result—further instructions

Name

Type

Presence

Description

result

string

Required
(exactly 1)

Further instructions: a reminder to back up the mnemonic, plus a warning if the mnemonic passphrase contains a null character. Prior to Dash Core 23.0.0, true was returned on success

Example from Dash Core 0.17.0

Upgrade wallet to HD without specifying any optional parameters:

dash-cli -testnet upgradetohd
true

See also

  • DumpHDInfo: returns an object containing sensitive private info about this HD wallet

UpgradeWallet#

The upgradewallet RPC upgrades the wallet to the latest version if no version number is specified. New keys may be generated and a new wallet backup will need to be made.

Parameters

Name

Type

Presence

Description

version

number

Optional
(0 or 1)

The version number to upgrade to. Default is the latest wallet version.

Result—JSON object on success or failure

Name

Type

Presence

Description

result

object

Required
(exactly 1)

Upgrade details

→
wallet_name

string

Required
(exactly 1)

Name of wallet this operation was performed on

→
previous_version

number (int)

Required
(exactly 1)

Version of wallet before this operation

→
current_version

number (int)

Required
(exactly 1)

Version of wallet after this operation

→
result

string

Optional
(0 or 1)

Description of result, if no error

→
error

string

Optional
(0 or 1)

The error message describing why the upgrade failed, if applicable

Example from Dash Core 21.0.0

Upgrade wallet without specifying any optional parameters:

dash-cli -testnet upgradewallet

Result (success indicated by empty object):

{
}

See also

  • DumpHDInfo: returns an object containing sensitive private info about this HD wallet

WalletCreateFundedPSBT#

The walletcreatefundedpsbt RPC creates and funds a transaction in the Partially Signed Transaction (PST) format. Inputs will be added if supplied inputs are not enough.

Implements the Creator and Updater roles.

As of Dash Core 23.0.0, all existing inputs must either have their previous output transaction be in the wallet or be in the UTXO set. Solving data must be provided for non-wallet inputs.

Parameter #1—Inputs

Name

Type

Presence

Description

Inputs

array

Optional
(0 or 1)

An array of objects, each one to be used as an input to the transaction. Leave empty to add inputs automatically. See add_inputs option.

→ Input

object

Optional
(0 or more)

An object describing a particular input

→ →
txid

string (hex)

Required
(exactly 1)

The TXID of the outpoint to be spent encoded as hex in RPC byte order

→ →
vout

number (int)

Required
(exactly 1)

The output index number (vout) of the outpoint to be spent; the first output in a transaction is index 0

→ →
Sequence

number (int)

Optional
(0 or 1)

The sequence number to use for the input

→ →
size

number (int)

Optional
(0 or 1)

Added in Dash Core 23.1.0
The maximum size for this input, including the size of the outpoint and sequence number. Note that signature sizes are not guaranteed to be consistent, so the maximum DER signatures size of 73 bytes should be used when considering ECDSA signatures. Default: calculated from wallet and solving data

Parameter #2—Outputs

Name

Type

Presence

Description

Outputs

array

Required
(exactly 1)

A JSON array with outputs as key-value pairs

→ Output

object

Required
(1 or more)

An object describing a particular output

→ →
Address

string: number (Dash)

Optional
(0 or 1)

A key-value pair. The key (string) is the Dash address, the value (float or string) is the amount in DASH

→ →
Data

data: string (hex)

Optional
(0 or 1)

A key-value pair. The key must be data, the value is hex encoded data

Parameter #3—locktime

Name

Type

Presence

Description

Locktime

numeric (int)

Optional
(0 or 1)

Indicates the earliest time a transaction can be added to the block chain (default=0). Non-0 value also locktime-activates inputs.

Parameter #4—Additional options

Name

Type

Presence

Description

Options

Object

Optional
(0 or 1)

Additional options

→
add_inputs

bool

Optional
(0 or 1)

Automatically include coins from the wallet to cover the target amount. Defaults to false when inputs are specified, true otherwise.

→
include_unsafe

bool

Optional
(0 or 1)

Include inputs that are not safe to spend (unconfirmed transactions from outside keys and unconfirmed replacement transactions). Defaults to false.
Warning: the resulting transaction may become invalid if one of the unsafe inputs disappears. If that happens, you will need to fund the transaction with different inputs and republish it.

→
minconf

numeric (int)

Optional
(0 or 1)

Added in Dash Core 24.0.0
If add_inputs is specified, require inputs with at least this many confirmations. Defaults to 0.

→
maxconf

numeric (int)

Optional
(0 or 1)

Added in Dash Core 24.0.0
If add_inputs is specified, require inputs with at most this many confirmations.

→
changeAddress

string

Optional
(0 or 1)

Updated in Dash Core 23.0.0

The dash address to receive the change. If not set, the address is chosen automatically.

→
changePosition

numeric (int)

Optional
(0 or 1)

The index of the change output (default=random)

→
includeWatching

bool

Optional
(0 or 1)

Also select inputs which are watch only (default=false for non-watching only wallets and true for watching only-wallets)

→
lockUnspents

bool

Optional
(0 or 1)

Lock selected unspent outputs (default=false). This applies to manually selected coins also since Dash Core 20.1.0.

→
fee_rate

numeric or string

Optional
(0 or 1)

Added in Dash Core 22.0.0
Specify a fee rate in duff/B. If not set, falls back to wallet fee estimation

→
feeRate

numeric or string

Optional
(0 or 1)

Set a specific fee rate in DASH/kB

→
subtractFeeFromOutputs

array

Optional
(0 or 1)

A json array of integers. The fee will be equally deducted from the amount of each specified output. The outputs are specified by their zero-based index, before any change output is added. Those recipients will receive less Dash than you enter in their corresponding amount field. If no outputs are specified here, the sender pays the fee.

→ →
Output index

numeric (int)

Optional
(0 or more)

An output index number (vout) from which the fee should be subtracted. If multiple vouts are provided, the total fee will be divided by the number of vouts listed and each vout will have that amount subtracted from it.

→
use_cj

bool

Optional
(0 or 1)

Added in Dash Core 24.0.0
Use CoinJoin funds only. Defaults to false.

→
conf_target

numeric (int)

Optional
(0 or 1)

Confirmation target (in blocks)

→
estimate_mode

string

Optional
(0 or 1)

The fee estimate mode, must be one of (case insensitive):
unset
economical
conservative

→
solving_data

object

Optional
(0 or 1)

Added in Dash Core 23.0.0

Keys and scripts needed for producing a final transaction with a dummy signature. Used for fee estimation during coin selection.

→ →
pubkeys

array

Optional
(0 or 1)

Public keys involved in this transaction

→ → →
pubkey

string

Optional
(0 or more)

A public key

→ →
scripts

array

Optional
(0 or 1)

Scripts involved in this transaction

→ → →
script

string

Optional
(0 or more)

A script

→ →
descriptors

array

Optional
(0 or 1)

Descriptors that provide solving data for this transaction

→ → →
descriptor

string

Optional
(0 or more)

A descriptor

Parameter #5—bip32derivs

Name

Type

Presence

Description

bip32derivs

bool

Optional
(exactly 0 or 1)

Includes the BIP 32 derivation paths for public keys if known (default = true)

Result—information about the created transaction

Name

Type

Presence

Description

result

object

Required
(exactly 1)

An object including information about the created transaction

→
psbt

string (base64)

Required
(Exactly 1)

The resulting raw transaction (base64-encoded string)

→
fee

number (dash)

Required
(Exactly 1)

Fee in DASH the resulting transaction pays

→
changepos

numeric (int)

Required
(Exactly 1)

The position of the added change output, or -1 if no change output was added

Example from Dash Core 18.0.0

dash-cli -testnet walletcreatefundedpsbt "[{\"txid\":\"2662c87e1761ed5f4e98a0640b2608114d86f282824a51bd624985d236c71178\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"

Result:

{
  "psbt": "cHNidP8BAGQCAAAAAXgRxzbShUlivVFKgoLyhk0RCCYLZKCYTl/tYRd+yGImAAAAAAD/////AgAAAAAAAAAABmoEAAECA6PmxgkAAAAAGXapFFNPqpebN9gMkzsFJWixaDCZ3S8OiKwAAAAAAAEA4QIAAAABlIu3UCzRFVGowPY3H7RvS5g6QGc71ZYEFXIrcS+NfEIBAAAAakcwRAIgT+T8SIyVXyhsUshI7HlQtA7EduG0NMat1oa0dL3eCakCIGIi0pH9naNBQIqopHIPWmlZmXcVod34GH51J3tr/K5+ASEDxn2GlEMVg4rqfsgNOQtdCbkbYkgzcNSXnaXM96ffd6n+////ArTnxgkAAAAAGXapFM78RkkEwDgUwBkG4ZfcdZp0XkfuiKwAypo7AAAAABl2qRQ++by+kvd8j63QVm7qf/jUfyK94IisVUgIAAAAAA==",
  "fee": 0.00000273,
  "changepos": 1
}

WalletDisplayAddress#

Added in version 23.1.0.

The walletdisplayaddress RPC displays an address on an external signer for verification.

Parameter #1—address to display

Name

Type

Presence

Description

address

string

Required
(exactly 1)

Dash address to display

Result—the address confirmed by the signer

Name

Type

Presence

Description

result

object

Required
(exactly 1)

An object containing the confirmed address

→
address

string

Required
(exactly 1)

The address as confirmed by the signer

WalletLock#

Note

Requires wallet support (unavailable on masternodes) and an unlocked wallet.

The walletlock RPC 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.

As of Dash Core 24.0.0, the wallet cannot be locked while a rescan started by the rescanblockchain RPC or importdescriptors RPC is running. Call the abortrescan RPC first.

Parameters: none

Result—null on success

Name

Type

Presence

Description

result

null

Required
(exactly 1)

Always set to JSON null

Example from Dash Core 0.12.2

dash-cli -testnet walletlock

(Success: nothing printed.)

See also

  • 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.

  • 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.

  • WalletPassphraseChange: changes the wallet passphrase from ‘old passphrase’ to ‘new passphrase’.

WalletPassphrase#

Note

Requires wallet support (unavailable on masternodes) and an encrypted wallet.

The walletpassphrase RPC 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.

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

Parameter #1—the passphrase

Name

Type

Presence

Description

Passphrase

string

Required
(exactly 1)

The passphrase that unlocks the wallet

Parameter #2—the number of seconds to leave the wallet unlocked

Name

Type

Presence

Description

Seconds

number (int)

Required
(exactly 1)

The number of seconds after which the decryption key will be automatically deleted from memory

Parameter #3—unlock for mixing processing only

Name

Type

Presence

Description

Mixing Only

bool

Optional
(0 or 1)

If true, the wallet will be locked for sending functions but unlocked for mixing transactions (default: false)

Result—null on success

Name

Type

Presence

Description

result

null

Required
(exactly 1)

Always set to JSON null

Example from Dash Core 0.12.2

Unlock the wallet for 10 minutes (the passphrase is “test”):

dash-cli -testnet walletpassphrase test 600

(Success: no result printed.)

Unlock the wallet for CoinJoin processing transactions only for 10 minutes (the passphrase is “test”):

dash-cli -testnet walletpassphrase test 600 true

(Success: no result printed.)

See also

  • 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.

  • WalletPassphraseChange: changes the wallet passphrase from ‘old passphrase’ to ‘new passphrase’.

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

Note

Requires wallet support (unavailable on masternodes) and an encrypted wallet.

The walletpassphrasechange RPC changes the wallet passphrase from ‘old passphrase’ to ‘new passphrase’.

As of Dash Core 24.0.0, the passphrase cannot be changed while a rescan started by the rescanblockchain RPC or importdescriptors RPC is running. Call the abortrescan RPC first.

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

Parameter #1—the current passphrase

Name

Type

Presence

Description

Current Passphrase

string

Required
(exactly 1)

The current wallet passphrase

Parameter #2—the new passphrase

Name

Type

Presence

Description

New Passphrase

string

Required
(exactly 1)

The new passphrase for the wallet

Result—null on success

Name

Type

Presence

Description

result

null

Required
(exactly 1)

Always set to JSON null

Example from Dash Core 0.12.2

Change the wallet passphrase from “test” to “example”:

dash-cli -testnet walletpassphrasechange "test" "example"

(Success: no result printed.)

See also

  • 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.

  • 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.

  • 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.

WalletProcessPSBT#

The walletprocesspsbt RPC updates a PSBT with input information from a wallet and then allows the signing of inputs.

Parameter #1—PSBT

Name

Type

Presence

Description

psbt

string

Required
(exactly 1)

The transaction base64 string

Parameter #2—Sign Transaction

Name

Type

Presence

Description

sign

bool

Optional
(exactly 0 or 1)

Sign the transaction when updating (default = true)

Parameter #3—Signature Hash Type

Name

Type

Presence

Description

sighashtype

string

Optional
(exactly 0 or 1)

The signature hash type to sign with if not specified by the PSBT. Must be one of the following (default = ALL):
- ALL
- NONE
- SINGLE
- ALL|ANYONECANPAY
- NONE|ANYONECANPAY
- SINGLE|ANYONECANPAY
As of Dash Core 24.0.0, an invalid value fails with error -8 (invalid parameter) instead of -1

Parameter #4—bip32derivs

Name

Type

Presence

Description

bip32derivs

bool

Optional
(exactly 0 or 1)

Includes the BIP 32 derivation paths for public keys if known (default = true).

Parameter #5—finalize

Name

Type

Presence

Description

finalize

bool

Optional
(exactly 0 or 1)

Also finalize inputs if possible (default = true).

Result—the processed wallet

Name

Type

Presence

Description

result

object

Required
(exactly 1)

The results of the signature

→
psbt

string

Required
(exactly 1)

The base64-encoded partially signed transaction

→
complete

bool

Required
(exactly 1)

If the transaction has a complete set of signatures

→
hex

string (hex)

Optional
(0 or 1)

Added in Dash Core 24.0.0
The hex-encoded network transaction if complete

Example from Dash Core 18.0.0

dash-cli walletprocesspsbt "cHNidP8BAEICAAAAAXgRxzbShUlivVFKgoLyhk0RCCYLZKCYTl/tYRd+yGImAAAAAAD/////AQAAAAAAAAAABmoEAAECAwAAAAAAAAA="

Result:

{
  "psbt": "cHNidP8BAEICAAAAAXgRxzbShUlivVFKgoLyhk0RCCYLZKCYTl/tYRd+yGImAAAAAAD/////AQAAAAAAAAAABmoEAAECAwAAAAAAAQDhAgAAAAGUi7dQLNEVUajA9jcftG9LmDpAZzvVlgQVcitxL418QgEAAABqRzBEAiBP5PxIjJVfKGxSyEjseVC0DsR24bQ0xq3WhrR0vd4JqQIgYiLSkf2do0FAiqikcg9aaVmZdxWh3fgYfnUne2v8rn4BIQPGfYaUQxWDiup+yA05C10JuRtiSDNw1Jedpcz3p993qf7///8CtOfGCQAAAAAZdqkUzvxGSQTAOBTAGQbhl9x1mnReR+6IrADKmjsAAAAAGXapFD75vL6S93yPrdBWbup/+NR/Ir3giKxVSAgAAQdqRzBEAiAF1fgBDg2M/WAeYTYzCkEiSSrDVzcYoe8wwrw/MbdgOQIgJzoYBQ9hAm6jqk2cLFitUd1/iL1ku8w9unadjNfsCdoBIQJn2pETmk8U2X6veADqnny5/6j8Iy7Oizij0SeJHm9x6AAA",
  "complete": true
}

See also

  • CreatePSBT: creates a transaction in the Partially Signed Transaction (PST) format.

  • CombinePSBT: combine multiple partially-signed Dash transactions into one transaction.

  • ConvertToPSBT: converts a network serialized transaction to a PSBT.

  • DecodePSBT: returns a JSON object representing the serialized, base64-encoded partially signed Dash transaction.

  • FinalizePSBT: finalizes the inputs of a PSBT.

  • WalletCreateFundedPSBT: creates and funds a transaction in the Partially Signed Transaction (PST) format.

WipeWalletTxes#

The wipewallettxes RPC wipes all transaction from the wallet. Note: Use the rescanblockchain RPC to initiate the scanning progress and recover wallet transactions.

Parameter #1—Keep confirmed txes

Name

Type

Presence

Description

keep_confirmed

boolean

Optional
(0 or 1)

Do not wipe confirmed transactions (default=false)

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 20.0.0

Wipe all transactions from the wallet:

dash-cli -testnet wipewallettxes

See also

  • RescanBlockchain: rescans the local blockchain for wallet related transactions.