We put our best effort into covering all topics related to Dimecoin. Each section will cover a different category. Not all documentation may be 100% accurate, if you spot an error, please report it or submit a PR request on GitHub.
REMINDER: This documentation is always evolving. If you have not been here for a while, perhaps check again. Things may have been added or updated since your last visit!
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#
The abandontransaction
RPC marks an in-wallet transaction and all its in-wallet descendants as abandoned. This allows their inputs to be respent.
Parameter #1—a transaction identifier (TXID)
Name |
Type |
Presence |
Description |
---|---|---|---|
TXID |
string (hex) |
Required |
The TXID of the transaction that you want to abandon. The TXID must be encoded as hex in RPC byte order |
Result—null
on success
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
JSON |
Example from Dimecoin Core 2.3.0.0
Abandons the transaction on your node.
dimecoin-cli abandontransaction fa3970c341c9f5de6ab13f128cbfec58d732e736a505fe32137ad551c799ecc4
Result (no output from dimecoin-cli
because result is set to null
).
See also
SendRawTransaction: validates a transaction and broadcasts it to the peer-to-peer network.
AbortRescan#
The abortrescan
RPC stops current wallet rescan
Stops current wallet rescan triggered e.g. by an importprivkey
RPC call.
Parameters: none
Result—true
on success
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
|
Example from Dimecoin Core 2.3.0.0
Abort the running wallet rescan
dimecoin-cli -mainnet abortrescan
Result:
true
See also
none
AddMultiSigAddress#
Note
Requires wallet support (unavailable on masternodes)
The addmultisigaddress
RPC adds a P2SH multisig address to the wallet. Each key is a Dimecoin address or hex-encoded public key. This functionality is only intended for use with non-watchonly addresses. See importaddress
RPC for watchonly p2sh address support. If ‘label’ is specified, assign address to that label.
Parameter #1—the number of signatures required
Name |
Type |
Presence |
Description |
---|---|---|---|
Required |
number (int) |
Required |
The minimum (m) number of signatures required to spend this m-of-n multisig script |
Parameter #2—the full public keys, or addresses for known public keys
Name |
Type |
Presence |
Description |
---|---|---|---|
Keys Or Addresses |
array |
Required |
An array of strings with each string being a public key or address |
→ |
string |
Required |
A public key against which signatures will be checked. Alternatively, this may be a P2PKH address belonging to the wallet—the corresponding public key will be substituted. There must be at least as many keys as specified by the Required parameter, and there may be more keys |
Parameter #3—label
Name |
Type |
Presence |
Description |
---|---|---|---|
Label |
string |
Optional |
A label to assign the addresses to. |
Result—P2SH address and hex-encoded redeem script
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
An object describing the multisig address |
→ |
string (base58) |
Required |
The P2SH address for this multisig redeem script |
→ |
string (hex) |
Required |
The multisig redeem script encoded as hex |
Example from Dimecoin Core 2.3.0.0
Adding a 1-of-2 P2SH multisig address with the label “test label” by combining one P2PKH address and one full public key:
dimecoin-cli -mainnet -rpcwallet="" addmultisigaddress 1 '''
[
"7SxkBWzPwMrZLAY9ZPitMnSwf4NSUBPbiH",
"02594523b004e82849a66b3da096b1e680bf2ed5f7d03a3443c027aa5777bb6223"
]
''' 'test label'
Result:
{
"address": "8jYUv8hJcbSUPbwYmzp1XMPU6SXoic3hwi",
"redeemScript": "512103283a224c2c014d1d0ef82b00470b6b277d71e227c0e2394f9baade5d666e57d32102594523b004e82849a66b3da096b1e680bf2ed5f7d03a3443c027aa5777bb622352ae",
"descriptor": "sh(multi(1,[48de9d39]03283a224c2c014d1d0ef82b00470b6b277d71e227c0e2394f9baade5d666e57d3,[dec361f1]02594523b004e82849a66b3da096b1e680bf2ed5f7d03a3443c027aa5777bb6223))#vtc5zmh2"
}
(New P2SH multisig address also stored in wallet.)
See also
CreateMultiSig: creates a P2SH multi-signature address.
DecodeScript: decodes a hex-encoded P2SH redeem script.
BackupWallet#
Note
Requires wallet support (unavailable on masternodes)
The backupwallet
RPC safely copies wallet.dat
to the specified file, which can be a directory or a path with filename.
Parameter #1—destination directory or filename
Name |
Type |
Presence |
Description |
---|---|---|---|
Destination |
string |
Required |
A filename or directory name. If a filename, it will be created or overwritten. If a directory name, the file |
Result—null
or error
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
Always |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet backupwallet /tmp/backup.dat
See also
ImportWallet: imports private keys from a file in wallet dump file format. These keys will be added to the keys currently in the wallet. This call may need to rescan all or parts of the blockchain for transactions affecting the newly-added keys, which may take several minutes.
CreateWallet#
Note
Requires wallet support (unavailable on masternodes)
The createwallet
RPC creates and loads a new wallet.
Parameter #1—wallet name
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string |
Required |
The name for the new wallet. If this is a path, the wallet will be created at the path location. |
*Parameter #2—disable private keys_
Name |
Type |
Presence |
Description |
---|---|---|---|
|
bool |
Optional |
Disable the possibility of private keys. Only watchonlys are possible in this mode. |
Parameter #3—passphrase
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string |
Optional |
Encrypt the wallet with this passphrase. |
Result—wallet name and any warnings
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
An object containing information about wallet creation |
→ |
string |
Required |
The wallet name if created successfully. If the wallet was created using a full path, the |
→ |
string |
Required |
Warning message if wallet was not loaded cleanly. |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet createwallet new-wallet
Result:
{
"name": "new-wallet",
"warning": ""
}
Note
In the example above, a new directory named new-wallet
was created in the current data directory (~/.dimecoincore/testnet3/
). This new directory contains the wallet.dat file and other related wallet files for the new wallet.
See also
LoadWallet: loads a wallet from a wallet file or directory.
DumpPrivKey#
Note
Requires wallet 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
Name |
Type |
Presence |
Description |
---|---|---|---|
P2PKH Address |
string (base58) |
Required |
The P2PKH address corresponding to the private key you want returned. Must be the address corresponding to a private key in this wallet |
Result—the private key
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string (base58) |
Required |
The private key encoded as base58check using wallet import format |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet dumpprivkey 7cBuREgSskHHkWLxDa9A5WppCki6PfFycL
Result:
dQZZ4awQvcDHyFS3CmURqSgeTobQm9t9nyUr337kvUtsWsnvvQyw
* [ImportPrivKey](../api/rpc-wallet.md#importprivkey): adds a private key to your wallet. The key should be formatted in the wallet import format created by the [`dumpprivkey` RPC](../api/rpc-wallet.md#dumpprivkey).
* [DumpWallet](../api/rpc-wallet.md#dumpwallet): creates or overwrites a file with all wallet keys in a human-readable format.
DumpWallet#
Note
Requires wallet 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
Name |
Type |
Presence |
Description |
---|---|---|---|
Filename |
string |
Required |
The filename with path (either absolute or relative to Dimecoin Core) into which the wallet dump will be placed. An existing file with that name will be overwritten. |
Result—information about exported wallet
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
An object describing dumped wallet file |
→ |
string |
Required |
Dimecoin Core build details |
→ |
int |
Required |
Height of the most recent block received |
→ |
string (hex) |
Required |
Hash of the most recent block received |
→ |
string |
Required |
Timestamp of the most recent block received |
→ |
int |
Required |
Number of keys dumped |
→ |
string |
Required |
Name of the file the wallet was dumped to |
→ |
string |
Required |
Warning to not share the file due to it containing the private keys |
Example from Dimecoin Core 2.3.0.0
Create a wallet dump and then print its first 10 lines.
dimecoin-cli -mainnet dumpwallet /tmp/dump.txt
head /tmp/dump.txt
Results:
{
"version": "v2.3.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!"
}
Sample Results (the first 10 lines of the file):
>>>>>>>># Wallet dump created by Dimecoin Core
>>>>>>>># * Created on 2020-12-09T18:40:52Z
>>>>>>>># * Best block at time of backup was 56750034 (000000b2304f57eefd42cdd943e7736d479468beb08049b8f88d11ebc7cf6f02),
>>>>>>>># mined on 2020-12-09T18:40:23Z
cQZZ4awQvcXXyES3CmUJqSgeTobQm9t9nyUr337kvUtsWsnvvMyw 2018-12-14T17:24:37Z change=1 # addr=ycBuREgSskHHkWLxDa9A5WppCki6PfFycL
cTBRPnJoPjEMh67v1zes437v8Po5bFLDWKgEudTJMhVaLs1ZVGJe 2018-12-14T17:24:37Z change=1 # addr=yNsWkgPLN1u7p5dfWYnasYdgirU2J3tjUj
cRkkwrFnQUrih3QiT87sNy1AxyfjzqVYSyVYuL3qnJcSiQfE4QJa 2018-12-14T17:24:37Z change=1 # addr=yRkHzRbRKn8gBp5826mbaBvxLuBBNDVQg3
cQM7KoqQjHCCTrDhnfBEY1vpW9W65zRvaQeTb41UbFb6WX8Q8UkQ 2018-12-14T17:24:37Z change=1 # addr=yVEdefApUYiDLHApvvWCK5afTtJeQada8Y
cTGSKYaQTQabnjNSwCqpjYXiucVujTXiwp9dzmJV9cNAiayAJusi 2018-12-14T17:24:37Z change=1 # addr=ybQYgp21ZyZK8JuMLb2CVwG4TaWrXVXD5M
See also
BackupWallet: safely copies
wallet.dat
to the specified file, which can be a directory or a path with filename.ImportWallet: imports private keys from a file in wallet dump file format (see the
dumpwallet
RPC). These keys will be added to the keys currently in the wallet. This call may need to rescan all or parts of the blockchain for transactions affecting the newly-added keys, which may take several minutes.
EncryptWallet#
Note
Requires wallet support (unavailable on masternodes).
The encryptwallet
RPC encrypts the wallet with a passphrase. This is only to enable encryption for the first time. After encryption is enabled, you will need to enter the passphrase to use private keys.
Warning
If using this RPC on the command line, remember that your shell probably saves your command lines (including the value of the passphrase parameter). In addition, there is no RPC to completely disable encryption. If you want to return to an unencrypted wallet, you must create a new wallet and restore your data from a backup made with the dumpwallet
RPC.
Parameter #1—a passphrase
Name |
Type |
Presence |
Description |
---|---|---|---|
Passphrase |
string |
Required |
The passphrase to use for the encrypted wallet. Must be at least one character |
Result—a notice (with program shutdown)
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string |
Required |
A notice that the server is stopping and that you need to make a new backup. The wallet is now encrypted |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet encryptwallet "test"
Result:
Wallet encrypted; Dimecoin 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’.
GetAddressInfo#
Note
Requires wallet support (unavailable on masternodes).
The getaddressinfo
RPC returns information about the given Dimecoin address.
Important
Some information requires the address to be in the wallet.
Parameter #1—a P2PKH or P2SH address
Name |
Type |
Presence |
Description |
---|---|---|---|
Address |
string (base58) |
Required |
The P2PKH or P2SH address encoded in base58check format |
Result—returns information about the address
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
Information about the address |
→ |
string (base58) |
Required |
The Dimecoin address given as parameter |
→ |
string (hex) |
Required |
The hex encoded scriptPubKey generated by the address |
→ |
bool |
Required |
Set to |
→ |
bool |
Required |
Set to |
→ |
bool |
Required |
Whether or not the key is a script |
→ |
string |
Optional |
A descriptor for spending coins sent to this address (only present when |
→ |
bool |
Required |
Set to |
→ |
numeric |
Optional |
Version number of the witness program |
→ |
string |
Optional |
Hex vcale of the witness program |
→ |
bool |
Required |
Set to |
→ |
string |
Optional |
Only returned for P2SH addresses belonging to this wallet. This is the type of script: |
→ |
string (hex) |
Optional |
Only returned for P2SH addresses belonging to this wallet. This is the redeem script encoded as hex |
→ |
array |
Optional |
Array of pubkeys associated with the known redeemscript (only if |
→ → |
string |
Optional |
A public key |
→ |
array |
Optional |
Array of addresses associated with the known redeemscript (only if “script” is “multisig”). |
→ → |
string |
Optional |
An address. |
→ |
number (int) |
Optional |
Only returned for multisig P2SH addresses belonging to the wallet. The number of signatures required by this script |
→ |
string (hex) |
Optional |
The public key corresponding to this address. Only returned if the address is a P2PKH address in the wallet |
→ |
bool |
Optional |
Set to |
→ |
string |
Optional |
The label associated with the address. Defaults to “”. Replaced by the labels array below. |
→ |
number (int) |
Optional |
The creation time of the key if available in seconds since epoch (Jan 1 1970 GMT) |
→ |
string |
Optional |
The HD keypath if the key is HD and available |
→ |
string |
Optional |
Hash160 of the HD master pubkey |
→ |
array |
Optional |
Array of labels associated with the address. |
→→ |
object |
Optional |
JSON object containing label data |
→→→ |
string |
Optional |
The label |
→→→ |
string |
Optional |
Purpose of address ( |
Example from Dimecoin Core 2.3.0.0
Get info for the following P2PKH address from the wallet:
dimecoin-cli getaddressinfo "7S9BMYB3QQwARC3UpnTKFQcGBsoZWpwWA7"
Result:
{
"address": "7S9BMYB3QQwARC3UpnTKFQcGBsoZWpwWA7",
"scriptPubKey": "76a914fd12e36177dd3a0a5736be7aa319ab02ebab2c0888ac",
"ismine": true,
"iswatchonly": false,
"isscript": false,
"iswitness": false,
"pubkey": "0283fe2d0a3f1fdf5fd228d8c97a0e5b020c26ae0ae021a71ba6ff719198661680",
"iscompressed": true,
"label": "",
"timestamp": 1695663614,
"hdkeypath": "m/0'/0'/5'",
"hdmasterkeyid": "de16ce029a24193c206b136d62300c1777b9ed63",
"labels": [
{
"name": "",
"purpose": "receive"
}
]
}
Get info for the following P2SH multisig address from the wallet:
dimecoin-cli -mainnet getaddressinfo 8uJLxDxk2gEMbidF5vT8XLS2UCgQmVcroW
Result:
{
"address": "8uJLxDxk2gEMbidF5vT8XLS2UCgQmVcroW",
"scriptPubKey": "a914a33155e490d146e656a9bac2cbee9c625ef42f0a87",
"ismine": false,
"solvable": false,
"iswatchonly": false,
"isscript": true,
"ischange": false,
"labels": [
]
}
See also
ImportAddress: adds an address or pubkey script to the wallet without the associated private key, allowing you to watch for transactions affecting that address or pubkey script without being able to spend any of its outputs.
GetNewAddress: returns a new DIME address for receiving payments. If an account is specified, payments received with the address will be credited to that account.
ValidateAddress: returns information about the given DIME address.
GetAddressesByLabel#
Note
Requires wallet support (unavailable on masternodes)
The getaddressesbylabel
RPC returns a list of every address assigned to a particular label.
Parameter #1—the label name
Name |
Type |
Presence |
Description |
---|---|---|---|
Label |
string |
Required |
The name of the label associated with the addresses to get. To get addresses from the default account, pass an empty string ( |
Result—a list of addresses
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
A JSON object containing all addresses belonging to the specified label as keys. |
→Address |
object |
Optional |
A JSON object with information about a P2PKH or P2SH address belonging to the label |
→→ |
string |
Optional |
Purpose of address ( |
Example from Dimecoin Core 2.3.0.0
Get the addresses assigned to the label “test”:
dimecoin-cli -mainnet getaddressesbylabel "test"
Result:
{
"7DAUpYSaWUFvP7PJbYoWb9gJg9xEmMiPYU": {
"purpose": "receive"
}
}
See also
GetAccount: returns the name of the account associated with the given address.
GetBalance: gets the balance in decimal DIME across all accounts or for a particular account.
GetBalance#
Note
Requires wallet support (unavailable on masternodes)
The getbalance
RPC gets the total available balance in DIME. The available balance is what the wallet considers currently spendable, and is thus affected by options which limit spendability such as -spendzeroconfchange
.
Parameter #1—unused parameter
Name |
Type |
Presence |
Description |
---|---|---|---|
Unused |
string |
Optional |
Deprecated: (previously account) will be removed in a later version of Dimecoin Core |
Parameter #2—the minimum number of confirmations
Name |
Type |
Presence |
Description |
---|---|---|---|
Confirmations |
number (int) |
Optional |
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 |
Parameter #3—whether to add the balance from transactions locked via InstantSend
Name |
Type |
Presence |
Description |
---|---|---|---|
addlocked |
bool |
Optional |
Add the balance from InstantSend locked transactions |
Parameter #4—whether to include watch-only addresses
Name |
Type |
Presence |
Description |
---|---|---|---|
Include Watch-Only |
bool |
Optional |
If set to |
Parameter #5—avoids partial respends
Name |
Type |
Presence |
Description |
---|---|---|---|
avoid_reuse |
bool |
Optional |
Do not include balance in dirty outputs; addresses are considered dirty if they have previously been used in a transaction. |
Result—the balance in DIME
Name |
Type |
Presence |
Description |
---|---|---|---|
|
number (DIME) |
Required |
The balance of the account (or all accounts) in DIME |
Examples from Dimecoin Core 2.3.0.0
Get the balance, including transactions with at least three confirmations and those spent to watch-only addresses. Do not include InstantSend locked transactions.
dimecoin-cli -mainnet getbalance "*" 3 false true
Result:
0.00000
Get the balance, including transactions with at least three confirmations and those spent to watch-only addresses. Include the balance from InstantSend locked transactions.
dimecoin-cli -mainnet getbalance "" 3 true true
Result:
1.00000
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 wallet support (unavailable on masternodes)
The getnewaddress
RPC returns a new DIME address for receiving payments. If label
is specified, the address is added to the address book so payments received with the address will be associated with label
.
Parameter #1—an account name
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string |
Optional |
The label name for the address to be linked to. If not provided, the default label |
Result—a DIME address never previously returned
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string (base58) |
Required |
The new DIME address. |
Example from Dimecoin Core 2.3.0.0
Create a new address in the “test” account:
dimecoin-cli -mainnet getnewaddress "test"
Result:
7DAUpYSaWUFvP7PJbYoWb9gJg9xEmMiPYU
See also
GetAccountAddress: returns the current Dimecoin 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 Dimecoin address for receiving change. This is for use with raw transactions, not normal use.
GetBalance: gets the balance in decimal DIME across all accounts or for a particular account.
GetRawChangeAddress#
Note
Requires wallet support (unavailable on masternodes)
The getrawchangeaddress
RPC returns a new DIME address for receiving change. This is for use with raw transactions, not normal use.
Parameters: none
Result—a P2PKH address which can be used in raw transactions
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string (base58) |
Required |
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 |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet getrawchangeaddress
Result:
7E6mZQV4Yv31vgAjncwS6aarecgXf8gsKw
See also
GetNewAddress: returns a new DIME address for receiving payments. If an account is specified, payments received with the address will be credited to that account.
GetAccountAddress: returns the current Dimecoin 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#
Note
Requires wallet support (unavailable on masternodes)
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
Name |
Type |
Presence |
Description |
---|---|---|---|
Address |
string |
Required |
Only works for addresses contained in the local wallet |
Parameter #2—the minimum number of confirmations
Name |
Type |
Presence |
Description |
---|---|---|---|
Confirmations |
number (int) |
Optional |
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 |
Parameter #3—whether to include transactions locked via InstantSend Not currently available in Dimecoin Core
Name |
Type |
Presence |
Description |
---|---|---|---|
addlocked |
bool |
Optional |
Add the balance from InstantSend locked transactions |
Result—the amount of DIME received
Name |
Type |
Presence |
Description |
---|---|---|---|
|
number (DIME) |
Required |
The amount of DIME received by the address, excluding coinbase transactions. May be |
Example from Dimecoin Core 2.3.0.0
Get the DIME received for a particular address, only counting
transactions with six or more confirmations (ignore InstantSend locked transactions):
dimecoin-cli -mainnet getreceivedbyaddress 7E6mZQV4Yv31vgAjncwS6aarecgXf8gsKw 6
Result:
125.00000
Get the DIME received for a particular address, only counting
transactions with six or more confirmations (include InstantSend locked transactions):
dimecoin-cli -mainnet getreceivedbyaddress 7E6mZQV4Yv31vgAjncwS6aarecgXf8gsKw 6 true
Result:
0.30000
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.
GetReceivedByLabel#
Note
Requires wallet support (unavailable on masternodes)
The getreceivedbylabel
RPC returns the total amount received by addresses with
Parameter #1—the label name
Name |
Type |
Presence |
Description |
---|---|---|---|
Label |
string |
Required |
The selected label, may be the default label using |
Parameter #2—the minimum number of confirmations
Name |
Type |
Presence |
Description |
---|---|---|---|
Confirmations |
number (int) |
Optional |
The minimum number of confirmations a transaction must have before it is counted towards the balance. Use |
Parameter #3—whether to include transactions locked via InstantSend
Name |
Type |
Presence |
Description |
---|---|---|---|
addlocked |
bool |
Optional |
Add the balance from InstantSend locked transactions (default=false) |
Result—the number of DIME received
Name |
Type |
Presence |
Description |
---|---|---|---|
|
number (DIME) |
Required |
The total amount of DIME received for this label. May be |
Example from Dimecoin Core 2.3.0.0
Get the DIME received by the “test” label with six or more confirmations:
dimecoin-cli -mainnet getreceivedbylabel "test" 6
Result:
0.30000
See also
GetReceivedByAddress: returns the total amount received by the specified address in transactions with the specified number of confirmations. It does not count coinbase transactions.
GetAddressesByLabel: returns a list of every address assigned to a particular label.
ListLabels: lists labels.
GetTransaction#
Note
Requires wallet support (unavailable on masternodes)
The gettransaction
RPC gets detailed information about an in-wallet transaction.
Parameter #1—a transaction identifier (TXID)
Name |
Type |
Presence |
Description |
---|---|---|---|
TXID |
string (hex) |
Required |
The TXID of the transaction to get details about. The TXID must be encoded as hex in RPC byte order |
Parameter #2—whether to include watch-only addresses in details and calculations
Name |
Type |
Presence |
Description |
---|---|---|---|
Include Watch-Only |
bool |
Optional |
If set to |
Parameter #3—whether or not to include the decoded transaction
Name |
Type |
Presence |
Description |
---|---|---|---|
verbose |
bool |
Optional |
Whether to include a |
Result—a description of the transaction
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
An object describing how the transaction affects the wallet |
→ |
number (DIME) |
Required |
A positive number of DIME if this transaction increased the total wallet balance; a negative number of DIME if this transaction decreased the total wallet balance, or |
→ |
number (DIME) |
Optional |
If an outgoing transaction, this is the fee paid by the transaction reported as negative DIME |
→ |
number (int) |
Required |
The number of confirmations the transaction has received. Will be |
→ |
string (hex) |
Optional |
The hash of the block on the local best blockchain which includes this transaction, encoded as hex in RPC byte order. Only returned for confirmed transactions |
→ |
number (int) |
Optional |
The index of the transaction in the block that includes it. Only returned for confirmed transactions |
→ |
number (int) |
Optional |
The block header time (Unix epoch time) of the block on the local best blockchain which includes this transaction. Only returned for confirmed transactions |
→ |
bool |
Optional |
Whether we consider the outputs of this unconfirmed transaction safe to spend. Only returned for unconfirmed transactions |
→ |
string (hex) |
Required |
The TXID of the transaction, encoded as hex in RPC byte order |
→ |
array |
Required |
An array containing the TXIDs of other transactions that spend the same inputs (UTXOs) as this transaction. Array may be empty |
→ → |
string (hex) |
Optional |
The TXID of a conflicting transaction, encoded as hex in RPC byte order |
→ |
number (int) |
Required |
A Unix epoch time when the transaction was added to the wallet |
→ |
number (int) |
Required |
A Unix epoch time when the transaction was detected by the local node, or the time of the block on the local best blockchain that included the transaction |
→ |
bool |
Optional |
|
→ |
string |
Optional |
For transaction originating with this wallet, a locally-stored comment added to the transaction. Only returned if a comment was added |
→ |
string |
Optional |
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 |
→ |
array |
Required |
An array containing one object for each input or output in the transaction which affected the wallet |
→ → |
string (base58) |
Optional |
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 |
→ → |
string |
Required |
Set to one of the following values: |
→ → |
number (DIME) |
Required |
A negative DIME amount if sending payment; a positive DIME amount if receiving payment (including coinbases) |
→ → |
string |
Optional |
An optional comment for the address/transaction |
→ → |
number (int) |
Required |
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 |
→ → |
number (DIME) |
Optional |
If sending payment, the fee paid as a negative DIME value. May be |
→ → |
bool |
Optional |
Indicates if a transaction is was abandoned: |
→ |
string (hex) |
Required |
The transaction in serialized transaction format |
→ |
object |
Optional |
The decoded transaction (only present when |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet gettransaction \
c099c882745ad150e9b2a55ef5818683c7ef597e1e5fc20856c67eabc3778ccc
Result:
{
"amount": -5750.00000000,
"fee": -0.01000000,
"confirmations": 276000,
"instantlock": true,
"instantlock_internal": false,
"chainlock": true,
"blockhash": "00000a01007be2912c3123085534b58d341cb5e5980b967e8dcc021089487a1e",
"blockheight": 65859,
"blockindex": 1,
"blocktime": 1553290594,
"txid": "c099c882745ad150e9b2a55ef5818683c7ef597e1e5fc20856c67eabc3778ccc",
"walletconflicts": [
],
"time": 1553290594,
"timereceived": 1688046610,
"details": [
{
"address": "7E6mZQV4Yv31vgAjncwS6aarecgXf8gsKw",
"category": "send",
"amount": -50.00000000,
"label": "test",
"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, Dimecoin 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 Dimecoin Core startup settings.
GetUnconfirmedBalance#
Note
Requires wallet 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
Name |
Type |
Presence |
Description |
---|---|---|---|
|
number (DIME) |
Required |
The total number of DIME paid to this wallet in unconfirmed transactions |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet getunconfirmedbalance
Result (no unconfirmed incoming payments):
0.00000
See also
GetBalance: gets the balance in decimal DIME across all accounts or for a particular account.
GetWalletInfo#
Note
Requires wallet support (unavailable on masternodes)
The getwalletinfo
RPC provides information about the wallet.
Parameters: none
Result—information about the wallet
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
An object describing the wallet |
→ |
string |
Required |
The name of the wallet |
→ |
number (int) |
Required |
The version |
→ |
number (DIME) |
Required |
The total confirmed balance of the wallet. The same as returned by the |
→ |
number (DIME) |
Required |
The total unconfirmed balance of the wallet. The same as returned by the |
→ |
number (DIME) |
Required |
The total immature balance of the wallet. This includes mining/masternode rewards that cannot be spent yet. Identical to |
→ |
number (int) |
Required |
The total number of transactions in the wallet (both spends and receives) |
→ |
number (int) |
Required |
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 |
→ |
number (int) |
Required |
The number of keys in the wallet keypool |
→ |
number (int) |
Optional |
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) |
→ |
number (int) |
Optional |
Only returned if the wallet was encrypted with the |
→ |
number (float) |
Required |
The transaction fee configuration, set in DIME/kB |
→ |
string (hash) |
Optional |
The Hash160 of the HD master pubkey (only present when HD is enabled) |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet getwalletinfo
Result:
{
"walletname": "",
"walletversion": 159900,
"balance": 3750252.25594,
"unconfirmed_balance": 0.00000,
"immature_balance": 0.00000,
"txcount": 20,
"keypoololdest": 1695663615,
"keypoolsize": 997,
"keypoolsize_hd_internal": 999,
"unlocked_until": 0,
"paytxfee": 1.00000,
"hdmasterkeyid": "XXXXXXa24193cZzzzzzz06b136XXXXXXX0c1777b9675345"
}
See also
ListTransactions: returns the most recent transactions that affect the wallet.
ImportAddress#
Note
Requires wallet 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
Name |
Type |
Presence |
Description |
---|---|---|---|
Address or Script |
string (base58 or hex) |
Required |
Either a P2PKH or P2SH address encoded in base58check, or a pubkey script encoded as hex |
Parameter #2—The account into which to place the address or pubkey script
Name |
Type |
Presence |
Description |
---|---|---|---|
Label |
string |
Optional |
An optional label. Default is an empty string(")” |
Parameter #3—whether to rescan the blockchain
Name |
Type |
Presence |
Description |
---|---|---|---|
Rescan |
bool |
Optional |
Set to |
Parameter #4—whether to rescan the blockchain
Name |
Type |
Presence |
Description |
---|---|---|---|
P2SH |
bool |
Optional |
Add the P2SH version of the script as well |
Result—null
on success
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
If the address or pubkey script is added to the wallet (or is already part of the wallet), JSON |
Example from Dimecoin Core 2.3.0.0
Add an address, rescanning the local block database for any transactions
matching it.
dimecoin-cli -mainnet importaddress \
7DAUpYSaWUFvP7PJbYoWb9gJg9xEmMiPYU "watch-only test" true
Result:
(No output; success.)
Show that the address has been added:
dimecoin-cli -mainnet getaccount 7DAUpYSaWUFvP7PJbYoWb9gJg9xEmMiPYU
Result:
watch-only test
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.ListReceivedByAddress: lists the total number of DIME received by each address.
ImportMulti#
Note
Requires wallet support (unavailable on masternodes). Wallet must be unlocked.
The importmulti
RPC imports addresses or scripts (with private keys, public keys, or P2SH redeem scripts) and optionally performs the minimum necessary rescan for all imports.
Parameter #1—the addresses/scripts to import
Name |
Type |
Presence |
Description |
---|---|---|---|
Imports |
array |
Required |
An array of JSON objects, each one being an address or script to be imported |
→ Import |
object |
Required |
A JSON object describing a particular import |
→ → |
string (hex) |
Optional |
The script (string) to be imported. Must have either this field or |
→ → |
string (base58) |
Optional |
The P2PKH or P2SH address to be imported. Must have either this field or |
→ → |
number (int) / string |
Required |
The creation time of the key in Unix epoch time or the string “now” to substitute the current synced blockchain time. The timestamp of the oldest key will determine how far back blockchain rescans need to begin. Specify |
→ → |
string |
Optional |
A redeem script. Only allowed if either the |
→ → |
array |
Optional |
Array of strings giving pubkeys that must occur in the scriptPubKey or redeemscript |
→ → |
array |
Optional |
Array of strings giving private keys whose corresponding public keys must occur in the scriptPubKey or redeemscript |
→ → |
bool |
Optional |
Stating whether matching outputs should be treated as change rather than incoming payments. The default is |
→ → |
bool |
Optional |
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 |
→ → |
string |
Optional |
Label to assign to the address, only allowed with |
Parameter #2—options regarding the import
Name |
Type |
Presence |
Description |
---|---|---|---|
Option |
object |
Optional |
JSON object with options regarding the import |
→ |
bool |
Optional |
Set to |
Result—execution result
Name |
Type |
Presence |
Description |
---|---|---|---|
|
array |
Required |
An array of JSON objects, with each object describing the execution result of each import |
→ Result |
object |
Required |
A JSON object describing the execution result of an imported address or script |
→ → |
string |
Required |
Displays |
→ → |
string : object |
Optional |
A JSON object containing details about the error. Only displayed if the import fails |
→ → → |
number (int) |
Optional |
The error code |
→ → → |
string |
Optional |
The error message |
Example from Dimecoin Core 2.3.0.0
Import the address 7DAUpYSaWUFvP7PJbYoWb9gJg9xEmMiPYU
(giving it a label and scanning the entire blockchain) and the scriptPubKey 76a9146cf5870411edc31ba5630d61c7cddff55b884fda88ac
(giving a specific timestamp and label):
dimecoin-cli importmulti '
[
{
"scriptPubKey" : { "address": "7DAUpYSaWUFvP7PJbYoWb9gJg9xEmMiPYU" },
"timestamp" : 0,
"label" : "Test"
},
{
"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 blockchain for transactions affecting the newly-added keys, which may take several minutes.
ImportPrivKey#
Note
Requires wallet 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
Name |
Type |
Presence |
Description |
---|---|---|---|
Private Key |
string (base58) |
Required |
The private key to import into the wallet encoded in base58check using wallet import format (WIF) |
Parameter #2—the account into which the key should be placed
Name |
Type |
Presence |
Description |
---|---|---|---|
Account |
string |
Optional |
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 blockchain
Name |
Type |
Presence |
Description |
---|---|---|---|
Rescan |
bool |
Optional |
Set to |
Result—null
on success
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
If the private key is added to the wallet (or is already part of the wallet), JSON |
Example from Dimecoin Core 2.3.0.0
Import the private key for the address
7DAUpYSaWUFvP7PJbYoWb9gJg9xEmMiPYU, giving it a label and scanning the
entire blockchain:
dimecoin-cli -mainnet importprivkey \
7DAUpYSaWUFvP7PJbYoWb9gJg9xEmMiPYU \
"test" \
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 blockchain for transactions affecting the newly-added keys, which may take several minutes.
ImportPrunedFunds#
Note
Requires wallet support (unavailable on masternodes). As of Dimecoin Core 2.0.0.0 pruned wallets are not supported
The importprunedfunds
RPC imports funds without the need of a rescan. Meant for use with pruned wallets. Corresponding address or script must previously be included in wallet.
The end-user is responsible to import additional transactions that subsequently spend the imported
outputs or rescan after the point in the blockchain the transaction is included.
Parameter #1—the raw transaction to import
Name |
Type |
Presence |
Description |
---|---|---|---|
Raw Transaction |
string |
Required |
A raw transaction in hex funding an already-existing address in wallet |
Parameter #2—the tx out proof that cointains the transaction
Name |
Type |
Presence |
Description |
---|---|---|---|
TX Out Proof |
string |
Required |
The hex output from gettxoutproof that contains the transaction |
Result—null
on success
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
If the funds are added to wallet, JSON |
Example from Dimecoin Core 1.10.01
dimecoin-cli importprunedfunds "txhex" "txoutproof"
(Success: no result displayed.)
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
Name |
Type |
Presence |
Description |
---|---|---|---|
Public Key |
string (hex) |
Required |
The public key to import |
Parameter #2—the account into which the key should be placed
Name |
Type |
Presence |
Description |
---|---|---|---|
Label |
string |
Optional |
The label the key should be assigned |
Parameter #3—whether to rescan the blockchain
Name |
Type |
Presence |
Description |
---|---|---|---|
Rescan |
bool |
Optional |
Set to |
Result—null
on success
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
If the public key is added to the wallet (or is already part of the wallet), JSON |
Example from Dimecoin Core 2.3.0.0
Import the public key for the address, giving it a label and scanning the
entire blockchain:
dimecoin-cli -mainnet importpubkey \
623222c61dbc12abfd3a029ae8a6f789c340390c83f1765f99e5e8de98b469fa \
"test" \
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 blockchain for transactions affecting the newly-added keys, which may take several minutes.
ImportWallet#
Note
Requires wallet 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 blockchain for transactions affecting the newly-added keys, which may take several minutes.
Parameter #1—the file to import
Name |
Type |
Presence |
Description |
---|---|---|---|
Filename |
string |
Required |
The file to import. The path is relative to Dimecoin Core’s working directory |
Result—null
on success
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
If all the keys in the file are added to the wallet (or are already part of the wallet), JSON |
Example from Dimecoin Core 2.3.0.0
Import the file shown in the example subsection of the dumpwallet
RPC.
dimecoin-cli -mainnet 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.
KeyPoolRefill#
Note
Requires wallet 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
Name |
Type |
Presence |
Description |
---|---|---|---|
Key Pool Size |
number (int) |
Optional |
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 |
Result—null
on success
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
If the keypool is successfully filled, JSON |
Example from Dimecoin Core 2.3.0.0
Generate one extra key than the default:
dimecoin-cli -mainnet keypoolrefill 1001
(No result shown: success.)
See also
GetNewAddress: returns a new DIME address for receiving payments. If an account is specified, payments received with the address will be credited to that account.
GetAccountAddress: returns the current DIME 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.
ListAddressGroupings#
Note
Requires wallet support (unavailable on masternodes).
The listaddressgroupings
RPC lists groups of addresses that may have had their common ownership made public by common use as inputs in the same transaction or from being used as change from a previous transaction.
Parameters: none
Result—an array of arrays describing the groupings
Name |
Type |
Presence |
Description |
---|---|---|---|
|
array |
Required |
An array containing the groupings. May be empty |
→ |
array |
Optional |
An array containing arrays of addresses which can be associated with each other |
→ → |
array |
Required |
An array containing information about a particular address |
→ → → |
string (base58) |
Required |
The address in base58check format |
→ → → |
number (dimecoins) |
Required |
The amount in DIME |
→ → → |
string |
Optional |
The label the address belongs to, if any. |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet listaddressgroupings
Result (edited to only three results):
[
[
[
"74QPDKfhMvRrjB73LFesRZ2636VzntkCCN",
0.00000
],
[
"76HfKD15N8GtHuFeqVWMsvAifKJgyGXUSD",
0.00000
],
[
"7BvixF8U75VrR4jd6Y7sDbDuQ8ERnKyi3J",
0.00000,
"test3"
],
[
"7CUCsDSLQ8rkHE21gacBozX13UmhiPkspH",
0.00000
],
[
"7GKyz3zwiuNzgAkVvkLrBXHcbQCE2MSCuH",
0.00000
],
[
"7GcxC5B7eToahnKrvixAbLGT4rWN5cTnno",
24882.97207
],
[
"7Jdsq8b2SCvDUJphucNMtwG1cNK8c6ZZtf",
0.00000
],
[
"7N5EpoBZwsZPMmNpaBUnkzeMNvk8itzxg9",
0.00000
],
[
"7QiXzuc334UycnLrG6UmqayyGBqPLRJz92",
0.00000
]
],
[
[
"7Pd9uKuKFedPkWbzqrDVhy2BxZTU7SEpP1",
2.49084
],
[
"7S9BMYB3QQwARC3UpnTKFQcGBsoZWpwWA7",
0.00000,
""
]
]
]
See also
GetAddressesByAccount: returns a list of every address assigned to a particular account.
GetTransaction: gets detailed information about an in-wallet transaction.
ListAddressBalances: lists addresses of this wallet and their balances
ListLabels#
Note
Requires wallet support (unavailable on masternodes).
The listlabels
RPC returns the list of all labels, or labels that are assigned to addresses with a specific purpose.
Parameter #1—purpose
Name |
Type |
Presence |
Description |
---|---|---|---|
Purpose |
string |
Optional |
Address purpose to list labels for ( |
Result—a list of labels
Name |
Type |
Presence |
Description |
---|---|---|---|
|
array |
Required |
A JSON array containing label names. Must include, at the very least, the default account ( |
→ |
string |
Required |
The name of a label. |
Example from Dimecoin Core 2.3.0.0
Display labels used for receiving.
dimecoin-cli -mainnet listlabels "receive"
Result:
[
"",
"test",
"test2",
"test3"
]
See also
GetAddressesByLabel: returns the list of addresses assigned the specified label.
ListReceivedByLabel: lists the total number of DIME received by each label.
ListLockUnspent#
Note
Requires wallet support (unavailable on masternodes).
The listlockunspent
RPC returns a list of temporarily unspendable (locked) outputs.
Parameters: none
Result—an array of locked outputs
Name |
Type |
Presence |
Description |
---|---|---|---|
|
array |
Required |
An array containing all locked outputs. May be empty |
→ |
object |
Optional |
An object describing a particular locked output |
→ → |
string (hex) |
Required |
The TXID of the transaction containing the locked output, encoded as hex in RPC byte order |
→ → |
number (int) |
Required |
The output index number (vout) of the locked output within the transaction. Output index |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet listlockunspent
Result:
[
{
"txid": "1fab6fbc3b4b006ea00e29de7d4dff081591344ba16f0de273703deedb439fef",
"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 DIME. 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#
Note
Requires wallet support (unavailable on masternodes).
The listreceivedbyaddress
RPC lists the total number of DIME received by each address.
Parameter #1—the minimum number of confirmations a transaction must have to be counted
Name |
Type |
Presence |
Description |
---|---|---|---|
Confirmations |
number (int) |
Optional |
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 |
Parameter #2—whether to include empty accounts
Name |
Type |
Presence |
Description |
---|---|---|---|
Include Empty |
bool |
Optional |
Set to |
Parameter #3—whether to include watch-only addresses in results
Name |
Type |
Presence |
Description |
---|---|---|---|
Include Watch-Only |
bool |
Optional |
If set to |
Parameter #4—limit returned information to a specific address
Name |
Type |
Presence |
Description |
---|---|---|---|
Address Filter |
string |
Optional |
If present, only return information for this address |
Result—addresses, account names, balances, and minimum confirmations
Name |
Type |
Presence |
Description |
---|---|---|---|
|
array |
Required |
An array containing objects each describing a particular address |
→ |
object |
Optional |
An object describing an address |
→ → |
bool |
Optional |
Set to |
→ → |
string (base58) |
Required |
The address being described encoded in base58check |
→ → |
number (DIME) |
Required |
The total amount the address has received in DIME |
→ → |
number (int) |
Required |
The number of confirmations of the latest transaction to the address. May be |
→ → |
string |
Required |
The account the address belongs to. May be the default account, an empty string (")” |
→ → |
array |
Required |
An array of TXIDs belonging to transactions that pay the address |
→ → → |
string |
Optional |
The TXID of a transaction paying the address, encoded as hex in RPC byte order |
Example from Dimecoin Core 2.3.0.0
List addresses with balances confirmed by at least six blocks, including
watch-only addresses. Also include the balance from InstantSend locked transactions:
dimecoin-cli -mainnet listreceivedbyaddress 6 true false
Result (edit to show only two entries):
[
{
"address": "781UNnKeADd5SGJMRKhhUSCgyUiGVkYq2f",
"account": "",
"amount": 0.00000,
"confirmations": 0,
"label": "",
"txids": [
]
},
{
"address": "7AZqqccQUnjp8Mmnpqs7Dvu6Sw8rHiiPE3",
"account": "",
"amount": 0.00000,
"confirmations": 0,
"label": "",
"txids": [
]
},
{
"address": "7S9BMYB3QQwARC3UpnTKFQcGBsoZWpwWA7",
"account": "test",
"amount": 10.00000,
"confirmations": 4995,
"label": "",
"txids": [
"1fab6fbc3b4b006ea00e29de7d4dff081591344ba16f0de273703deedb439fef"
]
},
]
See also
GetReceivedByAddress: returns the total amount received by the specified address in transactions with the specified number of confirmations. It does not count coinbase transactions.
ListReceivedByLabel#
Note
Requires wallet support (unavailable on masternodes).
The listreceivedbylabel
RPC lists the total number of DIME received by each label.
Parameter #1—the minimum number of confirmations a transaction must have to be counted
Name |
Type |
Presence |
Description |
---|---|---|---|
Confirmations |
number (int) |
Optional |
The minimum number of confirmations a transaction must have before it is counted towards the balance. Use |
Parameter #2—whether to include empty accounts
Name |
Type |
Presence |
Description |
---|---|---|---|
Include Empty |
bool |
Optional |
Set to |
Parameter #3—whether to include watch-only addresses in results
Name |
Type |
Presence |
Description |
---|---|---|---|
Include Watch-Only |
bool |
Optional |
If set to |
Result—account names, balances, and minimum confirmations
Name |
Type |
Presence |
Description |
---|---|---|---|
|
array |
Required |
An array containing objects each describing an account. At the very least, the default account (") will be included” |
→ |
object |
Required |
An object describing a label |
→ → |
bool |
Optional |
Set to |
→ → |
string |
Required |
Deprecated |
→ → |
number (DIME) |
Required |
The total amount received by this account in DIME |
→ → |
number (int) |
Required |
The number of confirmations received by the last transaction received by this account. May be |
→ → |
string |
Optional |
The label of the receiving address. The default label is |
Example from Dimecoin Core 2.3.0.0
Get the balances for all non-empty accounts, including transactions which have been confirmed at least six times and InstantSend locked transactions:
dimecoin-cli -mainnet listreceivedbylabel 6 true false
Result:
[
{
"account": "",
"amount": 500.00000000,
"confirmations": 33,
"label": ""
},
{
"account": "test",
"amount": 1250.00000000,
"confirmations": 47,
"label": "test"
}
]
See also
ListReceivedByAddress: lists the total number of DIME received by each address.
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.
ListSinceBlock#
Note
Requires wallet support (unavailable on masternodes).
The listsinceblock
RPC gets all transactions affecting the wallet which have occurred since a particular block, plus the header hash of a block at a particular depth.
Parameter #1—a block header hash
Name |
Type |
Presence |
Description |
---|---|---|---|
Header Hash |
string (hex) |
Optional |
The hash of a block header encoded as hex in RPC byte order. All transactions affecting the wallet which are not in that block or any earlier block will be returned, including unconfirmed transactions. Default is the hash of the genesis block, so all transactions affecting the wallet are returned by default |
Parameter #2—the target confirmations for the lastblock field
Name |
Type |
Presence |
Description |
---|---|---|---|
Target Confirmations |
number (int) |
Optional |
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 |
Parameter #3—whether to include watch-only addresses in details and calculations
Name |
Type |
Presence |
Description |
---|---|---|---|
Include Watch-Only |
bool |
Optional |
If set to |
Parameter #4—include_removed
Name |
Type |
Presence |
Description |
---|---|---|---|
include_removed |
bool |
Optional |
Show transactions that were removed due to a reorg in the \removed” array (not guaranteed to work on pruned nodes)” |
Result
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
An object containing an array of transactions and the lastblock field |
→ |
array |
Required |
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 |
→ → |
object |
Optional |
An payment which did not appear in the specified block or an earlier block |
→ |
bool |
Optional |
Set to |
→ |
string (base58) |
Optional |
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 |
→ |
string |
Required |
Set to one of the following values: |
→ |
number (DIME) |
Required |
A negative DIME amount if sending payment; a positive DIME amount if receiving payment (including coinbases) |
→ |
number (int) |
Required |
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 |
→ |
number (DIME) |
Optional |
If sending payment, the fee paid as a negative DIME value. May be |
→ |
number (int) |
Required |
The number of confirmations the transaction has received. Will be |
→ |
bool |
Optional |
Set to |
→ |
string (hex) |
Optional |
The hash of the block on the local best blockchain which includes this transaction, encoded as hex in RPC byte order. Only returned for confirmed transactions |
→ |
string (hex) |
Optional |
The block height containing the transaction. |
→ |
number (int) |
Optional |
The index of the transaction in the block that includes it. Only returned for confirmed transactions |
→ |
number (int) |
Optional |
The block header time (Unix epoch time) of the block on the local best blockchain which includes this transaction. Only returned for confirmed transactions |
→ |
string (hex) |
Required |
The TXID of the transaction, encoded as hex in RPC byte order |
→ |
array |
Required |
An array containing the TXIDs of other transactions that spend the same inputs (UTXOs) as this transaction. Array may be empty |
→ → |
string (hex) |
Optional |
The TXID of a conflicting transaction, encoded as hex in RPC byte order |
→ |
number (int) |
Required |
A Unix epoch time when the transaction was added to the wallet |
→ |
number (int) |
Required |
A Unix epoch time when the transaction was detected by the local node, or the time of the block on the local best blockchain that included the transaction |
→ |
bool |
Optional |
|
→ |
string |
Optional |
For transaction originating with this wallet, a locally-stored comment added to the transaction. Only returned if a comment was added |
→ |
string |
Optional |
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 |
→ |
array |
Optional |
Structure is the same as |
Example from Dimecoin Core 2.3.0.0
Get all transactions since a particular block (including watch-only transactions) and the header hash of the sixth most recent block.
dimecoin-cli -mainnet listsinceblock 0000015fb32d785efb2f792a194a14c11ef04141bb2778c04cea447cdccb4b6e 6 true true
Result (edited to show only two payments):
{
"transactions": [
{
"address": "7KevA5YQSyWMAykzFWPuPEXJk1bxUwXxaY",
"category": "send",
"amount": -5.00000,
"label": "test",
"vout": 0,
"fee": -0.00229,
"confirmations": 4998,
"blockhash": "acd4f8bad5b551faaf28db94f8a05ed75bc1ec5a9141c0ebf40ddfa330587165",
"blockindex": 2,
"blocktime": 1709850951,
"txid": "243ceb732dae2a027d94b046bf7e9861295863bf575d7e2f482fbd122a719e9c",
"walletconflicts": [
],
"time": 1709850886,
"timereceived": 1709850886,
"bip125-replaceable": "no",
"abandoned": false
}
]
}
See also
ListReceivedByAddress: lists the total number of DIME received by each address.
ListTransactions#
Note
Requires wallet support (unavailable on masternodes).
The listtransactions
RPC returns the most recent transactions that affect the wallet. If a label name is provided, this will return only incoming transactions paying to addresses with the specified label.
Parameter #1—a label name
Name |
Type |
Presence |
Description |
---|---|---|---|
Label |
string |
Optional |
If set, should be a valid label name to return only incoming transactions with the specified label, or |
Parameter #2—the number of transactions to get
Name |
Type |
Presence |
Description |
---|---|---|---|
Count |
number (int) |
Optional |
The number of the most recent transactions to list. Default is |
Parameter #3—the number of transactions to skip
Name |
Type |
Presence |
Description |
---|---|---|---|
Skip |
number (int) |
Optional |
The number of the most recent transactions which should not be returned. Allows for pagination of results. Default is |
Parameter #4—whether to include watch-only addresses in details and calculations
Name |
Type |
Presence |
Description |
---|---|---|---|
Include Watch-Only |
bool |
Optional |
If set to |
Result—payment details
Name |
Type |
Presence |
Description |
---|---|---|---|
|
array |
Required |
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 |
→ |
object |
Optional |
A payment or internal accounting entry |
→ → |
string (base58) |
Optional |
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 |
→ → |
string |
Required |
Set to one of the following values: |
→ → |
number (DIME) |
Required |
A negative DIME amount if sending payment; a positive DIME amount if receiving payment (including coinbases) |
→ → |
string |
Optional |
A comment for the address/transaction |
→ → |
number (int) |
Optional |
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 |
→ → |
number (DIME) |
Optional |
If sending payment, the fee paid as a negative DIME value. May be |
→ → |
number (int) |
Optional |
The number of confirmations the transaction has received. Will be |
→ → |
bool |
Optional |
Set to |
→ → |
bool |
Optional |
Indicates whether we consider the outputs of this unconfirmed transaction safe to spend. Only returned for unconfirmed transactions |
→ → |
string (hex) |
Optional |
The hash of the block on the local best blockchain which includes this transaction, encoded as hex in RPC byte order. Only returned for confirmed transactions |
→ → |
string (hex) |
Optional |
The block height containing the transaction. |
| → →blockindex
| number (int) | Optional
(0 or 1) | The index of the transaction in the block that includes it. Only returned for confirmed transactions |
| → →blocktime
| number (int) | Optional
(0 or 1) | The block header time (Unix epoch time) of the block on the local best blockchain which includes this transaction. Only returned for confirmed transactions |
| → →txid
| string (hex) | Optional
(0 or 1) | The TXID of the transaction, encoded as hex in RPC byte order. Not returned for move category payments |
| → →walletconflicts
| array | Optional
(0 or 1) | An array containing the TXIDs of other transactions that spend the same inputs (UTXOs) as this transaction. Array may be empty. Not returned for move category payments |
| → → →
TXID | string (hex) | Optional
(0 or more) | The TXID of a conflicting transaction, encoded as hex in RPC byte order |
| → →time
| number (int) | Required
(exactly 1) | A Unix epoch time when the transaction was added to the wallet |
| → →timereceived
| number (int) | Optional
(0 or 1) | A Unix epoch time when the transaction was detected by the local node, or the time of the block on the local best blockchain that included the transaction. Not returned for move category payments |
| → →comment
| string | Optional
(0 or 1) | For transaction originating with this wallet, a locally-stored comment added to the transaction. Only returned in regular payments if a comment was added. Always returned in move category payments. May be an empty string |
| → →to
| string | Optional
(0 or 1) | For transaction originating with this wallet, a locally-stored comment added to the transaction identifying who the transaction was sent to. Only returned if a comment-to was added. Never returned by move category payments. May be an empty string |
| → →bip125-replaceable
| string | bool | Whether transaction is RBF (Replace-by-Fee) eligible. |
| → →abandoned
| bool | Optional
(0 or 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 Dimecoin Core 2.3.0.0
List the most recent transaction.
dimecoin-cli listtransactions "*" 1
Result:
[
{
"address": "7Q1qNyuskRBFpY9WvH2ztv6rJMvQpNaBWi",
"category": "send",
"amount": -10.00000,
"label": "",
"vout": 1,
"fee": -0.00229,
"confirmations": 25,
"blockhash": "000000000003fab9e9a8aaa9ac6de7862f4f06dc5ba7b0add46c13a3b941656f",
"blockindex": 1,
"blocktime": 1710094644,
"txid": "9e5f8ad76df0c275990a8c713fbe801413b1a17409ebc63b7600c58d08250088",
"walletconflicts": [
],
"time": 1710094573,
"timereceived": 1710094573,
"bip125-replaceable": "no",
"abandoned": false
}
]
See also
GetTransaction: gets detailed information about an in-wallet transaction.
ListSinceBlock: gets all transactions affecting the wallet which have occurred since a particular block, plus the header hash of a block at a particular depth.
ListUnspent#
Note
Requires wallet support (unavailable on masternodes).
The listunspent
RPC returns an array of unspent transaction outputs belonging to this wallet. NOTE: Outputs affecting watch-only addresses will be returned; see the spendable field in the results described below.
Parameter #1—the minimum number of confirmations an output must have
Name |
Type |
Presence |
Description |
---|---|---|---|
Minimum Confirmations |
number (int) |
Optional |
The minimum number of confirmations the transaction containing an output must have in order to be returned. Use |
Parameter #2—the maximum number of confirmations an output may have
Name |
Type |
Presence |
Description |
---|---|---|---|
Maximum Confirmations |
number (int) |
Optional |
The maximum number of confirmations the transaction containing an output may have in order to be returned. Default is |
Parameter #3—the addresses an output must pay
Name |
Type |
Presence |
Description |
---|---|---|---|
Addresses |
array |
Optional |
If present, only outputs which pay an address in this array will be returned |
→ |
string (base58) |
Required |
A P2PKH or P2SH address |
Parameter #4—include unsafe outputs
Name |
Type |
Presence |
Description |
---|---|---|---|
Include Unsafe |
bool |
Optional |
Include outputs that are not safe to spend . See description of |
Parameter #5—query options
Name |
Type |
Presence |
Description |
---|---|---|---|
Query Options |
json |
Optional |
JSON with query options. Available options: |
Result—the list of unspent outputs
Name |
Type |
Presence |
Description |
---|---|---|---|
|
array |
Required |
An array of objects each describing an unspent output. May be empty |
→ |
object |
Optional |
An object describing a particular unspent output belonging to this wallet |
→ → |
string (hex) |
Required |
The TXID of the transaction containing the output, encoded as hex in RPC byte order |
→ → |
number (int) |
Required |
The output index number (vout) of the output within its containing transaction |
→ → |
string (base58) |
Optional |
The P2PKH or P2SH address the output paid. Only returned for P2PKH or P2SH output scripts |
→ → |
string (hex) |
Required |
The output script paid, encoded as hex |
→ → |
string (hex) |
Optional |
If the output is a P2SH whose script belongs to this wallet, this is the redeem script |
→ → |
number (int) |
Required |
The amount paid to the output in DIME |
→ → |
number (int) |
Required |
The number of confirmations received for the transaction containing this output |
→ → |
bool |
Required |
Set to |
→ → |
bool |
Required |
Set to |
→ → |
string |
Optional |
A descriptor for spending this output |
→ → |
bool |
Required |
Whether this output is considered safe to spend. Unconfirmed transactions from outside keys are considered unsafe and are not eligible for spending by |
Example from Dimecoin Core 2.3.0.0
Get all outputs confirmed at least 6 times for a particular address:
dimecoin-cli -mainnet listunspent 50
[
"7Pd9uKuKFedPkWbzqrDVhy2BxZTU7SEpP1"
]
'''
Result:
[
{
"txid": "db267f5ec45a95f16ab1dd9db19f380af5494cf1a39fd95082d327bfce6bc4de",
"vout": 1,
"address": "7Pd9uKuKFedPkWbzqrDVhy2BxZTU7SEpP1",
"scriptPubKey": "76a914e174f21ea252229760f9eed5d1c155dea36fdc4088ac",
"amount": 2.49084,
"confirmations": 4992,
"spendable": true,
"solvable": true,
"safe": true
}
]
Get all outputs for a particular address that have at least 1 confirmation and a maximum value of 10:
dimecoin-cli -mainnet listunspent 1 9999999 '''
[
"7Pd9uKuKFedPkWbzqrDVhy2BxZTU7SEpP1"
]
''' true '''
{
"maximumAmount": "10"
}
'''
Result:
[
{
"txid": "db267f5ec45a95f16ab1dd9db19f380af5494cf1a39fd95082d327bfce6bc4de",
"vout": 1,
"address": "7Pd9uKuKFedPkWbzqrDVhy2BxZTU7SEpP1",
"scriptPubKey": "76a914e174f21ea252229760f9eed5d1c155dea36fdc4088ac",
"amount": 12.49084,
"confirmations": 85,
"spendable": true,
"solvable": true,
"safe": true
}
]
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 DIME. 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
Name |
Type |
Presence |
Description |
---|---|---|---|
|
array |
Required |
An array of strings containing a list of currently loaded wallet files |
→ |
string |
Required |
The name of a wallet file |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet listwallets
Result:
[
"wallet.dat"
]
See also
none
LoadWallet#
Note
Requires wallet support (unavailable on masternodes).
The loadwallet
RPC loads a wallet from a wallet file or directory. NOTE: that all wallet command-line options used when starting dimecoind will be applied to the new wallet (eg -zapwallettxes, upgradewallet, rescan, etc).
Parameter #1—wallet name
Name |
Type |
Presence |
Description |
---|---|---|---|
Filename |
string |
Required |
The wallet directory or .dat file. The wallet can be specified as file/directory basename (which must be located in the |
Parameter #2—load on startup
Name |
Type |
Presence |
Description |
---|---|---|---|
load_on_startup |
boolean |
Optional |
Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged. |
Result—operation status
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
An object containing the wallet name or warning message related to the operation |
→ |
string |
Required |
The wallet name if loaded successfully |
→ |
string |
Required |
Warning message if wallet was not loaded cleanly |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet loadwallet wallet-test.dat
Result:
{
"name": "wallet-test.dat",
"warning": ""
}
See also
CreateWallet: creates and loads a new wallet.
UnloadWallet: unloads the specified wallet.
LockUnspent#
Note
Requires wallet support (unavailable on masternodes).
The lockunspent
RPC temporarily locks or unlocks specified transaction outputs. A locked transaction output will not be chosen by automatic coin selection when spending DIME. 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
Name |
Type |
Presence |
Description |
---|---|---|---|
Unlock |
bool |
Required |
Set to |
Parameter #2—the outputs to lock or unlock
Name |
Type |
Presence |
Description |
---|---|---|---|
Outputs |
array |
Optional |
An array of outputs to lock or unlock |
→ |
object |
Required |
An object describing a particular output |
→ → |
string |
Required |
The TXID of the transaction containing the output to lock or unlock, encoded as hex in internal byte order |
→ → |
number (int) |
Required |
The output index number (vout) of the output to lock or unlock. The first output in a transaction has an index of |
Result—true
if successful
Name |
Type |
Presence |
Description |
---|---|---|---|
|
bool |
Required |
Set to |
Example from Dimecoin Core 2.3.0.0
Lock two outputs:
dimecoin-cli -mainnet lockunspent false '''
[
{
"txid": "c4d69ec5e4168b5369e911d019e9714526c1f2db5b2d6882564ea887feca4c66",
"vout": 0
},
{
"txid": "986325411b2f7c5b23297b2a352a8d6f4383f8d0782585f93220082d361f8db9",
"vout": 1
}
]
'''
Result:
true
Verify the outputs have been locked:
dimecoin-cli -mainnet listlockunspent
Result
[
{
"txid": "c4d69ec5e4168b5369e911d019e9714526c1f2db5b2d6882564ea887feca4c66",
"vout": 0
},
{
"txid": "986325411b2f7c5b23297b2a352a8d6f4383f8d0782585f93220082d361f8db9",
"vout": 1
}
]
Unlock one of the above outputs:
dimecoin-cli -mainnet lockunspent true '''
[
{
"txid": "986325411b2f7c5b23297b2a352a8d6f4383f8d0782585f93220082d361f8db9",
"vout": 1
}
]
'''
Result:
true
Verify the output has been unlocked:
dimecoin-cli -mainnet listlockunspent
Result:
[
{
"txid": "c4d69ec5e4168b5369e911d019e9714526c1f2db5b2d6882564ea887feca4c66",
"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#
Note
Requires wallet support (unavailable on masternodes).
The removeprunedfunds
RPC deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will effect wallet balances.
Parameter #1—the raw transaction to import
Name |
Type |
Presence |
Description |
---|---|---|---|
TXID |
string |
Required |
The hex-encoded id of the transaction you are removing |
Result—null
on success
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
If the funds are removed from the wallet, JSON |
Example from Dimecoin Core 0.12.3
dimecoin-cli removeprunedfunds cd6daff525b83fa6a569ab50bf7f8f14d6\
45661a19f45378b362ef3f25bda237
(Success: no result displayed.)
See also
ImportPrivKey: adds a private key to your wallet. The key should be formatted in the wallet import format created by the
dumpprivkey
RPC.ImportPrunedFunds: imports funds without the need of a rescan. Meant for use with pruned wallets.
RescanBlockChain#
The rescanblockchain
RPC rescans the local blockchain for wallet related transactions.
Parameter #1—the start block height
Name |
Type |
Presence |
Description |
---|---|---|---|
Start Height |
integer |
Optional |
The block height where the rescan should start |
Parameter #2—the stop block height
Name |
Type |
Presence |
Description |
---|---|---|---|
Stop Height |
integer |
Optional |
The last block height that should be scanned |
Result—null
or start/end height details if parameters provided
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
An object containing the start/end heights depending on the range of blocks scanned |
→ |
integer |
Optional |
The block height where the rescan has started. If omitted, rescan started from the genesis block |
→ |
integer |
Optional |
The height of the last rescanned block. If omitted, rescan stopped at the chain tip |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli rescanblockchain
Result:
{
"start_height": 53698,
"stop_height": 53700
}
See also
AbortRescan: stops current wallet rescan.
ScanTXOutset#
Note
Experimental: this call may be removed or changed in future releases.
The scantxoutset
RPC scans the unspent transaction output set for entries that match certain output descriptors.
Parameter #1—action
Name |
Type |
Presence |
Description |
---|---|---|---|
Action |
string |
Required |
The action to execute: |
Parameter #2—scan objects
Name |
Type |
Presence |
Description |
---|---|---|---|
Scan Objects |
array |
Required |
An array of scan objects. Every scan object is either a string descriptor or an object. |
→ |
string: object |
Required |
An output descriptor; an object with output descriptor and metadata. |
→ → |
string |
Required |
An output descriptor |
→ → |
number (int) |
Optional |
The child index HD that chains should be explored (default: 1000) |
In the above,
Result—The unspent and total amount
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
An object containing the the unspent and total amounts. |
→ |
bool |
Required |
Whether the scan was completed |
→ |
number (int) |
Required |
The number of unspent transaction outputs scanned |
→ |
number (int) |
Required |
The current block height (index) |
→ |
string (hex) |
Required |
The hash of the block at the tip of the chain |
→ |
array |
Required |
An array containing unspent output objects |
→ → |
array |
Required |
An object containing unspent output information |
→ → → |
string (hex) |
Required |
The TXID of the transaction the output appeared in. The TXID must be encoded in hex in RPC byte order |
→ → → |
number (int) |
Required |
The index number of the output (vout) as it appeared in its transaction, with the first output being 0 |
→ → → |
string (hex) |
Required |
The output’s pubkey script encoded as hex |
→ → → |
string |
Required |
A specialized descriptor for the matched scriptPubKey |
→ → → |
number (int) |
Required |
The total amount in DIME of the unspent output |
→ → → |
number (int) |
Required |
The height of the unspent transaction output |
→ |
numeric |
Required |
The total amount of all found unspent outputs in DIME |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet scantxoutset start '["addr(7WjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ)"]'
Result:
{
"success": true,
"txouts": 639756,
"height": 667140,
"bestblock": "000000ec777dd903c5a378ab209a7815b24a5365b5c53a0c22e64ef3350d33db",
"unspents": [
{
"txid": "571028a9a2f69c5eec75dbae10c8724b8afd44530fac97936ae6676a9c61e03c",
"vout": 0,
"scriptPubKey": "76a914724c86a5dc23ecac05474d9be3ac76a6aa4bcb4488ac",
"desc": "addr(7WjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ)#sycxjztu",
"amount": 1.00000000,
"height": 494777
},
{
"txid": "3e76165230a3ff5bb8df0a9e278caa81f9a653c2b7a075f8dc16e56103c8f68e",
"vout": 0,
"scriptPubKey": "76a914724c86a5dc23ecac05474d9be3ac76a6aa4bcb4488ac",
"desc": "addr(yWjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ)#sycxjztu",
"amount": 7.76020488,
"height": 494777
}
],
"total_amount": 8.76020488
}
See also
ListUnspent: returns an array of unspent transaction outputs belonging to this wallet.
SendMany#
Note
Requires wallet 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—unused parameter
Name |
Type |
Presence |
Description |
---|---|---|---|
Unused |
string |
Required |
Must be set to |
Parameter #2—the addresses and amounts to pay
Name |
Type |
Presence |
Description |
---|---|---|---|
Outputs |
object |
Required |
An object containing key/value pairs corresponding to the addresses and amounts to pay |
→ |
string (base58) : number (DIME) |
Required |
A key/value pair with a base58check-encoded string containing the P2PKH or P2SH address to pay as the key, and an amount of DIME to pay as the value |
Parameter #3—minimum confirmations
Name |
Type |
Presence |
Description |
---|---|---|---|
Confirmations |
number (int) |
Optional |
Minimum number of confirmations |
Parameter #4—a comment
Name |
Type |
Presence |
Description |
---|---|---|---|
Comment |
string |
Optional |
A locally-stored (not broadcast) comment assigned to this transaction. Default is no comment |
Parameter #5—automatic fee subtraction
Name |
Type |
Presence |
Description |
---|---|---|---|
Subtract Fee From Amount |
array |
Optional |
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 |
→ |
string (base58) |
Optional (0 or more) |
An address previously listed as one of the recipients. |
Parameter #6—confirmation target
Name |
Type |
Presence |
Description |
---|---|---|---|
|
number (int) |
Optional |
Confirmation target (in blocks) |
Parameter #7—fee estimate mode
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string |
Optional |
The fee estimate mode, must be one of: |
Result—a TXID of the sent transaction
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string |
Required |
The TXID of the sent transaction, encoded as hex in RPC byte order |
Example from Dimecoin Core 2.3.0.0
Send 1.0 DIME to the first address and 2.0 DIME to the second address, with a comment of “Example Transaction”.
dimecoin-cli -mainnet sendmany \
"" \
'''
{
"7Sutkc49Khpz1HQN8AfWNitVBLwqtyaxvv": 1.0,
"7hQrX8CZTTfSjKmaq5h7DgSShyEsumCRBi": 2.0
} ''' \
6 \
false \
"Example Transaction"
Result:
a7c0194a005a220b9bfeb5fdd12d5b90979c10f53de4f8a48a1495aa198a6b95
See also
SendToAddress: spends an amount to a given address.
SendToAddress#
Note
Requires wallet 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
Name |
Type |
Presence |
Description |
---|---|---|---|
To Address |
string |
Required |
A P2PKH or P2SH address to which the DIME should be sent |
Parameter #2—amount to spend
Name |
Type |
Presence |
Description |
---|---|---|---|
Amount |
number (DIME) |
Required |
The amount to spent in DIME |
Parameter #3—a comment
Name |
Type |
Presence |
Description |
---|---|---|---|
Comment |
string |
Optional |
A locally-stored (not broadcast) comment assigned to this transaction. Default is no comment |
Parameter #4—a comment about who the payment was sent to
Name |
Type |
Presence |
Description |
---|---|---|---|
Comment To |
string |
Optional |
A locally-stored (not broadcast) comment assigned to this transaction. Meant to be used for describing who the payment was sent to. Default is no comment |
Parameter #5—automatic fee subtraction
Name |
Type |
Presence |
Description |
---|---|---|---|
Subtract Fee From Amount |
boolean |
Optional |
The fee will be deducted from the amount being sent. The recipient will receive less DIME than you enter in the amount field. Default is |
Parameter #6—confirmation target
Name |
Type |
Presence |
Description |
---|---|---|---|
|
number (int) |
Optional |
Confirmation target (in blocks) |
Parameter #7—fee estimate mode
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string |
Optional |
The fee estimate mode, must be one of: |
Parameter #8—avoids partial respends
Name |
Type |
Presence |
Description |
---|---|---|---|
|
boolean |
Optional |
Avoid spending from dirty addresses; addresses are considered dirty if they have previously been used in a transaction. |
Result—a TXID of the sent transaction
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string |
Required |
The TXID of the sent transaction, encoded as hex in RPC byte order |
Example from Dimecoin Core 2.3.0.0
Spend 1.0 DIME to the address below with the comment “sendtoaddress
example” and the comment-to “John Doe From Example.com”:
dimecoin-cli -mainnet sendtoaddress 7Sutkc49Khpz1HQN8AfWNitVBLwqtyaxvv \
1.0 "sendtoaddress example" "John Doe From Example.com"
Result:
70e2029d363f0110fe8a0aa2ba7bd771a579453135568b2aa559b2cb30f875aa
See also
SendMany: creates and broadcasts a transaction which sends outputs to multiple addresses.
SetLabel#
Note
Requires wallet support (unavailable on masternodes).
The setlabel
RPC sets the label associated with the given address.
Parameter #1—a DIME address
Name |
Type |
Presence |
Description |
---|---|---|---|
Address |
string (base58) |
Required |
The P2PKH or P2SH DIME address to be associated with a label. |
Parameter #2—a label
Name |
Type |
Presence |
Description |
---|---|---|---|
Label |
string |
Required |
The label to assign to the address. |
Result—null
if successful
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
Set to JSON |
Example from Dimecoin Core 2.3.0.0
Assign the “doc test” label to the provided address.
dimecoin-cli -mainnet setlabel 7MTFRnrfJ4NpnYVeidDNHVwT7uuNsVjevq "test"
(Success: no result displayed.)
See also
ListLabels: returns the list of all labels, or labels that are assigned to addresses with a specific purpose.
GetAddressesByLabel: returns the list of addresses assigned the specified label.
SetTxFee#
Note
Requires wallet support (unavailable on masternodes).
The settxfee
RPC sets the transaction fee per kilobyte paid by transactions created by this wallet.
Parameter #1—the transaction fee amount per kilobyte
Name |
Type |
Presence |
Description |
---|---|---|---|
Transaction Fee Per Kilobyte |
number (DIME) |
Required |
The transaction fee to pay, in DIME, for each kilobyte of transaction data. Be careful setting the fee too low—your transactions may not be relayed or included in blocks |
Result: true
on success
Name |
Type |
Presence |
Description |
---|---|---|---|
|
bool (true) |
Required |
Set to |
Example from Dimecoin Core 2.3.0.0
Set the transaction fee per kilobyte to 100 000 mDIME.
dimecoin-cli -mainnet settxfee 0.10000
Result:
true
See also
GetWalletInfo: provides information about the wallet.
GetNetworkInfo: returns information about the node’s connection to the network.
SetWalletFlag#
The SetWalletFlag RPC changes the state of the given wallet flag for a wallet.
*Parameter #1—states the name of the flag to change
Name |
Type |
Presence |
Description |
---|---|---|---|
flag |
string |
Required |
The name of the flag to change. Current available flags: avoid_reuse |
*Parameter #2—defining the new state
Name |
Type |
Presence |
Description |
---|---|---|---|
value |
boolean |
Optional |
The new state. |
Result
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object/null |
Required |
An object containing the requested block, or JSON |
→ |
str (string) |
Required |
the name of the flag that was modified |
→ |
true|false (boolean) |
Required |
the new state of the flag |
→ |
str (string) |
Required |
any warnings associated with the change |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli setwalletflag avoid_reuse
Result:
{
"flag_name": "avoid_reuse",
"flag_state": true,
"warnings": "You need to rescan the blockchain in order to correctly mark used destinations in the past. Until this is done, some destinations may be considered unused, even if the opposite is the case."
}
See also
none
SignMessage#
Requires wallet 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
Name |
Type |
Presence |
Description |
---|---|---|---|
Address |
string (base58) |
Required |
A P2PKH address whose private key belongs to this wallet |
Parameter #2—the message to sign
Name |
Type |
Presence |
Description |
---|---|---|---|
Message |
string |
Required |
The message to sign |
Result—the message signature
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string (base64) |
Required |
The signature of the message, encoded in base64. |
Example from Dimecoin Core 2.3.0.0
Sign a the message “Hello, World!” using the following address:
dimecoin-cli -mainnet signmessage 7NpezfFDfoikDuT1f4iK75AiLp2YLPsGAb "Hello, World!"
Result:
H4XULzfHCf16In2ECk9Ta9QxQPq639zQto2JA3OLlo3JbUdrClvJ89+A1z+Z9POd6l8LJhn1jGpQYF8mX4jkQvE=
See also
VerifyMessage: verifies a signed message.
SignRawTransactionWithWallet#
Note
Requires wallet support (unavailable on masternodes). Requires an unlocked wallet.
The signrawtransactionwithwallet
RPC signs a transaction in the serialized transaction format using private keys stored in the wallet.
Parameter #1—the transaction to sign
Name |
Type |
Presence |
Description |
---|---|---|---|
Transaction |
string (hex) |
Required |
The transaction to sign as a serialized transaction |
Parameter #2—unspent transaction output details
Name |
Type |
Presence |
Description |
---|---|---|---|
Dependencies |
array |
Optional |
The previous outputs being spent by this transaction |
→ |
object |
Optional |
An output being spent |
→ → |
string (hex) |
Required |
The TXID of the transaction the output appeared in. The TXID must be encoded in hex in RPC byte order |
→ → |
number (int) |
Required |
The index number of the output (vout) as it appeared in its transaction, with the first output being 0 |
→ → |
string (hex) |
Required |
The output’s pubkey script encoded as hex |
→ → |
string (hex) |
Optional |
If the pubkey script was a script hash, this must be the corresponding redeem script |
→ → |
numeric |
Required |
The amount of DIME spent |
Parameter #3—signature hash type
Name |
Type |
Presence |
Description |
|||
---|---|---|---|---|---|---|
SigHash |
string |
Optional |
The type of signature hash to use for all of the signatures performed. (You must use separate calls to the |
Result—the transaction with any signatures made
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
The results of the signature |
→ |
string (hex) |
Required |
The resulting serialized transaction encoded as hex with any signatures made inserted. If no signatures were made, this will be the same transaction provided in parameter #1 |
→ |
bool |
Required |
The value |
Example from Dimecoin Core 2.3.0.0
Sign the hex generated from the createrawtransaction
RPC:
dimecoin-cli -mainnet signrawtransactionwithwallet 020000000121f39228a11ddf19\
7ac3658e93bd264d0afd927f0cdfc7caeb760537e529c94a0100000000ffffffff0180969\
800000000001976a914fe64a96d6660e30c433e1189082466a95bdf9ceb88ac00000000
Result:
{
"hex": "020000000121f39228a11ddf197ac3658e93bd264d0afd927f0cdfc7caeb760537e529c94a010000006b483045022100811c5679ef097b0e5a338fc3cd05ee50e1802680ea8a172d0fd3a81da3c1fc2002204804b18a44e888ac1ee9b6a7cbadc211ecdc30f8c889938c95125206e39554220121025d81ce6581e547dd34194385352053abb17f0246768d75443b25ded5e37d594fffffffff0180969800000000001976a914fe64a96d6660e30c433e1189082466a95bdf9ceb88ac00000000",
"complete": true
}
See also
CombineRawTransaction: combine multiple partially signed transactions into one transaction.
CreateRawTransaction: creates an unsigned serialized transaction that spends a previous output to a new output with a P2PKH or P2SH address. The transaction is not stored in the wallet or transmitted to the network.
DecodeRawTransaction: decodes a serialized transaction hex string into a JSON object describing the transaction.
SendRawTransaction: validates a transaction and broadcasts it to the peer-to-peer network.
SignRawTransactionWithKey: signs inputs for a transaction in the serialized transaction format using private keys provided in the call.
UnloadWallet#
Note
Requires wallet support (unavailable on masternodes).
The unloadwallet
RPC unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument. Specifying the wallet name on a wallet endpoint is invalid.
Parameter #1—wallet name
Name |
Type |
Presence |
Description |
---|---|---|---|
Filename |
string |
Required |
The name of the wallet to unload. If provided both here and in the RPC endpoint, the two must be identical. |
Parameter #2—load of startup
Name |
Type |
Presence |
Description |
---|---|---|---|
load_on_startup |
boolean |
Optional |
Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged. |
Result—null on success
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet unloadwallet wallet-test.dat
Result:
null
See also
LoadWallet: loads a wallet from a wallet file or directory.
UpgradeWallet#
The upgradewallet
RPC upgrades the wallet to the latest version if no version number is specified. New keys may be generated and a new wallet backup will need to be made.
Parameters
Name |
Type |
Presence |
Description |
---|---|---|---|
|
number |
Optional |
The version number to upgrade to. Default is the latest wallet version. |
Result—null
on success
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
|
Example from Dimecoin Core 2.3.0.0
Upgrade wallet without specifying any optional parameters:
dimecoin-cli -mainnet upgradewallet
Result (no output from dimecoin-cli because result is set to null).
See also
DumpHDInfo: returns an object containing sensitive private info about this HD wallet
WalletCreateFundedPSBT#
The walletcreatefundedpsbt
RPC creates and funds a transaction in the Partially Signed Transaction (PST) format. Inputs will be added if supplied inputs are not enough.
Implements the Creator and Updater roles.
Parameter #1—Inputs
Name |
Type |
Presence |
Description |
---|---|---|---|
Inputs |
array |
Required |
An array of objects, each one to be used as an input to the transaction |
→ Input |
object |
Required |
An object describing a particular input |
→ → |
string (hex) |
Required |
The TXID of the outpoint to be spent encoded as hex in RPC byte order |
→ → |
number (int) |
Required |
The output index number (vout) of the outpoint to be spent; the first output in a transaction is index |
→ → |
number (int) |
Optional |
The sequence number to use for the input |
Parameter #2—Outputs
Name |
Type |
Presence |
Description |
---|---|---|---|
Outputs |
array |
Required |
A JSON array with outputs as key-value pairs |
→ Output |
object |
Required |
An object describing a particular output |
→ → |
string: number (DIME) |
Optional |
A key-value pair. The key (string) is the DIME address, the value (float or string) is the amount in DIME |
→ → |
|
Optional |
A key-value pair. The key must be |
Parameter #3—locktime
Name |
Type |
Presence |
Description |
---|---|---|---|
Locktime |
numeric (int) |
Optional |
Indicates the earliest time a transaction can be added to the blockchain (default= |
Parameter #4—Additional options
Name |
Type |
Presence |
Description |
---|---|---|---|
Options |
Object |
Optional |
Additional options |
→ |
string |
Optional |
The DIME address to receive the change (default=pool address) |
→ |
numeric (int) |
Optional |
The index of the change output (default=random) |
→ |
bool |
Optional |
Also select inputs which are watch only (default= |
→ |
bool |
Optional |
Lock selected unspent outputs (default= |
→ |
numeric or string |
Optional |
Set a specific fee rate in DIME/kB |
→ |
array |
Optional |
A json array of integers. The fee will be equally deducted from the amount of each specified output. The outputs are specified by their zero-based index, before any change output is added. Those recipients will receive less DIME than you enter in their corresponding amount field. If no outputs are specified here, the sender pays the fee. |
→ → |
numeric (int) |
Optional |
An output index number (vout) from which the fee should be subtracted. If multiple vouts are provided, the total fee will be divided by the number of vouts listed and each vout will have that amount subtracted from it. |
→ |
numeric (int) |
Optional |
Confirmation target (in blocks) |
→ |
numeric (int) |
Optional |
The fee estimate mode, must be one of: |
Parameter #5—bip32derivs
Name |
Type |
Presence |
Description |
---|---|---|---|
|
bool |
Optional |
Includes the BIP 32 derivation paths for public keys if known (default = |
Result—information about the created transaction
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
An object including information about the created transaction |
→ |
string (base64) |
Required |
The resulting raw transaction (base64-encoded string) |
→ |
numeric (dimecoins) |
Required |
Fee in DIME the resulting transaction pays |
→ |
numeric (int) |
Required |
The position of the added change output, or |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet walletcreatefundedpsbt "[{\"txid\":\"6536c87e1761ed5f4e98a0640b9564324d86f282824a51bd624985d236c78456\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"
Result:
{
"psbt": "cHNidP8BAGQCAAAAAXgRxzbShUlivVFKgoLyhk0RCCYLZKCYTl/tYRd+yGImAAAAAAD/////AgAAAAAAAAAABmoEAAECA6PmxgkAAAAAGXapFFNPqpebN9gMkzsFJWixaDCZ3S8OiKwAAAAAAAEA4QIAAAABlIu3UCzRFVGowPY3H7RvS5g6QGc71ZYEFXIrcS+NfEIBAAAAakcwRAIgT+T8SIyVXyhsUshI7HlQtA7EduG0NMat1oa0dL3eCakCIGIi0pH9naNBQIqopHIPWmlZmXcVod34GH51J3tr/K5+ASEDxn2GlEMVg4rqfsgNOQtdCbkbYkgzcNSXnaXM96ffd6n+////ArTnxgkAAAAAGXapFM78RkkEwDgUwBkG4ZfcdZp0XkfuiKwAypo7AAAAABl2qRQ++by+kvd8j63QVm7qf/jUfyK94IisVUgIAAAAAA==",
"fee": 0.00273,
"changepos": 1
}
See also
none
WalletLock#
Note
Requires wallet 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
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
Always set to JSON |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet walletlock
(Success: nothing printed.)
See also
EncryptWallet: encrypts the wallet with a passphrase. This is only to enable encryption for the first time. After encryption is enabled, you will need to enter the passphrase to use private keys.
WalletPassphrase: stores the wallet decryption key in memory for the indicated number of seconds. Issuing the
walletpassphrase
command while the wallet is already unlocked will set a new unlock time that overrides the old one.WalletPassphraseChange: changes the wallet passphrase from ‘old passphrase’ to ‘new passphrase’.
WalletPassphrase#
Note
Requires wallet support (unavailable on masternodes). 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
Name |
Type |
Presence |
Description |
---|---|---|---|
Passphrase |
string |
Required |
The passphrase that unlocks the wallet |
Parameter #2—the number of seconds to leave the wallet unlocked
Name |
Type |
Presence |
Description |
---|---|---|---|
Seconds |
number (int) |
Required |
The number of seconds after which the decryption key will be automatically deleted from memory |
Parameter #3—unlock for staking only TODO - NOT FULLY IMPLEMENTED YET
Name |
Type |
Presence |
Description |
---|---|---|---|
Unlock for Staking Only |
bool |
Optional |
If |
Result—null
on success
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
Always set to JSON |
Example from Dimecoin Core 2.3.0.0
Unlock the wallet for 10 minutes (the passphrase is “test”):
dimecoin-cli -mainnet walletpassphrase test 600
(Success: no result printed.)
See also
EncryptWallet: encrypts the wallet with a passphrase. This is only to enable encryption for the first time. After encryption is enabled, you will need to enter the passphrase to use private keys.
WalletPassphraseChange: changes the wallet passphrase from ‘old passphrase’ to ‘new passphrase’.
WalletLock: removes the wallet encryption key from memory, locking the wallet. After calling this method, you will need to call
walletpassphrase
again before being able to call any methods which require the wallet to be unlocked.
WalletPassphraseChange#
Note
Requires wallet support (unavailable on masternodes). 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
Name |
Type |
Presence |
Description |
---|---|---|---|
Current Passphrase |
string |
Required |
The current wallet passphrase |
Parameter #2—the new passphrase
Name |
Type |
Presence |
Description |
---|---|---|---|
New Passphrase |
string |
Required |
The new passphrase for the wallet |
Result—null
on success
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
Always set to JSON |
Example from Dimecoin Core 2.3.0.0
Change the wallet passphrase from “test” to “test2:
dimecoin-cli -mainnet walletpassphrasechange "test" "test2"
(Success: no result printed.)
See also
EncryptWallet: encrypts the wallet with a passphrase. This is only to enable encryption for the first time. After encryption is enabled, you will need to enter the passphrase to use private keys.
WalletLock: removes the wallet encryption key from memory, locking the wallet. After calling this method, you will need to call
walletpassphrase
again before being able to call any methods which require the wallet to be unlocked.WalletPassphrase: stores the wallet decryption key in memory for the indicated number of seconds. Issuing the
walletpassphrase
command while the wallet is already unlocked will set a new unlock time that overrides the old one.
WalletProcessPSBT#
The walletprocesspsbt
RPC updates a PSBT with input information from a wallet and then allows the signing of inputs.
Parameter #1—PSBT
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string |
Required |
The transaction base64 string |
Parameter #2—Sign Transaction
Name |
Type |
Presence |
Description |
---|---|---|---|
|
bool |
Optional |
Sign the transaction when updating (default = |
Parameter #3—Signature Hash Type
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string |
Optional |
The signature hash type to sign with if not specified by the PSBT. Must be one of the following (default = ALL): |
Parameter #4—bip32derivs
Name |
Type |
Presence |
Description |
---|---|---|---|
|
bool |
Optional |
Includes the BIP 32 derivation paths for public keys if known (default = |
Result—the processed wallet
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
The results of the signature |
→ |
string |
Required |
The base64-encoded partially signed transaction |
→ |
bool |
Required |
If the transaction has a complete set of signatures |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli walletprocesspsbt "cHNidP8BAEICAAAAAXgRxzbShUlivVFKgoLyhk0RCCYLZKCYTl/tYRd+yGImAAAAAAD/////AQAAAAAAAAAABmoEAAECAwAAAAAAAAA="
Result:
{
"psbt": "cHNidP8BAEICAAAAAXgRxzbShUlivVFKgoLyhk0RCCYLZKCYTl/tYRd+yGImAAAAAAD/////AQAAAAAAAAAABmoEAAECAwAAAAAAAQDhAgAAAAGUi7dQLNEVUajA9jcftG9LmDpAZzvVlgQVcitxL418QgEAAABqRzBEAiBP5PxIjJVfKGxSyEjseVC0DsR24bQ0xq3WhrR0vd4JqQIgYiLSkf2do0FAiqikcg9aaVmZdxWh3fgYfnUne2v8rn4BIQPGfYaUQxWDiup+yA05C10JuRtiSDNw1Jedpcz3p993qf7///8CtOfGCQAAAAAZdqkUzvxGSQTAOBTAGQbhl9x1mnReR+6IrADKmjsAAAAAGXapFD75vL6S93yPrdBWbup/+NR/Ir3giKxVSAgAAQdqRzBEAiAF1fgBDg2M/WAeYTYzCkEiSSrDVzcYoe8wwrw/MbdgOQIgJzoYBQ9hAm6jqk2cLFitUd1/iL1ku8w9unadjNfsCdoBIQJn2pETmk8U2X6veADqnny5/6j8Iy7Oizij0SeJHm9x6AAA",
"complete": true
}
See also
CreatePSBT: creates a transaction in the Partially Signed Transaction (PST) format.
CombinePSBT: combine multiple partially-signed DIME transactions into one transaction.
ConvertToPSBT: converts a network serialized transaction to a PSBT.
DecodePSBT: returns a JSON object representing the serialized, base64-encoded partially signed DIME transaction.
FinalizePSBT: finalizes the inputs of a PSBT.
WalletCreateFundedPSBT: creates and funds a transaction in the Partially Signed Transaction (PST) format.