curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "1.0",
"method": "decodescript",
"params": [
"76a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac"
],
"id": 1
}'
{
"result": {},
"error": {},
"id": 123
}
curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "1.0",
"method": "decodescript",
"params": [
"76a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac"
],
"id": 1
}'
{
"result": {},
"error": {},
"id": 123
}
decodescript
method is used to decode a hex-encoded script, providing insights into its structure and purpose. This includes identifying the script type, associated addresses, and whether it is a segwit script.
scriptHex
(required): The hex-encoded script to decode.result
— an object containing detailed information about the decoded script, including its type, related addresses, and segwit status.error
— an object containing an error message if an error occurred, otherwise null
.id
— an integer representing the ID of the request.decodescript
method is invaluable for developers and analysts working with Bitcoin scripts, providing a way to inspect and understand the functionality of arbitrary scripts without executing them.Details about the decoded script.
The response is of type object
.
Was this page helpful?