contracts

get/v1/contracts/{contract_id}

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer

Path parameters

contract_idstring required

Contract StrKey (C…, 56 chars)

Response

Contract detail

contract_idstring required
contract_typeinteger nullable
contract_type_namestring nullable
deployed_at_ledgerinteger nullable
deployerstring nullable
executable_ownerstring nullable

Task 0548 / CAP-85 (protocol 28): the contract this one borrows its code from, and the tag naming which of that owner's executables it runs. Both null for every contract that carries its own executable.

When they are set, wasm_hash above is the hash the reference resolves to at the time of the request — the code the contract genuinely runs, which is what the protocol's own get_address_executable reports too. It is NOT stored against this contract: the owner can re-point the whole fleet without a single ledger change touching it, so a stored copy would go quietly out of date. Read these two to tell "runs its own code" from "runs someone else's".

executable_tagstring nullable
is_sacboolean required
upgradeableboolean nullable

Task 0327: contract mutability, 3-state.

  • Some(true) → Upgradeable: the current WASM imports update_current_contract_wasm (a self-upgrade path).
  • Some(false) → Immutable/frozen: it cannot upgrade itself (a SAC has no WASM and is always Some(false)).
  • None → Unknown: the WASM interface hasn't been parsed yet (stub / pre-0327 row) — the frontend renders no chip.

Derived from the WASM at parse time (wasm_programs.metadata.upgradeable), not from a ledger flag (none exists).

wasm_hashstring nullable
wasm_uploaded_at_ledgerinteger nullable

Changes

No recorded changes to this operation across all 50 revisions of this API.