POST
https://nd-202-842-353.p2pify.com
/
788f110831fe13808302bd79796d55e8
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
}

The 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.

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • scriptHex (required): The hex-encoded script to decode.

Response

  • 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.

Use case

The 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.

Body

application/json

Response

200 - application/json

Details about the decoded script.

The response is of type object.