📝 Share Your Feedback on Twitter and Claim 1M Free GetBlock Requests

btc
Bitcoin (BTC)

Method: POST signrawtransactionwithwallet

dropdown

方法 RPC signrawtransactionwithwallet 例如 Bitcoin (BTC)

POST signrawtransactionwithwallet

方法不允许

原始交易的签名输入(序列化、十六进制编码)。

第二个可选参数(可能为空)是该交易依赖但可能尚未在区块链中的先前交易输出的数组。

如果钱包已加密,则需要使用 walletpassphrase 调用设置钱包密码。

Parameters

hexstring - 字符串,必填

交易十六进制字符串

prevtxs - json 数组,可选

之前的依赖交易输出

sighashtype - 字符串,可选,默认=ALL

“所有” “无” “单一” “所有|任何人可以支付” “无|任何人可以支付” “单一|任何人可以支付”

Request

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


Response

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