⚡ We welcome businesses to test our enterprise-grade service

dgb
DigiByte (DGB)

Method: POST getnewaddress

dropdown

方法 RPC getnewaddress 例如 DigiByte (DGB)

POST getnewaddress

Method not allowed

返回一个新的比特币地址用于接收付款。

如果指定了“标签”,则将其添加到通讯录中,因此收到的地址付款将与“标签”相关联。

Parameters

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

要链接到的地址的标签名称。 它也可以设置为空字符串“”以表示默认标签。 该标签不需要存在,如果给定名称没有标签,它将创建它。

address_type - 字符串,可选,默认值=由-addressType设置

要使用的地址类型。 选项是“遗产”,“ p2sh-segwit”和“ bech32”。

Request

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


Response

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