contracts
Decompile the contract's WASM on demand (task 0465, refs #374).
The bytes come from wasm_programs.code, so a program archived on the ledger still decompiles (task 0620); Soroban RPC answers only for a program whose bytes are not indexed yet. The output is immutable per (wasm_hash, decompiler version), which justifies the LONG cache header even without a server-side cache.
get/v1/contracts/{contract_id}/decompiled
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)
Query parameters
formatstring nullable
Requested representation: rust (default) or wat. When rust is requested but emission fails, the response carries the WAT fallback with representation: "wat" and rust_error set — no second round-trip needed.
Response
Decompiled source (Rust, or WAT fallback)
Changes
No recorded changes to this operation across all 50 revisions of this API.