Bitcoin
Bitcoin
Bitcoin
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
verifymessage checks that a base64 signature was produced by the private key behind a given Bitcoin address for a specific message. It lets someone prove control of an address — and therefore of the BTC sitting at it — without ever revealing the key or moving any coins. You pass the address, the signature, and the exact message, and the node recovers the signing key and confirms it matches the address. This is a stateless cryptographic check: no wallet is touched and nothing is written on chain. Call it with positional parameters against https://bitcoin.therpc.io/YOUR_API_KEY.
| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | address | string | 是 | Address the message was signed with. |
| 2 | signature | string | 是 | Base64 signature produced by signmessage. |
| 3 | message | string | 是 | The message that was signed. |
| 类型 | 描述 |
|---|---|
| boolean | true if the signature is valid for the address and message, false otherwise. |
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-5 | Invalid address | The address is malformed or not a valid Bitcoin address. |
-3 | Malformed base64 encoding | The signature is not valid base64. |
false return means the signature simply did not match the address and message — it is a valid outcome, not an error. A malformed address (code -5) or non-base64 signature (code -3) raises an error instead; handle those two cases separately from a plain false.