⚡ We welcome businesses to test our enterprise-grade service

zec
Zcash (ZEC)

Method: POST signrawtransaction

dropdown

方法 RPC signrawtransaction 例如 Zcash (ZEC)

POST signrawtransaction

用于原始交易的符号输入(序列化,编码)。

第二个可选参数(可能为null)是该交易取决于但尚未在块链中的先前交易输出的数组。

第三个可选参数(可能为null)是基本58编码的私钥的数组,如果给出,它将是用于签署事务的唯一密钥。

Parameters

hexstring - 细绳

交易十六进制字符串。

prevtxs - 细绳

选修的。

先前因交易输出的JSON数组。

privatekeys - 细绳

选修的

json的json阵列58编码的私钥用于签名。

sighashtype - 细绳

可选,默认=全部

签名哈希类型。 必须是之一

全部

没有任何

单身的

所有| Anyonecanpay

无| anyonecanpay

单| Anyonecanpay

branchid - 细绳

选修的

共识分支ID的十六进制表示。 这可以用来强制使用节点当前高度领先的共识规则签名。

Request

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


Response

{
    "error": null,
    "id": "getblock.io",
    "result": {
        "complete": true,
        "errors": null,
        "hex": "0400008085202f89010000000000000000000000000000000000000000000000000000000000000000ffffffff2003bb1e151b5c4c55584f525c000000000f4bcd54a8ae0234000000000000000000000000045246ea0e000000001976a91417b04a8ede7164eccb961f46289305ec04014b6388ac38c94d010000000017a914c1d33ded7edf633ca2592f2258d4c8c9ae28091587286bee000000000017a914d45cb1adffb5215a42720532a076f02c7c778c908740787d010000000017a914931fec54c1fea86e574462cc32013f5400b891298700000000e31e15000000000000000000000000"
    }
}