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 (Deprecated)#
Note
RPCs that require wallet support are not available on masternodes for security reasons. Such RPCs are designated with a “Requires wallet support” message.
GetAccount#
Note
Requires wallet support (unavailable on masternodes)
The getaccount
RPC returns the name of the account associated with the given address.
Parameter #1—a Dimecoin address
Name |
Type |
Presence |
Description |
---|---|---|---|
Address |
string (base58) |
Required |
A P2PKH or P2SH Dimecoin address belonging either to a specific account or the default account (")” |
Result—an account name
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string |
Required |
The name of an account, or an empty string (", the default account)” |
Example from Dimecoin Core 1.10.01
Dimecoin-cli -mainnet getaccount 7MTFRnrfJ4NpnYVeidDNHVwT7uuNsVjevq
Result:
doc test
See also
GetAddressesByAccount: returns a list of every address assigned to a particular account.
GetAccountAddress#
Note
Requires wallet support (unavailable on masternodes)
The getaccountaddress
RPC 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.
Parameter #1—an account name
Name |
Type |
Presence |
Description |
---|---|---|---|
Account |
string |
Required |
The name of an account. Use an empty string (") for the default account. If the account doesn’t exist, it will be created” |
Result—a Dimecoin address
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string (base58) |
Required |
An address, belonging to the account specified, which has not yet received any payments |
Example from Dimecoin Core 1.10.01
Get an address for the default account:
dimecoin-cli -mainnet getaccountaddress ""
Result:
7NUQ6RzTpNj5GP5ebdRcusJ7K9JJKx6VvV
See also
GetNewAddress: returns a new Dimecoin address for receiving payments. If an account is specified, payments received with the address will be credited to that account.
GetRawChangeAddress: returns a new Dimecoin address for receiving change. This is for use with raw transactions, not normal use.
GetAddressesByAccount: returns a list of every address assigned to a particular account.
GetAddressesByAccount#
Note
Requires wallet support (unavailable on masternodes)
The getaddressesbyaccount
RPC returns a list of every address assigned to a particular account.
Parameter #1—the account name
Name |
Type |
Presence |
Description |
---|---|---|---|
Account |
string |
Required |
The name of the account containing the addresses to get. To get addresses from the default account, pass an empty string (")” |
Result—a list of addresses
Name |
Type |
Presence |
Description |
---|---|---|---|
|
array |
Required |
An array containing all addresses belonging to the specified account. If the account has no addresses, the array will be empty |
Address |
string (base58) |
Optional |
A P2PKH or P2SH address belonging to the account |
Example from Dimecoin Core 1.10.01
Get the addresses assigned to the account “test”:
dimecoin-cli -mainnet getaddressesbyaccount "test"
Result:
[
"7MTFRnrfJ4NpnYVeidDNHVwT7uuNsVjevq",
"7hT2HS1SxvXkMVdAdf6RNtGPfuVFvwZi35"
]
See also
GetAccount: returns the name of the account associated with the given address.
GetBalance: gets the balance in decimal Dimecoin across all accounts or for a particular account.
SetAccount#
Warning
setaccount
will be removed in a later version of Dimecoin Core. Use the RPCs listed in the See Also subsection below instead.
Requires wallet support (unavailable on masternodes)
The setaccount
RPC puts the specified address in the given account.
Parameter #1—a Dimecoin address
Name |
Type |
Presence |
Description |
---|---|---|---|
Address |
string (base58) |
Required |
The P2PKH or P2SH address to put in the account. Must already belong to the wallet |
Parameter #2—an account
Name |
Type |
Presence |
Description |
---|---|---|---|
Account |
string |
Required |
The name of the account in which the address should be placed. May be the default account, an empty string (")” |
Result—null
if successful
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null |
Required |
Set to JSON |
Example from Dimecoin Core 2.3.0.0
Put the address indicated below in the “doc test” account.
dimecoin-cli -mainnet setaccount \
7MTFRnrfJ4NpnYVeidDNHVwT7uuNsVjevq "test"
(Success: no result displayed.)
See also
GetAccount: returns the name of the account associated with the given address.
GetAddressesByAccount: returns a list of every address assigned to a particular account.
SetLabel: sets the label associated with the given address.