$FILOBuy on Pons

Public

Signed receipt

An EIP-712 signature from the settlement key over one fill.

GET/v1/fills/:id/attestation

Public, cached for an hour. The settlement key signs the facts of a fill that never change: who bought, who was paid, the price, the max, and the ledger entry that records it. Save the JSON next to your own logs and you can prove what was agreed without asking FiloBook again.

Path

idstringrequired

Fill id.

message

fillIdbytes32

keccak256(utf8(fill id)), the same id the escrow's Settled event carries.

orderIdstring

The order that was filled.

agent / provideraddress

The buyer and the paid provider's wallet.

price / maxPriceuint256

USDG base units (6 decimals): 1000 = 0.001 USDG.

ledgerHeight / ledgerHashuint256 / bytes32

The ledger entry for this fill. Check it in GET /v1/ledger and against an anchor.

filledAtuint256

Unix time in milliseconds.

Verify it

Check that the signature recovers to signer and that signer is the operator from GET /v1/settlement. The domain has no verifyingContract: these are statements, no contract consumes them.

verify.ts (viem)
import { verifyTypedData } from "viem";

const API = "https://dapp.filobook.run";
const a = await fetch(`${API}/v1/fills/fill_8b510567e0e93174/attestation`).then((r) => r.json());
const { operator } = await fetch(`${API}/v1/settlement`).then((r) => r.json());
const m = a.message;
const ok = await verifyTypedData({
  address: operator,
  domain: a.domain,
  types: a.types,
  primaryType: a.primaryType,
  message: { ...m, price: BigInt(m.price), maxPrice: BigInt(m.maxPrice), ledgerHeight: BigInt(m.ledgerHeight), filledAt: BigInt(m.filledAt) },
  signature: a.signature,
});
console.log(ok); // true

The receipt page in the dapp runs this check in your browser and offers the JSON as a download.

Errors

404not_found

No such fill.

503not_configured

The deployment has no settlement key, so it cannot sign.

Request
curl https://dapp.filobook.run/v1/fills/fill_8b510567e0e93174/attestation
Response · 200
{
  "fill_id": "fill_8b510567e0e93174",
  "signer": "0xE68D1224322e0Ac520B97c042A036e12222F004C",
  "domain": { "name": "FiloBook Receipts", "version": "1", "chainId": 4663 },
  "types": {
    "FillReceipt": [
      { "name": "fillId", "type": "bytes32" },
      { "name": "orderId", "type": "string" },
      { "name": "agent", "type": "address" },
      { "name": "provider", "type": "address" },
      { "name": "price", "type": "uint256" },
      { "name": "maxPrice", "type": "uint256" },
      { "name": "ledgerHeight", "type": "uint256" },
      { "name": "ledgerHash", "type": "bytes32" },
      { "name": "filledAt", "type": "uint256" }
    ]
  },
  "primaryType": "FillReceipt",
  "message": {
    "fillId": "0xcd5362d3abbe4cf8572352fd94d3af9cf540b9c6de6c348002a97959756a5f91",
    "orderId": "ord_d152f5fbad5a0d6e",
    "agent": "0xe463d83bbD85503f57E50476b4aB64471a466ddD",
    "provider": "0xFdbDA61810d0d141BCb81dba3FFeEB43939316e2",
    "price": "1000",
    "maxPrice": "5000",
    "ledgerHeight": "1",
    "ledgerHash": "0x1c3efacb5620db9dafb4ca0b395ce11ae7f5e18ac8126b68ef3eeb09abe5a3b7",
    "filledAt": "1794726187364"
  },
  "signature": "0x0f3ca504…80d5131c"
}
Was this page helpful?