EXPERIMENTAL_receipt - NEAR Protocol

Fetches a single receipt by its id, returning its predecessor, receiver, and action or data payload.

Method

EXPERIMENTAL_receipt

Parameters

The params object carries:

ParameterExampleDescription
receipt_id"2jZ...receipthash"—

Example

bashexport NEAR_RPC=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

curl -X POST "${NEAR_RPC}" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": "getblock.io", "method": "EXPERIMENTAL_receipt", "params": {"receipt_id": "2jZ...receipthash"}}'

Response

json{
    "predecessor_id": "example.near",
    "receiver_id": "token.near",
    "receipt_id": "2jZ...",
    "receipt": {
        "Action": {
            "signer_id": "example.near",
            "actions": [
                {
                    "FunctionCall": {
                        "method_name": "ft_transfer"
                    }
                }
            ]
        }
    }
}

Response Fields

FieldTypeDescription
predecessor_idstringThe account that produced the receipt
receiver_idstringThe account the receipt is applied to
receiptobjectThe receipt's action or data payload

Use Cases

  • Receipt inspection: Resolve a specific receipt referenced in a transaction outcome

Error Handling

ErrorMessageDescription
-32700 / Parse errorParse errorThe JSON request was malformed
-32601 / Method not foundMethod not foundThe method is unknown or disabled on this node version
HANDLER_ERRORRequested data not foundThe account, block, chunk, or transaction does not exist or is garbage-collected (use an archival node)
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect