⚡ We welcome businesses to test our enterprise-grade service

grs
Groestlcoin (GRS)

Method: POST signrawtransactionwithkey

dropdown

方法 RPC signrawtransactionwithkey 例如 Groestlcoin (GRS)

POST signrawtransactionwithkey

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

第二个参数是基本58编码的私钥数组,它将是签署事务的唯一密钥。

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

Parameters

hexstring - 字符串,需要

交易十六进制字符串

privkeys - json阵列,必需

base58编码的私钥用于签名

prevtxs - Json Array,可选

先前的因交易输出

sighashtype - 字符串,可选,默认=全部

签名哈希类型。 必须是:

全部

没有任何

单身的

所有| Anyonecanpay

无| anyonecanpay

单| Anyonecanpay

Request

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


Response

{
    "error": null,
    "id": "getblock.io",
    "result": null
}