Dash Core

Dash Core Developer Documentation

Welcome to the Dash Core developer documentation. You'll find guides and documentation to help you start working with Dash Core as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Guides

Wallet RPCs

❗️

Wallet Support

RPCs that require wallet support are not available on masternodes for security reasons. Such RPCs are designated with a "Requires wallet support" message.

AbandonTransaction

Added in Bitcoin Core 0.12.0

The abandontransaction RPC 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)

NameTypePresenceDescription
TXIDstring (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

NameTypePresenceDescription
resultnullRequired
(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

NameTypePresenceDescription
resultnullRequired
(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

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes)

The addmultisigaddress RPC adds a P2SH multisig address to the wallet.

Parameter #1---the number of signatures required

NameTypePresenceDescription
Requirednumber (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

NameTypePresenceDescription
Keys Or AddressesarrayRequired
(exactly 1)
An array of strings with each string being a public key or address
→
Key Or Address
stringRequired
(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---the account name

NameTypePresenceDescription
AccountstringOptional
(0 or 1)
The account name in which the address should be stored. Default is the default account, \" (an empty string)"

Result---a P2SH address printed and stored in the wallet

NameTypePresenceDescription
resultstring (base58)Required
(exactly 1)
The P2SH multisig address. The address will also be added to the wallet, and outputs paying that address will be tracked by the wallet

Example from Dash Core 0.12.2

Adding a 2-of-3 P2SH multisig address to the "test account" by mixing
two P2PKH addresses and one full public key:

dash-cli -testnet addmultisigaddress 2 '''
  [
    "yNpezfFDfoikDuT1f4iK75AiLp2YLPsGAb",
    "0311f97539724e0de38fb1ff79f5148e5202459d06ed07193ab18c730274fd0d88",
    "yVJj7TB3ZhMcSP2wo65ZFNqy23BQH9tT87"
  ]
''' \
 'test account'

Result:

8uJLxDxk2gEMbidF5vT8XLS2UCgQmVcroW

(New P2SH multisig address also stored in wallet.)

See also

BackupWallet

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. 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

NameTypePresenceDescription
DestinationstringRequired
(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

NameTypePresenceDescription
resultnullRequired
(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 or overwrites 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.

DumpHDInfo

The dumphdinfo RPC returns an object containing sensitive private info about this HD wallet

Parameters: none

Result---HD wallet information

NameTypePresenceDescription
ResultobjectRequired
(exactly 1)
An object containing sensitive private info about this HD wallet.
→
hdseed
stringRequired
(exactly 1)
The BIP-32 HD seed (in hex)
→
mnemonic
stringRequired
(exactly 1)
The BIP-39 mnemonic for this HD wallet (English words)
→
mnemonicpassphrase
stringRequired
(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

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes). Requires an unlocked wallet or an unencrypted wallet.

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

NameTypePresenceDescription
P2PKH Addressstring (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

NameTypePresenceDescription
resultstring (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 or overwrites a file with all wallet keys in a human-readable format.

DumpWallet

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes). Requires an unlocked wallet or an unencrypted wallet.

The dumpwallet RPC creates or overwrites a file with all wallet keys in a human-readable format.

Parameter #1---a filename

NameTypePresenceDescription
FilenamestringRequired
(exactly 1)
The file in which the wallet dump will be placed. May be prefaced by an absolute file path. An existing file with that name will be overwritten

Result---information about exported wallet

NameTypePresenceDescription
resultobjectRequired
(exactly 1)
An object describing dumped wallet file
→
dashcoreversion
stringRequired
(exactly 1)
Dash Core build details
→
lastblockheight
intRequired
(exactly 1)
Height of the most recent block received
→
lastblockhash
string (hex)Required
(exactly 1)
Hash of the most recent block received
→
lastblocktime
stringRequired
(exactly 1)
Timestamp of the most recent block received
→
keys
intRequired
(exactly 1)
Number of keys dumped
→
file
stringRequired
(exactly 1)
Name of the file the wallet was dumped to
→
warning
stringRequired
(exactly 1)
Warning to not share the file due to it containing the private keys

Example from Dash Core 0.13.0

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

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

Results:

{
  "dashcoreversion": "v0.13.0.0",
  "lastblockheight": 250186,
  "lastblockhash": "0000000000a82fb1890de5da4740d0671910a436fe6fc4503a3e553adef073b4",
  "lastblocktime": "2018-10-23T12:50:44Z",
  "keys": 8135,
  "file": "/tmp/dump.txt",
  "warning": "/tmp/dump.txt file contains all private keys from this wallet. Do not share it with anyone!"
}

Results (the first 10 lines of the file):

>>>>>>>> Wallet dump created by Dash Core v0.13.0.0
>>>>>>>> * Created on 2018-10-23T12:55:38Z
>>>>>>>> * Best block at time of backup was 250186 (0000000000a82fb1890de5da4740d0671910a436fe6fc4503a3e553adef073b4),
>>>>>>>>   mined on 2018-10-23T12:50:44Z

cQZZ4awQvcXXyES3CmUJqSgeTobQm9t9nyUr337kvUtsWsnvvMyw 2017-11-28T18:21:36Z label=test%20label # addr=ycBuREgSskHHkWLxDa9A5WppCki6PfFycL
cTBRPnJoPjEMh67v1zes437v8Po5bFLDWKgEudTJMhVaLs1ZVGJe 2017-11-28T18:21:37Z reserve=1 # addr=yNsWkgPLN1u7p5dfWYnasYdgirU2J3tjUj
cRkkwrFnQUrih3QiT87sNy1AxyfjzqVYSyVYuL3qnJcSiQfE4QJa 2017-11-28T18:21:37Z reserve=1 # addr=yRkHzRbRKn8gBp5826mbaBvxLuBBNDVQg3
cQM7KoqQjHCCTrDhnfBEY1vpW9W65zRvaQeTb41UbFb6WX8Q8UkQ 2017-11-28T18:21:37Z reserve=1 # addr=yVEdefApUYiDLHApvvWCK5afTtJeQada8Y
cTGSKYaQTQabnjNSwCqpjYXiucVujTXiwp9dzmJV9cNAiayAJusi 2017-11-28T18:21:37Z reserve=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

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. 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.

🚧

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

NameTypePresenceDescription
PassphrasestringRequired
(exactly 1)
The passphrase to use for the encrypted wallet. Must be at least one character

Result---a notice (with program shutdown)

NameTypePresenceDescription
resultstringRequired
(exactly 1)
A notice that the server is stopping and that you need to make a new backup. The wallet is now encrypted

Example from Dash Core 0.12.2

dash-cli -testnet encryptwallet "test"

Result:

Wallet encrypted; Dash Core server stopping, restart to run with encrypted wallet.
The keypool has been flushed and a new HD seed was generated (if you are using
HD). You need to make a new backup.

See also

  • WalletPassphrase: 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'.

GetBalance

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes).

The getbalance RPC gets the balance in decimal dash across all accounts or for a particular account.

Parameter #1---an account name

NameTypePresenceDescription
AccountstringOptional
(0 or 1)
Deprecated: will be removed in a later version of Bitcoin Core

The name of an account to get the balance for. An empty string (\") is the default account. The string * will get the balance for all accounts (this is the default behavior)"

Parameter #2---the minimum number of confirmations

NameTypePresenceDescription
Confirmationsnumber (int)Optional
(0 or 1)
The minimum number of confirmations an externally-generated transaction must have before it is counted towards the balance. Transactions generated by this node are counted immediately. Typically, externally-generated transactions are payments to this wallet and transactions generated by this node are payments to other wallets. Use 0 to count unconfirmed transactions. Default is 1

Parameter #3---whether to add the balance from transactions locked via InstantSend

NameTypePresenceDescription
addlockedboolOptional
(exactly 1)
Add the balance from InstantSend locked transactions

Parameter #4---whether to include watch-only addresses

NameTypePresenceDescription
Include Watch-OnlyboolOptional
(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), treat watch-only addresses as if they didn't belong to this wallet

Result---the balance in dash

NameTypePresenceDescription
resultnumber (dash)Required
(exactly 1)
The balance of the account (or all accounts) in dash

Examples from Dash Core 0.13.0

Get the balance for the main ("") account, including transactions with
at least five confirmations and those spent to watch-only addresses in
that account. Do not include InstantSend locked transactions.

dash-cli -testnet getbalance "" 3 false true

Result:

0.00000000

Get the balance for the main ("") account, including transactions with
at least one confirmation and those spent to watch-only addresses in
that account. Include the balance from InstantSend locked transactions.

dash-cli -testnet getbalance "" 3 true true

Result:

1.00000000

See also

  • ListAccounts: lists accounts and their balances.
  • GetReceivedByAccount: returns the total amount received by addresses in a particular account from transactions with the specified number of confirmations. It does not count coinbase transactions.
  • GetReceivedByAddress: returns the total amount received by the specified address in transactions with the specified number of confirmations. It does not count coinbase transactions.

GetNewAddress

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes).

The getnewaddress RPC returns a new Dash address for receiving payments. If an account is specified, payments received with the address will be credited to that account.

Parameter #1---an account name

NameTypePresenceDescription
AccountstringOptional
(0 or 1)
The name of the account to put the address in. The default is the default account, an empty string (\")"

Result---a dash address never previously returned

NameTypePresenceDescription
resultstring (base58)Required
(exactly 1)
A P2PKH address which has not previously been returned by this RPC. The address will be marked as a receiving address in the wallet. 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

Create a new address in the "doc test" account:

dash-cli -testnet getnewaddress "doc test"

Result:

yPuNTqCGzXtU3eEV5jHvhhJkzEPyJLmVkb

See also

  • GetAccountAddress: returns the current Dash address for receiving payments to this account. If the account doesn't exist, it creates both the account and a new address for receiving payment. Once a payment has been received to an address, future calls to this RPC for the same account will return a different address.
  • GetRawChangeAddress: 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

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. 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

NameTypePresenceDescription
resultstring (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.
  • GetAccountAddress: returns the current Dash address for receiving payments to this account. If the account doesn't exist, it creates both the account and a new address for receiving payment. Once a payment has been received to an address, future calls to this RPC for the same account will return a different address.

GetReceivedByAddress

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes).

Warning iconWarning 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. It does not count coinbase transactions.

Parameter #1---the address

NameTypePresenceDescription
AddressstringRequired
(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

NameTypePresenceDescription
Confirmationsnumber (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

NameTypePresenceDescription
addlockedboolOptional
(exactly 1)
Add the balance from InstantSend locked transactions

Result---the amount of dash received

NameTypePresenceDescription
resultnumber (dash)Required
(exactly 1)
The amount of dash received by the address, excluding coinbase transactions. May be 0

Example from Dash Core 0.13.0

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

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

  • GetReceivedByAccount: returns the total amount received by addresses in a particular account from transactions with the specified number of confirmations. It does not count coinbase transactions.
  • GetAddressesByAccount: returns a list of every address assigned to a particular account.
  • ListAccounts: lists accounts and their balances.

GetTransaction

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes).

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

Parameter #1---a transaction identifier (TXID)

NameTypePresenceDescription
TXIDstring (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

NameTypePresenceDescription
Include Watch-OnlyboolOptional
(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), treat watch-only addresses as if they didn't belong to this wallet

Result---a description of the transaction

NameTypePresenceDescription
resultobjectRequired
(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
boolRequired
(exactly 1)
Always false if lite mode is enabled

Current transaction lock state (InstantSend and/or ChainLock)
→
instantlock_internal
boolRequired
(exactly 1)
Always false if lite mode is enabled

Current InstantSend transaction lock state
→
chainlock
boolRequired
(exactly 1)
Added in Dash Core 0.14.0

Always false if lite mode is enabled

If set to true, this transaction is in a block that is locked (not susceptible to a chain re-org)
→
generated
boolOptional
(0 or 1)
Set to true if the transaction is a coinbase. Not returned for regular 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
→
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
arrayRequired
(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
boolOptional
(0 or 1)
true if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions.
→
comment
stringOptional
(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
stringOptional
(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
boolOptional
(0 or 1)
Set to 1 if a PrivateSend transaction
→
details
arrayRequired
(exactly 1)
An array containing one object for each input or output in the transaction which affected the wallet
→ →
involvesWatchonly
boolOptional
(0 or 1)
Set to true if the input or output involves a watch-only address. Otherwise not returned
→ →
account
stringRequired
(exactly 1)
The account which the payment was credited to or debited from. May be an empty string (\") for the default account"
→ →
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
stringRequired
(exactly 1)
Set to one of the following values:
• send if sending payment normally
• privatesend if sending PrivateSend 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
→ →
amount
number (dash)Required
(exactly 1)
A negative dash amount if sending payment; a positive dash amount if receiving payment (including coinbases)
→ →
label
stringOptional
(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
boolOptional
(0 or 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
Only returned by send category payments
→
hex
string (hex)Required
(exactly 1)
The transaction in serialized transaction format

Example from Dash Core 0.14.0

dash-cli -testnet gettransaction \
  c099c882745ad150e9b2a55ef5818683c7ef597e1e5fc20856c67eabc3778ccc

Result:

{
  "amount": -50.00000000,
  "fee": -0.00030000,
  "confirmations": 3064,
  "instantlock": false,
  "instantlock_internal": false,
  "chainlock": false,
  "blockhash": "00000a01007be2912c3123085534b58d341cb5e5980b967e8dcc021089487a1e",
  "blockindex": 1,
  "blocktime": 1553290594,
  "trusted": true,
  "txid": "c099c882745ad150e9b2a55ef5818683c7ef597e1e5fc20856c67eabc3778ccc",
  "walletconflicts": [
  ],
  "time": 1553290584,
  "timereceived": 1553290584,
  "details": [
    {
      "account": "",
      "address": "ycCsAUKsjdmoP4qAXiS1cjYA4ixM48zJWe",
      "category": "send",
      "amount": -50.00000000,
      "label": "Electrum",
      "vout": 1,
      "fee": -0.00030000,
      "abandoned": false
    }
  ],
  "hex": "0200000003aac865dba0e98fe32533df6bc3eaac160d04bb02966584fb61fc8d7788e09537010000006a47304402202d537257f23ab42b3e14f2ab533f39bb4586aa1b29a1f833f718a59493c8a601022019c6c156c20e66ef256519592b3c977b64d417c94aea4dca20cf18522a138993012103c67d86944315838aea7ec80d390b5d09b91b62483370d4979da5ccf7a7df77a9feffffff47833a270d2e2bac47bc5dc0df576c3a68b01bedbc89692060ac4113a6f9cb67010000006a4730440220442c19a913b10edc533bf63310f5294d6d91eec0eb9c510a3c6b0f33333f27320220501d5093ecdf603b8af9734e21d5de4710c8500309bfa4acdda243a294442b2c012103c67d86944315838aea7ec80d390b5d09b91b62483370d4979da5ccf7a7df77a9feffffffdcfd2d0fb30d79ffeadab8832e65be2310b67043ff3d74deac9a9cb825acda67000000006b483045022100cae8c025d3bec82903f356a5ec38d78a141447b6562e3aceac901f5fcc6f8567022076407835937514d6690c81c0c3b97f92d2b0ae9749249affaf539ead825692f4012102d6be44ab930ff67f084fbaf47a38b539b8d5da65c010952a972c9e524b6009dffeffffff0204fe2b00000000001976a914e3b0093477c2f629430d0a7b5813fe8b0153b0fd88ac00f2052a010000001976a914ae4365dedb1836ba215b9149602e0787a23376d288ac42010100"
}

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

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes).

The getunconfirmedbalance RPC returns the wallet's total unconfirmed balance.

Parameters: none

Result---the balance of unconfirmed transactions paying this wallet

NameTypePresenceDescription
resultnumber (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

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes).

The getwalletinfo RPC provides information about the wallet.

Parameters: none

Result---information about the wallet

NameTypePresenceDescription
resultobjectRequired
(exactly 1)
An object describing the wallet
→
walletversion
number (int)Required
(exactly 1)
The version number of the wallet
→
balance
number (dash)Required
(exactly 1)
The total confirmed balance of the wallet. The same as returned by the getbalance RPC with default parameters
→
privatesendbalance
number (dash)Required
(exactly 1)
Added in Dash Core 0.12.3

The total PrivateSend balance of the wallet
→
unconfirmed_balance
number (dash)Required
(exactly 1)
The total unconfirmed balance of the wallet. The same as returned by the getunconfirmedbalance RPC with default parameters
→
immature_balance
number (dash)Required
(exactly 1)
The total immature balance of the wallet. This includes mining/masternode rewards that cannot be spent yet
→
txcount
number (int)Required
(exactly 1)
The total number of transactions in the wallet (both spends and receives)
→
keypoololdest
number (int)Required
(exactly 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
→
keypoolsize
number (int)Required
(exactly 1)
The number of keys in the wallet keypool
→
keypoolsize_hd_internal
number (int)Optional
(0 or 1)
How many new keys are pre-generated for internal use (used for change outputs, only appears if the wallet is using this feature, otherwise external keys are used)
→
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 (int)Required
(exactly 1)
The transaction fee configuration, set in DASH/kB
→
hdchainid
string (hash)Optional
(0 or 1)
The ID of the HD chain
→
hdaccountcount
number (int)Optional
(0 or 1)
How many accounts of the HD chain are in this wallet
→ →
hdaccountcountindex
number (int)Optional
(0 or 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

Example from Dash Core 0.12.3

dash-cli -testnet getwalletinfo

Result:

{
  "walletversion": 61000,
  "balance": 3000.00000000,
  "privatesend_balance": 413.20413200,  
  "unconfirmed_balance": 10.10000000,
  "immature_balance": 11.25000000,
  "txcount": 267,
  "keypoololdest": 1508428379,
  "keypoolsize": 999,
  "keys_left": 978,
  "unlocked_until": 0,
  "paytxfee": 0.00000000
}

See also

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

ImportAddress

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes).

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

NameTypePresenceDescription
Address or Scriptstring (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

NameTypePresenceDescription
LabelstringOptional
(0 or 1)
An optional label. Default is an empty string(\")"

Parameter #3---whether to rescan the block chain

NameTypePresenceDescription
RescanboolOptional
(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 by restarting Dash Core with the -rescan command-line argument). Rescanning may take several minutes.

Parameter #4---whether to rescan the block chain

NameTypePresenceDescription
P2SHboolOptional
(0 or 1)
Add the P2SH version of the script as well

Result---null on success

NameTypePresenceDescription
resultnullRequired
(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 getaccount yg89Yt5Tjzs9nRpX3wJCuvr7KuQvgkvmeC

Result:

watch-only test

See also

ImportElectrumWallet

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

Parameter #1---file name

NameTypePresenceDescription
File NamestringRequired
(exactly 1)
The Electrum wallet export file (should be in csv or json format)

Parameter #2---index

NameTypePresenceDescription
Indexnumber (int)Optional
(0 or 1)
Rescan the wallet for transactions starting from this block index (default: 0)

Result---null on success

NameTypePresenceDescription
resultnullRequired
(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

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes). Wallet must be unlocked.

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

NameTypePresenceDescription
ImportsarrayRequired
(exactly 1)
An array of JSON objects, each one being an address or script to be imported
→ ImportobjectRequired
(1 or more)
A JSON object describing a particular import
→ →
scriptPubKey
string (hex)Optional
(0 or 1)
The script (string) to be imported. Must have either this field or address below
→ →
address
string (base58)Optional
(0 or 1)
The P2PKH or P2SH address to be imported. Must have either this field or scriptPubKey above
→ →
timestamp
number (int) / stringRequired
(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
stringOptional
(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
arrayOptional
(0 or 1)
Array of strings giving pubkeys that must occur in the scriptPubKey or redeemscript
→ →
keys
arrayOptional
(0 or 1)
Array of strings giving private keys whose corresponding public keys must occur in the scriptPubKey or redeemscript
→ →
internal
boolOptional
(0 or 1)
Stating whether matching outputs should be treated as change rather than incoming payments. The default is false
→ →
watchonly
boolOptional
(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
stringOptional
(0 or 1)
Label to assign to the address, only allowed with internal set to false. The default is an empty string (“”)

Parameter #2---options regarding the import

NameTypePresenceDescription
OptionobjectOptional
(0 or 1)
JSON object with options regarding the import
→
rescan
boolOptional
(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

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array of JSON objects, with each object describing the execution result of each import
→ ResultobjectRequired
(1 or more)
A JSON object describing the execution result of an imported address or script
→ →
success
stringRequired
(exactly 1)
Displays true if the import has been successful or false if it failed
→ →
error
string : objectOptional
(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
stringOptional
(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

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes). Wallet must be unlocked.

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

NameTypePresenceDescription
Private Keystring (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

NameTypePresenceDescription
AccountstringOptional
(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

NameTypePresenceDescription
RescanboolOptional
(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 by restarting Dash Core with the -rescan command-line argument). 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

NameTypePresenceDescription
resultnullRequired
(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

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. 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

NameTypePresenceDescription
Raw Transactionstring
(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

NameTypePresenceDescription
TX Out Proofstring
(hex)
Required
(exactly 1)
The hex output from gettxoutproof that contains the transaction

Result---null on success

NameTypePresenceDescription
resultnullRequired
(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

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

NameTypePresenceDescription
Public Keystring (hex)Required
(exactly 1)
The public key to import

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

NameTypePresenceDescription
LabelstringOptional
(0 or 1)
The label the key should be assigned

Parameter #3---whether to rescan the block chain

NameTypePresenceDescription
RescanboolOptional
(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 by restarting Dash Core with the -rescan command-line argument). 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

NameTypePresenceDescription
resultnullRequired
(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

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes). Requires an unlocked wallet or an unencrypted wallet.

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.

Parameter #1---the file to import

NameTypePresenceDescription
FilenamestringRequired
(exactly 1)
The file to import. The path is relative to Dash Core's working directory

Result---null on success

NameTypePresenceDescription
resultnullRequired
(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 or overwrites 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.

KeePass

The keepass RPC provides commands for configuring and managing KeePass authentication

Parameter #1---Command mode

NameTypePresenceDescription
modestringRequired (exactly 1)The command mode to use:
genkey,
init,
setpassphrase

Command Options

ModeDescription
genkeyGenerates a base64 encoded 256 bit AES key that can be used for the communication with KeePassHttp. This is only necessary for manual configuration.
initSets up the association between Dash Core and KeePass by generating an AES key and sending an association message to KeePassHttp. This will trigger KeePass to ask for an Id for the association. Returns the association and the base64 encoded string for the AES key.
setpassphraseUpdates the passphrase in KeePassHttp to a new value. This should match the passphrase you intend to use for the wallet. Please note that the standard RPC commands walletpassphrasechange and the wallet encryption from the QT GUI already send the updates to KeePassHttp, so this is only necessary for manual manipulation of the password.

Command Mode - genkey

Result---the new key

NameTypePresenceDescription
Resultstring (base64)Required (exactly 1)The new key

Example from Dash Core 0.12.2

Manually generate a key

dash-cli -testnet keepass genkey

Result:

Generated Key: dNjo+J8Jb30txbJiKq4s9H6vEgWq/whb1w9bb2cTOFo=

Command Mode - init

Result---initialization response

NameTypePresenceDescription
ResultstringRequired (exactly 1)The success/error status

Example from Dash Core 0.12.2

Automatically initialize

dash-cli -testnet keepass init

Result (wrapped):

Association successful. Id: testwalletassociation - \
Key: MSb+JLygqz7ZH40SyJ1QR62i00IXoa3tmT85MGGI2K0=

Command Mode - setpassphrase

Parameter #2---Passphrase

NameTypePresenceDescription
PassphrasestringRequired (exactly 1)The passphrase to set

Result---status

NameTypePresenceDescription
ResultstringRequired (exactly 1)The success/error status

Example from Dash Core 0.12.2

Set KeePass passphrase

dash-cli -testnet keepass setpassphrase 1BWi20Xyk76uWumxJQy4

Result:

setlogin: Updated credentials.

See also: none

KeyPoolRefill

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes). Requires an unlocked wallet or an unencrypted wallet.

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

Parameter #1---the new keypool size

NameTypePresenceDescription
Key Pool Sizenumber (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

NameTypePresenceDescription
resultnullRequired
(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.
  • GetAccountAddress: returns the current Dash address for receiving payments to this account. If the account doesn't exist, it creates both the account and a new address for receiving payment. Once a payment has been received to an address, future calls to this RPC for the same account will return a different address.
  • GetWalletInfo: provides information about the wallet.

ListAddressBalances

The listaddressbalances RPC lists addresses of this wallet and their balances

Parameter #1---Minimum Amount

NameTypePresenceDescription
Minimum Amountnumeric (int)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

NameTypePresenceDescription
resultobjectRequired
(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

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. 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

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array containing the groupings. May be empty
→
Groupings
arrayOptional
(0 or more)
An array containing arrays of addresses which can be associated with each other
→ →
Address Details
arrayRequired
(1 or more)
An array containing information about a particular address
→ → →
Address
string (base58)Required
(exactly 1)
The address in base58check format
→ → →
Balance
number (bitcoins)Required
(exactly 1)
The current spendable balance of the address, not counting unconfirmed transactions
→ → →
Account
stringOptional
(0 or 1)
Deprecated: will be removed in a later version of Dash Core

The account the address belongs to, if any. This field will not be returned for change addresses. The default account is an empty string (\")"

Example from Dash Core 0.12.2

dash-cli -testnet listaddressgroupings

Result (edited to only three results):

[
  [
    [
      "yNpezfFDfoikDuT1f4iK75AiLp2YLPsGAb",
      0.00000000
    ]
  ],
  [
    [
      "yX7SvurfpwSD7QDA3pZNYNxt6kPPiZmRAk",
      27.02970000,
      "Test1"
    ]
  ],
  [
    [
      "ygMuVDN2raRBma86GpwyQeJV18kR1261d1",
      11.00000000,
      "Test2"
    ]
  ]
]

See also

ListLockUnspent

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes).

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

Parameters: none

Result---an array of locked outputs

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array containing all locked outputs. May be empty
→
Output
objectOptional
(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, so nodes start with zero locked outputs and the locked output list is always cleared when a node stops or fails.

ListReceivedByAddress

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. 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

NameTypePresenceDescription
Confirmationsnumber (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

NameTypePresenceDescription
addlockedboolOptional
(exactly 1)
Add the balance from InstantSend locked transactions

Parameter #3---whether to include empty accounts

NameTypePresenceDescription
Include EmptyboolOptional
(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

NameTypePresenceDescription
Include Watch-OnlyboolOptional
(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), treat watch-only addresses as if they didn't belong to this wallet

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

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array containing objects each describing a particular address
→
Address
objectOptional
(0 or more)
An object describing an address
→ →
involvesWatchonly
boolOptional
(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
→ →
account
stringRequired
(exactly 1)
Deprecated: will be removed in a later version of Dash Core

The account the address belongs to. May be the default account, an empty string (\")"
→ →
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
stringRequired
(exactly 1)
The account the address belongs to. May be the default account, an empty string (\")"
→ →
txids
arrayRequired
(exactly 1)
An array of TXIDs belonging to transactions that pay the address
→ → →
TXID
stringOptional
(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",
    "account": "",
    "amount": 1000.00000000,
    "confirmations": 26779,
    "label": "",
    "txids": [
      "0456aaf51a8df21dd47c2a06ede046a5bf7403bcb95d14d1d71b178c189fb933"
    ]
  },
  {
    "involvesWatchonly" : true,
    "address": "yfoR9uM3rcDfUc7AEfUNm5BjVYGFw7uQ9w",
    "account": "Watching",
    "amount": 1877.78476068,
    "confirmations": 26876,
    "label": "Watching",
    "txids": [
      "cd64114c803a2a243cb6ce4eb5c98e60cd2c688be8e900b3b957fe520cf42601",
      "83d3f7f31926908962e336341b1895d5f734f9d7149bdb35f0381cc78019bd83"
    ]
  }
]

See also

  • ListReceivedByAccount: lists the total number of dash received by each account.
  • GetReceivedByAddress: returns the total amount received by the specified address in transactions with the specified number of confirmations. It does not count coinbase transactions.
  • GetReceivedByAccount: returns the total amount received by addresses in a particular account from transactions with the specified number of confirmations. It does not count coinbase transactions.

ListSinceBlock

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. 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

NameTypePresenceDescription
Header Hashstring (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

NameTypePresenceDescription
Target Confirmationsnumber (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

NameTypePresenceDescription
Include Watch-OnlyboolOptional
(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), treat watch-only addresses as if they didn't belong to this wallet

Parameter #4---include_removed

NameTypePresenceDescription
include_removedboolOptional
Default=true
Show transactions that were removed due to a reorg in the \removed" array (not guaranteed to work on pruned nodes)"

Result

NameTypePresenceDescription
resultobjectRequired
(exactly 1)
An object containing an array of transactions and the lastblock field
→
transactions
arrayRequired
(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
objectOptional
(0 or more)
An payment which did not appear in the specified block or an earlier block
→
involvesWatchonly
boolOptional
(0 or 1)
Set to true if the payment involves a watch-only address. Otherwise not returned
→
account
stringRequired
(exactly 1)
Deprecated: will be removed in a later version of Bitcoin Core

The account which the payment was credited to or debited from. May be an empty string (\") for the default account"
→
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
stringRequired
(exactly 1)
Set to one of the following values:
• send if sending payment normally
• privatesend if sending PrivateSend 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
→
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
boolRequired
(exactly 1)
Always false if lite mode is enabled

Current transaction lock state (InstantSend and/or ChainLock)
→
instantlock_internal
boolRequired
(exactly 1)
Always false if lite mode is enabled

Current InstantSend transaction lock state
→
chainlock
boolRequired
(exactly 1)
Added in Dash Core 0.14.0

Always false if lite mode is enabled

If set to true, this transaction is in a block that is locked (not susceptible to a chain re-org)
→
generated
boolOptional
(0 or 1)
Set to true if the transaction is a coinbase. Not returned for regular 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
→
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
arrayRequired
(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
boolOptional
(0 or 1)
true if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions.
→
comment
stringOptional
(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
stringOptional
(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
→
removed
arrayOptional
(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 0.15.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 \
              0000000001fc119ea77e0c67783227fb9d55386125179ea5597109d311af2337 \
              6 true true

Result (edited to show only two payments):

{
  "transactions": [
    {
      "account": "",
      "address": "yMaodAgCofB2gmHEtATAiV3w5NkzTpmkgS",
      "category": "send",
      "amount": -2365.65209808,
      "label": "Mining Consolidation",
      "vout": 0,
      "fee": -0.00031420,
      "confirmations": 5,
      "instantlock": true,
      "instantlock_internal": false,
      "chainlock": true,
      "blockhash": "00000000001c4e142c6deaa273206706d37a7aa792887d9bd81ae787d4259137",
      "blockindex": 1,
      "blocktime": 1566399553,
      "txid": "bb8a2789c3166181cc190e0fd7675770217b69c9aeafe0d8207baf1ebeb05845",
      "walletconflicts": [
      ],
      "time": 1566399271,
      "timereceived": 1566399271,
      "abandoned": false
    },
    {
      "account": "Mining Consolidation",
      "address": "yMaodAgCofB2gmHEtATAiV3w5NkzTpmkgS",
      "category": "receive",
      "amount": 2365.65209808,
      "label": "Mining Consolidation",
      "vout": 0,
      "confirmations": 5,
      "instantlock": true,
      "instantlock_internal": false,
      "chainlock": true,
      "blockhash": "00000000001c4e142c6deaa273206706d37a7aa792887d9bd81ae787d4259137",
      "blockindex": 1,
      "blocktime": 1566399553,
      "txid": "bb8a2789c3166181cc190e0fd7675770217b69c9aeafe0d8207baf1ebeb05845",
      "walletconflicts": [
      ],
      "time": 1566399271,
      "timereceived": 1566399271
    }
  ],
  "removed": [
  ],
  "lastblock": "000000000158ad1e4eab53044e18aaf76e605a27252862d4f1d78cfd373f1686"
}

See also

ListTransactions

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes).

The listtransactions RPC returns the most recent transactions that affect the wallet.

Parameter #1---an account name to get transactions from

NameTypePresenceDescription
AccountstringOptional
(0 or 1)
Deprecated: will be removed in a later version of Dash Core

The name of an account to get transactions from. Use an empty string (\") to get transactions for the default account. Default is * to get transactions for all accounts."

Parameter #2---the number of transactions to get

NameTypePresenceDescription
Countnumber (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

NameTypePresenceDescription
Skipnumber (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

NameTypePresenceDescription
Include Watch-OnlyboolOptional
(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), treat watch-only addresses as if they didn't belong to this wallet

Result---payment details

NameTypePresenceDescription
resultarrayRequired
(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
objectOptional
(0 or more)
A payment or internal accounting entry
→ →
account
stringRequired
(exactly 1)
Deprecated: will be removed in a later version of Dash Core

The account which the payment was credited to or debited from. May be an empty string (\") for the default account"
→ →
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
stringRequired
(exactly 1)
Set to one of the following values:
• send if sending 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
• move if an off-block-chain move made with the move RPC
→ →
amount
number (dash)Required
(exactly 1)
A negative dash amount if sending payment; a positive dash amount if receiving payment (including coinbases)
→ →
label
stringOptional
(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
boolRequired
(exactly 1)
Always false if lite mode is enabled

Current transaction lock state (InstantSend and/or ChainLock)
→
instantlock_internal
boolRequired
(exactly 1)
Always false if lite mode is enabled

Current InstantSend transaction lock state

chainlock
boolRequired
(exactly 1)
Added in Dash Core 0.14.0

Always false if lite mode is enabled

If set to true, this transaction is in a block that is locked (not susceptible to a chain re-org)
→ →
generated
boolOptional
(0 or 1)
Set to true if the transaction is a coinbase. Not returned for regular transactions or move category payments
→ →
trusted
boolOptional
(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
→ →
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
arrayOptional
(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
stringOptional
(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
stringOptional
(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
→ →
otheraccount
stringOptional
(0 or 1)
This is the account the dash were moved from or moved to, as indicated by a negative or positive amount field in this payment. Only returned by move category payments
→ →
abandoned
boolOptional
(0 or 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
Only returned by send category payments

Example from Dash Core 0.14.0

List the most recent transaction from the main account including watch-only addresses.

dash-cli listtransactions "" 1 0 true

Result:

[
  {
    "account": "",
    "address": "ySGKtDZ3qBHRqk7mHsdofShQkqMcAS7SYJ",
    "category": "send",
    "amount": -0.50000000,
    "label": "",
    "vout": 1,
    "fee": -0.00040000,
    "confirmations": 3,
    "instantlock": true,
    "instantlock_internal": true,
    "chainlock": false,
    "blockhash": "000000000327ff7785d799dde99949457ac231ef1d956a2287c2f7bb84d9738c",
    "blockindex": 2,
    "blocktime": 1553798971,
    "txid": "048aae3ad194f5398b67fc7029b26bf50d66ecc7d185fd6d26f8c6ec5a4ed1f9",
    "walletconflicts": [
    ],
    "time": 1553798920,
    "timereceived": 1553798920,
    "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

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. 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

NameTypePresenceDescription
Minimum Confirmationsnumber (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

NameTypePresenceDescription
Maximum Confirmationsnumber (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

NameTypePresenceDescription
AddressesarrayOptional
(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

NameTypePresenceDescription
Include UnsafeboolOptional
(false or true)
Include outputs that are not safe to spend . See description of safe attribute below. Default is true

Parameter #5---query options

NameTypePresenceDescription
Query OptionsjsonOptionalJSON 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

Result---the list of unspent outputs

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array of objects each describing an unspent output. May be empty
→
Unspent Output
objectOptional
(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
→ →
account
stringOptional
(0 or 1)
Deprecated: will be removed in a later version of Dash Core

If the address returned belongs to an account, this is the account. Otherwise not returned
→ →
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 (int)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
→ →
spendable
boolRequired
(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
boolRequired
(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
→ →
ps_rounds
number (int)Required
(exactly 1)
The number of PrivateSend rounds
→ →
safe
boolRequired
(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.

Example from Dash Core 0.15.0

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

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

Result:

[
  {
    "txid": "534fe12e360773dddf8aa125a4027d2d8c0073e13ff2f04fd733202b85dbdcf1",
    "vout": 0,
    "address": "yLki4jbxX28JB3TThm1DTgRfbKVhhiMx3d",
    "scriptPubKey": "76a91404c719ccf48d39d3e6253ac98edaf2b5d24f0c0588ac",
    "amount": 1.00001000,
    "confirmations": 85,
    "spendable": true,
    "solvable": true,
    "safe": true,
    "ps_rounds": 13
  }
]

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

listunspent 1 9999999 "[\"yQqTPAw1Nk8iFDeDXqe5dQ7A9xD6LVUStD\"]" true "{\"maximumAmount\":\"10\"}"

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

Result:

[
  {
    "txid": "42cd5150fd1179b5a194e034685d524e6d5d38703ac794d236495923a29addc5",
    "vout": 1,
    "address": "yQqTPAw1Nk8iFDeDXqe5dQ7A9xD6LVUStD",
    "account": "",
    "scriptPubKey": "76a914318d6d7e26e07a142a425a32ea917a30147d6c9788ac",
    "amount": 5.00000000,
    "confirmations": 100,
    "spendable": true,
    "solvable": true,
    "safe": true,
    "ps_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, so nodes start with zero locked outputs and the locked output list is always cleared when a node stops or fails.

ListWallets

The listwallets RPC returns a list of currently loaded wallets.

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

Parameters: none

Result

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array of strings containing a list of currently loaded wallet files
→
Wallet
stringRequired
(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

LockUnspent

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. 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, so nodes start with zero locked outputs and the locked output list is always cleared when a node stops or fails.

Parameter #1---whether to lock or unlock the outputs

NameTypePresenceDescription
UnlockboolRequired
(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

NameTypePresenceDescription
OutputsarrayOptional
(0 or 1)
An array of outputs to lock or unlock
→
Output
objectRequired
(1 or more)
An object describing a particular output
→ →
txid
stringRequired
(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

Result---true if successful

NameTypePresenceDescription
resultboolRequired
(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.

RemovePrunedFunds

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. 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

NameTypePresenceDescription
TXIDstring
(hex)
Required
(exactly 1)
The hex-encoded id of the transaction you are removing

Result---null on success

NameTypePresenceDescription
resultnullRequired
(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.

SendMany

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes). Requires an unlocked wallet or an unencrypted wallet.

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

Parameter #1---from account

NameTypePresenceDescription
From AccountstringRequired
(exactly 1)
Deprecated: will be removed in a later version of Dash Core

The name of the account from which the dash should be spent. Use an empty string (\") for the default account. Dash Core will ensure the account has sufficient dash to pay the total amount in the outputs field described below (but the transaction fee paid is not included in the calculation, so an account can spend a total of its balance plus the transaction fee)"

Parameter #2---the addresses and amounts to pay

NameTypePresenceDescription
OutputsobjectRequired
(exactly 1)
An object containing key/value pairs corresponding to the addresses and amounts to pay
→
Address/Amount
string (base58) : number (dash)Required
(1 or more)
A key/value pair with a base58check-encoded string containing the P2PKH or P2SH address to pay as the key, and an amount of dash to pay as the value

Parameter #3---minimum confirmations

NameTypePresenceDescription
Confirmationsnumber (int)Optional
(0 or 1)
The minimum number of confirmations an incoming transaction must have for its outputs to be credited to this account's balance. Outgoing transactions are always counted, as are move transactions made with the move RPC. If an account doesn't have a balance high enough to pay for this transaction, the payment will be rejected. Use 0 to spend unconfirmed incoming payments. Default is 1

🚧

Warning: if account1 receives an unconfirmed payment and transfers it to account2 with the move RPC, account2 will be able to spend those Dash even if this parameter is set to 1 or higher.

Parameter #4--whether to add the balance from transactions locked via InstantSend
Name | Type | Presence | Description
--- | --- | --- | ---
addlocked | bool | Optional
(0 or 1) | If set to true, add the balance from InstantSend locked transactions. If set to false (the default), InstantSend locked transaction balances are not included.

Parameter #5---a comment

NameTypePresenceDescription
CommentstringOptional
(0 or 1)
A locally-stored (not broadcast) comment assigned to this transaction. Default is no comment

Parameter #6---automatic fee subtraction

NameTypePresenceDescription
Subtract Fee From AmountarrayOptional
(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

NameTypePresenceDescription
Use InstantSendboolOptional
(0 or 1)
Deprecated and ignored since Dash Core 0.15.0

Parameter #8---use PrivateSend

NameTypePresenceDescription
Use PrivateSendboolOptional
(0 or 1)
If set to true, use anonymized funds only (default: false).

Parameter #9---confirmation target

NameTypePresenceDescription
conf_targetnumber (int)Optional
(0 or 1)
Confirmation target (in blocks)

Parameter #10---fee estimate mode

NameTypePresenceDescription
estimate_modestringOptional
(0 or 1)
The fee estimate mode, must be one of:
UNSET
ECONOMICAL
CONSERVATIVE
Default: UNSET

Result---a TXID of the sent transaction

NameTypePresenceDescription
resultstringRequired
(exactly 1)
The TXID of the sent transaction, encoded as hex in RPC byte order

Example from Dash Core 0.12.2

From the account test1, 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 \
  "test1" \
  '''
    {
      "ySutkc49Khpz1HQN8AfWNitVBLwqtyaxvv": 0.1,
      "yhQrX8CZTTfSjKmaq5h7DgSShyEsumCRBi": 0.2
    } ''' \
  6       \
  false   \
  "Example Transaction"

Result:

a7c0194a005a220b9bfeb5fdd12d5b90979c10f53de4f8a48a1495aa198a6b95

Example from Dash Core 0.12.2 (InstantSend)

From the account test1, send 0.1 dash to the first address and 0.2
dash to the second address using InstantSend, with a comment of "Example Transaction".

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

Result:

3a5bbaa1a7aa3a8af45e8f1adf79528f99efc61052b0616d41b33fb8fb7af347

Example from Dash Core 0.12.2 (PrivateSend)

From the account test1, send 0.1 dash to the first address and 0.2
dash to the second address using PrivateSend, with a comment of "Example Transaction".

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

Result:

43337c8e4f3b21bedad7765fa851a6e855e4bb04f60d6b3e4c091ed21ffc5753

See also

  • SendFrom: spends an amount from a local account to a dash address.
  • SendToAddress: spends an amount to a given address.
  • Move: moves a specified amount from one account in your wallet to another using an off-block-chain transaction.

SendToAddress

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes). Requires an unlocked wallet or an unencrypted wallet.

The sendtoaddress RPC spends an amount to a given address.

Parameter #1---to address

NameTypePresenceDescription
To AddressstringRequired
(exactly 1)
A P2PKH or P2SH address to which the dash should be sent

Parameter #2---amount to spend

NameTypePresenceDescription
Amountnumber (dash)Required
(exactly 1)
The amount to spent in dash

Parameter #3---a comment

NameTypePresenceDescription
CommentstringOptional
(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

NameTypePresenceDescription
Comment TostringOptional
(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

NameTypePresenceDescription
Subtract Fee From AmountbooleanOptional
(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

NameTypePresenceDescription
Use InstantSendboolOptional
(0 or 1)
Deprecated and ignored since Dash Core 0.15.0

Parameter #7---use PrivateSend

NameTypePresenceDescription
Use PrivateSendboolOptional
(0 or 1)
If set to true, use anonymized funds only (default: false).

Parameter #8---confirmation target

NameTypePresenceDescription
conf_targetnumber (int)Optional
(0 or 1)
Confirmation target (in blocks)

Parameter #9---fee estimate mode

NameTypePresenceDescription
estimate_modestringOptional
(0 or 1)
The fee estimate mode, must be one of:
UNSET
ECONOMICAL
CONSERVATIVE
Default: UNSET

Result---a TXID of the sent transaction

NameTypePresenceDescription
resultstringRequired
(exactly 1)
The TXID of the sent transaction, encoded as hex in RPC byte order

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

Spend 0.1 dash via PrivateSend 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 + PrivateSend)

Spend 0.1 dash via InstantSend and PrivateSend 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

  • SendFrom: spends an amount from a local account to a dash address.
  • SendMany: creates and broadcasts a transaction which sends outputs to multiple addresses.
  • Move: moves a specified amount from one account in your wallet to another using an off-block-chain transaction.

SetPrivateSendAmount

The setprivatesendamount RPC sets the amount of DASH to be mixed with PrivateSend

Parameter #1---amount to mix

NameTypePresenceDescription
AmountintRequired
(exactly 1)
The number of DASH to mix (minimum: 2, maximum: 21,000,000)

Result---null on success

Example from Dash Core 0.13.0

dash-cli -testnet setprivatesendamount 2000

(Success: no result displayed.)

See also:

SetPrivateSendRounds

The setprivatesendrounds RPC sets the number of PrivateSend mixing rounds to use

Parameter #1---number of mixing rounds to use

NameTypePresenceDescription
RoundsintRequired
(exactly 1)
The number of mixing rounds to use (minimum: 1, maximum: 16)

Result---null on success

Example from Dash Core 0.13.0

dash-cli -testnet setprivatesendrounds 4

(Success: no result displayed.)

See also:

SetTxFee

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. 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

NameTypePresenceDescription
Transaction Fee Per Kilobytenumber (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

NameTypePresenceDescription
resultbool (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.

SignMessage

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes). Requires an unlocked wallet or an 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

NameTypePresenceDescription
Addressstring (base58)Required
(exactly 1)
A P2PKH address whose private key belongs to this wallet

Parameter #2---the message to sign

NameTypePresenceDescription
MessagestringRequired
(exactly 1)
The message to sign

Result---the message signature

NameTypePresenceDescription
resultstring (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

WalletLock

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes). Requires 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.

Parameters: none

Result---null on success

NameTypePresenceDescription
resultnullRequired
(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

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes). Requires 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

NameTypePresenceDescription
PassphrasestringRequired
(exactly 1)
The passphrase that unlocks the wallet

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

NameTypePresenceDescription
Secondsnumber (int)Required
(exactly 1)
The number of seconds after which the decryption key will be automatically deleted from memory

Parameter #3---unlock for PrivateSend mixing only

NameTypePresenceDescription
Mixing OnlyboolOptional
(0 or 1)
If true, the wallet will be locked for sending functions but unlocked for mixing transactions (default: false)

Result---null on success

NameTypePresenceDescription
resultnullRequired
(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 mixing 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

📘

Requires walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. support (unavailable on masternodes). Requires an encrypted wallet.

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

🚧

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

NameTypePresenceDescription
Current PassphrasestringRequired
(exactly 1)
The current wallet passphrase

Parameter #2---the new passphrase

NameTypePresenceDescription
New PassphrasestringRequired
(exactly 1)
The new passphrase for the wallet

Result---null on success

NameTypePresenceDescription
resultnullRequired
(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.
  • 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.

Updated 8 months ago


What's Next

Removed RPCs

Wallet RPCs


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.