{"openapi":"3.1.0","info":{"title":"STXER API","description":"STXER API documentation. Also browsable as [Scalar](/docs) or [Swagger UI](/swagger-ui).\n\n### Recommended: use the SDK\n\nFor TypeScript / JavaScript clients (and AI agents writing them), the [`stxer` SDK](https://github.com/stxer/stxer-sdk) is the supported way to call this API. It carries hand-written types aligned with the wire format.\n\nEnd-to-end scenario samples — Vitest suites that drive real-world flows through the simulator with exact balance / state assertions:\n\n- [locked-stx-vitest.test.ts](https://github.com/stxer/stxer-sdk/blob/master/src/sample/locked-stx-vitest.test.ts) — PoX-4 locked STX unlock + transfer via `AdvanceBlocks`\n- [sbtc-deposit-vitest.test.ts](https://github.com/stxer/stxer-sdk/blob/master/src/sample/sbtc-deposit-vitest.test.ts) — sBTC bridge mint via `complete-deposit-wrapper` + transfer\n- [brotocol-pegin-vitest.test.ts](https://github.com/stxer/stxer-sdk/blob/master/src/sample/brotocol-pegin-vitest.test.ts) — Brotocol BTC peg-in, end-to-end (forged tx + SPV proof)\n- [hbtc-vault-vitest.test.ts](https://github.com/stxer/stxer-sdk/blob/master/src/sample/hbtc-vault-vitest.test.ts) — hBTC vault: deposit, reward, time-locked redeem, transfer\n- [zest-borrow-vitest.test.ts](https://github.com/stxer/stxer-sdk/blob/master/src/sample/zest-borrow-vitest.test.ts) — Zest V2 lend / borrow / repay round-trip with a forged Pyth v4 price update\n- [granite-leverage-vitest.test.ts](https://github.com/stxer/stxer-sdk/blob/master/src/sample/granite-leverage-vitest.test.ts) — Granite leverage open with a forged Pyth v3 price update\n\nBrowse the full [`src/sample` folder](https://github.com/stxer/stxer-sdk/tree/master/src/sample) for the per-endpoint walkthroughs (`counter.ts`, `instant.ts`, `failure-modes.ts`, `batch-categories.ts`).","version":"1.0.0"},"tags":[{"name":"Simulation","description":"Transaction-level simulation against a forked chain state.\n\n### Three flows — pick the right one\n\n- **`POST /devtools/v2/simulations:instant`** — one-shot, no session. Submits a single transaction (plus optional batch reads) against a chosen parent block, returns the receipt. **No debug tracing.** Use for wallet previews, pre-broadcast safety checks, and read-side projections where you don't need the stxer debug UI.\n- **Sessions: `POST /devtools/v2/simulations` → `POST /devtools/v2/simulations/{id}` (1+ times) → `GET /devtools/v2/simulations/{id}`** — fork the chain at a parent block, run a sequence of typed steps (`Transaction`, `Eval`, `SetContractCode`, `Reads`, `TenureExtend`, `AdvanceBlocks`), then read back metadata + per-step summaries. Sessions support tracing — the result is browsable in the [stxer debug UI](https://stxer.xyz). Use for multi-step scenarios (deploys + calls, bridge flows, locked-STX unlock).\n- **`POST /devtools/v2/simulations/{id}/reads`** — batch-read the simulation's forked state without consuming a step slot. Cheaper than interleaving `Reads` steps when you just want to project state.\n\n### `Transaction` vs `Eval` vs `EvalReadonly`\n\nWithin a session, three step shapes evaluate Clarity — pick by side-effect requirement:\n- **`Transaction`** — full Stacks tx mechanics: receipt + events + post-conditions + fee + nonce. The only step that emits a `TransactionReceipt`. Use when you need to simulate a real user action.\n- **`Eval`** — arbitrary Clarity with **write access** to contract storage; no fee / nonce / post-conditions / events / receipt. Use to stub state mid-session (`var-set`, `map-set`, …) or run code with side-effects but without tx ceremony.\n- **`EvalReadonly`** (a `Reads` batch sub-type, NOT a top-level step) — read-only Clarity expression in sender/sponsor context; analyzer-enforced no writes. Cheapest projection — use for derived reads that need a sender, read-only `contract-call?` projections, custom expressions.\n\n### Burn-block scenarios — `AdvanceBlocks` + `/tip`\n\nFor scenarios that depend on burn-block progression (PoX cycles, locked-STX unlock, time-locked redemptions, bridge contract finalization), submit `AdvanceBlocks` steps to synthesize bitcoin / stacks blocks on the fork, then read the synthetic tip via `GET /devtools/v2/simulations/{id}/tip`. See the [`stxer` SDK README](https://github.com/stxer/stxer-sdk#advanceblocks-burn-block-scenarios) and bridge demos for worked examples.\n\n### Error model\n\nThe session endpoints surface server-side state through specific status codes. Body strings begin with a marker prefix:\n\n- **`409` (`simulation_busy:`)** — another submit is in flight for the same session. **Retry the same request** after a short backoff; do not start a new session.\n- **`410` (`simulation_outdated:`)** — your session was created against an older simulator schema (post schema-v=2 cutover). **Start a new session** with `POST /devtools/v2/simulations`; the old `simulation_id` is unreachable.\n- **`400`** — request validation failed (malformed step, bad principal, invalid `AdvanceBlocks` arg). Body carries the validation message.\n- **`404`** — unknown route, unknown `simulation_id`, or for `inspect/{txid}` the txid has no debug trace (e.g. session was started with `skip_tracing: true`, the txid corresponds to an `Eval` / `AdvanceBlocks` step rather than a `Transaction`, or the session has been GC'd).\n\nThe [`stxer` SDK](https://github.com/stxer/stxer-sdk) raises a typed `SimulationError` (with `.status` and `.marker` fields) so you can branch on these without parsing the body.\n\n### Capacity\n\n**Free during the public preview.** Usage is currently uncapped — no auth, no per-key rate limit. We will introduce a paid subscription tier for higher-volume / no-rate-limit access; the free tier will move to a soft rate limit at that point. If you are building production load on top of these endpoints, please open a ticket on our [Discord](https://discord.stxer.xyz) so we can plan capacity together."}],"paths":{"/sidecar/tip":{"get":{"operationId":"getSidecarTip","tags":["Sidecar"],"summary":"Get stacks tip info","responses":{"200":{"description":"Tip info","content":{"application/json":{"schema":{"type":"object","properties":{"bitcoin_height":{"type":"number"},"block_hash":{"type":"string"},"block_height":{"type":"number"},"block_time":{"type":"number"},"burn_block_height":{"type":"number"},"burn_block_time":{"type":"number"},"consensus_hash":{"type":"string"},"index_block_hash":{"type":"string"},"is_nakamoto":{"type":"boolean"},"tenure_cost":{"type":"object","properties":{"read_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"read_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"write_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"write_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"runtime":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."}},"required":["read_count","read_length","write_count","write_length","runtime"],"additionalProperties":false},"tenure_height":{"type":"number"},"sortition_id":{"type":"string"},"epoch_id":{"type":"string"}},"required":["bitcoin_height","block_hash","block_height","block_time","burn_block_height","burn_block_time","consensus_hash","index_block_hash","is_nakamoto","tenure_cost","tenure_height","sortition_id","epoch_id"],"additionalProperties":false}}}}}}},"/sidecar/v2/batch":{"post":{"operationId":"postSidecarV2Batch","tags":["Sidecar"],"summary":"Batch read from a specific block","description":"Batch read from a specific block","responses":{"200":{"description":"Batch read response","content":{"application/json":{"schema":{"type":"object","properties":{"index_block_hash":{"type":"string","description":"Index block hash the batch ran against."},"vars":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}},"maps":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}},"readonly":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}},"readonly_with_sender":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}},"stx":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}},"nonces":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}},"ft_supply":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}},"ft_balance":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}}},"required":["index_block_hash"],"additionalProperties":false,"description":"Sidecar batch-read response. Each result category is emitted positionally for the corresponding request field; treat any category as optional — callers must handle absence."}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vars":{"description":"The contract id and the variable name","type":"array","items":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}],"example":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","oracle-updater"]}},"maps":{"description":"The contract id, the map name and the key","type":"array","items":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"},{"type":"string"}],"example":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","values","0d000000075354582f555344"]}},"readonly":{"description":"Each entry is `[contract_id, function_name, ...arg_hex]` — fixed first two positions, then one hex-encoded Clarity value per function argument.","type":"array","items":{"type":"array","prefixItems":[{"type":"string","description":"contract_id"},{"type":"string","description":"function_name"}],"items":{"type":"string","description":"arg — Clarity value serialized to hex"},"example":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","get-value","0d000000075354582f555344"]}},"readonly_with_sender":{"description":"Each entry is `[sender, sponsor, contract_id, function_name, ...arg_hex]` — fixed first four positions, then one hex-encoded Clarity value per function argument.","type":"array","items":{"type":"array","prefixItems":[{"type":"string","description":"sender principal"},{"type":"string","description":"optional sponsor principal (empty string if none)"},{"type":"string","description":"contract_id"},{"type":"string","description":"function_name"}],"items":{"type":"string","description":"arg — Clarity value serialized to hex"},"example":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0","","SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","get-value","0d000000075354582f555344"]}},"stx":{"description":"The principals","example":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0","SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM"],"type":"array","items":{"type":"string"}},"nonces":{"description":"The principals","example":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0","SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM"],"type":"array","items":{"type":"string"}},"ft_balance":{"description":"The ft token identifier and the principal","type":"array","items":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}],"example":["SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token::sbtc-token","SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4"]}},"ft_supply":{"description":"A flat array of FT identifiers in `<contract_id>::<token_name>` form (one entry per token to look up).","example":["SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token::sbtc-token","SP1Y5YSTAHZ88XYK1VPDH24GY0HPX5J4JECTMY4A1.velar-token::velar"],"type":"array","items":{"type":"string"}},"tip":{"description":"The optional index_block_hash","type":"string"}}}}}}}},"/inspect/{block_height}/{block_hash}/{txid}":{"get":{"operationId":"getInspectByBlockHeightByBlockHashByTxid","tags":["Debugger"],"summary":"Get the debug tracing data for a given transaction","description":"Debug tracing data for onchain transaction execution in binary format for the stxer debug UI","responses":{"200":{"description":"Binary trace data","content":{"application/octet-stream":{"schema":{}}}}},"parameters":[{"in":"path","name":"block_height","schema":{"type":"number","example":1018838},"required":true},{"in":"path","name":"block_hash","schema":{"type":"string","pattern":"^[0-9a-f]{64}$","example":"89945f0d9956794d453adb28d78302002a1d16885d8b4de3ee598ec69c631a54"},"required":true,"description":"A 32-byte hex string"},{"in":"path","name":"txid","schema":{"type":"string","pattern":"^[0-9a-f]{64}$","example":"c1bfb9616c51a17859c48f1716eefdd5ea9646f59b8e6c082033370ae17e33fa"},"required":true,"description":"A 32-byte hex string"}]}},"/contracts/by-deploy/{txid}":{"get":{"operationId":"getContractsByDeployByTxid","tags":["AST"],"summary":"Get the AST of the contract a deploy transaction carries","description":"Parses the source code out of a contract-deploy transaction and returns its AST. Unlike `GET /contracts/{id}`, this answers for a deploy that ABORTED: such a transaction ran, and has a trace, but left no contract in chain state, so it can never be resolved by id. The Clarity version comes from the payload and the epoch from the transaction's burn height, so the AST is the one the node itself parsed. This is a statement about the transaction, never about what is deployed at the contract id it names.","responses":{"200":{"description":"The AST of the source the transaction tried to deploy","content":{"application/json":{"schema":{"type":"object","properties":{"contract_identifier":{"type":"string"},"expressions":{"type":"array","items":{"$ref":"#/components/schemas/SymbolicExpression"}},"top_level_expression_sorting":{"type":"array","items":{"type":"number"}},"referenced_traits":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"trait_definition":{"type":"string"},"trait_definition_type":{"type":"string","enum":["Defined","Imported"]}},"required":["trait_definition","trait_definition_type"],"additionalProperties":false}},"implemented_traits":{"type":"array","items":{"type":"string"}},"tx_id":{"type":"string"},"contract_id":{"type":"string"},"block_height":{"type":"number"},"burn_block_height":{"type":"number"},"tx_status":{"type":"string"},"source_code":{"type":"string"},"clarity_version":{"type":"number"},"epoch":{"type":"string"}},"required":["contract_identifier","expressions","top_level_expression_sorting","referenced_traits","implemented_traits","tx_id","contract_id","block_height","burn_block_height","tx_status","source_code","clarity_version","epoch"],"additionalProperties":false}}}},"404":{"description":"No such transaction, or it is not a contract deploy that carries source code.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"txid","schema":{"type":"string","pattern":"^(0x)?[0-9a-fA-F]{64}$","example":"0xa083ff31b409cc34598e4a0d68ac0edeff3f3ae591c7c2625eaeb419a7204e03"},"required":true,"description":"A 32-byte transaction id, hex, with or without a 0x prefix"}]}},"/contracts/{contract_id}":{"get":{"operationId":"getContractsByContractId","tags":["AST"],"summary":"Get the AST for a contract","description":"Get the AST for a onchain contract using the contract id","responses":{"200":{"description":"Contract AST with metadata","content":{"application/json":{"schema":{"type":"object","properties":{"contract_identifier":{"type":"string"},"expressions":{"type":"array","items":{"$ref":"#/components/schemas/SymbolicExpression"}},"top_level_expression_sorting":{"type":"array","items":{"type":"number"}},"referenced_traits":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"trait_definition":{"type":"string"},"trait_definition_type":{"type":"string","enum":["Defined","Imported"]}},"required":["trait_definition","trait_definition_type"],"additionalProperties":false}},"implemented_traits":{"type":"array","items":{"type":"string"}},"tx_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The transaction that deployed this source, or null when the source came from the node and no deploy transaction could be corroborated as its own."},"canonical":{"type":"boolean"},"contract_id":{"type":"string"},"block_height":{"type":"number"},"source_code":{"type":"string"},"abi":{"$ref":"#/components/schemas/ClarityAbi"}},"required":["contract_identifier","expressions","top_level_expression_sorting","referenced_traits","implemented_traits","tx_id","canonical","contract_id","block_height","source_code","abi"],"additionalProperties":false}}}},"404":{"description":"No contract is deployed under this id — either the id is unknown, or every deploy transaction for it aborted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"contract_id","schema":{"type":"string","pattern":"^S[PMTN][0-9A-Z]+\\.[0-9a-zA-Z_-]+$","example":"SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.amm-pool-v2-01"},"required":true,"description":"A contract identifier, e.g. SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.amm-pool-v2-01"}]}},"/contracts:parse":{"post":{"operationId":"postContractsParse","tags":["AST"],"summary":"Parse a contract source code into an AST","responses":{"200":{"description":"Parsed contract AST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractAST"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","pattern":"^S[PMTN][0-9A-Z]+\\.[0-9a-zA-Z_-]+$","example":"SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.amm-pool-v2-01","description":"A contract identifier, e.g. SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.amm-pool-v2-01"},"source_code":{"type":"string","example":"(define-read-only (hello) (ok \"Hello, World!\"))"},"clarity_version":{"default":"6","type":"string","enum":["1","2","3","4","5","6"]},"epoch":{"default":"Epoch40","type":"string","enum":["Epoch40","Epoch34","Epoch33","Epoch32","Epoch31","Epoch30"]}},"required":["contract_id","source_code"]}}}}}},"/devtools/v2/simulations:instant":{"post":{"operationId":"postDevtoolsV2SimulationsInstant","tags":["Simulation"],"summary":"Simulate a transaction","description":"Instantly simulate a transaction and get the result, including execution result and events. This is useful for apps or wallets to get the result of a transaction before sending it to the chain. This is lightweight and will not generate debug tracing information.","responses":{"200":{"description":"Simulation result","content":{"application/json":{"schema":{"type":"object","properties":{"reads":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false,"description":"The read result, a clarity value serialized to hex or a number in string format"},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload) or `Err` (error message string) is present."},"description":"Always present (may be empty `[]`). Aligned positionally with the `reads` request field."},"receipt":{"type":"object","properties":{"result":{"type":"string","pattern":"^[0-9a-f]*$","description":"The Clarity return value, SIP-005 hex-serialized. For contract-call transactions this includes the `(ok ...)` / `(err ...)` response wrapper — a Clarity-level `(err uX)` is encoded here, NOT in the outer `Err` variant.","format":"clarity-hex"},"stx_burned":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"STX (in micro-STX) burned by this transaction. u128 — accept as `number | string` to preserve precision above 2^53."},"tx_index":{"type":"number"},"vm_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message from the upstream Clarity VM. `null` when the transaction had no VM-level issue. When `post_condition_aborted` is `true` this field is also populated with the PC abort reason — check `post_condition_aborted` first to disambiguate a PC abort from a plain VM/analysis failure."},"post_condition_aborted":{"type":"boolean","description":"True when one or more post-conditions failed and the transaction was aborted. Implies `vm_error` is also set (to the abort reason); the reverse does not hold."},"costs":{"type":"number","description":"Time to run this simulation in milliseconds"},"execution_cost":{"type":"object","properties":{"read_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"read_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"write_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"write_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"runtime":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."}},"required":["read_count","read_length","write_count","write_length","runtime"],"additionalProperties":false},"events":{"type":"array","items":{"type":"string"},"description":"Events emitted during execution (contract logs, STX transfers, FT/NFT events, etc.). Each entry is a JSON-encoded **string** — callers must `JSON.parse` it to get the event object. Items are NOT JSON objects in the array."}},"required":["result","stx_burned","tx_index","vm_error","post_condition_aborted","costs","execution_cost","events"],"additionalProperties":false,"description":"A successful transaction-execution receipt. \"Successful\" here means the engine ran the transaction to completion — it does NOT imply the contract logic succeeded.\n\nFailure signals to check, in order:\n1. Outer `Err` variant on `Result.Transaction` — engine could not execute the transaction at all (deserialization failure, etc.). No receipt is produced.\n2. `post_condition_aborted: true` — execution ran but a post-condition tripped and rolled back state.\n3. `vm_error: string` (without PC abort) — Clarity VM raised a runtime error (e.g. arithmetic overflow, unwrap on none) or static analysis failed.\n4. `(err uX)` inside `result` — the contract returned a Clarity error response. This is application-level and is NOT signalled by any of the fields above; you must decode `result` to detect it.\n\n`post_condition_aborted` and `vm_error` are NOT independent. When a PC trips, the upstream sets `post_condition_aborted: true` AND writes the abort reason into `vm_error` — check `post_condition_aborted` first."}},"required":["reads","receipt"],"additionalProperties":false}}}},"400":{"description":"Validation error — malformed step body, bad principal/contract id, or an `AdvanceBlocks` argument outside the upstream `validate_advance_args` bounds. The body is the raw validation message.","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Unknown route, unknown `simulation_id`, or (for `inspect/{txid}`) the txid has no debug trace — either the session was started with `skip_tracing: true`, the txid corresponds to an `Eval` / `AdvanceBlocks` step rather than a `Transaction`, or the session has been GC'd.","content":{"text/plain":{"schema":{"type":"string"}}}},"409":{"description":"Session busy. Body starts with `simulation_busy:` — another submit is in flight for this session. **Retry the same request** after a short backoff; do not start a new session.","content":{"text/plain":{"schema":{"type":"string"}}}},"410":{"description":"Session outdated. Body starts with `simulation_outdated:` — your session was created against an older simulator schema. **Start a new session** with `POST /devtools/v2/simulations`; the old `simulation_id` is unreachable.","content":{"text/plain":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"transaction":{"type":"string","example":"00000000010400539842a932da94ec958ef478f9b4ca64c8b440fc000000000000000f0000000000000bb800004442323dc763a14ef2936f3d0d83240032fe58fab009be0f2a77d22ebe0afadd5fe1f0b118f46b29d679a267915befb612fbb394b9f021dc026ce2bc0393bf24030200000002000216539842a932da94ec958ef478f9b4ca64c8b440fc05000000003b9aca00010316402da2c079e5d31d58b9cfc7286d1b1eb2f7834e0f616d6d2d7661756c742d76322d303116f864edb04ef5fac0f5d7037ab181e10b9af928e012666c61742d65617274682d7374786369747909466c6174456172746803000000cddddb9ebc0216402da2c079e5d31d58b9cfc7286d1b1eb2f7834e0e616d6d2d706f6f6c2d76322d30310b737761702d68656c706572000000050616402da2c079e5d31d58b9cfc7286d1b1eb2f7834e0d746f6b656e2d777374782d76320616b2f458ea9d515f45a53e92661438c6d3404278a80b746f6b656e2d77666c61740100000000000000000000000005f5e100010000000000000000000000174876e8000a0100000000000000000000506aa9ca01a4","description":"The transaction to simulate, serialized to hex"},"block_height":{"example":1044660,"description":"Stacks block height to fork at. u64 — accept as `number | string` to preserve precision. If not provided, the simulator forks at the latest block.","anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}]},"block_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","example":"31c1c350a532eb2a2e183c2bcdeb7496330ad8c0fa22173058168bab6031340b","description":"The corresponding block hash if block height is provided"},"reads":{"description":"The Scalar UI does not explain this properly, you can view the schema on swagger-ui","type":"array","items":{"anyOf":[{"type":"object","properties":{"MapEntry":{"type":"array","prefixItems":[{"type":"string","description":"contract_id"},{"type":"string","description":"map_name"},{"type":"string","description":"key — Clarity value serialized to hex"}]}},"required":["MapEntry"],"example":{"MapEntry":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","values","0d000000075354582f555344"]},"description":"Read a map entry with parameters [contract_id, map_name, key_serialize_to_hex]"},{"type":"object","properties":{"DataVar":{"type":"array","prefixItems":[{"type":"string","description":"contract_id"},{"type":"string","description":"variable_name"}]}},"required":["DataVar"],"example":{"DataVar":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","oracle-updater"]},"description":"Read a data variable with parameters [contract_id, variable_name]"},{"type":"object","properties":{"EvalReadonly":{"type":"array","prefixItems":[{"type":"string","description":"sender principal"},{"type":"string","description":"optional sponsor principal (empty string if none)"},{"type":"string","description":"contract_id"},{"type":"string","description":"Clarity expression to evaluate (read-only)"}]}},"required":["EvalReadonly"],"examples":[{"EvalReadonly":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0","","SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","(var-get oracle-updater)"]},{"EvalReadonly":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0","","SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","(contract-call? .dia-oracle get-value 'STX-USD)"]}],"description":"Evaluate an arbitrary **read-only** Clarity expression in the context of `sender` / `sponsor`. The Clarity analyzer rejects any expression that would mutate state, so this is a pure projection.\n\nUse `EvalReadonly` (a `Reads` batch sub-type) for derived reads — read-only contract calls, custom expressions, projections — when you need sender-context that `DataVar` / `MapEntry` cannot provide. Cheaper than a full `Eval` step.\n\nChoosing between read variants:\n- `DataVar`, `MapEntry` — direct storage reads, no Clarity evaluation; cheapest.\n- `EvalReadonly` — arbitrary read-only Clarity expression with sender/sponsor context.\n- `Eval` (top-level step variant, NOT a `Reads` sub-type) — arbitrary Clarity with **write access**; use only when you need to mutate state.\n- `Transaction` — real Stacks tx with receipt, events, post-conditions, fee, nonce."},{"type":"object","properties":{"StxBalance":{"type":"string"}},"required":["StxBalance"],"examples":[{"StxBalance":"SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0"},{"StxBalance":"SPQC38PW542EQJ5M11CR25P7BS1CA6QT4TBXGB3M.stableswap-stx-ststx-v-1-2"}],"description":"Read the STX balance of a principal"},{"type":"object","properties":{"FtBalance":{"type":"array","prefixItems":[{"type":"string","description":"contract_id of the FT contract"},{"type":"string","description":"ft_token_name (asset identifier)"},{"type":"string","description":"holder principal"}]}},"required":["FtBalance"],"example":{"FtBalance":["SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token","sbtc-token","SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4"]},"description":"Read the fungible token balance of a principal using parameters [contract_id, ft_token_name, principal]"},{"type":"object","properties":{"FtSupply":{"type":"array","prefixItems":[{"type":"string","description":"contract_id of the FT contract"},{"type":"string","description":"ft_token_name (asset identifier)"}]}},"required":["FtSupply"],"example":{"FtSupply":["SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token","sbtc-token"]},"description":"Read the total supply of a fungible token using parameters [contract_id, ft_token_name]"},{"type":"object","properties":{"Nonce":{"type":"string"}},"required":["Nonce"],"example":{"Nonce":"SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0"},"description":"Read the nonce of a principal"}],"description":"Tagged union — the object has exactly one of these keys: `MapEntry`, `DataVar`, `EvalReadonly`, `StxBalance`, `FtBalance`, `FtSupply`, or `Nonce`. The key name selects the read kind and determines the shape of the value."}}},"required":["transaction"]}}}}}},"/devtools/v2/simulations":{"post":{"operationId":"postDevtoolsV2Simulations","tags":["Simulation"],"summary":"Start a simulation session","description":"Consider it a fork of the chain, you can run multiple transactions in this session","responses":{"200":{"description":"Simulation session created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The simulation id"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Validation error — malformed step body, bad principal/contract id, or an `AdvanceBlocks` argument outside the upstream `validate_advance_args` bounds. The body is the raw validation message.","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Unknown route, unknown `simulation_id`, or (for `inspect/{txid}`) the txid has no debug trace — either the session was started with `skip_tracing: true`, the txid corresponds to an `Eval` / `AdvanceBlocks` step rather than a `Transaction`, or the session has been GC'd.","content":{"text/plain":{"schema":{"type":"string"}}}},"409":{"description":"Session busy. Body starts with `simulation_busy:` — another submit is in flight for this session. **Retry the same request** after a short backoff; do not start a new session.","content":{"text/plain":{"schema":{"type":"string"}}}},"410":{"description":"Session outdated. Body starts with `simulation_outdated:` — your session was created against an older simulator schema. **Start a new session** with `POST /devtools/v2/simulations`; the old `simulation_id` is unreachable.","content":{"text/plain":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"block_height":{"example":1044660,"description":"Stacks block height to fork at. u64 — accept as `number | string` to preserve precision. If not provided, defaults to the tip height.","anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}]},"block_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","example":"31c1c350a532eb2a2e183c2bcdeb7496330ad8c0fa22173058168bab6031340b","description":"The corresponding block hash if block height is provided"},"skip_tracing":{"description":"Set to true to skip generating debug tracing information, this will cost less and the simulations will run faster. However, if you set it to true, you won't be able to view it with stxer debug UI. This is useful if you are using simulations in integration tests","type":"boolean"}}}}}}}},"/devtools/v2/simulations/{simulation_id}":{"post":{"operationId":"postDevtoolsV2SimulationsBySimulationId","tags":["Simulation"],"summary":"Run simulation steps in a simulation session","responses":{"200":{"description":"Simulation step results","content":{"application/json":{"schema":{"type":"object","properties":{"steps":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Transaction":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"object","properties":{"result":{"type":"string","pattern":"^[0-9a-f]*$","description":"The Clarity return value, SIP-005 hex-serialized. For contract-call transactions this includes the `(ok ...)` / `(err ...)` response wrapper — a Clarity-level `(err uX)` is encoded here, NOT in the outer `Err` variant.","format":"clarity-hex"},"stx_burned":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"STX (in micro-STX) burned by this transaction. u128 — accept as `number | string` to preserve precision above 2^53."},"tx_index":{"type":"number"},"vm_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message from the upstream Clarity VM. `null` when the transaction had no VM-level issue. When `post_condition_aborted` is `true` this field is also populated with the PC abort reason — check `post_condition_aborted` first to disambiguate a PC abort from a plain VM/analysis failure."},"post_condition_aborted":{"type":"boolean","description":"True when one or more post-conditions failed and the transaction was aborted. Implies `vm_error` is also set (to the abort reason); the reverse does not hold."},"costs":{"type":"number","description":"Time to run this simulation in milliseconds"},"execution_cost":{"type":"object","properties":{"read_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"read_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"write_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"write_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"runtime":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."}},"required":["read_count","read_length","write_count","write_length","runtime"],"additionalProperties":false},"events":{"type":"array","items":{"type":"string"},"description":"Events emitted during execution (contract logs, STX transfers, FT/NFT events, etc.). Each entry is a JSON-encoded **string** — callers must `JSON.parse` it to get the event object. Items are NOT JSON objects in the array."}},"required":["result","stx_burned","tx_index","vm_error","post_condition_aborted","costs","execution_cost","events"],"additionalProperties":false,"description":"A successful transaction-execution receipt. \"Successful\" here means the engine ran the transaction to completion — it does NOT imply the contract logic succeeded.\n\nFailure signals to check, in order:\n1. Outer `Err` variant on `Result.Transaction` — engine could not execute the transaction at all (deserialization failure, etc.). No receipt is produced.\n2. `post_condition_aborted: true` — execution ran but a post-condition tripped and rolled back state.\n3. `vm_error: string` (without PC abort) — Clarity VM raised a runtime error (e.g. arithmetic overflow, unwrap on none) or static analysis failed.\n4. `(err uX)` inside `result` — the contract returned a Clarity error response. This is application-level and is NOT signalled by any of the fields above; you must decode `result` to detect it.\n\n`post_condition_aborted` and `vm_error` are NOT independent. When a PC trips, the upstream sets `post_condition_aborted: true` AND writes the abort reason into `vm_error` — check `post_condition_aborted` first."}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (transaction receipt) or `Err` (engine-level error such as a failed deserialization) is present. A Clarity `(err uX)` returned by the contract is NOT signalled here; it lives inside `Ok.result`."}},"required":["Transaction"],"additionalProperties":false},{"type":"object","properties":{"Eval":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string","description":"The result clarity value serialized to hex"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (hex-serialized Clarity result) or `Err` (error message) is present."}},"required":["Eval"],"additionalProperties":false},{"type":"object","properties":{"SetContractCode":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"null"}},"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (null payload on success) or `Err` (error message) is present."}},"required":["SetContractCode"],"additionalProperties":false},{"type":"object","properties":{"Reads":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false,"description":"The read result, a clarity value serialized to hex or a number in string format"},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload) or `Err` (error message string) is present."}}},"required":["Reads"],"additionalProperties":false},{"type":"object","properties":{"TenureExtend":{"type":"object","properties":{"read_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"read_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"write_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"write_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"runtime":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."}},"required":["read_count","read_length","write_count","write_length","runtime"],"additionalProperties":false}},"required":["TenureExtend"],"additionalProperties":false},{"type":"object","properties":{"AdvanceBlocks":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"array","items":{"type":"object","properties":{"stacks_height":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"burn_height":{"type":"number"},"coinbase_height":{"type":"number"},"index_block_hash":{"type":"string","description":"Hex-encoded synthetic Stacks block id"},"burn_header_hash":{"type":"string","description":"Hex-encoded synthetic burn header hash"},"vrf_seed":{"type":"string","description":"Hex-encoded VRF seed for the synthesized block"},"block_time":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"burn_block_time":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"tenure_change":{"type":"boolean","description":"True when this synthetic block is the first stacks block in a new tenure (i.e. follows a synthesized bitcoin block)."}},"required":["stacks_height","burn_height","coinbase_height","index_block_hash","burn_header_hash","vrf_seed","block_time","burn_block_time","tenure_change"],"additionalProperties":false,"description":"One synthesized block produced by an `AdvanceBlocks` step."}}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — `Ok` carries the array of synthesized block summaries; `Err` is the validation/runtime message from upstream."}},"required":["AdvanceBlocks"],"additionalProperties":false}],"description":"Tagged union — the object has exactly one of these keys: `Transaction`, `Eval`, `SetContractCode`, `Reads`, `TenureExtend`, or `AdvanceBlocks`. The key name is the variant tag and indicates which step kind produced this result."}}},"required":["steps"],"additionalProperties":false}}}},"400":{"description":"Validation error — malformed step body, bad principal/contract id, or an `AdvanceBlocks` argument outside the upstream `validate_advance_args` bounds. The body is the raw validation message.","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Unknown route, unknown `simulation_id`, or (for `inspect/{txid}`) the txid has no debug trace — either the session was started with `skip_tracing: true`, the txid corresponds to an `Eval` / `AdvanceBlocks` step rather than a `Transaction`, or the session has been GC'd.","content":{"text/plain":{"schema":{"type":"string"}}}},"409":{"description":"Session busy. Body starts with `simulation_busy:` — another submit is in flight for this session. **Retry the same request** after a short backoff; do not start a new session.","content":{"text/plain":{"schema":{"type":"string"}}}},"410":{"description":"Session outdated. Body starts with `simulation_outdated:` — your session was created against an older simulator schema. **Start a new session** with `POST /devtools/v2/simulations`; the old `simulation_id` is unreachable.","content":{"text/plain":{"schema":{"type":"string"}}}}},"parameters":[{"in":"path","name":"simulation_id","schema":{"type":"string","minLength":32,"maxLength":32},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"steps":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Transaction":{"type":"string","description":"The transaction serialized to hex"}},"required":["Transaction"],"example":{"Transaction":"00000000010400539842a932da94ec958ef478f9b4ca64c8b440fc000000000000000f0000000000000bb800004442323dc763a14ef2936f3d0d83240032fe58fab009be0f2a77d22ebe0afadd5fe1f0b118f46b29d679a267915befb612fbb394b9f021dc026ce2bc0393bf24030200000002000216539842a932da94ec958ef478f9b4ca64c8b440fc05000000003b9aca00010316402da2c079e5d31d58b9cfc7286d1b1eb2f7834e0f616d6d2d7661756c742d76322d303116f864edb04ef5fac0f5d7037ab181e10b9af928e012666c61742d65617274682d7374786369747909466c6174456172746803000000cddddb9ebc0216402da2c079e5d31d58b9cfc7286d1b1eb2f7834e0e616d6d2d706f6f6c2d76322d30310b737761702d68656c706572000000050616402da2c079e5d31d58b9cfc7286d1b1eb2f7834e0d746f6b656e2d777374782d76320616b2f458ea9d515f45a53e92661438c6d3404278a80b746f6b656e2d77666c61740100000000000000000000000005f5e100010000000000000000000000174876e8000a0100000000000000000000506aa9ca01a4"},"description":"Execute a real (unsigned) Stacks transaction against the simulation fork. Generates a full receipt (events, vm_error, post_condition_aborted, execution_cost), consumes nonce, charges fee, enforces post-conditions. The signature is not verified — the simulator trusts the `origin` principal extracted from the spending condition (see the `setSender` helper in the SDK). Use the same hex format as the instant-simulation route.\n\nWhen to choose between `Transaction` / `Eval` / `EvalReadonly`:\n- `Transaction` — real tx mechanics: receipt + events + post-conditions + fee + nonce. The only variant that emits a `TransactionReceipt`.\n- `Eval` — arbitrary Clarity with **write access** to contract storage; no fee / nonce / post-conditions / events / receipt. Use to stub state mid-session or run code with side-effects but without tx ceremony.\n- `EvalReadonly` (a `Reads` batch sub-type, not a top-level step) — read-only Clarity expression in sender context; analyzer-enforced no writes. Cheapest projection."},{"type":"object","properties":{"Eval":{"type":"array","prefixItems":[{"type":"string","description":"sender principal"},{"type":"string","description":"optional sponsor principal (empty string if none)"},{"type":"string","description":"contract_id"},{"type":"string","description":"Clarity code to evaluate (write access to the contract)"}]}},"required":["Eval"],"example":{"Eval":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0","","SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","(var-set oracle-updater 'SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0)"]},"description":"Evaluate arbitrary Clarity code with **write access** to contract storage. Useful for stubbing state mid-session (`var-set`, `map-set`, etc.) or running code with side-effects without the ceremony of a full `Transaction` (no fee, no nonce consumption, no post-conditions, no receipt — just the resulting Clarity value or error). 4 parameters: [sender, optional_sponsor, contract_id, code].\n\nChoose `Eval` over `Transaction` when you need write access but do not want a real tx receipt or post-condition enforcement. Choose `EvalReadonly` (a `Reads` sub-type) over `Eval` when you only need to read — it is cheaper and the analyzer prevents accidental writes."},{"type":"object","properties":{"SetContractCode":{"type":"array","prefixItems":[{"type":"string","description":"contract_id (the target to replace)"},{"type":"string","description":"Clarity source code"},{"type":"number","description":"Clarity version number (1, 2, or 3)"}]}},"required":["SetContractCode"],"example":{"SetContractCode":["SP1Y5YSTAHZ88XYK1VPDH24GY0HPX5J4JECTMY4A1.wstx",";;; SIP010 interface for STX.\n\n(impl-trait 'SP2AKWJYC7BNY18W1XXKPGP0YVEK63QJG4793Z2D4.sip-010-trait-ft-standard.sip-010-trait)\n\n(define-public\n  (transfer\n    (amt  uint)\n    (from principal)\n    (to   principal)\n    (memo (optional (buff 34))))\n  (stx-transfer-memo? amt from to (default-to 0x memo)) )\n\n(define-read-only (get-name)                   (ok \"Wrapped STX\"))\n(define-read-only (get-symbol)                 (ok \"wSTX\"))\n(define-read-only (get-decimals)               (ok u6)) ;;micro stacks\n(define-read-only (get-balance (of principal)) (ok (stx-get-balance of)))\n(define-read-only (get-total-supply)           (ok stx-liquid-supply)) ;;XXX\n(define-read-only (get-token-uri)              (ok (some u\"https://stacks.co\")))\n\n;;; eof",2]},"description":"Replace the code of a contract using parameters [contract_id, code, clarity_version_number], use this with caution, try avoid changing the ABI of the contract, otherwise there will be unexpected behaviors"},{"type":"object","properties":{"Reads":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"MapEntry":{"type":"array","prefixItems":[{"type":"string","description":"contract_id"},{"type":"string","description":"map_name"},{"type":"string","description":"key — Clarity value serialized to hex"}]}},"required":["MapEntry"],"example":{"MapEntry":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","values","0d000000075354582f555344"]},"description":"Read a map entry with parameters [contract_id, map_name, key_serialize_to_hex]"},{"type":"object","properties":{"DataVar":{"type":"array","prefixItems":[{"type":"string","description":"contract_id"},{"type":"string","description":"variable_name"}]}},"required":["DataVar"],"example":{"DataVar":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","oracle-updater"]},"description":"Read a data variable with parameters [contract_id, variable_name]"},{"type":"object","properties":{"EvalReadonly":{"type":"array","prefixItems":[{"type":"string","description":"sender principal"},{"type":"string","description":"optional sponsor principal (empty string if none)"},{"type":"string","description":"contract_id"},{"type":"string","description":"Clarity expression to evaluate (read-only)"}]}},"required":["EvalReadonly"],"examples":[{"EvalReadonly":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0","","SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","(var-get oracle-updater)"]},{"EvalReadonly":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0","","SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","(contract-call? .dia-oracle get-value 'STX-USD)"]}],"description":"Evaluate an arbitrary **read-only** Clarity expression in the context of `sender` / `sponsor`. The Clarity analyzer rejects any expression that would mutate state, so this is a pure projection.\n\nUse `EvalReadonly` (a `Reads` batch sub-type) for derived reads — read-only contract calls, custom expressions, projections — when you need sender-context that `DataVar` / `MapEntry` cannot provide. Cheaper than a full `Eval` step.\n\nChoosing between read variants:\n- `DataVar`, `MapEntry` — direct storage reads, no Clarity evaluation; cheapest.\n- `EvalReadonly` — arbitrary read-only Clarity expression with sender/sponsor context.\n- `Eval` (top-level step variant, NOT a `Reads` sub-type) — arbitrary Clarity with **write access**; use only when you need to mutate state.\n- `Transaction` — real Stacks tx with receipt, events, post-conditions, fee, nonce."},{"type":"object","properties":{"StxBalance":{"type":"string"}},"required":["StxBalance"],"examples":[{"StxBalance":"SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0"},{"StxBalance":"SPQC38PW542EQJ5M11CR25P7BS1CA6QT4TBXGB3M.stableswap-stx-ststx-v-1-2"}],"description":"Read the STX balance of a principal"},{"type":"object","properties":{"FtBalance":{"type":"array","prefixItems":[{"type":"string","description":"contract_id of the FT contract"},{"type":"string","description":"ft_token_name (asset identifier)"},{"type":"string","description":"holder principal"}]}},"required":["FtBalance"],"example":{"FtBalance":["SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token","sbtc-token","SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4"]},"description":"Read the fungible token balance of a principal using parameters [contract_id, ft_token_name, principal]"},{"type":"object","properties":{"FtSupply":{"type":"array","prefixItems":[{"type":"string","description":"contract_id of the FT contract"},{"type":"string","description":"ft_token_name (asset identifier)"}]}},"required":["FtSupply"],"example":{"FtSupply":["SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token","sbtc-token"]},"description":"Read the total supply of a fungible token using parameters [contract_id, ft_token_name]"},{"type":"object","properties":{"Nonce":{"type":"string"}},"required":["Nonce"],"example":{"Nonce":"SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0"},"description":"Read the nonce of a principal"}],"description":"Tagged union — the object has exactly one of these keys: `MapEntry`, `DataVar`, `EvalReadonly`, `StxBalance`, `FtBalance`, `FtSupply`, or `Nonce`. The key name selects the read kind and determines the shape of the value."}}},"required":["Reads"],"example":{"Reads":[{"StxBalance":"SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0"},{"Nonce":"SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0"}]},"description":"Issue a batch of read steps in-line with the other steps in this submit. Reads see the simulation's forked state at the point this step runs (so they reflect prior steps in the same submit). For pure projection without consuming a step slot in the session timeline, prefer `POST /devtools/v2/simulations/{id}/reads`."},{"type":"object","properties":{"TenureExtend":{"anyOf":[{"type":"array","prefixItems":[]},{"type":"object","properties":{"cause":{"type":"string","enum":["Extended","ExtendedRuntime","ExtendedReadCount","ExtendedReadLength","ExtendedWriteCount","ExtendedWriteLength"],"description":"Tenure-extend cause. `Extended` resets all cost dimensions; the SIP-034 variants reset a single dimension only."}},"required":["cause"]}]}},"required":["TenureExtend"],"examples":[{"TenureExtend":[]},{"TenureExtend":{"cause":"Extended"}},{"TenureExtend":{"cause":"ExtendedRuntime"}}],"description":"Mimic a tenure-extend transaction by resetting the current cost. Two on-the-wire shapes are accepted: legacy `[]` (treated as `cause: 'Extended'`) and modern `{ cause: <TenureExtendCause> }`."},{"type":"object","properties":{"AdvanceBlocks":{"type":"object","properties":{"bitcoin_blocks":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of bitcoin blocks to synthesize. May be zero only when stacks_blocks_per_bitcoin > 0 (extends the current tenure with stacks-only blocks)."},"stacks_blocks_per_bitcoin":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Stacks blocks to synthesize per bitcoin block. Must be >= 1 if bitcoin_blocks > 0."},"bitcoin_interval_secs":{"description":"Burn-block-time delta between synthesized bitcoin blocks. Defaults to 600 (mainnet target). Must be >= stacks_blocks_per_bitcoin.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"burn_header_hashes":{"description":"Per-burn-index burn-header-hash overrides keyed by 0-based index within this batch.","type":"object","propertyNames":{"type":"string","pattern":"^\\d+$"},"additionalProperties":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}},"pox_addrs":{"description":"Per-burn-index PoX address overrides: `[addrs, payout_ustx]`.","type":"object","propertyNames":{"type":"string","pattern":"^\\d+$"},"additionalProperties":{"type":"array","prefixItems":[{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":0,"maximum":255},"hashbytes":{"type":"string","pattern":"^[0-9a-fA-F]*$","description":"PoX address hashbytes as hex"}},"required":["version","hashbytes"]}},{"anyOf":[{"type":"number"},{"type":"string"}]}]}},"vrf_seeds":{"description":"Per-burn-index VRF-seed overrides keyed by 0-based index.","type":"object","propertyNames":{"type":"string","pattern":"^\\d+$"},"additionalProperties":{"type":"string","pattern":"^[0-9a-fA-F]{64}$","description":"32-byte VRF seed as hex (no 0x prefix)"}}},"required":["bitcoin_blocks","stacks_blocks_per_bitcoin"],"description":"AdvanceBlocks step — synthesize bitcoin and stacks blocks on top of the pinned parent tip. No semantic caps are enforced at the API layer; upstream `validate_advance_args` is the authority on bounds."}},"required":["AdvanceBlocks"],"example":{"AdvanceBlocks":{"bitcoin_blocks":1,"stacks_blocks_per_bitcoin":1}},"description":"Synthesize bitcoin and stacks blocks on top of the pinned parent tip. Used to model burn-block / tenure boundaries (bridge contracts, time-locked redemptions, locked-STX unlock)."}],"description":"Tagged union — the object has exactly one of these keys: `Transaction`, `Eval`, `SetContractCode`, `Reads`, `TenureExtend`, or `AdvanceBlocks`. The key name selects the step kind and determines the shape of the value."},"description":"The steps to simulate, complex types are not rendered properly on Scalar UI, you can use Swagger UI to view it"}},"required":["steps"]}}}}},"get":{"operationId":"getDevtoolsV2SimulationsBySimulationId","tags":["Simulation"],"summary":"Get simulation results summary","responses":{"200":{"description":"Simulation summary","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"block_height":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"block_hash":{"type":"string"},"burn_block_height":{"type":"number"},"burn_block_hash":{"type":"string"},"consensus_hash":{"type":"string"},"epoch":{"type":"string"},"index_block_hash":{"type":"string"},"skip_tracing":{"type":"boolean"},"sortition_id":{"type":"string"}},"required":["block_height","block_hash","burn_block_height","burn_block_hash","consensus_hash","epoch","index_block_hash","skip_tracing","sortition_id"],"additionalProperties":false},"steps":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Transaction":{"type":"string","description":"The transaction serialized to hex"},"TxId":{"type":"string","description":"Hex-encoded txid for executed transactions. Empty string (`\"\"`) when the transaction failed before getting a txid (engine-level `Err`)."},"Result":{"type":"object","properties":{"Transaction":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"object","properties":{"result":{"type":"string","pattern":"^[0-9a-f]*$","description":"The Clarity return value, SIP-005 hex-serialized. For contract-call transactions this includes the `(ok ...)` / `(err ...)` response wrapper — a Clarity-level `(err uX)` is encoded here, NOT in the outer `Err` variant.","format":"clarity-hex"},"stx_burned":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"STX (in micro-STX) burned by this transaction. u128 — accept as `number | string` to preserve precision above 2^53."},"tx_index":{"type":"number"},"vm_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message from the upstream Clarity VM. `null` when the transaction had no VM-level issue. When `post_condition_aborted` is `true` this field is also populated with the PC abort reason — check `post_condition_aborted` first to disambiguate a PC abort from a plain VM/analysis failure."},"post_condition_aborted":{"type":"boolean","description":"True when one or more post-conditions failed and the transaction was aborted. Implies `vm_error` is also set (to the abort reason); the reverse does not hold."},"costs":{"type":"number","description":"Time to run this simulation in milliseconds"},"execution_cost":{"type":"object","properties":{"read_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"read_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"write_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"write_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"runtime":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."}},"required":["read_count","read_length","write_count","write_length","runtime"],"additionalProperties":false},"events":{"type":"array","items":{"type":"string"},"description":"Events emitted during execution (contract logs, STX transfers, FT/NFT events, etc.). Each entry is a JSON-encoded **string** — callers must `JSON.parse` it to get the event object. Items are NOT JSON objects in the array."}},"required":["result","stx_burned","tx_index","vm_error","post_condition_aborted","costs","execution_cost","events"],"additionalProperties":false,"description":"A successful transaction-execution receipt. \"Successful\" here means the engine ran the transaction to completion — it does NOT imply the contract logic succeeded.\n\nFailure signals to check, in order:\n1. Outer `Err` variant on `Result.Transaction` — engine could not execute the transaction at all (deserialization failure, etc.). No receipt is produced.\n2. `post_condition_aborted: true` — execution ran but a post-condition tripped and rolled back state.\n3. `vm_error: string` (without PC abort) — Clarity VM raised a runtime error (e.g. arithmetic overflow, unwrap on none) or static analysis failed.\n4. `(err uX)` inside `result` — the contract returned a Clarity error response. This is application-level and is NOT signalled by any of the fields above; you must decode `result` to detect it.\n\n`post_condition_aborted` and `vm_error` are NOT independent. When a PC trips, the upstream sets `post_condition_aborted: true` AND writes the abort reason into `vm_error` — check `post_condition_aborted` first."}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` or `Err` is present. See zSimulationStepResult for failure-signal semantics."}},"required":["Transaction"],"additionalProperties":false},"ExecutionCost":{"type":"object","properties":{"read_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"read_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"write_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"write_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"runtime":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."}},"required":["read_count","read_length","write_count","write_length","runtime"],"additionalProperties":false}},"required":["Transaction","TxId","Result","ExecutionCost"],"additionalProperties":false},{"type":"object","properties":{"Reads":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"MapEntry":{"type":"array","prefixItems":[{"type":"string","description":"contract_id"},{"type":"string","description":"map_name"},{"type":"string","description":"key — Clarity value serialized to hex"}]}},"required":["MapEntry"],"additionalProperties":false,"example":{"MapEntry":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","values","0d000000075354582f555344"]},"description":"Read a map entry with parameters [contract_id, map_name, key_serialize_to_hex]"},{"type":"object","properties":{"DataVar":{"type":"array","prefixItems":[{"type":"string","description":"contract_id"},{"type":"string","description":"variable_name"}]}},"required":["DataVar"],"additionalProperties":false,"example":{"DataVar":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","oracle-updater"]},"description":"Read a data variable with parameters [contract_id, variable_name]"},{"type":"object","properties":{"EvalReadonly":{"type":"array","prefixItems":[{"type":"string","description":"sender principal"},{"type":"string","description":"optional sponsor principal (empty string if none)"},{"type":"string","description":"contract_id"},{"type":"string","description":"Clarity expression to evaluate (read-only)"}]}},"required":["EvalReadonly"],"additionalProperties":false,"examples":[{"EvalReadonly":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0","","SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","(var-get oracle-updater)"]},{"EvalReadonly":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0","","SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","(contract-call? .dia-oracle get-value 'STX-USD)"]}],"description":"Evaluate an arbitrary **read-only** Clarity expression in the context of `sender` / `sponsor`. The Clarity analyzer rejects any expression that would mutate state, so this is a pure projection.\n\nUse `EvalReadonly` (a `Reads` batch sub-type) for derived reads — read-only contract calls, custom expressions, projections — when you need sender-context that `DataVar` / `MapEntry` cannot provide. Cheaper than a full `Eval` step.\n\nChoosing between read variants:\n- `DataVar`, `MapEntry` — direct storage reads, no Clarity evaluation; cheapest.\n- `EvalReadonly` — arbitrary read-only Clarity expression with sender/sponsor context.\n- `Eval` (top-level step variant, NOT a `Reads` sub-type) — arbitrary Clarity with **write access**; use only when you need to mutate state.\n- `Transaction` — real Stacks tx with receipt, events, post-conditions, fee, nonce."},{"type":"object","properties":{"StxBalance":{"type":"string"}},"required":["StxBalance"],"additionalProperties":false,"examples":[{"StxBalance":"SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0"},{"StxBalance":"SPQC38PW542EQJ5M11CR25P7BS1CA6QT4TBXGB3M.stableswap-stx-ststx-v-1-2"}],"description":"Read the STX balance of a principal"},{"type":"object","properties":{"FtBalance":{"type":"array","prefixItems":[{"type":"string","description":"contract_id of the FT contract"},{"type":"string","description":"ft_token_name (asset identifier)"},{"type":"string","description":"holder principal"}]}},"required":["FtBalance"],"additionalProperties":false,"example":{"FtBalance":["SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token","sbtc-token","SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4"]},"description":"Read the fungible token balance of a principal using parameters [contract_id, ft_token_name, principal]"},{"type":"object","properties":{"FtSupply":{"type":"array","prefixItems":[{"type":"string","description":"contract_id of the FT contract"},{"type":"string","description":"ft_token_name (asset identifier)"}]}},"required":["FtSupply"],"additionalProperties":false,"example":{"FtSupply":["SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token","sbtc-token"]},"description":"Read the total supply of a fungible token using parameters [contract_id, ft_token_name]"},{"type":"object","properties":{"Nonce":{"type":"string"}},"required":["Nonce"],"additionalProperties":false,"example":{"Nonce":"SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0"},"description":"Read the nonce of a principal"}],"description":"Tagged union — the object has exactly one of these keys: `MapEntry`, `DataVar`, `EvalReadonly`, `StxBalance`, `FtBalance`, `FtSupply`, or `Nonce`. The key name selects the read kind and determines the shape of the value."}},"Result":{"type":"object","properties":{"Reads":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false,"description":"The read result, a clarity value serialized to hex or a number in string format"},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload) or `Err` (error message string) is present."}}},"required":["Reads"],"additionalProperties":false}},"required":["Reads","Result"],"additionalProperties":false},{"type":"object","properties":{"SetContractCode":{"type":"array","prefixItems":[{"type":"string","pattern":"^S[PMTN][0-9A-Z]+\\.[0-9a-zA-Z_-]+$","example":"SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.amm-pool-v2-01","description":"A contract identifier, e.g. SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.amm-pool-v2-01"},{"type":"string","description":"Clarity source code"},{"type":"number","description":"Clarity version number (1, 2, or 3)"}]},"Result":{"type":"object","properties":{"SetContractCode":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"null"}},"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (null payload) or `Err` (error message) is present."}},"required":["SetContractCode"],"additionalProperties":false}},"required":["SetContractCode","Result"],"additionalProperties":false},{"type":"object","properties":{"Eval":{"type":"array","prefixItems":[{"type":"string","description":"Sender principal"},{"type":"string","description":"Optional sponsor principal (empty if none)"},{"type":"string","pattern":"^S[PMTN][0-9A-Z]+\\.[0-9a-zA-Z_-]+$","example":"SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.amm-pool-v2-01","description":"A contract identifier, e.g. SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.amm-pool-v2-01"},{"type":"string","description":"Clarity code to evaluate"}]},"Result":{"type":"object","properties":{"Eval":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (hex-serialized Clarity result) or `Err` (error message) is present."}},"required":["Eval"],"additionalProperties":false}},"required":["Eval","Result"],"additionalProperties":false},{"type":"object","properties":{"TenureExtend":{"type":"object","properties":{"cause":{"type":"string","enum":["Extended","ExtendedRuntime","ExtendedReadCount","ExtendedReadLength","ExtendedWriteCount","ExtendedWriteLength"],"description":"Tenure-extend cause. `Extended` resets all cost dimensions; the SIP-034 variants reset a single dimension only."}},"required":["cause"],"additionalProperties":false},"Result":{"type":"object","properties":{"TenureExtend":{"type":"object","properties":{"read_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"read_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"write_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"write_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"runtime":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."}},"required":["read_count","read_length","write_count","write_length","runtime"],"additionalProperties":false}},"required":["TenureExtend"],"additionalProperties":false}},"required":["TenureExtend","Result"],"additionalProperties":false},{"type":"object","properties":{"AdvanceBlocks":{"type":"object","properties":{"bitcoin_blocks":{"type":"integer","minimum":0,"maximum":9007199254740991},"stacks_blocks_per_bitcoin":{"type":"integer","minimum":0,"maximum":9007199254740991},"bitcoin_interval_secs":{"anyOf":[{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d*$"}]},{"type":"null"}]},"burn_header_hashes":{"type":"object","propertyNames":{"type":"string","pattern":"^\\d+$"},"additionalProperties":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}},"pox_addrs":{"type":"object","propertyNames":{"type":"string","pattern":"^\\d+$"},"additionalProperties":{"type":"object","properties":{"addrs":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":0,"maximum":255},"hashbytes":{"type":"string","pattern":"^[0-9a-fA-F]*$","description":"PoX address hashbytes as hex"}},"required":["version","hashbytes"],"additionalProperties":false}},"payout":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["addrs","payout"],"additionalProperties":false}},"vrf_seeds":{"type":"object","propertyNames":{"type":"string","pattern":"^\\d+$"},"additionalProperties":{"type":"string","pattern":"^[0-9a-fA-F]{64}$","description":"32-byte VRF seed as hex (no 0x prefix)"}}},"required":["bitcoin_blocks","stacks_blocks_per_bitcoin","bitcoin_interval_secs","burn_header_hashes","pox_addrs","vrf_seeds"],"additionalProperties":false,"description":"Echoed AdvanceBlocks input as serialized in the summary response. Differs from the request shape in two ways: `bitcoin_interval_secs` is nullable (serde `Option`); `pox_addrs` values are `{addrs, payout}` objects (vs. the request tuple form)."},"Result":{"type":"object","properties":{"AdvanceBlocks":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"array","items":{"type":"object","properties":{"stacks_height":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"burn_height":{"type":"number"},"coinbase_height":{"type":"number"},"index_block_hash":{"type":"string","description":"Hex-encoded synthetic Stacks block id"},"burn_header_hash":{"type":"string","description":"Hex-encoded synthetic burn header hash"},"vrf_seed":{"type":"string","description":"Hex-encoded VRF seed for the synthesized block"},"block_time":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"burn_block_time":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"tenure_change":{"type":"boolean","description":"True when this synthetic block is the first stacks block in a new tenure (i.e. follows a synthesized bitcoin block)."}},"required":["stacks_height","burn_height","coinbase_height","index_block_hash","burn_header_hash","vrf_seed","block_time","burn_block_time","tenure_change"],"additionalProperties":false,"description":"One synthesized block produced by an `AdvanceBlocks` step."}}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — `Ok` carries the array of synthesized block summaries; `Err` is the validation/runtime message from upstream."}},"required":["AdvanceBlocks"],"additionalProperties":false}},"required":["AdvanceBlocks","Result"],"additionalProperties":false}],"description":"Tagged union summarizing one simulation step. The variant key (`Transaction`, `Reads`, `SetContractCode`, `Eval`, `TenureExtend`, or `AdvanceBlocks`) identifies the step kind. Each variant carries the original step input alongside its `Result`."}}},"required":["metadata","steps"],"additionalProperties":false}}}},"400":{"description":"Validation error — malformed step body, bad principal/contract id, or an `AdvanceBlocks` argument outside the upstream `validate_advance_args` bounds. The body is the raw validation message.","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Unknown route, unknown `simulation_id`, or (for `inspect/{txid}`) the txid has no debug trace — either the session was started with `skip_tracing: true`, the txid corresponds to an `Eval` / `AdvanceBlocks` step rather than a `Transaction`, or the session has been GC'd.","content":{"text/plain":{"schema":{"type":"string"}}}},"409":{"description":"Session busy. Body starts with `simulation_busy:` — another submit is in flight for this session. **Retry the same request** after a short backoff; do not start a new session.","content":{"text/plain":{"schema":{"type":"string"}}}},"410":{"description":"Session outdated. Body starts with `simulation_outdated:` — your session was created against an older simulator schema. **Start a new session** with `POST /devtools/v2/simulations`; the old `simulation_id` is unreachable.","content":{"text/plain":{"schema":{"type":"string"}}}}},"parameters":[{"in":"path","name":"simulation_id","schema":{"type":"string","minLength":32,"maxLength":32},"required":true}]}},"/devtools/v2/simulations/{simulation_id}/reads":{"post":{"operationId":"postDevtoolsV2SimulationsBySimulationIdReads","tags":["Simulation"],"summary":"Reads from the simulation session","description":"Batch reads from the simulation session, similar to the sidecar batch reads","responses":{"200":{"description":"Batch read response","content":{"application/json":{"schema":{"type":"object","properties":{"vars":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}},"maps":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}},"readonly":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}},"readonly_with_sender":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}},"stx":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}},"nonces":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}},"ft_balance":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}},"ft_supply":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"Ok":{"type":"string"}},"required":["Ok"],"additionalProperties":false},{"type":"object","properties":{"Err":{"type":"string"}},"required":["Err"],"additionalProperties":false}],"description":"Tagged union — exactly one of `Ok` (success payload string) or `Err` (error message) is present."}}},"additionalProperties":false,"description":"Each category is omitted from the response when the corresponding request field was empty/absent (rust `skip_serializing_if = Vec::is_empty`)."}}}},"400":{"description":"Validation error — malformed step body, bad principal/contract id, or an `AdvanceBlocks` argument outside the upstream `validate_advance_args` bounds. The body is the raw validation message.","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Unknown route, unknown `simulation_id`, or (for `inspect/{txid}`) the txid has no debug trace — either the session was started with `skip_tracing: true`, the txid corresponds to an `Eval` / `AdvanceBlocks` step rather than a `Transaction`, or the session has been GC'd.","content":{"text/plain":{"schema":{"type":"string"}}}},"409":{"description":"Session busy. Body starts with `simulation_busy:` — another submit is in flight for this session. **Retry the same request** after a short backoff; do not start a new session.","content":{"text/plain":{"schema":{"type":"string"}}}},"410":{"description":"Session outdated. Body starts with `simulation_outdated:` — your session was created against an older simulator schema. **Start a new session** with `POST /devtools/v2/simulations`; the old `simulation_id` is unreachable.","content":{"text/plain":{"schema":{"type":"string"}}}}},"parameters":[{"in":"path","name":"simulation_id","schema":{"type":"string","minLength":32,"maxLength":32},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vars":{"description":"The contract id and the variable name","type":"array","items":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}],"example":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","oracle-updater"]}},"maps":{"description":"The contract id, the map name and the key","type":"array","items":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"},{"type":"string"}],"example":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","values","0d000000075354582f555344"]}},"readonly":{"description":"Each entry is `[contract_id, function_name, ...arg_hex]` — fixed first two positions, then one hex-encoded Clarity value per function argument.","type":"array","items":{"type":"array","prefixItems":[{"type":"string","description":"contract_id"},{"type":"string","description":"function_name"}],"items":{"type":"string","description":"arg — Clarity value serialized to hex"},"example":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","get-value","0d000000075354582f555344"]}},"readonly_with_sender":{"description":"Each entry is `[sender, sponsor, contract_id, function_name, ...arg_hex]` — fixed first four positions, then one hex-encoded Clarity value per function argument.","type":"array","items":{"type":"array","prefixItems":[{"type":"string","description":"sender principal"},{"type":"string","description":"optional sponsor principal (empty string if none)"},{"type":"string","description":"contract_id"},{"type":"string","description":"function_name"}],"items":{"type":"string","description":"arg — Clarity value serialized to hex"},"example":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0","","SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0.dia-oracle","get-value","0d000000075354582f555344"]}},"stx":{"description":"The principals","example":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0","SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM"],"type":"array","items":{"type":"string"}},"nonces":{"description":"The principals","example":["SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0","SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM"],"type":"array","items":{"type":"string"}},"ft_balance":{"description":"The ft token identifier and the principal","type":"array","items":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}],"example":["SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token::sbtc-token","SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4"]}},"ft_supply":{"description":"A flat array of FT identifiers in `<contract_id>::<token_name>` form (one entry per token to look up).","example":["SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token::sbtc-token","SP1Y5YSTAHZ88XYK1VPDH24GY0HPX5J4JECTMY4A1.velar-token::velar"],"type":"array","items":{"type":"string"}}}}}}}}},"/devtools/v2/simulations/{simulation_id}/tip":{"get":{"operationId":"getDevtoolsV2SimulationsBySimulationIdTip","tags":["Simulation"],"summary":"Get the current tip of a simulation session","description":"Returns the latest synthetic tip when at least one `AdvanceBlocks` step has run (`synthetic: true`, includes `vrf_seed` and `tenure_change`); otherwise returns the parent metadata pinned at session start (`synthetic: false`, `vrf_seed` and `tenure_change` omitted).","responses":{"200":{"description":"Simulation tip","content":{"application/json":{"schema":{"type":"object","properties":{"synthetic":{"type":"boolean","description":"True when the latest tip is a synthesized block (added by AdvanceBlocks); false when no synthetic blocks exist yet."},"stacks_height":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"burn_height":{"type":"number"},"coinbase_height":{"type":"number"},"block_time":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"burn_block_time":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}],"description":"Unsigned 64-bit integer. Wire form is a JSON number; values above 2^53 may arrive as a decimal string to preserve precision."},"index_block_hash":{"type":"string"},"consensus_hash":{"type":"string"},"burn_header_hash":{"type":"string"},"sortition_id":{"type":"string"},"epoch":{"type":"string"},"vrf_seed":{"description":"Only present for synthetic tips — VRF seed of the latest synthetic block.","type":"string"},"tenure_change":{"description":"Only present for synthetic tips — whether the latest synthetic block is a tenure change.","type":"boolean"}},"required":["synthetic","stacks_height","burn_height","coinbase_height","block_time","burn_block_time","index_block_hash","consensus_hash","burn_header_hash","sortition_id","epoch"],"additionalProperties":false,"description":"Current tip of a simulation session. When `synthetic` is false, fields mirror the pinned parent tip (no AdvanceBlocks step yet)."}}}},"400":{"description":"Validation error — malformed step body, bad principal/contract id, or an `AdvanceBlocks` argument outside the upstream `validate_advance_args` bounds. The body is the raw validation message.","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Unknown route, unknown `simulation_id`, or (for `inspect/{txid}`) the txid has no debug trace — either the session was started with `skip_tracing: true`, the txid corresponds to an `Eval` / `AdvanceBlocks` step rather than a `Transaction`, or the session has been GC'd.","content":{"text/plain":{"schema":{"type":"string"}}}},"409":{"description":"Session busy. Body starts with `simulation_busy:` — another submit is in flight for this session. **Retry the same request** after a short backoff; do not start a new session.","content":{"text/plain":{"schema":{"type":"string"}}}},"410":{"description":"Session outdated. Body starts with `simulation_outdated:` — your session was created against an older simulator schema. **Start a new session** with `POST /devtools/v2/simulations`; the old `simulation_id` is unreachable.","content":{"text/plain":{"schema":{"type":"string"}}}}},"parameters":[{"in":"path","name":"simulation_id","schema":{"type":"string","minLength":32,"maxLength":32},"required":true}]}},"/devtools/v2/simulations/{simulation_id}/inspect/{txid}":{"get":{"operationId":"getDevtoolsV2SimulationsBySimulationIdInspectByTxid","tags":["Simulation"],"summary":"Get debug trace data for a transaction in a simulation","description":"Debug tracing data for onchain transaction execution in binary format for the stxer debug UI","responses":{"200":{"description":"Binary trace data","content":{"application/octet-stream":{"schema":{}}}},"400":{"description":"Validation error — malformed step body, bad principal/contract id, or an `AdvanceBlocks` argument outside the upstream `validate_advance_args` bounds. The body is the raw validation message.","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Unknown route, unknown `simulation_id`, or (for `inspect/{txid}`) the txid has no debug trace — either the session was started with `skip_tracing: true`, the txid corresponds to an `Eval` / `AdvanceBlocks` step rather than a `Transaction`, or the session has been GC'd.","content":{"text/plain":{"schema":{"type":"string"}}}},"409":{"description":"Session busy. Body starts with `simulation_busy:` — another submit is in flight for this session. **Retry the same request** after a short backoff; do not start a new session.","content":{"text/plain":{"schema":{"type":"string"}}}},"410":{"description":"Session outdated. Body starts with `simulation_outdated:` — your session was created against an older simulator schema. **Start a new session** with `POST /devtools/v2/simulations`; the old `simulation_id` is unreachable.","content":{"text/plain":{"schema":{"type":"string"}}}}},"parameters":[{"in":"path","name":"simulation_id","schema":{"type":"string","minLength":32,"maxLength":32},"required":true},{"in":"path","name":"txid","schema":{"type":"string","minLength":64,"maxLength":64},"required":true}]}}},"components":{"schemas":{"SymbolicExpression":{"description":"Recursive AST expression node","type":"object","properties":{"id":{"type":"number"},"span":{"type":"string"},"expr":{"anyOf":[{"type":"object","properties":{"atom_value":{"type":"string"}},"required":["atom_value"],"additionalProperties":false},{"type":"object","properties":{"atom":{"type":"string"}},"required":["atom"],"additionalProperties":false},{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/SymbolicExpression"}}},"required":["list"],"additionalProperties":false},{"type":"object","properties":{"literal_value":{"type":"string"}},"required":["literal_value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string"}},"required":["field"],"additionalProperties":false},{"type":"object","properties":{"trait_reference":{"type":"object","properties":{"clarity_name":{"type":"string"},"trait_definition":{"type":"string"},"trait_definition_type":{"type":"string","enum":["Defined","Imported"]}},"required":["clarity_name","trait_definition","trait_definition_type"],"additionalProperties":false}},"required":["trait_reference"],"additionalProperties":false}]},"pre_comments":{"type":"array","items":{"type":"object","properties":{"comment":{"type":"string"},"span":{"type":"string"}},"required":["comment","span"],"additionalProperties":false}},"post_comments":{"type":"array","items":{"type":"object","properties":{"comment":{"type":"string"},"span":{"type":"string"}},"required":["comment","span"],"additionalProperties":false}},"end_line_comment":{"type":"string"}},"required":["id","span","expr"],"additionalProperties":false},"ClarityAbi":{"type":"object","properties":{"functions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"access":{"type":"string","enum":["private","public","read_only"]},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"description":"ClarityAbiType in @stacks/transactions/dist/contract-abi.d.ts"}},"required":["name","type"],"additionalProperties":false}},"outputs":{"type":"object","properties":{"type":{"description":"ClarityAbiType in @stacks/transactions/dist/contract-abi.d.ts"}},"required":["type"],"additionalProperties":false}},"required":["name","access","args","outputs"],"additionalProperties":false}},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"access":{"type":"string","enum":["variable","constant"]},"type":{"description":"ClarityAbiType in @stacks/transactions/dist/contract-abi.d.ts"}},"required":["name","access","type"],"additionalProperties":false}},"maps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"key":{"description":"ClarityAbiType in @stacks/transactions/dist/contract-abi.d.ts"},"value":{"description":"ClarityAbiType in @stacks/transactions/dist/contract-abi.d.ts"}},"required":["name","key","value"],"additionalProperties":false}},"fungible_tokens":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"non_fungible_tokens":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"description":"ClarityAbiType in @stacks/transactions/dist/contract-abi.d.ts"}},"required":["name","type"],"additionalProperties":false}},"epoch":{"type":"string","enum":["Epoch10","Epoch20","Epoch2_05","Epoch21","Epoch22","Epoch23","Epoch24","Epoch25","Epoch30","Epoch31","Epoch32","Epoch33","Epoch34","Epoch40"]},"clarity_version":{"type":"string","enum":["Clarity1","Clarity2","Clarity3","Clarity4","Clarity5","Clarity6"]}},"required":["functions","variables","maps","fungible_tokens","non_fungible_tokens","epoch","clarity_version"],"additionalProperties":false},"ContractAST":{"type":"object","properties":{"contract_identifier":{"type":"string"},"expressions":{"type":"array","items":{"$ref":"#/components/schemas/SymbolicExpression"}},"top_level_expression_sorting":{"type":"array","items":{"type":"number"}},"referenced_traits":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"trait_definition":{"type":"string"},"trait_definition_type":{"type":"string","enum":["Defined","Imported"]}},"required":["trait_definition","trait_definition_type"],"additionalProperties":false}},"implemented_traits":{"type":"array","items":{"type":"string"}}},"required":["contract_identifier","expressions","top_level_expression_sorting","referenced_traits","implemented_traits"],"additionalProperties":false}}}}