{"openapi":"3.1.0","info":{"title":"MST local HTTP API","version":"0.1.0","description":"Rust API plus app web commerce endpoints for test environments. AMM uses SDK/contracts. User purchases/reservations require their wallet; the authenticated commerce operator may settle existing prepaid units. Rust body limit65536 bytes; commerce usage8192 bytes. Generated from the same catalog as /docs/api."},"servers":[{"url":"http://127.0.0.1:9411","description":"Local Rust API (not a hosted production endpoint)"}],"tags":[{"name":"Core"},{"name":"Perps"},{"name":"NFT"},{"name":"Demo"},{"name":"Commerce"}],"paths":{"/api/commerce":{"get":{"operationId":"commerce-state","tags":["Commerce"],"summary":"Sale and reservation state","description":"Read-only API on the app web server. Returns sale, fees and tariffs; optional account includes recent requests and lots. Chain integers are decimal strings.","parameters":[{"name":"chainId","required":false,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","enum":[31337,91342],"default":91342},"in":"query"},{"name":"account","required":false,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"servers":[{"url":"http://127.0.0.1:3177","description":"App web API"}]}},"/api/commerce/usage":{"post":{"operationId":"commerce-usage","tags":["Commerce"],"summary":"Settle product usage","description":"App web server; requires a product-scoped Bearer server key. Maximum8192-byte body, all values strings. Settles only the reserved service/operator scope. Retry a successful task reference with identical lot/units for the same canonical receipt and no second burn. Conflicting reuse409; unauthorized401. Does not execute an external task.","parameters":[],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommerceUsage"}}}},"servers":[{"url":"http://127.0.0.1:3177","description":"App web API"}],"security":[{"CommerceBearer":[]}]}},"/health":{"get":{"operationId":"health","tags":["Core"],"summary":"API health","description":"Reports RPC, chain and demo-engine configuration; this is separate from contract readiness.","parameters":[],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}}}},"/rpc":{"post":{"operationId":"rpc","tags":["Core"],"summary":"Read-only JSON-RPC","description":"Put chainId in the query. Only12 read methods are allowed; batches contain1–20 requests with unique IDs. Sending/signing methods return403.","parameters":[{"name":"chainId","required":false,"description":"Optional; defaults to the configured primary chain.","schema":{"type":"integer","minimum":1},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RpcInput"}}}}}},"/perps/status":{"get":{"operationId":"perps-status","tags":["Perps"],"summary":"Perpetual readiness and contracts","description":"Inspect ready/readReady/reasons, registered contracts and observation, including oracle/keeper readiness.","parameters":[{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpsStatus"}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/perps/status"}},"/perps/markets":{"get":{"operationId":"perps-markets","tags":["Perps"],"summary":"Markets","description":"Returns registered original GMX markets, tokens, precision and observations.","parameters":[{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpsMarkets"}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/perps/markets"}},"/perps/account":{"get":{"operationId":"perps-account","tags":["Perps"],"summary":"Account orders and positions","description":"Reads account orders and positions at a canonical observation block.","parameters":[{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"},{"name":"account","required":true,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"},{"name":"cursor","description":"Account item offset; default0. Accepted but unused by history.","schema":{"type":"integer","minimum":0},"in":"query"},{"name":"limit","description":"Default20 for account;50 for history.","schema":{"type":"integer","minimum":0},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/perps/account"}},"/perps/risk":{"get":{"operationId":"perps-risk","tags":["Perps"],"summary":"Position risk review","description":"Reads the original position by positionKey. Use estimate=true to request estimates.","parameters":[{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"},{"name":"account","required":true,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"},{"name":"positionKey","required":true,"description":"Original GMX position key.","schema":{"$ref":"#/components/schemas/Bytes32"},"in":"query"},{"name":"estimate","description":"Default:false.","schema":{"type":"boolean","default":false},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/perps/risk"}},"/perps/claims":{"get":{"operationId":"perps-claims","tags":["Perps"],"summary":"Claimable amounts","description":"Reads funding/collateral claim candidates and original observations.","parameters":[{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"},{"name":"account","required":true,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"},{"name":"cursor","description":"Optional scan cursor.","schema":{"type":"integer","minimum":0},"in":"query"},{"name":"span","description":"Scan span; default4096.","schema":{"type":"integer","minimum":0,"default":4096},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/perps/claims"}},"/perps/plan":{"post":{"operationId":"perps-plan","tags":["Perps"],"summary":"Unsigned transaction plan","description":"Reviews create/update/cancel/claimFunding/claimCollateral. Returns transaction, approval, riskReview, observation and expiry; the server does not sign/send. Valid through observation block+2 or time+30 seconds.","parameters":[],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpsPlan"}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpsIntent"}}}},"x-web-proxy-path":"/api/perps/plan"}},"/perps/history":{"get":{"operationId":"perps-history","tags":["Perps"],"summary":"Perpetual history","description":"Account history from the persistent journal. limit defaults to50; this handler currently does not use cursor.","parameters":[{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"},{"name":"account","required":true,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"},{"name":"cursor","description":"Account item offset; default0. Accepted but unused by history.","schema":{"type":"integer","minimum":0},"in":"query"},{"name":"limit","description":"Default20 for account;50 for history.","schema":{"type":"integer","minimum":0},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/perps/history"}},"/perps/transactions":{"post":{"operationId":"perps-transactions","tags":["Perps"],"summary":"Track a submitted transaction","description":"Registers an already-submitted wallet transaction hash and observes its receipt/status; it does not broadcast.","parameters":[],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpsTransaction"}}}},"x-web-proxy-path":"/api/perps/transactions"}},"/perps/mock-oracle":{"get":{"operationId":"perps-mock-get","tags":["Perps"],"summary":"Local mock oracle state","description":"Reads desired/applied revisions, prices and faults for explicit local-only control, separate from real feeds.","parameters":[{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/perps/mock-oracle","x-local-only":true},"post":{"operationId":"perps-mock-post","tags":["Perps"],"summary":"Request local mock prices","description":"Send the current expectedRevision and a complete registered-token price map. Checks Origin, saves a command for the keeper, then returns before application. Re-read revisions to confirm application.","parameters":[{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"},{"name":"Origin","in":"header","required":true,"description":"Must equal the configured web origin (local default:http://127.0.0.1:3177).","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockOracleChange"}}}},"x-web-proxy-path":"/api/perps/mock-oracle","x-local-only":true}},"/market/status":{"get":{"operationId":"market-status","tags":["NFT"],"summary":"NFT market status","description":"Returns registry, observation and meshpet-fixed-v1 policy for registered MeshPet/MST fixed-price trades.","parameters":[{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"},{"name":"cursor","description":"Opaque pagination cursor from nextCursor.","schema":{"type":"string"},"in":"query"},{"name":"limit","description":"Page size:1–50; default12.","schema":{"type":"integer","minimum":1,"maximum":50,"default":12},"in":"query"},{"name":"sort","description":"Default:newest.","schema":{"type":"string","enum":["newest","priceAsc","priceDesc"],"default":"newest"},"in":"query"},{"name":"seller","required":false,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"},{"name":"owner","required":false,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketStatus"}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/nft-market/status"}},"/market/challenges":{"post":{"operationId":"market-challenges","tags":["NFT"],"summary":"Order-book signing challenge","description":"Issues a five-minute, single-use nonce/message. personal_sign (EIP-191) the exact returned message and pass nonce/signature as authorization. This is separate from the Seaport listing EIP-712 signature.","parameters":[],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeResponse"}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeRequest"}}}},"x-web-proxy-path":"/api/nft-market/challenges"}},"/market/orders":{"get":{"operationId":"market-orders","tags":["NFT"],"summary":"Public listings","description":"Returns public listings, nextCursor and observation.","parameters":[{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"},{"name":"cursor","description":"Opaque pagination cursor from nextCursor.","schema":{"type":"string"},"in":"query"},{"name":"limit","description":"Page size:1–50; default12.","schema":{"type":"integer","minimum":1,"maximum":50,"default":12},"in":"query"},{"name":"sort","description":"Default:newest.","schema":{"type":"string","enum":["newest","priceAsc","priceDesc"],"default":"newest"},"in":"query"},{"name":"seller","required":false,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"},{"name":"owner","required":false,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketPage"}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/nft-market/orders"},"post":{"operationId":"market-save","tags":["NFT"],"summary":"Save a signed private listing","description":"Stores a verified Seaport order with save-challenge authorization. Initially private; publish separately. Does not fulfill on-chain.","parameters":[],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketItem"}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveOrder"}}}},"x-web-proxy-path":"/api/nft-market/orders"}},"/market/orders/private":{"post":{"operationId":"market-private","tags":["NFT"],"summary":"Read my private listings","description":"Uses a challenge with action=read and the zero orderHash. Cannot read another seller’s private listings.","parameters":[],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketPage"}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivateOrders"}}}},"x-web-proxy-path":"/api/nft-market/orders/private"}},"/market/orders/{hash}":{"get":{"operationId":"market-detail","tags":["NFT"],"summary":"Public listing detail","description":"Reads item and observation for a public order hash.","parameters":[{"name":"hash","required":true,"description":"EVM address or order hash.","schema":{"$ref":"#/components/schemas/Bytes32"},"in":"path"},{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"},{"name":"cursor","description":"Opaque pagination cursor from nextCursor.","schema":{"type":"string"},"in":"query"},{"name":"limit","description":"Page size:1–50; default12.","schema":{"type":"integer","minimum":1,"maximum":50,"default":12},"in":"query"},{"name":"sort","description":"Default:newest.","schema":{"type":"string","enum":["newest","priceAsc","priceDesc"],"default":"newest"},"in":"query"},{"name":"seller","required":false,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"},{"name":"owner","required":false,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketItem"}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/nft-market/orders/{hash}"}},"/market/orders/{hash}/visibility":{"post":{"operationId":"market-visibility","tags":["NFT"],"summary":"Publish or hide a listing","description":"Use a publish challenge for visible=true, hide for false. Hiding does not cancel an on-chain signed order. Publishing revalidates original state.","parameters":[{"name":"hash","required":true,"description":"EVM address or order hash.","schema":{"$ref":"#/components/schemas/Bytes32"},"in":"path"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketItem"}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderVisibility"}}}},"x-web-proxy-path":"/api/nft-market/orders/{hash}/visibility"}},"/market/owned":{"get":{"operationId":"market-owned","tags":["NFT"],"summary":"Owned NFTs","description":"owner is required; reads holdings of the registered collection.","parameters":[{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"},{"name":"cursor","description":"Opaque pagination cursor from nextCursor.","schema":{"type":"string"},"in":"query"},{"name":"limit","description":"Page size:1–50; default12.","schema":{"type":"integer","minimum":1,"maximum":50,"default":12},"in":"query"},{"name":"sort","description":"Default:newest.","schema":{"type":"string","enum":["newest","priceAsc","priceDesc"],"default":"newest"},"in":"query"},{"name":"seller","required":false,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"},{"name":"owner","required":true,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketPage"}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/nft-market/owned"}},"/market/activity":{"get":{"operationId":"market-activity","tags":["NFT"],"summary":"NFT activity","description":"Reads activity from original events and canonical observations.","parameters":[{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"},{"name":"cursor","description":"Opaque pagination cursor from nextCursor.","schema":{"type":"string"},"in":"query"},{"name":"limit","description":"Page size:1–50; default12.","schema":{"type":"integer","minimum":1,"maximum":50,"default":12},"in":"query"},{"name":"sort","description":"Default:newest.","schema":{"type":"string","enum":["newest","priceAsc","priceDesc"],"default":"newest"},"in":"query"},{"name":"seller","required":false,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"},{"name":"owner","required":false,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/nft-market/activity"}},"/market/transactions":{"get":{"operationId":"market-transactions-get","tags":["NFT"],"summary":"Account transaction history","description":"Requires owner; reads tracked transactions and receipt status.","parameters":[{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"},{"name":"cursor","description":"Opaque pagination cursor from nextCursor.","schema":{"type":"string"},"in":"query"},{"name":"limit","description":"Page size:1–50; default12.","schema":{"type":"integer","minimum":1,"maximum":50,"default":12},"in":"query"},{"name":"sort","description":"Default:newest.","schema":{"type":"string","enum":["newest","priceAsc","priceDesc"],"default":"newest"},"in":"query"},{"name":"seller","required":false,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"},{"name":"owner","required":true,"description":"EVM address (20 bytes).","schema":{"$ref":"#/components/schemas/Address"},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/nft-market/transactions"},"post":{"operationId":"market-transactions-post","tags":["NFT"],"summary":"Observe an NFT transaction","description":"Tracks an already-submitted txHash and orderHash. Signing, sending and fulfillment use the client wallet and Seaport.","parameters":[],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketTransaction"}}}},"x-web-proxy-path":"/api/nft-market/transactions"}},"/market/media/{collection}/{token}":{"get":{"operationId":"market-media","tags":["NFT"],"summary":"Pet NFT metadata","description":"Returns metadata and application media URLs for a registered collection/token.","parameters":[{"name":"collection","required":true,"description":"EVM address or order hash.","schema":{"$ref":"#/components/schemas/Address"},"in":"path"},{"name":"token","required":true,"description":"NFT token ID as a base10 uint256 string.","schema":{"$ref":"#/components/schemas/Uint256"},"in":"path"},{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/nft-market/media/{collection}/{token}"}},"/market/media/{collection}/{token}/{file}":{"get":{"operationId":"market-image","tags":["NFT"],"summary":"Pet PNG / sprite","description":"file is the 0x{64-hex-digit digest}.png returned by metadata. Must match the current art or sprite digest.","parameters":[{"name":"collection","required":true,"description":"EVM address or order hash.","schema":{"$ref":"#/components/schemas/Address"},"in":"path"},{"name":"token","required":true,"description":"NFT token ID as a base10 uint256 string.","schema":{"$ref":"#/components/schemas/Uint256"},"in":"path"},{"name":"file","required":true,"description":"Metadata-provided digest followed by.png.","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}\\.png$"},"in":"path"},{"name":"chainId","required":true,"description":"Registered chain ID. Local:31337. Chain ID alone does not identify the genesis.","schema":{"type":"integer","minimum":1},"in":"query"}],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-web-proxy-path":"/api/nft-market/media/{collection}/{token}/{file}"}},"/demo/oracle":{"get":{"operationId":"demo-oracle-get","tags":["Demo"],"summary":"Read demo scenario","description":"Educational scenario frame, separate from an operational oracle feed or actual execution result.","parameters":[],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-local-only":true},"post":{"operationId":"demo-oracle-post","tags":["Demo"],"summary":"Select demo scenario","description":"Select normal/long-crash/short-squeeze/stale when local demo mode is enabled. This alone does not change contract prices.","parameters":[],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OracleScenario"}}}},"x-local-only":true}},"/demo/engine":{"get":{"operationId":"demo-engine-get","tags":["Demo"],"summary":"Read demo job","description":"Reads configured/job for the configured original-engine demo job.","parameters":[],"responses":{"200":{"description":"Successful response; inspect canonical observation/readiness where present.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-local-only":true},"post":{"operationId":"demo-engine-post","tags":["Demo"],"summary":"Run the local demo engine","description":"Runs the current scenario with no JSON body. Requires matching Origin.202/job means accepted;409 if a job is already running.","parameters":[{"name":"Origin","in":"header","required":true,"description":"Must equal the configured web origin (local default:http://127.0.0.1:3177).","schema":{"type":"string"}}],"responses":{"202":{"description":"Accepted; inspect job state.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Application or validation error. Status/code depends on endpoint; see API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"text/plain":{"schema":{"type":"string"}}}}},"x-local-only":true}}},"components":{"schemas":{"CommerceUsage":{"type":"object","additionalProperties":false,"properties":{"chainId":{"type":"string","enum":["31337","91342"]},"product":{"type":"string","enum":["meshcode","meshclan","meshlaw","aidocx","arise"]},"lotId":{"type":"string","pattern":"^[1-9][0-9]{0,77}$"},"units":{"type":"string","pattern":"^(?:[1-9][0-9]{0,5}|1000000)$"},"reference":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:@-]+$"}},"required":["chainId","product","lotId","units","reference"]},"Address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"EVM address."},"Bytes32":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"HexBytes":{"type":"string","pattern":"^0x([0-9a-fA-F]{2})*$"},"Uint256":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"Base10 integer string, no leading zeros; must fit uint256. Do not use a JSON number."},"RpcRequest":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"type":"string","enum":["eth_chainId","eth_blockNumber","eth_getBalance","eth_getCode","eth_call","eth_getLogs","eth_getBlockByNumber","eth_getTransactionReceipt","eth_getTransactionByHash","eth_getTransactionCount","eth_estimateGas","eth_gasPrice"]},"params":{"type":"array","items":{},"default":[]}},"description":"No notifications: id is required and cannot be null. Only allowlisted read methods are accepted."},"RpcInput":{"oneOf":[{"$ref":"#/components/schemas/RpcRequest"},{"type":"array","minItems":1,"maxItems":20,"items":{"$ref":"#/components/schemas/RpcRequest"}}],"description":"Batch IDs must be unique."},"PerpsIntent":{"type":"object","additionalProperties":false,"properties":{"chainId":{"type":"integer","minimum":1},"account":{"$ref":"#/components/schemas/Address"},"market":{"$ref":"#/components/schemas/Address"},"collateralToken":{"$ref":"#/components/schemas/Address"},"isLong":{"type":"boolean"},"action":{"type":"string","enum":["create","update","cancel","claimFunding","claimCollateral"]},"orderType":{"type":"integer","enum":[0,2,3,4,5,6],"default":0,"description":"Create requires2 market increase,3 limit increase,4 market decrease,5 TP or6 SL. Default0 is not a create order."},"orderKey":{"anyOf":[{"$ref":"#/components/schemas/Bytes32"},{"type":"null"}]},"sizeDeltaUsd":{"$ref":"#/components/schemas/Uint256","default":"0"},"collateralDeltaAmount":{"$ref":"#/components/schemas/Uint256","default":"0"},"acceptablePrice":{"$ref":"#/components/schemas/Uint256","default":"0"},"triggerPrice":{"$ref":"#/components/schemas/Uint256","default":"0"},"minOutputUsd":{"$ref":"#/components/schemas/Uint256","default":"0"},"executionFee":{"$ref":"#/components/schemas/Uint256","default":"0"},"validFromTime":{"$ref":"#/components/schemas/Uint256","default":"0"},"timeKey":{"$ref":"#/components/schemas/Uint256","default":"0"},"autoCancel":{"type":"boolean","default":false},"nativeCollateral":{"type":"boolean","default":false},"receiveNative":{"type":"boolean","default":false,"description":"Only supported new decrease/TP/SL with a WNT output pool."},"closePosition":{"type":"boolean","default":false}},"required":["chainId","account","market","collateralToken","isLong","action"]},"PerpsTransaction":{"type":"object","additionalProperties":false,"properties":{"chainId":{"type":"integer","minimum":1},"account":{"$ref":"#/components/schemas/Address"},"hash":{"$ref":"#/components/schemas/Bytes32"}},"required":["chainId","account","hash"]},"MockOracleChange":{"type":"object","additionalProperties":false,"properties":{"expectedRevision":{"type":"integer","minimum":0},"pricesUsd":{"type":"object","additionalProperties":{"type":"string","maxLength":24,"pattern":"^[0-9]+(\\.[0-9]{1,8})?$"},"description":"Complete map of registered token symbols to human USD decimal strings:greater than0, at most1,000,000,000; at most8 fractional digits and24 characters."},"fault":{"type":"string","enum":["none","stale","invalid-price"],"default":"none"},"faultSymbol":{"anyOf":[{"type":"string","description":"Required registered symbol for a fault; absent/null for none."},{"type":"null"}]}},"required":["expectedRevision","pricesUsd"]},"Authorization":{"type":"object","additionalProperties":false,"properties":{"nonce":{"$ref":"#/components/schemas/Bytes32"},"signature":{"$ref":"#/components/schemas/HexBytes"}},"required":["nonce","signature"]},"ChallengeRequest":{"type":"object","additionalProperties":false,"properties":{"chainId":{"type":"integer","minimum":1},"account":{"$ref":"#/components/schemas/Address"},"action":{"type":"string","enum":["save","publish","hide","read"]},"orderHash":{"$ref":"#/components/schemas/Bytes32","description":"Zero hash only for read; nonzero for save/publish/hide."}},"required":["chainId","account","action","orderHash"]},"OfferItem":{"type":"object","additionalProperties":false,"properties":{"itemType":{"type":"integer","const":2},"token":{"$ref":"#/components/schemas/Address"},"identifierOrCriteria":{"$ref":"#/components/schemas/Uint256"},"startAmount":{"const":"1"},"endAmount":{"const":"1"}},"required":["itemType","token","identifierOrCriteria","startAmount","endAmount"]},"ConsiderationItem":{"type":"object","additionalProperties":false,"properties":{"itemType":{"type":"integer","const":1},"token":{"$ref":"#/components/schemas/Address"},"identifierOrCriteria":{"const":"0"},"startAmount":{"$ref":"#/components/schemas/Uint256"},"endAmount":{"$ref":"#/components/schemas/Uint256"},"recipient":{"$ref":"#/components/schemas/Address"}},"required":["itemType","token","identifierOrCriteria","startAmount","endAmount","recipient"]},"OrderParameters":{"type":"object","additionalProperties":false,"properties":{"offerer":{"$ref":"#/components/schemas/Address"},"zone":{"$ref":"#/components/schemas/Address"},"offer":{"type":"array","minItems":1,"maxItems":1,"items":{"$ref":"#/components/schemas/OfferItem"}},"consideration":{"type":"array","minItems":1,"maxItems":2,"items":{"$ref":"#/components/schemas/ConsiderationItem"}},"orderType":{"const":0},"startTime":{"$ref":"#/components/schemas/Uint256"},"endTime":{"$ref":"#/components/schemas/Uint256"},"zoneHash":{"$ref":"#/components/schemas/Bytes32"},"salt":{"$ref":"#/components/schemas/Uint256"},"conduitKey":{"$ref":"#/components/schemas/Bytes32"},"counter":{"$ref":"#/components/schemas/Uint256"},"totalOriginalConsiderationItems":{"$ref":"#/components/schemas/Uint256"}},"required":["offerer","zone","offer","consideration","orderType","startTime","endTime","zoneHash","salt","conduitKey","counter","totalOriginalConsiderationItems"]},"SeaportOrder":{"type":"object","additionalProperties":false,"properties":{"parameters":{"$ref":"#/components/schemas/OrderParameters"},"signature":{"$ref":"#/components/schemas/HexBytes"}},"required":["parameters","signature"]},"SaveOrder":{"type":"object","additionalProperties":false,"properties":{"chainId":{"type":"integer","minimum":1},"order":{"$ref":"#/components/schemas/SeaportOrder"},"authorization":{"$ref":"#/components/schemas/Authorization"}},"required":["chainId","order","authorization"]},"PrivateOrders":{"type":"object","additionalProperties":false,"properties":{"chainId":{"type":"integer","minimum":1},"authorization":{"$ref":"#/components/schemas/Authorization"},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"limit":{"anyOf":[{"type":"integer","minimum":1,"maximum":50,"default":12},{"type":"null"}]},"sort":{"anyOf":[{"type":"string","enum":["newest","priceAsc","priceDesc"],"default":"newest"},{"type":"null"}]}},"required":["chainId","authorization"]},"OrderVisibility":{"type":"object","additionalProperties":false,"properties":{"chainId":{"type":"integer","minimum":1},"visible":{"type":"boolean"},"authorization":{"$ref":"#/components/schemas/Authorization"}},"required":["chainId","visible","authorization"]},"MarketTransaction":{"type":"object","additionalProperties":false,"properties":{"chainId":{"type":"integer","minimum":1},"txHash":{"$ref":"#/components/schemas/Bytes32"},"orderHash":{"$ref":"#/components/schemas/Bytes32"}},"required":["chainId","txHash","orderHash"]},"OracleScenario":{"type":"object","required":["scenario"],"properties":{"scenario":{"type":"string","enum":["normal","long-crash","short-squeeze","stale"]}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"observation":{"type":["object","null"],"additionalProperties":true}},"description":"Application errors use an error code. Framework validation failures may be plain text."},"Health":{"type":"object","additionalProperties":false,"properties":{"status":{"const":"ok"},"chainId":{"type":"integer","minimum":0},"rpcConfigured":{"type":"boolean"},"rpcProviders":{"type":"integer","minimum":0},"rpcChains":{"type":"array","items":{"type":"integer","minimum":0}},"demoOracle":{"type":"boolean"},"engineConfigured":{"type":"boolean"}},"required":["status","chainId","rpcConfigured","rpcProviders","rpcChains","demoOracle","engineConfigured"]},"PerpsObservation":{"type":"object","additionalProperties":false,"properties":{"blockNumber":{"type":"integer","minimum":0},"blockHash":{"$ref":"#/components/schemas/Bytes32"},"timestamp":{"type":"integer","minimum":0},"configurationVersion":{"$ref":"#/components/schemas/Bytes32"},"environment":{"type":"string"},"genesisHash":{"$ref":"#/components/schemas/Bytes32"}},"required":["blockNumber","blockHash","timestamp","configurationVersion","environment","genesisHash"]},"MarketObservation":{"type":"object","additionalProperties":false,"properties":{"chainId":{"type":"integer","minimum":0},"blockNumber":{"type":"integer","minimum":0},"blockHash":{"$ref":"#/components/schemas/Bytes32"},"timestamp":{"type":"integer","minimum":0},"head":{"type":"integer","minimum":0},"lag":{"type":"integer","minimum":0},"confirmations":{"type":"integer","minimum":0},"ready":{"type":"boolean"}},"required":["chainId","blockNumber","blockHash","timestamp","head","lag","confirmations","ready"]},"PerpsStatus":{"type":"object","additionalProperties":false,"properties":{"chainId":{"type":"integer","minimum":0},"ready":{"type":"boolean"},"readReady":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"string"}},"capabilities":{"type":"object","additionalProperties":{"type":"boolean"}},"keeperBlock":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"keeperSource":{"type":"string"},"keeperIssuedAt":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"keeperValidUntil":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"sourceCommit":{"type":"string"},"contracts":{"type":"object","additionalProperties":{"type":"object","additionalProperties":true}},"wrappedNativeToken":{"$ref":"#/components/schemas/Address"},"observation":{"$ref":"#/components/schemas/PerpsObservation"}},"required":["chainId","ready","readReady","reasons","capabilities","keeperBlock","keeperSource","keeperIssuedAt","keeperValidUntil","sourceCommit","contracts","wrappedNativeToken","observation"]},"PerpsMarkets":{"type":"object","additionalProperties":false,"properties":{"chainId":{"type":"integer","minimum":0},"rows":{"type":"array","items":{"type":"object","additionalProperties":true}},"observation":{"$ref":"#/components/schemas/PerpsObservation"}},"required":["chainId","rows","observation"]},"PerpsPlan":{"type":"object","additionalProperties":false,"properties":{"id":{"$ref":"#/components/schemas/Bytes32"},"chainId":{"type":"integer","minimum":0},"account":{"$ref":"#/components/schemas/Address"},"intent":{"$ref":"#/components/schemas/PerpsIntent"},"transaction":{"type":"object","additionalProperties":false,"properties":{"to":{"$ref":"#/components/schemas/Address"},"data":{"$ref":"#/components/schemas/HexBytes"},"value":{"$ref":"#/components/schemas/Uint256"},"gas":{"anyOf":[{"$ref":"#/components/schemas/Uint256"},{"type":"null"}]},"gasPrice":{"$ref":"#/components/schemas/Uint256"}},"required":["to","data","value","gas","gasPrice"]},"approval":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"requiresApproval":{"type":"boolean"},"executionFee":{"$ref":"#/components/schemas/Uint256"},"minimumExecutionFee":{"$ref":"#/components/schemas/Uint256"},"estimatedPrice":{},"riskReview":{},"orderCost":{},"receiver":{"$ref":"#/components/schemas/Address"},"positionKey":{"$ref":"#/components/schemas/Bytes32"},"observation":{"$ref":"#/components/schemas/PerpsObservation"},"validUntilBlock":{"type":"integer","minimum":0},"validUntilTime":{"type":"integer","minimum":0},"usdDecimals":{"const":30}},"required":["id","chainId","account","intent","transaction","approval","requiresApproval","executionFee","minimumExecutionFee","estimatedPrice","riskReview","orderCost","receiver","positionKey","observation","validUntilBlock","validUntilTime","usdDecimals"]},"MarketStatus":{"type":"object","additionalProperties":false,"properties":{"registry":{"type":"object","additionalProperties":true},"observation":{"$ref":"#/components/schemas/MarketObservation"},"policy":{"const":"meshpet-fixed-v1"}},"required":["registry","observation","policy"]},"MarketPage":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"observation":{"$ref":"#/components/schemas/MarketObservation"}},"required":["items","nextCursor","observation"]},"MarketItem":{"type":"object","additionalProperties":false,"properties":{"item":{"type":"object","additionalProperties":true},"observation":{"$ref":"#/components/schemas/MarketObservation"}},"required":["item","observation"]},"Challenge":{"type":"object","additionalProperties":false,"properties":{"nonce":{"$ref":"#/components/schemas/Bytes32"},"account":{"$ref":"#/components/schemas/Address"},"action":{"type":"string","enum":["save","publish","hide","read"]},"orderHash":{"$ref":"#/components/schemas/Bytes32"},"expiresAt":{"type":"integer","minimum":0},"message":{"type":"string"},"used":{"type":"boolean"}},"required":["nonce","account","action","orderHash","expiresAt","message","used"]},"ChallengeResponse":{"type":"object","additionalProperties":false,"properties":{"challenge":{"$ref":"#/components/schemas/Challenge"},"registry":{"type":"object","additionalProperties":true}},"required":["challenge","registry"]}},"securitySchemes":{"CommerceBearer":{"type":"http","scheme":"bearer","description":"Independent product-scoped server credential; never embed in a browser."}}}}