mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
Wallet RPCs (new)
- Add details for ImportPubKey and ImportElectrumWallet
This commit is contained in:
parent
663d383b41
commit
a71277cdee
4 changed files with 96 additions and 20 deletions
|
@ -7,27 +7,51 @@ http://opensource.org/licenses/MIT.
|
|||
##### ImportElectrumWallet
|
||||
{% include helpers/subhead-links.md %}
|
||||
|
||||
{% assign summary_importElectrumWallet="" %}
|
||||
{% assign summary_importElectrumWallet="imports keys from an Electrum wallet export file (.csv or .json)" %}
|
||||
<!-- __ -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
The `importelectrumwallet` RPC {{summary_importElectrumWallet}}
|
||||
|
||||
*Parameter #1---PARAMETER DESCRIPTION*
|
||||
*Parameter #1---file name*
|
||||
|
||||
*Result---RESULT DESCRIPTION*
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "File Name"
|
||||
t: "string"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The Electrum wallet export file (should be in csv or json format)"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Parameter #2---index*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Index"
|
||||
t: "number (int)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "Rescan the wallet for transactions starting from this block index (default: 0)"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Result---`null` on success*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "`result`"
|
||||
t: "null"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "If the Electrum keys are imported successfully, JSON `null` will be returned"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
{% highlight bash %}
|
||||
dash-cli -testnet importelectrumwallet
|
||||
dash-cli importelectrumwallet /tmp/electrum-export.csv
|
||||
{% endhighlight %}
|
||||
|
||||
Result:
|
||||
{% highlight json %}
|
||||
*INSERT RESULTS HERE*
|
||||
{% endhighlight %}
|
||||
(Success: no result displayed.)
|
||||
|
||||
*See also:*
|
||||
*See also: none*
|
||||
|
||||
{% endautocrossref %}
|
||||
|
|
|
@ -43,7 +43,7 @@ The `importprivkey` RPC {{summary_importPrivKey}}
|
|||
- 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 for this private key). 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. Notes: if the address for this key is already in the wallet, the block database will not be rescanned even if this parameter is set"
|
||||
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 for this private key). 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. Notes: if the address for this key is already in the wallet, the block database will not be rescanned even if this parameter is set"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
|
@ -76,6 +76,7 @@ dash-cli -testnet importprivkey \
|
|||
|
||||
* [DumpPrivKey][rpc dumpprivkey]: {{summary_dumpPrivKey}}
|
||||
* [ImportAddress][rpc importaddress]: {{summary_importAddress}}
|
||||
* [ImportPrivKey][rpc importpubkey]: {{summary_importPubKey}}
|
||||
* [ImportWallet][rpc importwallet]: {{summary_importWallet}}
|
||||
|
||||
{% endautocrossref %}
|
||||
|
|
|
@ -7,27 +7,73 @@ http://opensource.org/licenses/MIT.
|
|||
##### ImportPubKey
|
||||
{% include helpers/subhead-links.md %}
|
||||
|
||||
{% assign summary_importPubKey="" %}
|
||||
{% assign summary_importPubKey="imports a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend" %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
The `importpubkey` RPC {{summary_importPubKey}}
|
||||
|
||||
*Parameter #1---PARAMETER DESCRIPTION*
|
||||
*Parameter #1---the public key to import*
|
||||
|
||||
*Result---RESULT DESCRIPTION*
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Private Key"
|
||||
t: "string (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The public key to import"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Parameter #2---the account into which the key should be placed*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Label"
|
||||
t: "string"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "The label the key should be assigned"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Parameter #3---whether to rescan the block chain*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- 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. 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. Notes: if the address for this key is already in the wallet, the block database will not be rescanned even if this parameter is set"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Result---`null` on success*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "`result`"
|
||||
t: "null"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "If the public key is added to the wallet (or is already part of the wallet), JSON `null` will be returned"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
|
||||
Import the public key for the address, giving it a label and scanning the
|
||||
entire block chain:
|
||||
|
||||
{% highlight bash %}
|
||||
dash-cli -testnet importpubkey
|
||||
dash-cli -testnet importpubkey \
|
||||
0210c1349657c1253d3d64d1b31d3500b09335bf12b8df061666e216f550a43249 \
|
||||
"test label" \
|
||||
true
|
||||
{% endhighlight %}
|
||||
|
||||
Result:
|
||||
{% highlight json %}
|
||||
*INSERT RESULTS HERE*
|
||||
{% endhighlight %}
|
||||
(Success: no result displayed.)
|
||||
|
||||
*See also:*
|
||||
|
||||
* [ImportAddress][rpc importaddress]: {{summary_importAddress}}
|
||||
* [ImportPrivKey][rpc importprivkey]: {{summary_importPrivKey}}
|
||||
* [ImportWallet][rpc importwallet]: {{summary_importWallet}}
|
||||
|
||||
{% endautocrossref %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue