⚡ We welcome businesses to test our enterprise-grade service

btg
Bitcoin Gold (BTG)

Method: POST importaddress

dropdown

方法 RPC importaddress 例如 Bitcoin Gold (BTG)

POST importaddress

Method not allowed

添加一个地址或脚本(在十六进制中),可以看好像它在您的钱包中,但不能用于花费。 需要一个新的钱包备份。

请注意,如果Rescan为真,则此通话可能需要一个多小时才能完成,在此期间,其他RPC呼叫可能会报告存在导入的地址,但仍缺少相关的交易,导致暂时不正确/虚假余额和无限额的输出,直到Rackan完成。

如果您有完整的公钥,则应致电ImportPubkey而不是此。

提示使用ImportMulti导入多个地址。

请注意,如果您以十六进制形式导入非标准的原始脚本,则将发送给它的输出将被视为更改,并且不会在许多RPC中显示。

注意使用“ getwalletinfo”查询扫描进度。

Parameters

address - 字符串,需要

比特币地址(或十六进制编码的脚本)

label - 字符串,可选,默认=””

可选标签

rescan - 布尔值,可选,默认值= true

解放交易钱包

p2sh - 布尔值,可选,默认值= false

还添加脚本的P2SH版本

Request

curl --location --request POST 'https://btg.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "importaddress",
"params": [null, null, null, null],
"id": "getblock.io"}'


Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}