比特幣(Bitcoin) RPC Rawtransactions API中decodescript的用法及代碼示例。
用法:
decodescript "hexstring"
解碼一個hex-encoded腳本。
參數1 - hexstring
類型:字符串,必填
hex-encoded腳本
返回結果
{
"asm":"asm", (string) Script public key
"hex":"hex", (string) hex-encoded public key
"type":"type", (string) The output type
"reqSigs": n, (numeric) The required signatures
"addresses": [ (json array of string)
"address" (string) bitcoin address
,...
],
"p2sh","address" (string) address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH).
}
示例
bitcoin-cli decodescript "hexstring"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "decodescript", "params": ["hexstring"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
相關用法
- Bitcoin analyzepsbt用法及代碼示例
- Bitcoin combinepsbt用法及代碼示例
- Bitcoin combinerawtransaction用法及代碼示例
- Bitcoin converttopsbt用法及代碼示例
- Bitcoin createpsbt用法及代碼示例
- Bitcoin createrawtransaction用法及代碼示例
- Bitcoin decodepsbt用法及代碼示例
- Bitcoin decoderawtransaction用法及代碼示例
- Bitcoin finalizepsbt用法及代碼示例
- Bitcoin fundrawtransaction用法及代碼示例
- Bitcoin getrawtransaction用法及代碼示例
- Bitcoin joinpsbts用法及代碼示例
- Bitcoin sendrawtransaction用法及代碼示例
- Bitcoin signrawtransactionwithkey用法及代碼示例
- Bitcoin testmempoolaccept用法及代碼示例
- Bitcoin utxoupdatepsbt用法及代碼示例
注:本文由純淨天空篩選整理自bitcoin.org大神的英文原創作品 Bitcoin decodescript。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。