IWeb2Json
The Web2Json attestation type fetches data from a URL, post-processes the returned JSON with a jq filter, and returns the result as ABI-encoded bytes.
The interface only declares the request/response/proof structs — verification is exposed via IFdcVerification.verifyWeb2Json.
Sourced from IWeb2Json.sol on GitHub.
Structs
Request
Top-level request.
struct Request {
bytes32 attestationType;
bytes32 sourceId;
bytes32 messageIntegrityCode;
RequestBody requestBody;
}
Response
Top-level response.
struct Response {
bytes32 attestationType;
bytes32 sourceId;
uint64 votingRound;
uint64 lowestUsedTimestamp;
RequestBody requestBody;
ResponseBody responseBody;
}
Proof
Top-level proof.
struct Proof {
bytes32[] merkleProof;
Response data;
}
RequestBody
struct RequestBody {
string url;
string httpMethod; // "GET" | "POST" | "PUT" | "PATCH" | "DELETE"
string headers; // "{}" if none
string queryParams; // "{}" if none
string body; // "{}" if none
string postProcessJq;
string abiSignature;
}
ResponseBody
struct ResponseBody {
bytes abiEncodedData;
}
Decode abiEncodedData into the struct described by your abiSignature to consume the post-processed payload on-chain.