Skip to main content

Prove API

API Endpoints

1. Request Receipt Proof

Endpoint: proof.sepolia.polymer.zone

Method: POST

Request Header

Authorization: Bearer <token>

Request Body

{
“jsonrpc”: “2.0”,
“id”: 1,
"method": "receipt_requestProof",
"params": [uint32, uint32, uint64, uint32]
}

Request Parameters in order

NameDescription
srcChainId [uint32]The chain ID of the chain that emitted the log.
dstChainId [uint32]The target chain for execution to ensure app-hash is updated.
srcBlockNumber [uint64]Block number on the source chain where the log was emitted.
txIndex [uint32]Index of the transaction (receipt belongs to) in the array of all transactions in that block. Note: This is not the log index.

Response Body (Success)

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"jobID": [int64]
}
}

The response contains a jobID that uniquely identifies your request.

2. Query Receipt Proof

Endpoint: proof.sepolia.polymer.zone

Method: POST

Request Body

{
"jsonrpc": "2.0",
"id": 1,
"method": "receipt_queryProof",
"params": [int64]
}

Response Fields

NameDescription
jobID [uint64]The jobID returned by the proof request.

Response Body (Success)

{
“jsonrpc”: “2.0”,
“id”: 1,
"result": {
“jobID”: int64,
“proof”: []byte (hex string encoded),
“status”: “complete” | “error” | “pending”
}
}

Response Fields

NameDescription
jobID [uint64]Unique identifier for the API request.
proof [hex string encoded]Byte payload containing the full proof path to use against the app-hash to prove a given receipt (as part of the bytes).
statusIndicates the current status of the proof (complete, error, pending).

The proof returned includes the necessary information to verify the receipt in question:

Polymer superRoot Height -> IAVL proof -> srcChain height -> receiptRoot -> MMPT proof -> receipt

Note

  • The application relayer or solver does not need to perform any action to submit the proof to the application contract.
  • If you wish to prove a single log, you will also need to provide a logIndex of the desired event within the receipt. See the method details below for further information.
  • The current version (V0) of the Proof API typically takes around 6-10 seconds to return a response with the proof, as lazy updates are performed. You can immediately execute your function once you get the proof. This delay is to ensure that the latest rollup states are propagated all the way to the desired destination chain and successfully updated, the major bottleneck is rollup block times.
  • All of the proofs described above can be built using public RPCs. The primary function of the Prove API is to provide convenience and manage the coordination across multiple chain RPCs.