Accounts and stats

Three routes read summaries: everything one wallet has on the protocol, the protocol's counts, and the first model with a piece of its ciphertext. The errors every route shares are in Overview.

GET /v1/accounts/{wallet}#

Reads one wallet's side of the protocol in its three roles: the models it owns, the enclaves it operates and the calls it made. {wallet} is the wallet's address.

FieldMeaning
walletaddressrequired

The wallet asked for.

modelsarray of Modelrequired

The Model objects this wallet owns.

ownerEarningsarray of Moneyrequired

What the wallet was paid as an owner by settled calls, one Money per mint.

enclavesarray of Enclaverequired

The Enclave objects this wallet operates, in the order of GET /v1/enclaves.

operatorEarningsarray of Moneyrequired

What the wallet was paid as an operator by settled calls, across every enclave it operates, one Money per mint.

callsarray of Callrequired

The Call objects this wallet opened, latest opened first.

Every list is whole, without pages. A wallet with nothing on the protocol returns empty arrays.

CodeWhen
VALIDATION_ERROR{wallet} is not an address.

Next: a call whose status is refundable is refunded with POST /v1/calls/{id}/refund/build. An owned model is changed with the builds on Models. How earnings come about is in Fees and the token.

GET /v1/stats#

Reads the protocol's counts.

FieldMeaning
modelsintegerrequired

Models, in every status.

enclavesintegerrequired

Enclaves whose attestation record is unexpired at the current slot.

receiptsdecimal stringrequired

Receipts written.

callsSettleddecimal stringrequired

Calls settled. Each settled call has one receipt, so it equals receipts.

operatorEarningsarray of Moneyrequired

What all operators were paid by settled calls, one Money per mint.

currentSlotslotrequired

The latest slot the API has read. Statuses that depend on a slot (live and expired enclaves and grants, refundable calls) are computed against it.

asOftimestamprequired

When the API assembled the response.

Next: the models behind the counts are at GET /v1/models and the enclaves at GET /v1/enclaves.

GET /v1/home#

Reads the summary a first screen shows: the counts, the model named sketch-32, the first bytes of its ciphertext and its latest receipts.

FieldMeaning
statsobjectrequired

The response of GET /v1/stats.

modelModel or nullrequired

The Model named sketch-32. null when it is not among the 100 models with the most settled calls.

ciphertextobject or nullrequired

The first 256 bytes of the model's ciphertext, in the shape GET /v1/models/{id}/weights returns. null when model is null.

recentReceiptsarray of Receiptrequired

The model's 8 latest Receipt objects, latest settling slot first. Empty when model is null.

CodeWhen
UPSTREAM_UNAVAILABLEThe model's Weights account could not be read from the cluster. Retryable.

Next: call the model as in Call a model in five minutes.