Chain and market reads
The deployment context, provider asks, the job book, wallet summaries, provider records and the escrow key.
Reads of on-chain state, served by the coordinator. Model and provider filters take integer
ids, not names; get a model's id from Number(model.vorq.model_id).
| Method | Returns |
|---|---|
chainContext() | ChainContext |
asks({ model?, limit?, offset? }) | AskBook |
jobs({ state?, model?, provider?, owner?, postedBefore?, order?, limit?, offset? }) | JobBook |
jobsSummary({ owner }) | JobsSummary |
evmJob(jobId) | One job row in its on-chain shape (EvmJob, a plain record). |
providers(id) | ProviderRecord |
allowlist({ limit?, offset? }) | Allowlist |
escrowKey() | EscrowKeyAnnouncement |
ChainContext
The deployment every signature is bound to, from GET /evm/chain. Read once and cached for the
client's lifetime.
| Member | Type |
|---|---|
chainId | number |
jobRegistry, providerRegistry, askRegistry, usdc | Address |
decimals | number (the payment token's) |
tokenDomain | { name: string; version: string } (the payment token's EIP-712 domain) |
feeBps | number (the protocol fee, in basis points) |
Paging
AskBook, JobBook and Allowlist are pages. Each carries asOfBlock
(bigint | null), truncated and nextOffset:
- Loop on
nextOffset, passing it back asoffset, until it isnull.truncatedalone (the page was cut by the response size budget) does not tell you whether more rows exist. limitdefaults to 100 and is at most 1000.- The coordinator refuses offsets past 1 000 000 with a
400; narrow the query instead.
const rows = [];
for (let offset: number | null = 0; offset !== null; ) {
const page = await client.jobs({ owner, offset });
rows.push(...page.jobs);
offset = page.nextOffset;
}asks
Published provider asks. AskBook.asks is a list of:
| Member | Type |
|---|---|
providerId, modelId | number |
sla | number (window seconds) |
rateIn, rateOut | string (USD per 1M units) |
rateInCached | string (USD per 1M cached input units, at most rateIn; equal to it when the provider lists no discount) |
jobs
On-chain job rows (JobBook.jobs, plain records, typed EvmJob). Every row carries gas_fee,
the flat relay gas fee fixed when the job was posted, and fee, the protocol fee settlement took
on top of the provider's charge ("0" for a job that did not settle), both in USD. A row whose
gas_fee or fee is missing or not a USD decimal string raises VorqError; evmJob checks its
row the same way.
| Filter | Meaning |
|---|---|
state | "Open", "Claimed", "Settled" or "Cancelled". |
model, provider | Integer ids. |
owner | A wallet address. |
postedBefore | A block number; only jobs posted at or before it. |
order | "oldest" (default) or "newest". |
jobsSummary
One wallet's totals. owner is required and must be a string, else ValidationError.
| Member | Type | Meaning |
|---|---|---|
jobs, completed | number | Counts. |
escrowed | string | What each job's claim locks (cap + protocol fee on the cap + gas_fee), summed over every row, in USD. |
byModel | { modelId, jobs, completed, escrowed }[] | The same, per model. |
asOfBlock | bigint | null |
A count that is not an integer, or an escrowed that is not a USD decimal string, raises VorqError.
providers
ProviderRecord: providerId, operator (address), name (the curated display name, or
null), boxKey (the Curve25519 key designated
orders are sealed to, 0x-prefixed), listed and raw (the full record, including any
attestation evidence).
allowlist
The on-chain measurement allowlist the Verifier checks against. entries is a
list of { key, status, entry }; status 2 is a revoked entry.
escrowKey
The coordinator's escrow key announcement, unverified: escrowPublicKey (64 hex characters,
no 0x), evidence and issuedAt (unix seconds). Open orders verify it themselves before
sealing; see Verifier.