mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
content - Update RPCs
- Update GetBlockChainInfo and GetBlockTemplate - Add ImportMulti - Some minor generate RPC updates for removed commands
This commit is contained in:
parent
b93ff39716
commit
b99321f29a
6 changed files with 85 additions and 77 deletions
|
@ -98,7 +98,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
|
|||
|
||||
* [GetBestBlockHash][rpc getbestblockhash]: {{summary_getBestBlockHash}}
|
||||
* [GetBlock][rpc getblock]: {{summary_getBlock}} {{UPDATED0_13_0}}
|
||||
* [GetBlockChainInfo][rpc getblockchaininfo]: {{summary_getBlockChainInfo}} {{UPDATED0_12_1}}
|
||||
* [GetBlockChainInfo][rpc getblockchaininfo]: {{summary_getBlockChainInfo}} {{DASH_UPDATED0_12_3}} {{UPDATED0_12_1}}
|
||||
* [GetBlockCount][rpc getblockcount]: {{summary_getBlockCount}}
|
||||
* [GetBlockHash][rpc getblockhash]: {{summary_getBlockHash}}
|
||||
* [GetBlockHashes][rpc getblockhashes]: {{summary_getBlockHashes}} {{DASH_NEW0_12_1}}
|
||||
|
@ -181,7 +181,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
|
|||
|
||||
{% autocrossref %}
|
||||
|
||||
* [GetBlockTemplate][rpc getblocktemplate]: {{summary_getBlockTemplate}}
|
||||
* [GetBlockTemplate][rpc getblocktemplate]: {{summary_getBlockTemplate}} {{DASH_UPDATED0_12_3}}
|
||||
* [GetMiningInfo][rpc getmininginfo]: {{summary_getMiningInfo}} {{UPDATED0_14_0}}
|
||||
* [GetNetworkHashPS][rpc getnetworkhashps]: {{summary_getNetworkHashPS}}
|
||||
* [PrioritiseTransaction][rpc prioritisetransaction]: {{summary_prioritiseTransaction}}
|
||||
|
@ -273,6 +273,7 @@ default.
|
|||
* [GetWalletInfo][rpc getwalletinfo]: {{summary_getWalletInfo}}
|
||||
* [ImportAddress][rpc importaddress]: {{summary_importAddress}}
|
||||
* [ImportElectrumWallet][rpc importelectrumwallet]: {{summary_importElectrumWallet}} {{DASH_NEW0_12_1}}
|
||||
* [ImportMulti][rpc importmulti]: {{summary_importMulti}} {{DASH_NEW0_12_3}} {{NEW0_14_0}}
|
||||
* [ImportPrivKey][rpc importprivkey]: {{summary_importPrivKey}}
|
||||
* [ImportPubKey][rpc importpubkey]: {{summary_importPubKey}}
|
||||
* [ImportWallet][rpc importwallet]: {{summary_importWallet}}
|
||||
|
@ -301,7 +302,6 @@ default.
|
|||
|
||||
* {{DASH_NOT_IMPLEMENTED}} [AddWitnessAddress][rpc addwitnessaddress]: {{summary_addWitnessAddress}} {{NEW0_13_0}}
|
||||
* {{DASH_NOT_IMPLEMENTED}} [BumpFee][rpc bumpfee]: {{summary_bumpFee}} {{NEW0_14_0}}
|
||||
* {{DASH_NOT_IMPLEMENTED}} [ImportMulti][rpc importmulti]: {{summary_importMulti}} {{NEW0_14_0}}
|
||||
* {{DASH_NOT_IMPLEMENTED}} [ImportPrunedFunds][rpc importprunedfunds]: {{summary_importPrunedFunds}} {{NEW0_13_0}}
|
||||
* {{DASH_NOT_IMPLEMENTED}} [RemovePrunedFunds][rpc removeprunedfunds]: {{summary_removePrunedFunds}} {{NEW0_13_0}}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ The `disconnectnode` RPC {{summary_disconnectNode}}
|
|||
*Parameter #1---hostname/IP address and port of node to disconnect*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "`node`"
|
||||
- n: "`address`"
|
||||
t: "string"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The node you want to disconnect from as a string in the form of `<IP address>:<port>`.<br><br>*Updated in Bitcoin Core 0.14.1*"
|
||||
|
|
|
@ -7,6 +7,8 @@ http://opensource.org/licenses/MIT.
|
|||
##### GetBlockChainInfo
|
||||
{% include helpers/subhead-links.md %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% assign summary_getBlockChainInfo="provides information about the current state of the block chain." %}
|
||||
|
||||
{% autocrossref %}
|
||||
|
@ -163,9 +165,23 @@ The `getblockchaininfo` RPC {{summary_getBlockChainInfo}}
|
|||
p: "Optional<br>(0 or 1)"
|
||||
d: "The bit (0-28) in the block version field used to signal this softfork. Field is only shown when status is `started`"
|
||||
|
||||
- n: "→ → →<br>`startTime`"
|
||||
t: "numeric<br>(int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The Unix epoch time when the softfork voting begins"
|
||||
|
||||
- n: "→ → →<br>`timeout`"
|
||||
t: "numeric<br>(int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The Unix epoch time at which the deployment is considered failed if not yet locked in"
|
||||
|
||||
- n: "→ → →<br>`since`"
|
||||
t: "numeric<br>(int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "*Added in Bitcoin Core 0.14.0*<br><br>The height of the first block to which the status applies"
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Dash Core 0.12.2*
|
||||
*Example from Dash Core 0.12.3*
|
||||
|
||||
{% highlight bash %}
|
||||
dash-cli -testnet getblockchaininfo
|
||||
|
@ -176,74 +192,57 @@ Result:
|
|||
{% highlight json %}
|
||||
{
|
||||
"chain": "test",
|
||||
"blocks": 4622,
|
||||
"headers": 4622,
|
||||
"bestblockhash": "000000007f4141e557309da09911b1c3c65b8e9eed3f5e940f7083aec8999ac7",
|
||||
"difficulty": 1.380236305048335,
|
||||
"mediantime": 1507209819,
|
||||
"verificationprogress": 0.9999053826626874,
|
||||
"chainwork": "000000000000000000000000000000000000000000000000000001d17aeaf58b",
|
||||
"blocks": 82244,
|
||||
"headers": 82244,
|
||||
"bestblockhash": "0000000004efcadbdb9d8b524e5ab982af3db039fdb585c2f1c1df56d42d4492",
|
||||
"difficulty": 47.4955836390814,
|
||||
"mediantime": 1519662782,
|
||||
"verificationprogress": 0.9999999483744162,
|
||||
"chainwork": "0000000000000000000000000000000000000000000000000021adf3af961831",
|
||||
"pruned": false,
|
||||
"softforks": [
|
||||
{
|
||||
"id": "bip34",
|
||||
"version": 2,
|
||||
"enforce": {
|
||||
"status": true,
|
||||
"found": 100,
|
||||
"required": 51,
|
||||
"window": 100
|
||||
},
|
||||
"reject": {
|
||||
"status": true,
|
||||
"found": 100,
|
||||
"required": 75,
|
||||
"window": 100
|
||||
"status": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bip66",
|
||||
"version": 3,
|
||||
"enforce": {
|
||||
"status": true,
|
||||
"found": 100,
|
||||
"required": 51,
|
||||
"window": 100
|
||||
},
|
||||
"reject": {
|
||||
"status": true,
|
||||
"found": 100,
|
||||
"required": 75,
|
||||
"window": 100
|
||||
"status": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bip65",
|
||||
"version": 4,
|
||||
"enforce": {
|
||||
"status": true,
|
||||
"found": 100,
|
||||
"required": 51,
|
||||
"window": 100
|
||||
},
|
||||
"reject": {
|
||||
"status": true,
|
||||
"found": 100,
|
||||
"required": 75,
|
||||
"window": 100
|
||||
"status": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"bip9_softforks": [
|
||||
{
|
||||
"id": "csv",
|
||||
"status": "started"
|
||||
"bip9_softforks": {
|
||||
"csv": {
|
||||
"status": "active",
|
||||
"startTime": 1506556800,
|
||||
"timeout": 1538092800,
|
||||
"since": 8064
|
||||
},
|
||||
{
|
||||
"id": "dip0001",
|
||||
"status": "started"
|
||||
"dip0001": {
|
||||
"status": "active",
|
||||
"startTime": 1505692800,
|
||||
"timeout": 1537228800,
|
||||
"since": 5600
|
||||
},
|
||||
"bip147": {
|
||||
"status": "active",
|
||||
"startTime": 1517792400,
|
||||
"timeout": 1549328400,
|
||||
"since": 78800
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
|
|
|
@ -7,6 +7,8 @@ http://opensource.org/licenses/MIT.
|
|||
##### GetBlockTemplate
|
||||
{% include helpers/subhead-links.md %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% assign summary_getBlockTemplate="gets a block template or proposal for use with mining software." %}
|
||||
|
||||
{% autocrossref %}
|
||||
|
@ -41,6 +43,16 @@ information, please see the following resources:
|
|||
p: "Optional<br>(exactly 1)"
|
||||
d: "Client side supported feature, `longpoll`, `coinbasetxn`, `coinbasevalue`, `proposal`, `serverlist`, `workid`"
|
||||
|
||||
- n: "→<br>`rules`"
|
||||
t: "array (string)"
|
||||
p: "Optional<br>(0 or more)"
|
||||
d: "A list of strings"
|
||||
|
||||
- n: "→ →<br>Rules"
|
||||
t: "string"
|
||||
p: "Optional<br>(exactly 1)"
|
||||
d: "Client side supported softfork deployment, `csv`, `dip0001`, etc."
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Result---block template*
|
||||
|
|
|
@ -7,15 +7,14 @@ http://opensource.org/licenses/MIT.
|
|||
##### ImportMulti
|
||||
{% include helpers/subhead-links.md %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% assign summary_importMulti="imports addresses or scripts (with private keys, public keys, or P2SH redeem scripts) and optionally performs the minimum necessary rescan for all imports." %}
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
*Added in Bitcoin Core 0.14.0*
|
||||
*Added in Dash Core 0.12.3 / Bitcoin Core 0.14.0*
|
||||
|
||||
{{WARNING_ICON}} **_Not implemented in Dash Core (as of 0.12.2)_**
|
||||
|
||||
{% comment %}
|
||||
*Requires wallet support. Wallet must be unlocked.*
|
||||
|
||||
The `importmulti` RPC {{summary_importMulti}}
|
||||
|
@ -123,27 +122,27 @@ The `importmulti` RPC {{summary_importMulti}}
|
|||
p: "Optional<br>(0 or 1)"
|
||||
d: "The error code"
|
||||
|
||||
- n: "→ → → <br>`message`"
|
||||
- n: "→ → → <br>`message<!--noref-->`"
|
||||
t: "string"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "The error message"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Bitcoin Core 0.14.1*
|
||||
*Example from Dash Core 0.12.3*
|
||||
|
||||
Import the address 1NL9w5fP9kX2D9ToNZPxaiwFJCngNYEYJo (giving it a label and scanning the entire block chain) and the scriptPubKey 76a9149e857da0a5b397559c78c98c9d3f7f655d19c68688ac (giving a specific timestamp and label):
|
||||
Import the address `ycCsAUKsjdmoP4qAXiS1cjYA4ixM48zJWe` (giving it a label and scanning the entire block chain) and the scriptPubKey `76a9146cf5870411edc31ba5630d61c7cddff55b884fda88ac` (giving a specific timestamp and label):
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli importmulti '
|
||||
dash-cli importmulti '
|
||||
[
|
||||
{
|
||||
"scriptPubKey" : { "address": "1NL9w5fP9kX2D9ToNZPxaiwFJCngNYEYJo" },
|
||||
"scriptPubKey" : { "address": "ycCsAUKsjdmoP4qAXiS1cjYA4ixM48zJWe" },
|
||||
"timestamp" : 0,
|
||||
"label" : "Personal"
|
||||
},
|
||||
{
|
||||
"scriptPubKey" : "76a9149e857da0a5b397559c78c98c9d3f7f655d19c68688ac",
|
||||
"scriptPubKey" : "76a9146cf5870411edc31ba5630d61c7cddff55b884fda88ac",
|
||||
"timestamp" : 1493912405,
|
||||
"label" : "TestFailure"
|
||||
}
|
||||
|
@ -153,18 +152,18 @@ bitcoin-cli importmulti '
|
|||
Result (scriptPubKey import failed because `internal` was not set to `true`):
|
||||
|
||||
{% highlight json %}
|
||||
[
|
||||
{
|
||||
"success": true
|
||||
},
|
||||
{
|
||||
"success": false,
|
||||
"error": {
|
||||
[
|
||||
{
|
||||
"success": true
|
||||
},
|
||||
{
|
||||
"success": false,
|
||||
"error": {
|
||||
"code": -8,
|
||||
"message": "Internal must be set for hex scriptPubKey"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
{% endhighlight %}
|
||||
|
||||
*See also*
|
||||
|
@ -173,6 +172,4 @@ Result (scriptPubKey import failed because `internal` was not set to `true`):
|
|||
* [ImportAddress][rpc importaddress]: {{summary_importAddress}}
|
||||
* [ImportWallet][rpc importwallet]: {{summary_importWallet}}
|
||||
|
||||
{% endcomment %}
|
||||
|
||||
{% endautocrossref %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue