GetTransactionProof - Algorand

Get a proof for a transaction in a block.

Endpoint

httpGET /v2/blocks/{round}/transactions/{txid}/proof

Path Parameters

ParameterTypeRequiredDescription
roundintegerYesA round number.
txidstringYesThe transaction ID for which to generate a proof.

Query Parameters

ParameterTypeRequiredDescription
hashtypestringOptionalThe type of hash function used to create the proof, must be one of:
formatstringOptionalConfigures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON.

Example

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

curl "${ALGO_ALGOD}v2/blocks/REPLACE_ROUND/transactions/REPLACE_TXID/proof"

Response

Returns application/json. Top-level fields:

FieldTypeDescription
hashtypestringThe type of hash function used to create the proof, must be one of:
idxintegerIndex of the transaction in the block's payset.
proofstringProof of transaction membership.
stibhashstringHash of SignedTxnInBlock for verifying proof.
treedepthintegerRepresents the depth of the tree that is being proven, i.e. the number of edges from a leaf to the root.

Error Handling

ErrorMessageDescription
400Bad requestA parameter was missing or malformed
404Not foundThe requested resource does not exist
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect