mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
Wallet RPC updates
- Convert more existing RPCs to Dash (gettransaction->listaccounts)
This commit is contained in:
parent
2e46278b3c
commit
8202b61162
8 changed files with 191 additions and 92 deletions
|
@ -9,6 +9,8 @@ http://opensource.org/licenses/MIT.
|
|||
|
||||
{% assign summary_getTransaction="gets detailed information about an in-wallet transaction." %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
*Requires wallet support.*
|
||||
|
@ -41,16 +43,27 @@ The `gettransaction` RPC {{summary_getTransaction}}
|
|||
d: "An object describing how the transaction affects the wallet"
|
||||
|
||||
- n: "→<br>`amount`"
|
||||
t: "number (bitcoins)"
|
||||
t: "number (dash)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "A positive number of bitcoins if this transaction increased the total wallet balance; a negative number of bitcoins if this transaction decreased the total wallet balance, or `0` if the transaction had no net effect on wallet balance"
|
||||
d: "A positive number of dash if this transaction increased the total wallet balance; a negative number of dash if this transaction decreased the total wallet balance, or `0` if the transaction had no net effect on wallet balance"
|
||||
|
||||
- n: "→<br>`fee`"
|
||||
t: "number (bitcoins)"
|
||||
t: "number (dash)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "If an outgoing transaction, this is the fee paid by the transaction reported as negative bitcoins"
|
||||
d: "If an outgoing transaction, this is the fee paid by the transaction reported as negative dash"
|
||||
|
||||
- n: "→<br>`instantlock`"
|
||||
t: "bool"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "Current transaction lock state"
|
||||
|
||||
{{INCLUDE_F_LIST_TRANSACTIONS_F_FULL}}
|
||||
|
||||
- n: "→<br>`DS`"
|
||||
t: "bool"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "Set to 1 if a PrivateSend transaction"
|
||||
|
||||
- n: "→<br>`details`"
|
||||
t: "array"
|
||||
p: "Required<br>(exactly 1)"
|
||||
|
@ -74,12 +87,12 @@ The `gettransaction` RPC {{summary_getTransaction}}
|
|||
- n: "→ →<br>`category`"
|
||||
t: "string"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "Set to one of the following values:<br>• `send` if sending payment<br>• `receive` if this wallet received payment in a regular transaction<br>• `generate` if a matured and spendable coinbase<br>• `immature` if a coinbase that is not spendable yet<br>• `orphan` if a coinbase from a block that's not in the local best block chain"
|
||||
d: "Set to one of the following values:<br>• `send` if sending payment normally<br>• `privatesend` if sending PrivateSent payment<br>• `receive` if this wallet received payment in a regular transaction<br>• `generate` if a matured and spendable coinbase<br>• `immature` if a coinbase that is not spendable yet<br>• `orphan` if a coinbase from a block that's not in the local best block chain"
|
||||
|
||||
- n: "→ →<br>`amount`"
|
||||
t: "number (bitcoins)"
|
||||
t: "number (dash)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "A negative bitcoin amount if sending payment; a positive bitcoin amount if receiving payment (including coinbases)"
|
||||
d: "A negative dash amount if sending payment; a positive dash amount if receiving payment (including coinbases)"
|
||||
|
||||
- n: "→ →<br>`vout`"
|
||||
t: "number (int)"
|
||||
|
@ -87,9 +100,9 @@ The `gettransaction` RPC {{summary_getTransaction}}
|
|||
d: "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"
|
||||
|
||||
- n: "→ →<br>`fee`"
|
||||
t: "number (bitcoins)"
|
||||
t: "number (dash)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "If sending payment, the fee paid as a negative bitcoins value. May be `0`. Not returned if receiving payment"
|
||||
d: "If sending payment, the fee paid as a negative dash value. May be `0`. Not returned if receiving payment"
|
||||
|
||||
- n: "→ →<br>`abandoned`"
|
||||
t: "bool"
|
||||
|
@ -103,48 +116,52 @@ The `gettransaction` RPC {{summary_getTransaction}}
|
|||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Bitcoin Core 0.13.1*
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet gettransaction \
|
||||
5a7d24cd665108c66b2d56146f244932edae4e2376b561b3d396d5ae017b9589
|
||||
dash-cli -testnet gettransaction \
|
||||
345d5f708b047b145f6a40a4e1e36c76648611cd009bd073e607c8ddf47bb797
|
||||
{% endhighlight %}
|
||||
|
||||
Result:
|
||||
|
||||
{% highlight json %}
|
||||
{
|
||||
"amount" : 0.00000000,
|
||||
"fee" : 0.00000000,
|
||||
"confirmations" : 106670,
|
||||
"blockhash" : "000000008b630b3aae99b6fe215548168bed92167c47a2f7ad4df41e571bcb51",
|
||||
"blockindex" : 1,
|
||||
"blocktime" : 1396321351,
|
||||
"txid" : "5a7d24cd665108c66b2d56146f244932edae4e2376b561b3d396d5ae017b9589",
|
||||
"walletconflicts" : [
|
||||
"amount": 0.00000000,
|
||||
"fee": -0.00010000,
|
||||
"confirmations": 20,
|
||||
"instantlock": false,
|
||||
"trusted": true,
|
||||
"txid": "345d5f708b047b145f6a40a4e1e36c76648611cd009bd073e607c8ddf47bb797",
|
||||
"walletconflicts": [
|
||||
],
|
||||
"time" : 1396321351,
|
||||
"timereceived" : 1418924711,
|
||||
"bip125-replaceable" : "no",
|
||||
"details" : [
|
||||
"time": 1511967821,
|
||||
"timereceived": 1511967821,
|
||||
"bip125-replaceable": "no",
|
||||
"DS": "1",
|
||||
"details": [
|
||||
{
|
||||
"account" : "",
|
||||
"address" : "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN",
|
||||
"category" : "send",
|
||||
"amount" : -0.10000000,
|
||||
"vout" : 0,
|
||||
"fee" : 0.00000000
|
||||
"account": "",
|
||||
"address": "ybTSbNqB7nG4ZVbHyati6GbfFz5w7tDnHf",
|
||||
"category": "privatesend",
|
||||
"amount": -10.00000000,
|
||||
"label": "PS",
|
||||
"vout": 0,
|
||||
"fee": -0.00010000,
|
||||
"abandoned": false
|
||||
},
|
||||
{
|
||||
"account" : "doc test",
|
||||
"address" : "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN",
|
||||
"category" : "receive",
|
||||
"amount" : 0.10000000,
|
||||
"vout" : 0
|
||||
"account": "PS",
|
||||
"address": "ybTSbNqB7nG4ZVbHyati6GbfFz5w7tDnHf",
|
||||
"category": "receive",
|
||||
"amount": 10.00000000,
|
||||
"label": "PS",
|
||||
"vout": 0
|
||||
}
|
||||
],
|
||||
"hex" : "0100000001cde58f2e37d000eabbb60d9cf0b79ddf67cede6dba58732539983fa341dd5e6c010000006a47304402201feaf12908260f666ab369bb8753cdc12f78d0c8bdfdef997da17acff502d321022049ba0b80945a7192e631c03bafd5c6dc3c7cb35ac5c1c0ffb9e22fec86dd311c01210321eeeb46fd878ce8e62d5e0f408a0eab41d7c3a7872dc836ce360439536e423dffffffff0180969800000000001976a9142b14950b8d31620c6cc923c5408a701b1ec0a02088ac00000000"
|
||||
"hex": "010000000156d338508686982770a101c9fd41ce8b2c6ff4eb17dac6b1e7a32dfc5d2ae6e9030000006b4830450221008e8bf68440818d2b2fe8bcc2447d3b455f4e27864dae3f2bc62d2c8d1fdadaad0220390a0810f7f75436a7ebb0bc5c5a5e377b2330e1395f42b5f96d249ac9705ffc012103f4398f7e93dcc64a24191dbae57ef1ccbfcbd867f39a714020e66cf5b10050c4feffffff0100ca9a3b000000001976a914a60d00463c9eed290555e8f719333fc6b21c636088ac89850000"
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
*See also*
|
||||
|
|
|
@ -9,6 +9,8 @@ http://opensource.org/licenses/MIT.
|
|||
|
||||
{% assign summary_getUnconfirmedBalance="returns the wallet's total unconfirmed balance." %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
*Requires wallet support.*
|
||||
|
@ -21,16 +23,16 @@ The `getunconfirmedbalance` RPC {{summary_getUnconfirmedBalance}}
|
|||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "`result`"
|
||||
t: "number (bitcoins)"
|
||||
t: "number (dash)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The total number of bitcoins paid to this wallet in unconfirmed transactions"
|
||||
d: "The total number of dash paid to this wallet in unconfirmed transactions"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Bitcoin Core 0.10.0*
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet getunconfirmedbalance
|
||||
dash-cli -testnet getunconfirmedbalance
|
||||
{% endhighlight %}
|
||||
|
||||
Result (no unconfirmed incoming payments):
|
||||
|
|
|
@ -9,6 +9,8 @@ http://opensource.org/licenses/MIT.
|
|||
|
||||
{% assign summary_getWalletInfo="provides information about the wallet." %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
*Requires wallet support.*
|
||||
|
@ -31,9 +33,19 @@ The `getwalletinfo` RPC {{summary_getWalletInfo}}
|
|||
d: "The version number of the wallet"
|
||||
|
||||
- n: "→<br>`balance`"
|
||||
t: "number (bitcoins)"
|
||||
t: "number (dash)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The balance of the wallet. The same as returned by the `getbalance` RPC with default parameters"
|
||||
d: "The total confirmed balance of the wallet. The same as returned by the `getbalance` RPC with default parameters"
|
||||
|
||||
- n: "→<br>`unconfirmed_balance`"
|
||||
t: "number (dash)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The total unconfirmed balance of the wallet. The same as returned by the `getunconfirmedbalance` RPC with default parameters"
|
||||
|
||||
- n: "→<br>`immature_balance`"
|
||||
t: "number (dash)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The total immature balance of the wallet. This includes mining/masternode rewards that cannot be spent yet"
|
||||
|
||||
- n: "→<br>`txcount`"
|
||||
t: "number (int)"
|
||||
|
@ -50,29 +62,73 @@ The `getwalletinfo` RPC {{summary_getWalletInfo}}
|
|||
p: "Required<br>(exactly 1)"
|
||||
d: "The number of keys in the wallet keypool"
|
||||
|
||||
- n: "→<br>`keypoolsize_hd_internal`"
|
||||
t: "number (int)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "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)"
|
||||
|
||||
- n: "→<br>`keys_left`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The number of unused keys left since the last automatic backup"
|
||||
|
||||
- n: "→<br>`unlocked_until`"
|
||||
t: "number (int)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "Only returned if the wallet was encrypted with the `encryptwallet` RPC. A Unix epoch date when the wallet will be locked, or `0` if the wallet is currently locked"
|
||||
|
||||
- n: "→<br>`paytxfee`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The transaction fee configuration, set in DASH/kB"
|
||||
|
||||
- n: "→<br>`hdchainid`"
|
||||
t: "string (hash)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "The ID of the HD chain"
|
||||
|
||||
- n: "→<br>`hdaccountcount`"
|
||||
t: "number (int)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "How many accounts of the HD chain are in this wallet"
|
||||
|
||||
- n: "→ →<br>`hdaccountcountindex`"
|
||||
t: "number (int)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "The index of the account"
|
||||
|
||||
- n: "→ →<br>`hdexternalkeyindex`"
|
||||
t: "number (int)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "Current external child key index"
|
||||
|
||||
- n: "→ →<br>`hdinternalkeyindex`"
|
||||
t: "number (int)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "Current internal child key index"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Bitcoin Core 0.10.0*
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet getwalletinfo
|
||||
dash-cli -testnet getwalletinfo
|
||||
{% endhighlight %}
|
||||
|
||||
Result:
|
||||
|
||||
{% highlight json %}
|
||||
{
|
||||
"walletversion" : 60000,
|
||||
"balance" : 1.45060000,
|
||||
"txcount" : 17,
|
||||
"keypoololdest" : 1398809500,
|
||||
"keypoolsize" : 196,
|
||||
"unlocked_until" : 0
|
||||
"walletversion": 61000,
|
||||
"balance": 3000.00000000,
|
||||
"unconfirmed_balance": 10.10000000,
|
||||
"immature_balance": 11.25000000,
|
||||
"txcount": 267,
|
||||
"keypoololdest": 1508428379,
|
||||
"keypoolsize": 999,
|
||||
"keys_left": 978,
|
||||
"unlocked_until": 0,
|
||||
"paytxfee": 0.00000000
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@ http://opensource.org/licenses/MIT.
|
|||
|
||||
{% assign summary_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." %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
*Requires wallet support.*
|
||||
|
@ -28,10 +30,10 @@ The `importaddress` RPC {{summary_importAddress}}
|
|||
*Parameter #2---The account into which to place the address or pubkey script*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Account"
|
||||
- n: "Label"
|
||||
t: "string"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "An account name into which the address should be placed. Default is the default account, an empty string(\"\")"
|
||||
d: "An optional label. Default is an empty string(\"\")"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
|
@ -41,7 +43,17 @@ The `importaddress` RPC {{summary_importAddress}}
|
|||
- n: "Rescan"
|
||||
t: "bool"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "Set to `true` (the default) to rescan the entire local block database for transactions affecting any address or pubkey script in the wallet (including transaction affecting the newly-added address or pubkey script). Set to `false` to not rescan the block database (rescanning can be performed at any time by restarting Bitcoin Core with the `-rescan` command-line argument). Rescanning may take several minutes."
|
||||
d: "Set to `true` (the default) to rescan the entire local block database for transactions affecting any address or pubkey script in the wallet (including transaction affecting the newly-added address or pubkey script). Set to `false` to not rescan the block database (rescanning can be performed at any time by restarting Dash Core with the `-rescan` command-line argument). Rescanning may take several minutes."
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Parameter #4---whether to rescan the block chain*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "P2SH"
|
||||
t: "bool"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "Add the P2SH version of the script as well"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
|
@ -55,14 +67,14 @@ The `importaddress` RPC {{summary_importAddress}}
|
|||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Bitcoin Core 0.10.0*
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
Add an address, rescanning the local block database for any transactions
|
||||
matching it.
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet importaddress \
|
||||
muhtvdmsnbQEPFuEmxcChX58fGvXaaUoVt "watch-only test" true
|
||||
dash-cli -testnet importaddress \
|
||||
yg89Yt5Tjzs9nRpX3wJCuvr7KuQvgkvmeC "watch-only test" true
|
||||
{% endhighlight %}
|
||||
|
||||
Result:
|
||||
|
@ -72,7 +84,7 @@ Result:
|
|||
Show that the address has been added:
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet getaccount muhtvdmsnbQEPFuEmxcChX58fGvXaaUoVt
|
||||
dash-cli -testnet getaccount yg89Yt5Tjzs9nRpX3wJCuvr7KuQvgkvmeC
|
||||
{% endhighlight %}
|
||||
|
||||
Result:
|
||||
|
|
|
@ -9,6 +9,8 @@ http://opensource.org/licenses/MIT.
|
|||
|
||||
{% assign summary_importWallet="imports private keys from a file in wallet dump file format (see the `dumpwallet` RPC). These keys will be added to the keys currently in the wallet. This call may need to rescan all or parts of the block chain for transactions affecting the newly-added keys, which may take several minutes." %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
*Requires wallet support. Requires an unlocked wallet or an
|
||||
|
@ -22,7 +24,7 @@ The `importwallet` RPC {{summary_importWallet}}
|
|||
- n: "Filename"
|
||||
t: "string"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The file to import. The path is relative to Bitcoin Core's working directory"
|
||||
d: "The file to import. The path is relative to Dash Core's working directory"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
|
@ -36,12 +38,12 @@ The `importwallet` RPC {{summary_importWallet}}
|
|||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Bitcoin Core 0.10.0*
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
Import the file shown in the example subsection of the `dumpwallet` RPC.
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet importwallet /tmp/dump.txt
|
||||
dash-cli -testnet importwallet /tmp/dump.txt
|
||||
{% endhighlight %}
|
||||
|
||||
(Success: no result displayed.)
|
||||
|
|
|
@ -9,6 +9,8 @@ http://opensource.org/licenses/MIT.
|
|||
|
||||
{% assign summary_keyPoolRefill="fills the cache of unused pre-generated keys (the keypool)." %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
*Requires wallet support. Requires an unlocked wallet or an unencrypted
|
||||
|
@ -22,7 +24,7 @@ The `keypoolrefill` RPC {{summary_keyPoolRefill}}
|
|||
- n: "Key Pool Size"
|
||||
t: "number (int)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "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 `100`. The value `0` also equals the default. The value specified is for this call only---the default keypool size is not changed"
|
||||
d: "The new size of the keypool; if the number of keys in the keypool is less than this number, new keys will be generated. Default is `1000`. The value `0` also equals the default. The value specified is for this call only---the default keypool size is not changed"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
|
@ -36,12 +38,12 @@ The `keypoolrefill` RPC {{summary_keyPoolRefill}}
|
|||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Bitcoin Core 0.10.0*
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
Generate one extra key than the default:
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet keypoolrefill 101
|
||||
dash-cli -testnet keypoolrefill 1001
|
||||
{% endhighlight %}
|
||||
|
||||
(No result shown: success.)
|
||||
|
|
|
@ -9,20 +9,32 @@ http://opensource.org/licenses/MIT.
|
|||
|
||||
{% assign summary_listAccounts="lists accounts and their balances." %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
*Requires wallet support.*
|
||||
|
||||
The `listaccounts` RPC {{summary_listAccounts}}
|
||||
|
||||
{{WARNING}} `listaccounts` will be removed in a later version of Bitcoin
|
||||
{{WARNING}} `listaccounts` will be removed in a later version of Dash
|
||||
Core. Use the RPCs listed in the See Also subsection below instead.
|
||||
|
||||
*Parameter #1---the minimum number of confirmations a transaction must have*
|
||||
|
||||
{{INCLUDE_CONFIRMATIONS_PARAMETER}}
|
||||
|
||||
*Parameter #2---whether to include watch-only addresses in results*
|
||||
*Parameter #2---whether to add 5 confirmations to transactions locked via InstantSend*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "addlockconf"
|
||||
t: "bool"
|
||||
p: "Optional<br>(exactly 1)"
|
||||
d: "Add the number of InstantSend confirmations to InstantSend locked transactions"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Parameter #3---whether to include watch-only addresses in results*
|
||||
|
||||
{{INCLUDE_INCLUDE_WATCH_ONLY_PARAMETER}}
|
||||
|
||||
|
@ -35,34 +47,30 @@ Core. Use the RPCs listed in the See Also subsection below instead.
|
|||
d: "A JSON array containing key/value pairs with account names and values. Must include, at the very least, the default account (\"\")"
|
||||
|
||||
- n: "→<br>Account : Balance"
|
||||
t: "string : number (bitcoins)"
|
||||
t: "string : number (dash)"
|
||||
p: "Required<br>(1 or more)"
|
||||
d: "The name of an account as a string paired with the balance of the account as a number of bitcoins. The number of bitcoins may be negative if the account has spent more bitcoins than it received. Accounts with zero balances and zero transactions will be displayed"
|
||||
d: "The name of an account as a string paired with the balance of the account as a number of dash. The number of dash may be negative if the account has spent more dash than it received. Accounts with zero balances and zero transactions will be displayed"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Bitcoin Core 0.10.0*
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
Display account balances with one confirmation and watch-only addresses
|
||||
included.
|
||||
included. Add the InstantSend confirmations (5) for locked transactions.
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet listaccounts 1 true
|
||||
dash-cli -testnet listaccounts 1 true true
|
||||
{% endhighlight %}
|
||||
|
||||
Result:
|
||||
|
||||
{% highlight json %}
|
||||
{
|
||||
"" : -2.73928803,
|
||||
"Refund from example.com" : 0.00000000,
|
||||
"doc test" : -498.45900000,
|
||||
"someone else's address" : 0.00000000,
|
||||
"someone else's address2" : 0.00050000,
|
||||
"test" : 499.97975293,
|
||||
"test account" : 0.00000000,
|
||||
"test label" : 0.48961280,
|
||||
"test1" : 1.99900000
|
||||
"": -2941.30029732,
|
||||
"Watching": 8.50000000,
|
||||
"MN": 2000.25442744,
|
||||
"PS": 37.02970000,
|
||||
"Recv1": 3843.48167912,
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
|
|
|
@ -22,12 +22,12 @@ http://opensource.org/licenses/MIT.
|
|||
- n: "{{DEPTH}}<br>`category`"
|
||||
t: "string"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "Set to one of the following values:<br>• `send` if sending payment<br>• `receive` if this wallet received payment in a regular transaction<br>• `generate` if a matured and spendable coinbase<br>• `immature` if a coinbase that is not spendable yet<br>• `orphan` if a coinbase from a block that's not in the local best block chain"
|
||||
d: "Set to one of the following values:<br>• `send` if sending payment normally<br>• `privatesend` if sending PrivateSent payment<br>• `receive` if this wallet received payment in a regular transaction<br>• `generate` if a matured and spendable coinbase<br>• `immature` if a coinbase that is not spendable yet<br>• `orphan` if a coinbase from a block that's not in the local best block chain"
|
||||
|
||||
- n: "{{DEPTH}}<br>`amount`"
|
||||
t: "number (bitcoins)"
|
||||
t: "number (dash)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "A negative bitcoin amount if sending payment; a positive bitcoin amount if receiving payment (including coinbases)"
|
||||
d: "A negative dash amount if sending payment; a positive dash amount if receiving payment (including coinbases)"
|
||||
|
||||
- n: "{{DEPTH}}<br>`vout`"
|
||||
t: "number (int)"
|
||||
|
@ -35,9 +35,9 @@ http://opensource.org/licenses/MIT.
|
|||
d: "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"
|
||||
|
||||
- n: "{{DEPTH}}<br>`fee`"
|
||||
t: "number (bitcoins)"
|
||||
t: "number (dash)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "If sending payment, the fee paid as a negative bitcoins value. May be `0`. Not returned if receiving payment"
|
||||
d: "If sending payment, the fee paid as a negative dash value. May be `0`. Not returned if receiving payment"
|
||||
|
||||
{% endcapture %}
|
||||
|
||||
|
@ -122,7 +122,7 @@ http://opensource.org/licenses/MIT.
|
|||

|
||||
**Warning:** if account1 receives an unconfirmed payment and transfers
|
||||
it to account2 with the `move` RPC, account2 will be able to spend those
|
||||
bitcoins even if this parameter is set to `1` or higher.{% endcapture %}
|
||||
dash even if this parameter is set to `1` or higher.{% endcapture %}
|
||||
|
||||
|
||||
{% capture INCLUDE_DECODE_RAW_TRANSACTION %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue