Embedded contract specification

GET/api/v1/contracts/{address}/spec

Public chain data, without an attribution gate or registry fallback. The address mapping is short-lived: public, max-age=300, s-maxage=3600. Missing contracts return no_contract; a contract without an embedded interface returns no_embedded_spec.

Parameters

Parameters
NameInTypeDescription
addresspathstring
If-None-Match?headerstring

Example request

curl example
curl -s -H "Accept: application/json" "https://signet-web-pearl.vercel.app/api/v1/contracts/CAMYYJCHOQZSTF2KF6WY4UMFXS75VI46NEGKWE6XHWFULYD46BE5EUXZ/spec"
@signet/sdk example
import { SignetClient } from '@signet/sdk';

const signet = new SignetClient({ baseUrl: 'https://signet-web-pearl.vercel.app' });
const result = await signet.getContractSpec('CAMYYJCHOQZSTF2KF6WY4UMFXS75VI46NEGKWE6XHWFULYD46BE5EUXZ');

Responses

200 · The embedded specification. ETag is the quoted WASM hash.

Headers: Cache-Control, ETag

Fields of a 200 response
FieldTypeDescription
dataobject
addressstring
networkstring
specSpecJsonVersioned, deterministic JSON form of a Soroban contract spec (B-11). entriesXdr is the source of truth; the flattened views are carried alongside. H's OpenAPI document $refs this file; signet-simulator validates spec.extract output against it.
attestationHash?stringHash of the registry attestation record.
attestationPointer?stringPointer or URI of the attestation in the registry.
build?contractBuild
entries?objectEvery contractmetav0 key/value pair. Absent in documents written before it was added.
rustVersion?string
sdkVersion?string
entriesXdrstring[]Every spec entry's canonical XDR bytes as base64, in decode order.
env?contractEnvMeta
preReleaseinteger
protocolVersioninteger
errorsspecErrorCase[]
doc?string
enumName?string
namestring
valueinteger
eventsspecEvent[]
dataFormat"single_value" | "vec" | "map"
docstring
namestring
paramsobject[]
prefixTopicsstring[]
functionSchemas?objectOptional JSON Schema per function arguments (B-15).
functionsspecFunction[]
doc?string
inputsspecField[]
isConstructor?boolean
namestring
outputstypeRef[]
provenance?"embedded" | "orbital_registry"Where this specification was obtained from.
schemaVersion1Schema version. Additive fields keep v1; renames and removals need v2.
sdkVersionstringVersion of @stellar/stellar-sdk that decoded this spec.
typesspecType[]
warningsstring[]Non-fatal extraction notes (e.g. future XDR arms surfaced as unknown).
wasmHashstringHex-encoded SHA-256 hash of the contract executable WASM.
specSource"embedded"
wasmHashstring

304 · If-None-Match matched. Empty body; ETag and Cache-Control retained.

Headers: Cache-Control, ETag

400 · A standard v1 error. Missing contracts and embedded specs have distinct details.reason.

404 · A standard v1 error. Missing contracts and embedded specs have distinct details.reason.

429 · A standard v1 error. Missing contracts and embedded specs have distinct details.reason.

500 · A standard v1 error. Missing contracts and embedded specs have distinct details.reason.

503 · A standard v1 error. Missing contracts and embedded specs have distinct details.reason.

Example response

Generated from the schema; real values differ.

example response
{
  "data": {
    "address": "CAMYYJCHOQZSTF2KF6WY4UMFXS75VI46NEGKWE6XHWFULYD46BE5EUXZ",
    "network": "string",
    "spec": {
      "attestationHash": "string",
      "attestationPointer": "string",
      "build": {
        "entries": {},
        "rustVersion": "string",
        "sdkVersion": "string"
      },
      "entriesXdr": [
        "string"
      ],
      "env": {
        "preRelease": 3,
        "protocolVersion": 3
      },
      "errors": [
        {
          "doc": null,
          "enumName": null,
          "name": null,
          "value": null
        }
      ],
      "events": [
        {
          "dataFormat": "single_value",
          "doc": null,
          "name": null,
          "params": [],
          "prefixTopics": []
        }
      ],
      "functionSchemas": {},
      "functions": [
        {
          "doc": null,
          "inputs": [],
          "isConstructor": null,
          "name": null,
          "outputs": []
        }
      ],
      "provenance": "embedded",
      "schemaVersion": 1,
      "sdkVersion": "string",
      "types": [
        null
      ],
      "warnings": [
        "string"
      ],
      "wasmHash": "b2a1f39f0e8f1c5bd3a2e6c1d0f4b7a8c9e2d1f0a3b4c5d6e7f8091a2b3c4d5e"
    },
    "specSource": "embedded",
    "wasmHash": "b2a1f39f0e8f1c5bd3a2e6c1d0f4b7a8c9e2d1f0a3b4c5d6e7f8091a2b3c4d5e"
  }
}