mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
P2P reference - Update verifymessage/signmessage RPCs
This commit is contained in:
parent
9b76d62b0c
commit
02e2d7a602
2 changed files with 11 additions and 12 deletions
|
@ -6,7 +6,7 @@ http://opensource.org/licenses/MIT.
|
||||||
|
|
||||||
##### SignMessage
|
##### SignMessage
|
||||||
{% include helpers/subhead-links.md %}
|
{% include helpers/subhead-links.md %}
|
||||||
|
<!-- __ -->
|
||||||
{% assign summary_signMessage="signs a message with the private key of an address." %}
|
{% assign summary_signMessage="signs a message with the private key of an address." %}
|
||||||
|
|
||||||
{% autocrossref %}
|
{% autocrossref %}
|
||||||
|
@ -42,27 +42,26 @@ The `signmessage` RPC {{summary_signMessage}}
|
||||||
- n: "`result`"
|
- n: "`result`"
|
||||||
t: "string (base64)"
|
t: "string (base64)"
|
||||||
p: "Required<br>(exactly 1)"
|
p: "Required<br>(exactly 1)"
|
||||||
d: "The signature of the message, encoded in base64. Note that Bitcoin Core before 0.10.0 creates signatures with random *k* values, so each time you sign the same message, it will create a different signature"
|
d: "The signature of the message, encoded in base64."
|
||||||
|
|
||||||
{% enditemplate %}
|
{% enditemplate %}
|
||||||
|
|
||||||
*Example from Bitcoin Core 0.13.1*
|
*Example from Dash Core 0.12.2*
|
||||||
|
|
||||||
Sign a the message "Hello, World!" using the following address:
|
Sign a the message "Hello, World!" using the following address:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
bitcoin-cli signmessage 17fshh33qUze2yifiJ2sXgijSMzJ2KNEwu "Hello, World!"
|
dash-cli -testnet signmessage yNpezfFDfoikDuT1f4iK75AiLp2YLPsGAb "Hello, World!"
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
Result:
|
Result:
|
||||||
|
|
||||||
{% highlight text %}
|
{% highlight text %}
|
||||||
ILypRih424AWRYXK1goB6mskx99aelWcVCTEKolaW7U4VPnwj6Khf+vJSED7pMtPQd3KnXuqq1JvavrQdPMFFB0=
|
H4XULzfHCf16In2ECk9Ta9QxQPq639zQto2JA3OLlo3JbUdrClvJ89+A1z+Z9POd6l8LJhn1jGpQYF8mX4jkQvE=
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
*See also*
|
*See also*
|
||||||
|
|
||||||
* [SignMessageWithPrivKey][rpc signmessagewithprivkey]: {{summary_signMessageWithPrivKey}}
|
|
||||||
* [VerifyMessage][rpc verifymessage]: {{summary_verifyMessage}}
|
* [VerifyMessage][rpc verifymessage]: {{summary_verifyMessage}}
|
||||||
|
|
||||||
{% endautocrossref %}
|
{% endautocrossref %}
|
||||||
|
|
|
@ -6,7 +6,7 @@ http://opensource.org/licenses/MIT.
|
||||||
|
|
||||||
##### VerifyMessage
|
##### VerifyMessage
|
||||||
{% include helpers/subhead-links.md %}
|
{% include helpers/subhead-links.md %}
|
||||||
|
<!-- __ -->
|
||||||
{% assign summary_verifyMessage="verifies a signed message." %}
|
{% assign summary_verifyMessage="verifies a signed message." %}
|
||||||
|
|
||||||
{% autocrossref %}
|
{% autocrossref %}
|
||||||
|
@ -53,15 +53,15 @@ The `verifymessage` RPC {{summary_verifyMessage}}
|
||||||
|
|
||||||
{% enditemplate %}
|
{% enditemplate %}
|
||||||
|
|
||||||
*Example from Bitcoin Core 0.10.0*
|
*Example from Dash Core 0.12.2*
|
||||||
|
|
||||||
Check the signature on the message created in the example for
|
Check the signature on the message created in the example for
|
||||||
`signmessage`:
|
`signmessage`:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
bitcoin-cli -testnet verifymessage \
|
dash-cli -testnet verifymessage \
|
||||||
mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe \
|
yNpezfFDfoikDuT1f4iK75AiLp2YLPsGAb \
|
||||||
IL98ziCmwYi5pL+dqKp4Ux+zCa4hP/xbjHmWh+Mk/lefV/0pWV1p/gQ94jgExSmgH2/+PDcCCrOHAady2IEySSI= \
|
H4XULzfHCf16In2ECk9Ta9QxQPq639zQto2JA3OLlo3JbUdrClvJ89+A1z+Z9POd6l8LJhn1jGpQYF8mX4jkQvE= \
|
||||||
'Hello, World!'
|
'Hello, World!'
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue