> ## Documentation Index
> Fetch the complete documentation index at: https://docs.darknyx.trade/llms.txt
> Use this file to discover all available pages before exploring further.

> Application and instance metadata, including the enclave signer set.

# Info



## OpenAPI

````yaml api-reference/openapi/darknyx-public.yaml GET /info
openapi: 3.1.0
info:
  title: Darknyx TEE API
  version: 4.1.0
  description: |
    Public + authenticated REST and WebSocket API for the Darknyx dark pool
    TEE matching layer. One attested endpoint may expose several independently
    routed spot markets. Pairs with the v2 on-chain custody program
    (vault, program ID `C63vKvysCzX55PKraas4Wc22ijqjGJQdPC1mrzCFVWZx`).
  contact:
    name: Darknyx engineering
  license:
    name: PolyForm Perimeter License 1.0.1
    url: https://polyformproject.org/licenses/perimeter/1.0.1
servers:
  - url: https://api.darknyx.example.com
    description: Mainnet placeholder; use the origin published with a deployment.
  - url: https://api.devnet.darknyx.example.com
    description: Devnet placeholder; use the origin published with a deployment.
security: []
tags:
  - name: auth
    description: OAuth2 client-credentials and bearer-token lifecycle.
  - name: attestation
    description: |
      Darknyx engine and transport attestation plus the deployment gateway's
      separate evidence bundle. Programmatic clients verify the certificate on
      their actual connection with `/transport-attestation` before any
      credential or sensitive write. `/evidences/*` describes surrounding
      ingress infrastructure and is not a substitute for the engine check.
  - name: info
    description: |
      Application/instance metadata, boot-session id, and settlement signers.
      Verify measured identity through `/attestation`, not self-reported fields.
  - name: instruments
    description: Public market metadata.
  - name: orders
    description: Place / cancel / modify / inspect orders.
  - name: system
    description: Public engine liveness + server time (GTT slot conversion).
  - name: account
    description: Per-account open orders and preferences. Balances remain client-derived.
  - name: tree
    description: >-
      Convenience Merkle-tree mirror; clients can verify the same state on
      Solana.
  - name: transparency
    description: Public solvency snapshot + engine identity + aggregate stats.
  - name: settlement
    description: Batch settlement status (TEE → L1 tx_signature lookup).
paths:
  /info:
    get:
      tags:
        - info
      summary: Application + instance metadata.
      description: |
        Returns application and instance metadata, the current boot-session
        identifier, and the complete ordered settlement-signer set. The
        compose hash here is a convenience value; security-sensitive clients
        verify the measured event log returned by attestation. The boot session
        is replay-scoping data validated by intake and must equal the value
        bound by the `/transport-attestation` manifest.
      responses:
        '200':
          description: Application info.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppInfo'
        '429':
          $ref: '#/components/responses/PublicRateLimited'
components:
  schemas:
    AppInfo:
      type: object
      description: |
        Application + instance metadata, returned by GET /info.
        Mirrors what dstack-sdk `client.info()` returns plus a
        couple of Darknyx-specific fields. Used in tandem with
        /attestation by the SDK's verifyTeeAttestation() helper.
      required:
        - app_id
        - instance_id
        - app_name
        - device_id
        - compose_hash
        - boot_session_id
        - transport_mode
        - tcb_info
        - tee_pubkey
        - tee_pubkeys
        - version
      properties:
        app_id:
          type: string
          description: Hex app-id — deterministic from deployer + compose.
        instance_id:
          type: string
          description: Hex instance-id of this specific CVM.
        app_name:
          type: string
        compose_hash:
          type: string
          description: |
            SHA-256 of canonicalised app-compose.json. CONVENIENCE ONLY —
            the client's attestation check pins its EXPECTED_COMPOSE_HASH
            against the compose-hash read from the DCAP-VERIFIED quote's
            RTMR3 event log, NOT against this self-reported field (a
            malicious or unverified endpoint can put anything here).
        boot_session_id:
          type: string
          pattern: ^[0-9a-fA-F]{64}$
          description: |
            Fresh 32-byte process-boot session id, hex. Every canonical place
            and cancel intent binds this value, so requests prepared before a
            CVM restart cannot be replayed into the new process. The value read
            from `/info` must equal the boot session bound by the
            `/transport-attestation` manifest. It is not part of the separate
            signer-attestation `report_data` layout.
        transport_mode:
          type: string
          enum:
            - ra-tls
            - gateway-terminated
          description: |
            Boot-selected transport policy. Clients pin this operational field
            to the independently verified transport manifest; it is not a trust
            root by itself.
        tcb_info:
          type: object
          required:
            - mrtd
          properties:
            mrtd:
              type: string
              description: Initial Trust Domain measurement.
        device_id:
          type: string
          description: TDX platform identifier of this host (PPID-derived).
        tee_pubkey:
          type: string
          description: |
            Base58 Ed25519 pubkey (same as in AttestationQuote). This is
            the PRIMARY (shard-0) signer. Under tree-sharding the TEE
            derives K = num_trees signer keys (paths
            darknyx/ed25519-signer/v2/{0..K-1}); all K are registered in the
            on-chain `vault_config.tee_pubkeys` set via one
            `set_tee_pubkey` rotation, and each is a shard settle
            fee-payer. Prefer the complete set below.
        tee_pubkeys:
          type: array
          items:
            type: string
          description: |
            The FULL K-shard signer set (base58, shard order) — every key
            the vault accepts settle payloads from. A client reconciles this
            against finalized on-chain `vault_config.tee_pubkeys`. The quote's
            report_data binds SHA-256 of their raw concatenation in shard order;
            `tee_pubkey` is `tee_pubkeys[0]`.
        version:
          type: string
          description: Semver tag of the darknyx-tee build (e.g. v0.4.2).
    Error:
      type: object
      description: |
        The error envelope. Every non-2xx response renders as this shape, with
        the mapped HTTP status. Success responses are NOT enveloped (their typed
        body is returned directly). Every response — success and error — carries
        an `x-request-id` header for correlation with server logs.
      required:
        - code
        - message
      properties:
        code:
          type: integer
          description: |
            Stable numeric error code. Ranges: 1000–1099 request validation,
            1100–1199 auth, 1200–1299 conflict, 1300–1399 not found, 1400–1499
            rate limit, 5000+ server. See the Error Codes reference.

            One exception to the ranges: `1402` is returned with HTTP 503, not
            429. It signals that credential verification is momentarily at
            capacity and was refused rather than queued. Branch on the numeric
            code rather than inferring the status from its range.
          example: 1102
        message:
          type: string
          example: trading_key_signature does not verify against the canonical body
  responses:
    PublicRateLimited:
      description: |
        The venue-wide public-route allowance is exhausted (SW-02). Every
        unauthenticated route shares one weighted bucket: client traffic reaches
        the enclave through the dstack gateway, so all requests present the same
        source address and a per-caller limit here would bound the venue rather
        than any individual caller.

        Weights follow real cost — `/attestation` (a TDX quote per request,
        uncacheable because the caller's nonce is the point) is the heaviest,
        `/transparency` is moderate, and in-memory reads are ~100x lighter.
        Honest polling sits far inside the budget.

        `POST /auth/token` is deliberately EXEMPT from this bucket and cannot
        return this response: metering it venue-wide would let junk credentials
        exhaust a shared allowance and lock every real account out of
        authenticating. Its own `429`, documented on that operation, comes from
        the per-account login bucket instead.

        `Retry-After` carries the back-off in seconds.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'

````