Search by name, SuiNS, address, digest, object ID, coin type or checkpoint.

API
receipts.verify

receipts.verify

Check a receipt's signature and that its digest is the digest of its bytes.

Details

Endpoint
POST /v1/receipts/verify
Credits
1
Rate class
Light. Counts against your light requests per second.

Pass a receipt id, or the receipt object with its signature (as tx.receipt returned it). Checks the ed25519 signature against tide's published key (or `public_key`), recomputes the receipt id, and checks that the digest is the blake2b digest of the bytes in the receipt. You can do the same offline: see https://tide.ad/docs/receipts.

Parameters

NameTypeDescription
idstringReceipt id.
receiptobject or stringThe receipt (or the whole tx.receipt answer).
signatureobjectThe signature object.
public_keystringA public key (base64) to check against instead of tide's.

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/receipts/verify" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "id": "8e56072be767fadb73a18169d8dcfc3c"
}'
TypeScript
const res = await fetch("https://api.tide.ad/v1/receipts/verify", {
  method: "POST",
  headers: {
    "x-api-key": process.env.TIDE_API_KEY!,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "id": "8e56072be767fadb73a18169d8dcfc3c"
  }),
});
const data = await res.json();

Response

JSON
{
  "valid": true,
  "signature_valid": true,
  "signed_by_tide": true,
  "digest_matches_bytes": true,
  "id": "8e56072be767fadb73a18169d8dcfc3c",
  "text": "Signed by tide's attestation key, and the digest is the blake2b digest of the bytes in the receipt.",
  "digest": "CRDtuCsNNkMdAZmrfRhPNuNjztCwmpWhcrn3EwBqJGn3",
  "verdict": "pass",
  "url": "https://tide.ad/proof/8e56072be767fadb73a18169d8dcfc3c"
}