From ee9e14c784a482e60218d1e2174fd81a9df38b9a Mon Sep 17 00:00:00 2001 From: Michael Rotarius Date: Sat, 7 Jan 2017 12:51:08 +0100 Subject: [PATCH] Validateaddress update --- .../devdoc/bitcoin-core/rpcs/quick-ref.md | 2 +- .../bitcoin-core/rpcs/rpcs/validateaddress.md | 40 +++++++++++++------ 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/_includes/devdoc/bitcoin-core/rpcs/quick-ref.md b/_includes/devdoc/bitcoin-core/rpcs/quick-ref.md index 3bca59e6..8ddf0ccd 100644 --- a/_includes/devdoc/bitcoin-core/rpcs/quick-ref.md +++ b/_includes/devdoc/bitcoin-core/rpcs/quick-ref.md @@ -158,7 +158,7 @@ Use v0.n.n in abbreviation title to prevent autocrossrefing. * [CreateMultiSig][rpc createmultisig]: {{summary_createMultiSig}} * [EstimateFee][rpc estimatefee]: {{summary_estimateFee}} {{NEW0_10_0}} * [EstimatePriority][rpc estimatepriority]: {{summary_estimatePriority}} {{NEW0_10_0}}, {{DEPRECATED}} -* [ValidateAddress][rpc validateaddress]: {{summary_validateAddress}} +* [ValidateAddress][rpc validateaddress]: {{summary_validateAddress}} {{UPDATED0_13_0}} * [VerifyMessage][rpc verifymessage]: {{summary_verifyMessage}} {% endautocrossref %} diff --git a/_includes/devdoc/bitcoin-core/rpcs/rpcs/validateaddress.md b/_includes/devdoc/bitcoin-core/rpcs/rpcs/validateaddress.md index 461e5b67..e2c65e53 100644 --- a/_includes/devdoc/bitcoin-core/rpcs/rpcs/validateaddress.md +++ b/_includes/devdoc/bitcoin-core/rpcs/rpcs/validateaddress.md @@ -39,8 +39,13 @@ The `validateaddress` RPC {{summary_validateAddress}} - n: "→
`address`" t: "string (base58)" p: "Optional
(0 or 1)" - d: "If the address is valid, this is the address " + d: "The bitcoin address given as parameter" +- n: "→
`scriptPubKey`" + t: "string (hex)" + p: "Optional
(0 or 1)" + d: "The hex encoded scriptPubKey generated by the address" + - n: "→
`ismine`" t: "bool" p: "Optional
(0 or 1)" @@ -94,30 +99,41 @@ The `validateaddress` RPC {{summary_validateAddress}} - n: "→
`account`" t: "string" p: "Optional
(0 or 1)" - d: "The account this address belong to. May be an empty string for the default account. Only returned if the address belongs to the wallet" + d: "*Deprecated: will be removed in a later version of Bitcoin Core*

The account this address belong to. May be an empty string for the default account. Only returned if the address belongs to the wallet" +- n: "→
`hdkeypath`" + t: "string" + p: "Optional
(0 or 1)" + d: "*Added in Bitcoin Core 0.13.0*

The HD keypath if the key is HD and available" + +- n: "→
`hdmasterkeyid`" + t: "string (hash160)" + p: "Optional
(0 or 1)" + d: "*Added in Bitcoin Core 0.13.0*

The Hash160 of the HD master public key" + {% enditemplate %} -*Example from Bitcoin Core 0.10.0* +*Example from Bitcoin Core 0.13.1* Validate the following P2PKH address from the wallet: {% highlight bash %} -bitcoin-cli -testnet validateaddress mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe +bitcoin-cli validateaddress 17fshh33qUze2yifiJ2sXgijSMzJ2KNEwu {% endhighlight %} Result: {% highlight json %} { - "isvalid" : true, - "address" : "mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe", - "ismine" : true, - "iswatchonly" : false, - "isscript" : false, - "pubkey" : "03bacb84c6464a58b3e0a53cc0ba4cb3b82848cd7bed25a7724b3cc75d76c9c1ba", - "iscompressed" : true, - "account" : "test label" + "isvalid": true, + "address": "17fshh33qUze2yifiJ2sXgijSMzJ2KNEwu", + "scriptPubKey": "76a914492ae280d70af33acf0ae7cd329b961e65e9cbd888ac", + "ismine": true, + "iswatchonly": false, + "isscript": false, + "pubkey": "0312eeb9ae5f14c3cf43cece11134af860c2ef7d775060e3a578ceec888acada31", + "iscompressed": true, + "account": "Test" } {% endhighlight %}