tx.receiptCheckPost
After execution: compare actual effects with a receipt you send in the body.
Details
- Endpoint
- POST /v1/tx/:digest/receipt-check
- Credits
- 2
- Rate class
- Light. Counts against your light requests per second.
Same as GET /v1/tx/{digest}/receipt-check, with the receipt object (and signature) in the body.
Parameters
| Name | Type | Description |
|---|---|---|
| digestrequired | string | The executed digest. |
| receiptrequired | object or string | The receipt object, or the whole tx.receipt answer. |
| signature | object | Its signature. |
Request
Send your key in the x-api-key header, or leave it out to use the keyless tier.
curl
curl -X POST "https://api.tide.ad/v1/tx/CRDtuCsNNkMdAZmrfRhPNuNjztCwmpWhcrn3EwBqJGn3/receipt-check" \
-H "x-api-key: YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{
"receipt": "8e56072be767fadb73a18169d8dcfc3c"
}'TypeScript
const res = await fetch("https://api.tide.ad/v1/tx/CRDtuCsNNkMdAZmrfRhPNuNjztCwmpWhcrn3EwBqJGn3/receipt-check", {
method: "POST",
headers: {
"x-api-key": process.env.TIDE_API_KEY!,
"content-type": "application/json",
},
body: JSON.stringify({
"receipt": "8e56072be767fadb73a18169d8dcfc3c"
}),
});
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
}