Decode Raw Transaction Hex

Through this endpoint customers can decode a raw transaction hex and see the decoded transactions' details.

Single Result - This endpoint returns only one single result. POST /blockchain-tools/{blockchain}/{network}/decode-raw-transaction

Path Parameters

  • Required
    blockchain string

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

    Example : bitcoin
    Possible Values : bitcoin bitcoin-cash litecoin dogecoin dash ethereum ethereum-classic binance-smart-chain zcash
  • Required
    network string

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten" are test networks.

    Example : testnet
    Possible Values : mainnet testnet ropsten mordor

Query parameters

  • Optional
    context string

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.

    Example : yourExampleString

Request body schema application/json

  • Optional
    context string

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.

    Example : yourExampleString
  • Required
    data object
    • Required
      item object
      • Required
        rawTransactionHex string

        Represents the raw transaction Hex that has to be decoded.

        Example : 0100000001f3f6a909f8521adb57d898d2985834e632374e770fd9e2b98656f1bf1fdfd427010000006b48304502203a776322ebf8eb8b58cc6ced4f2574f4c73aa664edce0b0022690f2f6f47c521022100b82353305988cb0ebd443089a173ceec93fe4dbfe98d74419ecc84a6a698e31d012103c5c1bc61f60ce3d6223a63cedbece03b12ef9f0068f2f3c4a7e7f06c523c3664ffffffff0260e31600000000001976a914977ae6e32349b99b72196cb62b5ef37329ed81b488ac063d1000000000001976a914f76bc4190f3d8e2315e5c11c59cfc8be9df747e388ac00000000

Response schema

200 400 401 402 403 409 415 422 429 500
HTTP Status Code: 200
Content-Type: application/json

The resource has been successfully created.

  • Object :

  • Required
    apiVersion string

    Specifies the version of the API that incorporates this endpoint.

    Example : 2021-03-20
  • Required
    requestId string

    Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.

    Example : 601c1710034ed6d407996b30
  • Optional
    context string

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.

    Example : yourExampleString
  • Required
    data object
    • Required
      item object
      • Required
        blockchainSpeficicData object One Of
        object
        • Required
          locktime integer

          Represents the time at which a particular transaction can be added to the blockchain.

          Example : 1781965
        • Required
          transactionHash string

          Represents the same as transactionId for account-based protocols like Ethereum, while it could be different in UTXO-based protocols like Bitcoin. E.g., in UTXO-based protocols hash is different from transactionId for SegWit transactions.

          Example : 1ec73b0f61359927d02376b35993b756b1097cb9a857bec23da4c98c4977d2b2
        • Required
          vSize integer

          Represents the virtual size of this transaction.

          Example : 166
        • Required
          version integer

          Represents the transaction version number.

          Example : 1
        • Required
          vin array

          Represents the transaction inputs.

          • Optional
            address string

            Represents the address which send/receive the amount.

            Example : 2N5PcdirZUzKF9bWuGdugNuzcQrCbBudxv1
          • Optional
            inputHash string

            Represents the transaction inputs' indentifier.

            Example : 108c523cba933520905136262f6cdef87d68a1fa4ffb95b1a73f69a07ed2aed3
          • Optional
            outputIndex integer

            Represents the output of a transaction.

            Example : 3
          • Required
            scriptSig object

            Specifies the required signatures.

            • Optional
              asm string

              The asm strands for assembly, which is the symbolic representation of the Bitcoin's Script language op-codes.

              Example : 0014daaf6d5cb86befe42df851a4d1df052e663754c1
            • Optional
              hex string

              Represents the hex of the public key of the address.

              Example : 160014daaf6d5cb86befe42df851a4d1df052e663754c1
            • Optional
              type string

              Represents the script type of the reference transaction identifier.

              Example : scripthash
          • Optional
            sequence string

            Represents the script sequence number.

            Example : 4294967295
          • Optional
            txinwitness array

            Represents an array hex-encoded witness data (if there is any) as strings.

            Example : 3045022100c11ea5740bcd69f0f68a4914279838014d28923134d18e05c5a5486dfd06cc8c02200dadccec3f07bed0d1040f9e5a155efa5fdd40fc91f92342578d26848da4c6b901
        • Required
          vout array

          Represents the transaction outputs.

          • Required
            scriptPubKey object

            Script pub key of the transaction

            • Required
              address string

              Represents the address which send the amount.

              Example : 2MzakdGTEp8SMWEHKwKM4HYv6uNCBXtHpkV
            • Optional
              asm string

              Represents the assembly of the script public key of the address.

              Example : OP_HASH160 507a5bd8cac1d9efdf4c0a4bfacb3e0abb4f8d15 OP_EQUAL
            • Optional
              hex string

              Represents the hex of the script public key of the address.

              Example : a914507a5bd8cac1d9efdf4c0a4bfacb3e0abb4f8d1587
            • Optional
              type string

              Represents the script type.

              Example : scripthash
          • Optional
            value string

            Represents the sent/received amount.

            Example : 0.00014400
        • Optional
          weight integer

          Represents the size of Bitcoin block, measured in weight units and including the segwit discount.

          Example : 236
      • Required
        size integer

        Represents the total size of this transaction.

        Example : 248
      • Required
        transactionId string

        Represents the decoded transaction hex.

        Example : 00a8a090a7c78f64e4626e6720b305edd95fcd7865b5b45864a88070a8079cea

Credits Cost : 10 Credits For 1 Result(s)

Try it out

Request Example

POST
https://rest.cryptoapis.io/blockchain-tools/bitcoin/testnet/decode-raw-transaction?context=yourExampleString
Headers
Content-Type: application/json
X-API-Key: my-api-key

Request Body
{
    "context": "yourExampleString",
    "data": {
        "item": {
            "rawTransactionHex": "0100000001f3f6a909f8521adb57d898d2985834e632374e770fd9e2b98656f1bf1fdfd427010000006b48304502203a776322ebf8eb8b58cc6ced4f2574f4c73aa664edce0b0022690f2f6f47c521022100b82353305988cb0ebd443089a173ceec93fe4dbfe98d74419ecc84a6a698e31d012103c5c1bc61f60ce3d6223a63cedbece03b12ef9f0068f2f3c4a7e7f06c523c3664ffffffff0260e31600000000001976a914977ae6e32349b99b72196cb62b5ef37329ed81b488ac063d1000000000001976a914f76bc4190f3d8e2315e5c11c59cfc8be9df747e388ac00000000"
        }
    }
}

Response Example

{
    "apiVersion": "2021-03-20",
    "requestId": "601c1710034ed6d407996b30",
    "context": "yourExampleString",
    "data": {
        "item": {
            "blockchainSpeficicData": {
                "locktime": 1781965,
                "transactionHash": "1ec73b0f61359927d02376b35993b756b1097cb9a857bec23da4c98c4977d2b2",
                "vSize": 166,
                "version": 1,
                "vin": [
                    {
                        "address": "2N5PcdirZUzKF9bWuGdugNuzcQrCbBudxv1",
                        "inputHash": "108c523cba933520905136262f6cdef87d68a1fa4ffb95b1a73f69a07ed2aed3",
                        "outputIndex": 3,
                        "scriptSig": {
                            "asm": "0014daaf6d5cb86befe42df851a4d1df052e663754c1",
                            "hex": "160014daaf6d5cb86befe42df851a4d1df052e663754c1",
                            "type": "scripthash"
                        },
                        "sequence": "4294967295",
                        "txinwitness": [
                            "3045022100c11ea5740bcd69f0f68a4914279838014d28923134d18e05c5a5486dfd06cc8c02200dadccec3f07bed0d1040f9e5a155efa5fdd40fc91f92342578d26848da4c6b901"
                        ]
                    }
                ],
                "vout": [
                    {
                        "scriptPubKey": {
                            "address": "2MzakdGTEp8SMWEHKwKM4HYv6uNCBXtHpkV",
                            "asm": "OP_HASH160 507a5bd8cac1d9efdf4c0a4bfacb3e0abb4f8d15 OP_EQUAL",
                            "hex": "a914507a5bd8cac1d9efdf4c0a4bfacb3e0abb4f8d1587",
                            "type": "scripthash"
                        },
                        "value": "0.00014400"
                    }
                ],
                "weight": 236
            },
            "size": 248,
            "transactionId": "00a8a090a7c78f64e4626e6720b305edd95fcd7865b5b45864a88070a8079cea"
        }
    }
}