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
|
##### ImportElectrumWallet
|
||||||
{% include helpers/subhead-links.md %}
|
{% include helpers/subhead-links.md %}
|
||||||
|
|
||||||
{% assign summary_importElectrumWallet="" %}
|
{% assign summary_importElectrumWallet="imports keys from an Electrum wallet export file (.csv or .json)" %}
|
||||||
|
<!-- __ -->
|
||||||
|
|
||||||
{% autocrossref %}
|
{% autocrossref %}
|
||||||
|
|
||||||
The `importelectrumwallet` RPC {{summary_importElectrumWallet}}
|
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*
|
*Example from Dash Core 0.12.2*
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
dash-cli -testnet importelectrumwallet
|
dash-cli importelectrumwallet /tmp/electrum-export.csv
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
Result:
|
(Success: no result displayed.)
|
||||||
{% highlight json %}
|
|
||||||
*INSERT RESULTS HERE*
|
|
||||||
{% endhighlight %}
|
|
||||||
|
|
||||||
*See also:*
|
*See also: none*
|
||||||
|
|
||||||
{% endautocrossref %}
|
{% endautocrossref %}
|
||||||
|
|
|
@ -43,7 +43,7 @@ The `importprivkey` RPC {{summary_importPrivKey}}
|
||||||
- n: "Rescan"
|
- n: "Rescan"
|
||||||
t: "bool"
|
t: "bool"
|
||||||
p: "Optional<br>(0 or 1)"
|
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 %}
|
{% enditemplate %}
|
||||||
|
|
||||||
|
@ -76,6 +76,7 @@ dash-cli -testnet importprivkey \
|
||||||
|
|
||||||
* [DumpPrivKey][rpc dumpprivkey]: {{summary_dumpPrivKey}}
|
* [DumpPrivKey][rpc dumpprivkey]: {{summary_dumpPrivKey}}
|
||||||
* [ImportAddress][rpc importaddress]: {{summary_importAddress}}
|
* [ImportAddress][rpc importaddress]: {{summary_importAddress}}
|
||||||
|
* [ImportPrivKey][rpc importpubkey]: {{summary_importPubKey}}
|
||||||
* [ImportWallet][rpc importwallet]: {{summary_importWallet}}
|
* [ImportWallet][rpc importwallet]: {{summary_importWallet}}
|
||||||
|
|
||||||
{% endautocrossref %}
|
{% endautocrossref %}
|
||||||
|
|
|
@ -7,27 +7,73 @@ http://opensource.org/licenses/MIT.
|
||||||
##### ImportPubKey
|
##### ImportPubKey
|
||||||
{% include helpers/subhead-links.md %}
|
{% 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 %}
|
{% autocrossref %}
|
||||||
|
|
||||||
The `importpubkey` RPC {{summary_importPubKey}}
|
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*
|
*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 %}
|
{% highlight bash %}
|
||||||
dash-cli -testnet importpubkey
|
dash-cli -testnet importpubkey \
|
||||||
|
0210c1349657c1253d3d64d1b31d3500b09335bf12b8df061666e216f550a43249 \
|
||||||
|
"test label" \
|
||||||
|
true
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
Result:
|
(Success: no result displayed.)
|
||||||
{% highlight json %}
|
|
||||||
*INSERT RESULTS HERE*
|
|
||||||
{% endhighlight %}
|
|
||||||
|
|
||||||
*See also:*
|
*See also:*
|
||||||
|
|
||||||
|
* [ImportAddress][rpc importaddress]: {{summary_importAddress}}
|
||||||
|
* [ImportPrivKey][rpc importprivkey]: {{summary_importPrivKey}}
|
||||||
|
* [ImportWallet][rpc importwallet]: {{summary_importWallet}}
|
||||||
|
|
||||||
{% endautocrossref %}
|
{% endautocrossref %}
|
||||||
|
|
|
@ -13,6 +13,7 @@ This file is licensed under the terms of its source texts{%endcomment%}
|
||||||
{% assign summary_decodeRawTransaction="decodes a serialized transaction hex string into a JSON object describing the transaction." %}
|
{% assign summary_decodeRawTransaction="decodes a serialized transaction hex string into a JSON object describing the transaction." %}
|
||||||
{% assign summary_decodeScript="decodes a hex-encoded P2SH redeem script." %}
|
{% assign summary_decodeScript="decodes a hex-encoded P2SH redeem script." %}
|
||||||
{% assign summary_disconnectNode="immediately disconnects from a specified node." %}
|
{% assign summary_disconnectNode="immediately disconnects from a specified node." %}
|
||||||
|
{% assign summary_dumpHDInfo="" %}
|
||||||
{% assign summary_dumpPrivKey="returns the wallet-import-format (WIP) private key corresponding to an address. (But does not remove it from the wallet.)" %}
|
{% assign summary_dumpPrivKey="returns the wallet-import-format (WIP) private key corresponding to an address. (But does not remove it from the wallet.)" %}
|
||||||
{% assign summary_dumpWallet="creates or overwrites a file with all wallet keys in a human-readable format." %}
|
{% assign summary_dumpWallet="creates or overwrites a file with all wallet keys in a human-readable format." %}
|
||||||
{% assign summary_encryptWallet="encrypts the wallet with a passphrase. This is only to enable encryption for the first time. After encryption is enabled, you will need to enter the passphrase to use private keys." %}
|
{% assign summary_encryptWallet="encrypts the wallet with a passphrase. This is only to enable encryption for the first time. After encryption is enabled, you will need to enter the passphrase to use private keys." %}
|
||||||
|
@ -49,7 +50,7 @@ This file is licensed under the terms of its source texts{%endcomment%}
|
||||||
{% assign summary_getDifficulty="returns the proof-of-work difficulty as a multiple of the minimum difficulty." %}
|
{% assign summary_getDifficulty="returns the proof-of-work difficulty as a multiple of the minimum difficulty." %}
|
||||||
{% assign summary_getGenerate="returns if the server is set to generate coins or not." %}
|
{% assign summary_getGenerate="returns if the server is set to generate coins or not." %}
|
||||||
{% assign summary_getGovernanceInfo="returns an object containing governance parameters." %}
|
{% assign summary_getGovernanceInfo="returns an object containing governance parameters." %}
|
||||||
{% assign summary_getHashesPerSec="was removed in Bitcoin Core 0.11.0." %}
|
{% assign summary_getHashesPerSec="was removed in Bitcoin Core 0.11.0 and is not part of Dash." %}
|
||||||
{% assign summary_getInfo="prints various information about the node and the network." %}
|
{% assign summary_getInfo="prints various information about the node and the network." %}
|
||||||
{% assign summary_getMemPoolAncestors="returns all in-mempool ancestors for a transaction in the mempool." %}
|
{% assign summary_getMemPoolAncestors="returns all in-mempool ancestors for a transaction in the mempool." %}
|
||||||
{% assign summary_getMemPoolDescendants="returns all in-mempool descendants for a transaction in the mempool." %}
|
{% assign summary_getMemPoolDescendants="returns all in-mempool descendants for a transaction in the mempool." %}
|
||||||
|
@ -76,13 +77,17 @@ This file is licensed under the terms of its source texts{%endcomment%}
|
||||||
{% assign summary_getTxOutSetInfo="returns statistics about the confirmed unspent transaction output (UTXO) set. Note that this call may take some time and that it only counts outputs from confirmed transactions---it does not count outputs from the memory pool." %}
|
{% assign summary_getTxOutSetInfo="returns statistics about the confirmed unspent transaction output (UTXO) set. Note that this call may take some time and that it only counts outputs from confirmed transactions---it does not count outputs from the memory pool." %}
|
||||||
{% assign summary_getUnconfirmedBalance="returns the wallet's total unconfirmed balance." %}
|
{% assign summary_getUnconfirmedBalance="returns the wallet's total unconfirmed balance." %}
|
||||||
{% assign summary_getWalletInfo="provides information about the wallet." %}
|
{% assign summary_getWalletInfo="provides information about the wallet." %}
|
||||||
{% assign summary_getWork="was removed in Bitcoin Core 0.10.0." %}
|
{% assign summary_getWork="was removed in Bitcoin Core 0.10.0. and is not part of Dash" %}
|
||||||
{% assign summary_help="lists all available public RPC commands, or gets help for the specified RPC. Commands which are unavailable will not be listed, such as wallet RPCs if wallet support is disabled." %}
|
{% assign summary_help="lists all available public RPC commands, or gets help for the specified RPC. Commands which are unavailable will not be listed, such as wallet RPCs if wallet support is disabled." %}
|
||||||
{% 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." %}
|
{% 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." %}
|
||||||
|
{% assign summary_importElectrumWallet="imports keys from an Electrum wallet export file (.csv or .json)" %}
|
||||||
{% 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." %}
|
{% 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." %}
|
||||||
{% assign summary_importPrivKey="adds a private key to your wallet. The key should be formatted in the wallet import format created by the `dumpprivkey` RPC." %}
|
{% assign summary_importPrivKey="adds a private key to your wallet. The key should be formatted in the wallet import format created by the `dumpprivkey` RPC." %}
|
||||||
{% assign summary_importPrunedFunds="imports funds without the need of a rescan. Meant for use with pruned wallets." %}
|
{% assign summary_importPrunedFunds="imports funds without the need of a rescan. Meant for use with pruned wallets." %}
|
||||||
|
{% 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" %}
|
||||||
{% 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." %}
|
{% 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." %}
|
||||||
|
{% assign summary_instantSendToAddress="" %}
|
||||||
|
{% assign summary_keepass="" %}
|
||||||
{% assign summary_keyPoolRefill="fills the cache of unused pre-generated keys (the keypool)." %}
|
{% assign summary_keyPoolRefill="fills the cache of unused pre-generated keys (the keypool)." %}
|
||||||
{% assign summary_listAccounts="lists accounts and their balances." %}
|
{% assign summary_listAccounts="lists accounts and their balances." %}
|
||||||
{% 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_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." %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue