mirror of
https://github.com/seigler/dash-docs
synced 2025-07-28 02:06:13 +00:00
Merge pull request #450 from harding/nevertouchprivkeys
Add Warning About Handling Private Keys To Transaction Examples
This commit is contained in:
commit
1db4eb4031
2 changed files with 13 additions and 0 deletions
|
@ -486,6 +486,13 @@ Use the `dumpprivkey` RPC to get the private keys corresponding to the
|
||||||
public keys used in the two UTXOs out inputs we will be spending. We need
|
public keys used in the two UTXOs out inputs we will be spending. We need
|
||||||
the private keys so we can sign each of the inputs separately.
|
the private keys so we can sign each of the inputs separately.
|
||||||
|
|
||||||
|
**Warning:** Users should never manually manage private keys on mainnet.
|
||||||
|
As dangerous as raw transactions are (see warnings above), making a
|
||||||
|
mistake with a private key can be much worse---as in the case of a HD
|
||||||
|
wallet [cross-generational key compromise][devguide hardened keys].
|
||||||
|
These examples are to help you learn, not for you to emulate on
|
||||||
|
mainnet.
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
> bitcoin-cli -regtest getnewaddress
|
> bitcoin-cli -regtest getnewaddress
|
||||||
n4puhBEeEWD2VvjdRC9kQuX2abKxSCMNqN
|
n4puhBEeEWD2VvjdRC9kQuX2abKxSCMNqN
|
||||||
|
@ -1171,6 +1178,10 @@ transaction, the same way we got private keys in the Complex Raw
|
||||||
Transaction subsection. Recall that we created a 2-of-3 multisig script,
|
Transaction subsection. Recall that we created a 2-of-3 multisig script,
|
||||||
so signatures from two private keys are needed.
|
so signatures from two private keys are needed.
|
||||||
|
|
||||||
|
**Reminder:** Users should never manually manage private keys on
|
||||||
|
mainnet. See the warning in the [complex raw transaction section][devex
|
||||||
|
complex raw transaction].
|
||||||
|
|
||||||
<div markdown="1" class="multicode">
|
<div markdown="1" class="multicode">
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
> bitcoin-cli -regtest signrawtransaction $RAW_TX '''
|
> bitcoin-cli -regtest signrawtransaction $RAW_TX '''
|
||||||
|
|
|
@ -177,9 +177,11 @@
|
||||||
[core paymentrequest.proto]: https://github.com/bitcoin/bitcoin/blob/master/src/qt/paymentrequest.proto
|
[core paymentrequest.proto]: https://github.com/bitcoin/bitcoin/blob/master/src/qt/paymentrequest.proto
|
||||||
[core script.h]: https://github.com/bitcoin/bitcoin/blob/master/src/script.h
|
[core script.h]: https://github.com/bitcoin/bitcoin/blob/master/src/script.h
|
||||||
[DER]: https://en.wikipedia.org/wiki/Abstract_Syntax_Notation_One
|
[DER]: https://en.wikipedia.org/wiki/Abstract_Syntax_Notation_One
|
||||||
|
[devex complex raw transaction]: /en/developer-examples#complex-raw-transaction
|
||||||
[devex payment protocol]: /en/developer-examples#payment-protocol
|
[devex payment protocol]: /en/developer-examples#payment-protocol
|
||||||
[devguide]: /en/developer-guide
|
[devguide]: /en/developer-guide
|
||||||
[devguide avoiding key reuse]: /en/developer-guide#avoiding-key-reuse
|
[devguide avoiding key reuse]: /en/developer-guide#avoiding-key-reuse
|
||||||
|
[devguide hardened keys]: /en/developer-guide#hardened-keys
|
||||||
[devguide payment processing]: /en/developer-guide#payment-processing
|
[devguide payment processing]: /en/developer-guide#payment-processing
|
||||||
[devguide wallets]: /en/developer-guide#wallets
|
[devguide wallets]: /en/developer-guide#wallets
|
||||||
[devref wallets]: /en/developer-reference#wallets
|
[devref wallets]: /en/developer-reference#wallets
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue