tx.receiptCheck
After execution: compare the transaction's actual effects with its receipt.
Details
- Endpoint
- GET /v1/tx/:digest/receipt-check
- Credits
- 2
- Rate class
- Light. Counts against your light requests per second.
Give the executed digest and the receipt id (`receipt`). tide reads the transaction from the chain and compares status, every balance change, objects created, deleted and transferred, events and gas with the receipt. Returns match, differs (each difference in one plain sentence, for the agent to report to its human), not_executed or other_transaction (the signed bytes were not the receipt's). POST the same path with the receipt object for receipts tide did not store.
Parameters
| Name | Type | Description |
|---|---|---|
| digestrequired | string | The executed transaction digest. |
| receiptrequired | string | Receipt id (or, with POST, the receipt object). |
Request
Send your key in the x-api-key header, or leave it out to use the keyless tier.
curl
curl "https://api.tide.ad/v1/tx/CRDtuCsNNkMdAZmrfRhPNuNjztCwmpWhcrn3EwBqJGn3/receipt-check?receipt=8e56072be767fadb73a18169d8dcfc3c" \
-H "x-api-key: YOUR_API_KEY"TypeScript
const res = await fetch("https://api.tide.ad/v1/tx/CRDtuCsNNkMdAZmrfRhPNuNjztCwmpWhcrn3EwBqJGn3/receipt-check?receipt=8e56072be767fadb73a18169d8dcfc3c", {
headers: {
"x-api-key": process.env.TIDE_API_KEY!,
},
});
const data = await res.json();Response
JSON
{
"result": "not_executed",
"digest": "CRDtuCsNNkMdAZmrfRhPNuNjztCwmpWhcrn3EwBqJGn3",
"receipt_id": "8e56072be767fadb73a18169d8dcfc3c",
"status": null,
"checkpoint": null,
"differences": [],
"summary": "Not on chain yet: Sui has no transaction with this digest. Check again after it is sent.",
"link": "https://tide.ad/proof/8e56072be767fadb73a18169d8dcfc3c",
"signature_valid": true
}