Embedded specification by WASM hash
GET/api/v1/specs/{wasmHash}
Read an immutable embedded specification directly by its hash. Public caching for one year with immutable; a missing code entry returns no_wasm.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| wasmHash | path | string | |
| If-None-Match? | header | string |
Example request
curl example
curl -s -H "Accept: application/json" "https://signet-web-pearl.vercel.app/api/v1/specs/b2a1f39f0e8f1c5bd3a2e6c1d0f4b7a8c9e2d1f0a3b4c5d6e7f8091a2b3c4d5e"@signet/sdk example
import { SignetClient } from '@signet/sdk';
const signet = new SignetClient({ baseUrl: 'https://signet-web-pearl.vercel.app' });
const result = await signet.getSpecByHash('b2a1f39f0e8f1c5bd3a2e6c1d0f4b7a8c9e2d1f0a3b4c5d6e7f8091a2b3c4d5e');Responses
200 · The embedded specification. ETag is the quoted WASM hash.
Headers: Cache-Control, ETag
| Field | Type | Description |
|---|---|---|
| data | object | |
| network | string | |
| spec | SpecJson | Versioned, 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? | string | Hash of the registry attestation record. |
| attestationPointer? | string | Pointer or URI of the attestation in the registry. |
| build? | contractBuild | |
| entries? | object | Every contractmetav0 key/value pair. Absent in documents written before it was added. |
| rustVersion? | string | |
| sdkVersion? | string | |
| entriesXdr | string[] | Every spec entry's canonical XDR bytes as base64, in decode order. |
| env? | contractEnvMeta | |
| preRelease | integer | |
| protocolVersion | integer | |
| errors | specErrorCase[] | |
| doc? | string | |
| enumName? | string | |
| name | string | |
| value | integer | |
| events | specEvent[] | |
| dataFormat | "single_value" | "vec" | "map" | |
| doc | string | |
| name | string | |
| params | object[] | |
| prefixTopics | string[] | |
| functionSchemas? | object | Optional JSON Schema per function arguments (B-15). |
| functions | specFunction[] | |
| doc? | string | |
| inputs | specField[] | |
| isConstructor? | boolean | |
| name | string | |
| outputs | typeRef[] | |
| provenance? | "embedded" | "orbital_registry" | Where this specification was obtained from. |
| schemaVersion | 1 | Schema version. Additive fields keep v1; renames and removals need v2. |
| sdkVersion | string | Version of @stellar/stellar-sdk that decoded this spec. |
| types | specType[] | |
| warnings | string[] | Non-fatal extraction notes (e.g. future XDR arms surfaced as unknown). |
| wasmHash | string | Hex-encoded SHA-256 hash of the contract executable WASM. |
| specSource | "embedded" | |
| wasmHash | string |
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": {
"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"
}
}