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 (listsinceblock->listunspent)
This commit is contained in:
parent
79231bb3d3
commit
8c175dfdff
4 changed files with 116 additions and 94 deletions
|
@ -9,6 +9,8 @@ http://opensource.org/licenses/MIT.
|
|||
|
||||
{% assign summary_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." %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
*Requires wallet support.*
|
||||
|
@ -69,13 +71,13 @@ The `listsinceblock` RPC {{summary_listSinceBlock}}
|
|||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Bitcoin Core 0.13.1*
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
Get all transactions since a particular block (including watch-only
|
||||
transactions) and the header hash of the sixth most recent block.
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet listsinceblock \
|
||||
dash-cli -testnet listsinceblock \
|
||||
00000000688633a503f69818a70eac281302e9189b1bb57a76a05c329fcda718 \
|
||||
6 true
|
||||
{% endhighlight %}
|
||||
|
@ -86,43 +88,49 @@ Result (edited to show only two payments):
|
|||
{
|
||||
"transactions": [
|
||||
{
|
||||
"account" : "doc test",
|
||||
"address" : "mmXgiR6KAhZCyQ8ndr2BCfEq1wNG2UnyG6",
|
||||
"category" : "receive",
|
||||
"amount" : 0.10000000,
|
||||
"vout" : 0,
|
||||
"confirmations" : 76478,
|
||||
"blockhash" : "000000000017c84015f254498c62a7c884a51ccd75d4dd6dbdcb6434aa3bd44d",
|
||||
"account": "",
|
||||
"address": "yfCjqf9F7oNGD1sRqta2rNpCXSQ9dknDf5",
|
||||
"category": "send",
|
||||
"amount": -0.01000010,
|
||||
"vout": 7,
|
||||
"fee": 0.05000050,
|
||||
"confirmations": 95,
|
||||
"instantlock": false,
|
||||
"blockhash": "0000000002aa705754c6ab4e15cf2183a1d174e61c080f64eb469c458669144b",
|
||||
"blockindex": 1,
|
||||
"blocktime" : 1399294967,
|
||||
"txid" : "85a98fdf1529f7d5156483ad020a51b7f3340e47448cf932f470b72ff01a6821",
|
||||
"blocktime": 1511972930,
|
||||
"txid": "52e34eec71a4cf95c043b76567f55cec1bc293c444810d454a2d05f2a819b5ed",
|
||||
"walletconflicts": [
|
||||
],
|
||||
"time" : 1399294967,
|
||||
"timereceived" : 1418924714,
|
||||
"bip125-replaceable": "no"
|
||||
"time": 1511972930,
|
||||
"timereceived": 1511974218,
|
||||
"bip125-replaceable": "no",
|
||||
"abandoned": false
|
||||
},
|
||||
{
|
||||
"involvesWatchonly" : true,
|
||||
"account" : "someone else's address2",
|
||||
"address" : "n3GNqMveyvaPvUbH469vDRadqpJMPc84JA",
|
||||
"category" : "receive",
|
||||
"amount" : 0.00050000,
|
||||
"vout" : 0,
|
||||
"confirmations" : 34714,
|
||||
"blockhash" : "00000000bd0ed80435fc9fe3269da69bb0730ebb454d0a29128a870ea1a37929",
|
||||
"blockindex" : 11,
|
||||
"blocktime" : 1411051649,
|
||||
"txid" : "99845fd840ad2cc4d6f93fafb8b072d188821f55d9298772415175c456f3077d",
|
||||
"account": "",
|
||||
"address": "yi2U4Cx2QH33LdNwk2c2oLABWzEZWhYU9k",
|
||||
"category": "send",
|
||||
"amount": -0.01000010,
|
||||
"vout": 8,
|
||||
"fee": 0.05000050,
|
||||
"confirmations": 95,
|
||||
"instantlock": false,
|
||||
"blockhash": "0000000002aa705754c6ab4e15cf2183a1d174e61c080f64eb469c458669144b",
|
||||
"blockindex": 1,
|
||||
"blocktime": 1511972930,
|
||||
"txid": "52e34eec71a4cf95c043b76567f55cec1bc293c444810d454a2d05f2a819b5ed",
|
||||
"walletconflicts": [
|
||||
],
|
||||
"time" : 1418695703,
|
||||
"timereceived" : 1418925580,
|
||||
"bip125-replaceable": "no"
|
||||
"time": 1511972930,
|
||||
"timereceived": 1511974218,
|
||||
"bip125-replaceable": "no",
|
||||
"abandoned": false
|
||||
}
|
||||
],
|
||||
"lastblock" : "0000000000984add1a686d513e66d25686572c7276ec3e358a7e3e9f7eb88619"
|
||||
"lastblock": "000000000dba5583e3fc5c2df06b478e922702f53a1476aac8eb4322f648ccea"
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
*See also*
|
||||
|
|
|
@ -9,6 +9,8 @@ http://opensource.org/licenses/MIT.
|
|||
|
||||
{% assign summary_listTransactions="returns the most recent transactions that affect the wallet." %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
*Requires wallet support.*
|
||||
|
@ -21,7 +23,7 @@ The `listtransactions` RPC {{summary_listTransactions}}
|
|||
- n: "Account"
|
||||
t: "string"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "*Deprecated: will be removed in a later version of Bitcoin Core*<br><br>The name of an account to get transactinos from. Use an empty string (\"\") to get transactions for the default account. Default is `*` to get transactions for all accounts."
|
||||
d: "*Deprecated: will be removed in a later version of Dash Core*<br><br>The name of an account to get transactinos from. Use an empty string (\"\") to get transactions for the default account. Default is `*` to get transactions for all accounts."
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
|
@ -65,7 +67,7 @@ The `listtransactions` RPC {{summary_listTransactions}}
|
|||
- n: "→ →<br>`account`"
|
||||
t: "string"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "*Deprecated: will be removed in a later version of Bitcoin Core*<br><br>The account which the payment was credited to or debited from. May be an empty string (\"\") for the default account"
|
||||
d: "*Deprecated: will be removed in a later version of Dash Core*<br><br>The account which the payment was credited to or debited from. May be an empty string (\"\") for the default account"
|
||||
|
||||
- n: "→ →<br>`address`"
|
||||
t: "string (base58)"
|
||||
|
@ -78,9 +80,9 @@ The `listtransactions` RPC {{summary_listTransactions}}
|
|||
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<br>• `move` if an off-block-chain move made with the `move` RPC"
|
||||
|
||||
- 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>`label`"
|
||||
t: "string"
|
||||
|
@ -93,15 +95,20 @@ The `listtransactions` RPC {{summary_listTransactions}}
|
|||
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. Not returned for *move* category payments"
|
||||
|
||||
- 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 or for *move* category payments"
|
||||
d: "If sending payment, the fee paid as a negative dash value. May be `0`. Not returned if receiving payment or for *move* category payments"
|
||||
|
||||
- n: "→ →<br>`confirmations`"
|
||||
t: "number (int)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "The number of confirmations the transaction has received. Will be `0` for unconfirmed and `-1` for conflicted. Not returned for *move* category payments"
|
||||
|
||||
- n: "→<br>`instantlock`"
|
||||
t: "bool"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "Current transaction lock state"
|
||||
|
||||
- n: "→ →<br>`trusted`"
|
||||
t: "bool"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
|
@ -165,7 +172,7 @@ The `listtransactions` RPC {{summary_listTransactions}}
|
|||
- n: "→ →<br>`otheraccount`"
|
||||
t: "string"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "This is the account the bitcoins were moved from or moved to, as indicated by a negative or positive *amount* field in this payment. Only returned by *move* category payments"
|
||||
d: "This is the account the dash were moved from or moved to, as indicated by a negative or positive *amount* field in this payment. Only returned by *move* category payments"
|
||||
|
||||
- n: "→ →<br>`bip125-replaceable`"
|
||||
t: "string"
|
||||
|
@ -179,12 +186,12 @@ The `listtransactions` RPC {{summary_listTransactions}}
|
|||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Bitcoin Core 0.13.1*
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
List the most recent transaction from all accounts including watch-only addresses.
|
||||
List the most recent transaction from the main account including watch-only addresses.
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli listtransactions "*" 1 0 true
|
||||
dash-cli listtransactions "" 1 0 true
|
||||
{% endhighlight %}
|
||||
|
||||
Result:
|
||||
|
@ -192,24 +199,24 @@ Result:
|
|||
{% highlight json %}
|
||||
[
|
||||
{
|
||||
"involvesWatchonly" : true,
|
||||
"account" : "",
|
||||
"address" : "1GeDA9rRpqaCdsdkTzGtbajt6jPvn3pg2N",
|
||||
"category" : "send",
|
||||
"amount" : -3.45902877,
|
||||
"vout" : 0,
|
||||
"fee" : -0.00032890,
|
||||
"confirmations" : 29710,
|
||||
"blockhash" : "0000000000000000008b9cb38cd3105e75af94b3af79d0a59cbe4edb618fb814",
|
||||
"blockindex" : 1705,
|
||||
"blocktime" : 1463173519,
|
||||
"txid" : "9b32d4315ac4c5e0d3a5fb947b9a198d3641698badc820643a7df23081f99695e",
|
||||
"account": "MN Setup",
|
||||
"address": "yY6AmGopsZS31wy1JLHR9P6AC6owFaXwuh",
|
||||
"category": "immature",
|
||||
"amount": 11.25000000,
|
||||
"label": "MN Setup",
|
||||
"vout": 3,
|
||||
"confirmations": 20,
|
||||
"instantlock": false,
|
||||
"generated": true,
|
||||
"blockhash": "000000000207e556193e19287d2e554a5f99e1ff7cb19367e8de8ad6bacc494e",
|
||||
"blockindex": 0,
|
||||
"blocktime": 1511986957,
|
||||
"txid": "cd9d44cd87ffb784f9dac384bad7db55324d3f47724eb60e16b3de6a26175936",
|
||||
"walletconflicts": [
|
||||
],
|
||||
"time" : 1418695703,
|
||||
"timereceived" : 1418925580,
|
||||
"bip125-replaceable" : "no",
|
||||
"abandoned": false
|
||||
"time": 1511986957,
|
||||
"timereceived": 1511986982,
|
||||
"bip125-replaceable": "no"
|
||||
}
|
||||
]
|
||||
{% endhighlight %}
|
||||
|
|
|
@ -9,6 +9,8 @@ http://opensource.org/licenses/MIT.
|
|||
|
||||
{% assign summary_listUnspent="returns an array of unspent transaction outputs belonging to this wallet." %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
*Requires wallet support.*
|
||||
|
@ -83,7 +85,7 @@ the *spendable* field in the results described below.
|
|||
- n: "→ →<br>`account`"
|
||||
t: "string"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "*Deprecated: will be removed in a later version of Bitcoin Core*<br><br>If the address returned belongs to an account, this is the account. Otherwise not returned"
|
||||
d: "*Deprecated: will be removed in a later version of Dash Core*<br><br>If the address returned belongs to an account, this is the account. Otherwise not returned"
|
||||
|
||||
- n: "→ →<br>`scriptPubKey`"
|
||||
t: "string (hex)"
|
||||
|
@ -98,13 +100,18 @@ the *spendable* field in the results described below.
|
|||
- n: "→ →<br>`amount`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The amount paid to the output in bitcoins"
|
||||
d: "The amount paid to the output in dash"
|
||||
|
||||
- n: "→ →<br>`confirmations`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The number of confirmations received for the transaction containing this output"
|
||||
|
||||
- n: "→ →<br>`ps_rounds`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The number of PrivateSend rounds"
|
||||
|
||||
- n: "→ →<br>`spendable`"
|
||||
t: "bool"
|
||||
p: "Required<br>(exactly 1)"
|
||||
|
@ -117,15 +124,15 @@ the *spendable* field in the results described below.
|
|||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Bitcoin Core 0.13.1*
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
Get all outputs confirmed at least 6 times for a particular
|
||||
address:
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet listunspent 6 99999999 '''
|
||||
dash-cli -testnet listunspent 6 99999999 '''
|
||||
[
|
||||
"mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe"
|
||||
"yTQNnbby2yhxoK1UtL9E5J9epGtkAoFWSm"
|
||||
]
|
||||
'''
|
||||
{% endhighlight %}
|
||||
|
@ -135,15 +142,15 @@ Result:
|
|||
{% highlight json %}
|
||||
[
|
||||
{
|
||||
"txid" : "d54994ece1d11b19785c7248868696250ab195605b469632b7bd68130e880c9a",
|
||||
"vout" : 1,
|
||||
"address" : "mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe",
|
||||
"account" : "test label",
|
||||
"scriptPubKey" : "76a9140dfc8bafc8419853b34d5e072ad37d1a5159f58488ac",
|
||||
"amount" : 0.00010000,
|
||||
"confirmations" : 6210,
|
||||
"txid": "52e34eec71a4cf95c043b76567f55cec1bc293c444810d454a2d05f2a819b5ed",
|
||||
"vout": 3,
|
||||
"address": "yTQNnbby2yhxoK1UtL9E5J9epGtkAoFWSm",
|
||||
"scriptPubKey": "76a9144db791c2388be4716f048be2648bafe1944f787688ac",
|
||||
"amount": 0.01000010,
|
||||
"confirmations": 113,
|
||||
"ps_rounds": 4,
|
||||
"spendable": true,
|
||||
"sovable" : true
|
||||
"solvable": true
|
||||
}
|
||||
]
|
||||
{% endhighlight %}
|
||||
|
|
|
@ -88,12 +88,12 @@ This file is licensed under the terms of its source texts{%endcomment%}
|
|||
{% assign summary_listAddressGroupings="lists groups of addresses that may have had their common ownership made public by common use as inputs in the same transaction or from being used as change from a previous transaction." %}
|
||||
{% assign summary_listBanned="lists all banned IPs/Subnets." %}
|
||||
{% assign summary_listLockUnspent="returns a list of temporarily unspendable (locked) outputs." %}
|
||||
{% assign summary_listReceivedByAccount="lists the total number of bitcoins received by each account." %}
|
||||
{% assign summary_listReceivedByAddress="lists the total number of bitcoins received by each address." %}
|
||||
{% assign summary_listReceivedByAccount="lists the total number of dash received by each account." %}
|
||||
{% assign summary_listReceivedByAddress="lists the total number of dash received by each address." %}
|
||||
{% assign summary_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." %}
|
||||
{% assign summary_listTransactions="returns the most recent transactions that affect the wallet." %}
|
||||
{% assign summary_listUnspent="returns an array of unspent transaction outputs belonging to this wallet." %}
|
||||
{% assign summary_lockUnspent="temporarily locks or unlocks specified transaction outputs. A locked transaction output will not be chosen by automatic coin selection when spending bitcoins. 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." %}
|
||||
{% assign summary_lockUnspent="temporarily locks or unlocks specified transaction outputs. A locked transaction output will not be chosen by automatic coin selection when spending dash. Locks are stored in memory only, so nodes start with zero locked outputs and the locked output list is always cleared when a node stops or fails." %}
|
||||
{% assign summary_masternode="" %}
|
||||
{% assign summary_masternodeBroadcast="provides a set of commands to create and relay masternode broadcast messages." %}
|
||||
{% assign summary_masternodeList="returns a list of masternodes in different modes." %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue