• Reading the docs…
Start trading

API reference

Registry, Council and liveness

Who and what holds the Pool, live: the enclave registered on chain, the Council, and how long until an Escape could open.

Route#

GET /v1/trust#

The Trust page reads it, and the Account page reads it to open the Escape panel while liveness.state is escape.

Returns Trust.

Errors

  • PROGRAM_UNAVAILABLE: the Pool is not indexed yet, or no enclave registration covers the current slot; retryable.
  • INDEXER_UNAVAILABLE: the indexer has not verified the latest Commit yet, or its root disagrees with the chain; retryable.

liveness.slotsUntilEscape starts again at windowSlots with every Commit and reads 0 from lastCommitSlot + windowSlots on. Once the current slot is past lastCommitSlot + windowSlots, anyone may call trigger_escape, and once it lands state is escape with the frozen root and its slot (Escape). A past enclave registration, which a Receipt may have been signed under, is served by GET /v1/enclaves/{key}.

TypeScript
const { enclave, council, liveness } = await api.trust()
const escapeOpen = liveness.state === 'escape'
const sharesNeeded = council.t
Response
{
  "enclave": {
    "signingKey": "5FYR7WaPVYwsmUCQxmJoLrwG14cwLCsxsQvSt2FMDJhL",
    "hpkeKey": "/kV4H3CpJDM4boEAapb7E3r17uE5y63yd+pNtrcPxkY=",
    "keyEpoch": "2180",
    "measurement": "ZgsEmPKnF/77hCijP1VK9Ndu92n3honQagGmISlBu6c=",
    "platform": "mainnet-beta",
    "quoteHash": "/ltey38J838VqZUrrqaRSJibMbOQ6avYOQ4OLIKl97k=",
    "verifiedAtSlot": "470880162",
    "validFromSlot": "470880000",
    "validUntilSlot": "471096000"
  },
  "council": {
    "epoch": "0",
    "n": 3,
    "t": 2,
    "members": [
      {
        "index": 1,
        "verificationKey": "7ibXFnq9B0MhlZWsKw4U2nyiR8pcIj25D7lwHZskLBw="
      },
      {
        "index": 2,
        "verificationKey": "zvPnntz55cWesn70P3pRTOGr6zEK9xyPHk0KXg+jIGQ="
      },
      {
        "index": 3,
        "verificationKey": "Omg7MhZPp7O8MXes/drFjiEs3DijM6UdoGpJrF2EHBw="
      }
    ]
  },
  "liveness": {
    "state": "live",
    "lastCommitSlot": "470881188",
    "currentSlot": "470881315",
    "windowSlots": "9000",
    "slotsUntilEscape": "8873",
    "frozenRoot": null,
    "frozenSlot": null
  }
}

Types#

Trust#

Field Type Meaning
enclave Enclave The active enclave registration.
council Council The Council.
liveness Liveness Commit liveness and the Escape's state.

Enclave#

An enclave key’s registration in the Registry: what the program verified and the slots the key is admitted for (Registration and the Registry).

Field Type Meaning
signingKey Address The enclave's Ed25519 signing key, which signs Commits, replies and Receipts.
hpkeKey Hash The X25519 key Intents and deposit notes are sealed to, base64.
keyEpoch U64 The key epoch of this registration; a sealed Intent names the epoch it was sealed to.
measurement Hash The enclave build's measurement, as registered on chain.
platform "intel-tdx", "aws-nitro", "mainnet-beta" The platform the registration was admitted under: intel-tdx when its Platform record was admitted with a proof of Intel's collateral, mainnet-beta when it was admitted with dev.
quoteHash Hash The hash of the attestation quote the program verified for this epoch; every HPKE info string includes it.
verifiedAtSlot U64 The slot the program verified the quote at.
validFromSlot U64 The first slot the key is admitted for.
validUntilSlot U64 or null The slot the key's admission ends at, exclusive: the start of the next key epoch. null when the registration sets no end.

Council#

The members’ verification keys are the ones CouncilConfig records (Where the Council is recorded).

Field Type Meaning
epoch U64 The Council's epoch; it changes at each rotation.
n integer n, the number of members.
t integer t, the shares an Escape request needs.
members object[] Each member.
members[].index integer The member's index, from 1.
members[].verificationKey Hash The key the member's shares are verified against, base64.

Liveness#

Field Type Meaning
state "live", "escape" live while Commits land, escape once the Escape is triggered.
lastCommitSlot U64 The slot of the last Commit.
currentSlot U64 The cluster's slot when the server read it.
windowSlots U64 W, in slots.
slotsUntilEscape U64 Slots left until lastCommitSlot + windowSlots, and 0 from then on. The Escape can be triggered once the current slot is past it.
frozenRoot Hash or null The Ledger root the Escape froze; null while live.
frozenSlot U64 or null The slot of the last Commit before the Escape; null while live.