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
|
||||
{% include helpers/subhead-links.md %}
|
||||
|
||||
<!-- __ -->
|
||||
{% assign summary_signMessage="signs a message with the private key of an address." %}
|
||||
|
||||
{% autocrossref %}
|
||||
|
@ -42,27 +42,26 @@ The `signmessage` RPC {{summary_signMessage}}
|
|||
- n: "`result`"
|
||||
t: "string (base64)"
|
||||
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 %}
|
||||
|
||||
*Example from Bitcoin Core 0.13.1*
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
Sign a the message "Hello, World!" using the following address:
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli signmessage 17fshh33qUze2yifiJ2sXgijSMzJ2KNEwu "Hello, World!"
|
||||
dash-cli -testnet signmessage yNpezfFDfoikDuT1f4iK75AiLp2YLPsGAb "Hello, World!"
|
||||
{% endhighlight %}
|
||||
|
||||
Result:
|
||||
|
||||
{% highlight text %}
|
||||
ILypRih424AWRYXK1goB6mskx99aelWcVCTEKolaW7U4VPnwj6Khf+vJSED7pMtPQd3KnXuqq1JvavrQdPMFFB0=
|
||||
H4XULzfHCf16In2ECk9Ta9QxQPq639zQto2JA3OLlo3JbUdrClvJ89+A1z+Z9POd6l8LJhn1jGpQYF8mX4jkQvE=
|
||||
{% endhighlight %}
|
||||
|
||||
*See also*
|
||||
|
||||
* [SignMessageWithPrivKey][rpc signmessagewithprivkey]: {{summary_signMessageWithPrivKey}}
|
||||
* [VerifyMessage][rpc verifymessage]: {{summary_verifyMessage}}
|
||||
|
||||
{% endautocrossref %}
|
|
@ -6,7 +6,7 @@ http://opensource.org/licenses/MIT.
|
|||
|
||||
##### VerifyMessage
|
||||
{% include helpers/subhead-links.md %}
|
||||
|
||||
<!-- __ -->
|
||||
{% assign summary_verifyMessage="verifies a signed message." %}
|
||||
|
||||
{% autocrossref %}
|
||||
|
@ -53,15 +53,15 @@ The `verifymessage` RPC {{summary_verifyMessage}}
|
|||
|
||||
{% 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
|
||||
`signmessage`:
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet verifymessage \
|
||||
mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe \
|
||||
IL98ziCmwYi5pL+dqKp4Ux+zCa4hP/xbjHmWh+Mk/lefV/0pWV1p/gQ94jgExSmgH2/+PDcCCrOHAady2IEySSI= \
|
||||
dash-cli -testnet verifymessage \
|
||||
yNpezfFDfoikDuT1f4iK75AiLp2YLPsGAb \
|
||||
H4XULzfHCf16In2ECk9Ta9QxQPq639zQto2JA3OLlo3JbUdrClvJ89+A1z+Z9POd6l8LJhn1jGpQYF8mX4jkQvE= \
|
||||
'Hello, World!'
|
||||
{% endhighlight %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue