# trac-peer RPC API v1

## Health check

> Basic liveness probe.<br>

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"tags":[{"name":"Health"}],"servers":[{"url":"http://127.0.0.1:5001","description":"Local dev example"}],"paths":{"/v1/health":{"get":{"tags":["Health"],"summary":"Health check","description":"Basic liveness probe.\n","operationId":"health","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}}},"components":{"schemas":{"HealthResponse":{"type":"object","additionalProperties":false,"properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}}
```

## Peer + MSB status summary

> Status summary for the running peer and its embedded MSB client view.\
> \
> Useful for UIs to display:\
> \- peer identity (pubKeyHex, writerKeyHex, msbAddress)\
> \- subnet info (bootstrap/channel, signed/unsigned lengths)\
> \- MSB view (bootstrapHex, networkId, signedLength)<br>

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"tags":[{"name":"Status"}],"servers":[{"url":"http://127.0.0.1:5001","description":"Local dev example"}],"paths":{"/v1/status":{"get":{"tags":["Status"],"summary":"Peer + MSB status summary","description":"Status summary for the running peer and its embedded MSB client view.\n\nUseful for UIs to display:\n- peer identity (pubKeyHex, writerKeyHex, msbAddress)\n- subnet info (bootstrap/channel, signed/unsigned lengths)\n- MSB view (bootstrapHex, networkId, signedLength)\n","operationId":"status","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"500":{"$ref":"#/components/responses/ErrorResponse"}}}}},"components":{"schemas":{"StatusResponse":{"type":"object","additionalProperties":false,"properties":{"peer":{"$ref":"#/components/schemas/StatusPeer"},"msb":{"$ref":"#/components/schemas/StatusMsb"}},"required":["peer","msb"]},"StatusPeer":{"type":"object","additionalProperties":true,"properties":{"pubKeyHex":{"allOf":[{"$ref":"#/components/schemas/Hex32"}]},"writerKeyHex":{"allOf":[{"$ref":"#/components/schemas/Hex32"}]},"msbAddress":{"allOf":[{"$ref":"#/components/schemas/Bech32mTracAddress"}]},"baseWritable":{"type":"boolean"},"isIndexer":{"type":"boolean"},"isWriter":{"type":"boolean"},"subnetBootstrapHex":{"allOf":[{"$ref":"#/components/schemas/Hex32"}],"nullable":true},"subnetChannelUtf8":{"type":"string","nullable":true},"subnetSignedLength":{"type":"integer","format":"int64","nullable":true},"subnetUnsignedLength":{"type":"integer","format":"int64","nullable":true},"admin":{"allOf":[{"$ref":"#/components/schemas/Hex32"}],"nullable":true},"chatStatus":{"type":"string","enum":["on","off"],"nullable":true}}},"Hex32":{"type":"string","description":"32-byte hex string (64 hex chars)","pattern":"^[0-9a-fA-F]{64}$"},"Bech32mTracAddress":{"type":"string","description":"Trac bech32m address","pattern":"^trac1[0-9a-z]+$"},"StatusMsb":{"type":"object","additionalProperties":true,"properties":{"ready":{"type":"boolean"},"bootstrapHex":{"allOf":[{"$ref":"#/components/schemas/Hex32"}]},"networkId":{"type":"number"},"signedLength":{"type":"number"}},"required":["ready","bootstrapHex","networkId","signedLength"]},"ErrorResponse":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"}},"required":["error"]}},"responses":{"ErrorResponse":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}
```

## Contract schema (ABI-like discovery)

> ABI-like discovery document for wallets/dApps.\
> \
> Includes:\
> \- supported contract transaction types (\`contract.txTypes\`)\
> \- per-op input schema hints (\`contract.ops\`)\
> \- protocol API method schema (\`api.methods\`)<br>

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"tags":[{"name":"Contract"}],"servers":[{"url":"http://127.0.0.1:5001","description":"Local dev example"}],"paths":{"/v1/contract/schema":{"get":{"tags":["Contract"],"summary":"Contract schema (ABI-like discovery)","description":"ABI-like discovery document for wallets/dApps.\n\nIncludes:\n- supported contract transaction types (`contract.txTypes`)\n- per-op input schema hints (`contract.ops`)\n- protocol API method schema (`api.methods`)\n","operationId":"contractSchema","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractSchemaResponse"}}}},"500":{"$ref":"#/components/responses/ErrorResponse"}}}}},"components":{"schemas":{"ContractSchemaResponse":{"type":"object","additionalProperties":false,"properties":{"schemaVersion":{"type":"number"},"schemaFormat":{"type":"string","enum":["json-schema"]},"contract":{"$ref":"#/components/schemas/ContractSchemaContract"},"api":{"$ref":"#/components/schemas/ContractSchemaApi"}},"required":["schemaVersion","schemaFormat","contract","api"]},"ContractSchemaContract":{"type":"object","additionalProperties":true,"properties":{"contractClass":{"type":"string","nullable":true},"protocolClass":{"type":"string","nullable":true},"txTypes":{"type":"array","items":{"type":"string"}},"ops":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ContractSchemaOp"}}},"required":["contractClass","protocolClass","txTypes","ops"]},"ContractSchemaOp":{"type":"object","additionalProperties":true,"properties":{"key":{"$ref":"#/components/schemas/JsonSchema"},"value":{"$ref":"#/components/schemas/JsonSchema"}},"required":["value"]},"JsonSchema":{"type":"object","description":"JSON Schema object (contract op schema or API schema)","additionalProperties":true},"ContractSchemaApi":{"type":"object","additionalProperties":true,"properties":{"methods":{"type":"object","additionalProperties":true}},"required":["methods"]},"ErrorResponse":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"}},"required":["error"]}},"responses":{"ErrorResponse":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}
```

## Generate a nonce for contract tx signing

> Generates a nonce used in the wallet signing payload.<br>

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"tags":[{"name":"Contract"}],"servers":[{"url":"http://127.0.0.1:5001","description":"Local dev example"}],"paths":{"/v1/contract/nonce":{"get":{"tags":["Contract"],"summary":"Generate a nonce for contract tx signing","description":"Generates a nonce used in the wallet signing payload.\n","operationId":"contractNonce","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponse"}}}},"500":{"$ref":"#/components/responses/ErrorResponse"}}}}},"components":{"schemas":{"NonceResponse":{"type":"object","additionalProperties":false,"properties":{"nonce":{"$ref":"#/components/schemas/Hex32"}},"required":["nonce"]},"Hex32":{"type":"string","description":"32-byte hex string (64 hex chars)","pattern":"^[0-9a-fA-F]{64}$"},"ErrorResponse":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"}},"required":["error"]}},"responses":{"ErrorResponse":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}
```

## Get tx signing context (MSB context)

> Returns the MSB tx context required for wallets to compute the contract tx hash.\
> \
> The wallet typically signs a payload derived from:\
> \- \`{ prepared\_command, nonce, context }\`<br>

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"tags":[{"name":"Contract"}],"servers":[{"url":"http://127.0.0.1:5001","description":"Local dev example"}],"paths":{"/v1/contract/tx/context":{"get":{"tags":["Contract"],"summary":"Get tx signing context (MSB context)","description":"Returns the MSB tx context required for wallets to compute the contract tx hash.\n\nThe wallet typically signs a payload derived from:\n- `{ prepared_command, nonce, context }`\n","operationId":"contractTxContext","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TxContextResponse"}}}},"500":{"$ref":"#/components/responses/ErrorResponse"}}}}},"components":{"schemas":{"TxContextResponse":{"type":"object","additionalProperties":false,"properties":{"msb":{"$ref":"#/components/schemas/TxContextMsb"}},"required":["msb"]},"TxContextMsb":{"type":"object","additionalProperties":false,"properties":{"networkId":{"type":"number"},"txv":{"$ref":"#/components/schemas/Hex32"},"iw":{"$ref":"#/components/schemas/Hex32"},"bs":{"$ref":"#/components/schemas/Hex32"},"mbs":{"$ref":"#/components/schemas/Hex32"},"operationType":{"type":"number"}},"required":["networkId","txv","iw","bs","mbs","operationType"]},"Hex32":{"type":"string","description":"32-byte hex string (64 hex chars)","pattern":"^[0-9a-fA-F]{64}$"},"ErrorResponse":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"}},"required":["error"]}},"responses":{"ErrorResponse":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}
```

## Simulate or broadcast a wallet-signed contract transaction

> Submits a wallet-signed contract transaction.\
> \
> Notes:\
> \- Tx submission is opt-in; operators must start the peer with \`--api-tx-exposed\`.\
> \- Use \`sim=true\` first (preflight) and only broadcast (\`sim=false\`) if simulation succeeds.<br>

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"tags":[{"name":"Contract"}],"servers":[{"url":"http://127.0.0.1:5001","description":"Local dev example"}],"paths":{"/v1/contract/tx":{"post":{"tags":["Contract"],"summary":"Simulate or broadcast a wallet-signed contract transaction","description":"Submits a wallet-signed contract transaction.\n\nNotes:\n- Tx submission is opt-in; operators must start the peer with `--api-tx-exposed`.\n- Use `sim=true` first (preflight) and only broadcast (`sim=false`) if simulation succeeds.\n","operationId":"contractTx","requestBody":{"required":true,"description":"Wallet-signed contract transaction payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractTxRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractTxResponse"}}}},"400":{"$ref":"#/components/responses/ErrorResponse"},"413":{"$ref":"#/components/responses/ErrorResponse"},"500":{"$ref":"#/components/responses/ErrorResponse"}}}}},"components":{"schemas":{"ContractTxRequest":{"type":"object","additionalProperties":false,"properties":{"tx":{"$ref":"#/components/schemas/Hex32"},"prepared_command":{"$ref":"#/components/schemas/PreparedCommand"},"address":{"$ref":"#/components/schemas/Hex32"},"signature":{"$ref":"#/components/schemas/Hex64"},"nonce":{"$ref":"#/components/schemas/Hex32"},"sim":{"type":"boolean","default":false}},"required":["tx","prepared_command","address","signature","nonce"]},"Hex32":{"type":"string","description":"32-byte hex string (64 hex chars)","pattern":"^[0-9a-fA-F]{64}$"},"PreparedCommand":{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","minLength":1,"maxLength":256},"value":{}},"required":["type","value"]},"Hex64":{"type":"string","description":"64-byte hex string (128 hex chars)","pattern":"^[0-9a-fA-F]{128}$"},"ContractTxResponse":{"type":"object","additionalProperties":true,"properties":{"result":{}},"required":["result"]},"ErrorResponse":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"}},"required":["error"]}},"responses":{"ErrorResponse":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}
```

## Read a single key from subnet state

> Reads one key from subnet state.\
> \
> \- \`confirmed=true\` reads from the subnet \*\*signed\*\* view (final snapshots).\
> \- \`confirmed=false\` reads from the latest local view (fast UI updates).<br>

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"tags":[{"name":"State"}],"servers":[{"url":"http://127.0.0.1:5001","description":"Local dev example"}],"paths":{"/v1/state":{"get":{"tags":["State"],"summary":"Read a single key from subnet state","description":"Reads one key from subnet state.\n\n- `confirmed=true` reads from the subnet **signed** view (final snapshots).\n- `confirmed=false` reads from the latest local view (fast UI updates).\n","operationId":"getState","parameters":[{"name":"key","in":"query","required":true,"description":"Exact Hyperbee key","schema":{"type":"string","minLength":1,"maxLength":4096}},{"name":"confirmed","in":"query","required":false,"description":"If true, reads from signed view; if false, reads from latest (unsigned) view","schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateResponse"}}}},"400":{"$ref":"#/components/responses/ErrorResponse"},"500":{"$ref":"#/components/responses/ErrorResponse"}}}}},"components":{"schemas":{"StateResponse":{"type":"object","additionalProperties":false,"properties":{"key":{"type":"string"},"confirmed":{"type":"boolean"},"value":{}},"required":["key","confirmed","value"]},"ErrorResponse":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"}},"required":["error"]}},"responses":{"ErrorResponse":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}
```

## The Hex32 object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"Hex32":{"type":"string","description":"32-byte hex string (64 hex chars)","pattern":"^[0-9a-fA-F]{64}$"}}}}
```

## The Hex64 object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"Hex64":{"type":"string","description":"64-byte hex string (128 hex chars)","pattern":"^[0-9a-fA-F]{128}$"}}}}
```

## The Bech32mTracAddress object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"Bech32mTracAddress":{"type":"string","description":"Trac bech32m address","pattern":"^trac1[0-9a-z]+$"}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"ErrorResponse":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"}},"required":["error"]}}}}
```

## The StatusPeer object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"StatusPeer":{"type":"object","additionalProperties":true,"properties":{"pubKeyHex":{"allOf":[{"$ref":"#/components/schemas/Hex32"}]},"writerKeyHex":{"allOf":[{"$ref":"#/components/schemas/Hex32"}]},"msbAddress":{"allOf":[{"$ref":"#/components/schemas/Bech32mTracAddress"}]},"baseWritable":{"type":"boolean"},"isIndexer":{"type":"boolean"},"isWriter":{"type":"boolean"},"subnetBootstrapHex":{"allOf":[{"$ref":"#/components/schemas/Hex32"}],"nullable":true},"subnetChannelUtf8":{"type":"string","nullable":true},"subnetSignedLength":{"type":"integer","format":"int64","nullable":true},"subnetUnsignedLength":{"type":"integer","format":"int64","nullable":true},"admin":{"allOf":[{"$ref":"#/components/schemas/Hex32"}],"nullable":true},"chatStatus":{"type":"string","enum":["on","off"],"nullable":true}}},"Hex32":{"type":"string","description":"32-byte hex string (64 hex chars)","pattern":"^[0-9a-fA-F]{64}$"},"Bech32mTracAddress":{"type":"string","description":"Trac bech32m address","pattern":"^trac1[0-9a-z]+$"}}}}
```

## The HealthResponse object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"HealthResponse":{"type":"object","additionalProperties":false,"properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}}
```

## The StatusMsb object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"StatusMsb":{"type":"object","additionalProperties":true,"properties":{"ready":{"type":"boolean"},"bootstrapHex":{"allOf":[{"$ref":"#/components/schemas/Hex32"}]},"networkId":{"type":"number"},"signedLength":{"type":"number"}},"required":["ready","bootstrapHex","networkId","signedLength"]},"Hex32":{"type":"string","description":"32-byte hex string (64 hex chars)","pattern":"^[0-9a-fA-F]{64}$"}}}}
```

## The StatusResponse object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"StatusResponse":{"type":"object","additionalProperties":false,"properties":{"peer":{"$ref":"#/components/schemas/StatusPeer"},"msb":{"$ref":"#/components/schemas/StatusMsb"}},"required":["peer","msb"]},"StatusPeer":{"type":"object","additionalProperties":true,"properties":{"pubKeyHex":{"allOf":[{"$ref":"#/components/schemas/Hex32"}]},"writerKeyHex":{"allOf":[{"$ref":"#/components/schemas/Hex32"}]},"msbAddress":{"allOf":[{"$ref":"#/components/schemas/Bech32mTracAddress"}]},"baseWritable":{"type":"boolean"},"isIndexer":{"type":"boolean"},"isWriter":{"type":"boolean"},"subnetBootstrapHex":{"allOf":[{"$ref":"#/components/schemas/Hex32"}],"nullable":true},"subnetChannelUtf8":{"type":"string","nullable":true},"subnetSignedLength":{"type":"integer","format":"int64","nullable":true},"subnetUnsignedLength":{"type":"integer","format":"int64","nullable":true},"admin":{"allOf":[{"$ref":"#/components/schemas/Hex32"}],"nullable":true},"chatStatus":{"type":"string","enum":["on","off"],"nullable":true}}},"Hex32":{"type":"string","description":"32-byte hex string (64 hex chars)","pattern":"^[0-9a-fA-F]{64}$"},"Bech32mTracAddress":{"type":"string","description":"Trac bech32m address","pattern":"^trac1[0-9a-z]+$"},"StatusMsb":{"type":"object","additionalProperties":true,"properties":{"ready":{"type":"boolean"},"bootstrapHex":{"allOf":[{"$ref":"#/components/schemas/Hex32"}]},"networkId":{"type":"number"},"signedLength":{"type":"number"}},"required":["ready","bootstrapHex","networkId","signedLength"]}}}}
```

## The JsonSchema object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"JsonSchema":{"type":"object","description":"JSON Schema object (contract op schema or API schema)","additionalProperties":true}}}}
```

## The ContractSchemaOp object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"ContractSchemaOp":{"type":"object","additionalProperties":true,"properties":{"key":{"$ref":"#/components/schemas/JsonSchema"},"value":{"$ref":"#/components/schemas/JsonSchema"}},"required":["value"]},"JsonSchema":{"type":"object","description":"JSON Schema object (contract op schema or API schema)","additionalProperties":true}}}}
```

## The ContractSchemaContract object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"ContractSchemaContract":{"type":"object","additionalProperties":true,"properties":{"contractClass":{"type":"string","nullable":true},"protocolClass":{"type":"string","nullable":true},"txTypes":{"type":"array","items":{"type":"string"}},"ops":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ContractSchemaOp"}}},"required":["contractClass","protocolClass","txTypes","ops"]},"ContractSchemaOp":{"type":"object","additionalProperties":true,"properties":{"key":{"$ref":"#/components/schemas/JsonSchema"},"value":{"$ref":"#/components/schemas/JsonSchema"}},"required":["value"]},"JsonSchema":{"type":"object","description":"JSON Schema object (contract op schema or API schema)","additionalProperties":true}}}}
```

## The ContractSchemaApi object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"ContractSchemaApi":{"type":"object","additionalProperties":true,"properties":{"methods":{"type":"object","additionalProperties":true}},"required":["methods"]}}}}
```

## The ContractSchemaResponse object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"ContractSchemaResponse":{"type":"object","additionalProperties":false,"properties":{"schemaVersion":{"type":"number"},"schemaFormat":{"type":"string","enum":["json-schema"]},"contract":{"$ref":"#/components/schemas/ContractSchemaContract"},"api":{"$ref":"#/components/schemas/ContractSchemaApi"}},"required":["schemaVersion","schemaFormat","contract","api"]},"ContractSchemaContract":{"type":"object","additionalProperties":true,"properties":{"contractClass":{"type":"string","nullable":true},"protocolClass":{"type":"string","nullable":true},"txTypes":{"type":"array","items":{"type":"string"}},"ops":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ContractSchemaOp"}}},"required":["contractClass","protocolClass","txTypes","ops"]},"ContractSchemaOp":{"type":"object","additionalProperties":true,"properties":{"key":{"$ref":"#/components/schemas/JsonSchema"},"value":{"$ref":"#/components/schemas/JsonSchema"}},"required":["value"]},"JsonSchema":{"type":"object","description":"JSON Schema object (contract op schema or API schema)","additionalProperties":true},"ContractSchemaApi":{"type":"object","additionalProperties":true,"properties":{"methods":{"type":"object","additionalProperties":true}},"required":["methods"]}}}}
```

## The NonceResponse object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"NonceResponse":{"type":"object","additionalProperties":false,"properties":{"nonce":{"$ref":"#/components/schemas/Hex32"}},"required":["nonce"]},"Hex32":{"type":"string","description":"32-byte hex string (64 hex chars)","pattern":"^[0-9a-fA-F]{64}$"}}}}
```

## The TxContextMsb object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"TxContextMsb":{"type":"object","additionalProperties":false,"properties":{"networkId":{"type":"number"},"txv":{"$ref":"#/components/schemas/Hex32"},"iw":{"$ref":"#/components/schemas/Hex32"},"bs":{"$ref":"#/components/schemas/Hex32"},"mbs":{"$ref":"#/components/schemas/Hex32"},"operationType":{"type":"number"}},"required":["networkId","txv","iw","bs","mbs","operationType"]},"Hex32":{"type":"string","description":"32-byte hex string (64 hex chars)","pattern":"^[0-9a-fA-F]{64}$"}}}}
```

## The TxContextResponse object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"TxContextResponse":{"type":"object","additionalProperties":false,"properties":{"msb":{"$ref":"#/components/schemas/TxContextMsb"}},"required":["msb"]},"TxContextMsb":{"type":"object","additionalProperties":false,"properties":{"networkId":{"type":"number"},"txv":{"$ref":"#/components/schemas/Hex32"},"iw":{"$ref":"#/components/schemas/Hex32"},"bs":{"$ref":"#/components/schemas/Hex32"},"mbs":{"$ref":"#/components/schemas/Hex32"},"operationType":{"type":"number"}},"required":["networkId","txv","iw","bs","mbs","operationType"]},"Hex32":{"type":"string","description":"32-byte hex string (64 hex chars)","pattern":"^[0-9a-fA-F]{64}$"}}}}
```

## The PreparedCommand object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"PreparedCommand":{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","minLength":1,"maxLength":256},"value":{}},"required":["type","value"]}}}}
```

## The ContractTxRequest object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"ContractTxRequest":{"type":"object","additionalProperties":false,"properties":{"tx":{"$ref":"#/components/schemas/Hex32"},"prepared_command":{"$ref":"#/components/schemas/PreparedCommand"},"address":{"$ref":"#/components/schemas/Hex32"},"signature":{"$ref":"#/components/schemas/Hex64"},"nonce":{"$ref":"#/components/schemas/Hex32"},"sim":{"type":"boolean","default":false}},"required":["tx","prepared_command","address","signature","nonce"]},"Hex32":{"type":"string","description":"32-byte hex string (64 hex chars)","pattern":"^[0-9a-fA-F]{64}$"},"PreparedCommand":{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","minLength":1,"maxLength":256},"value":{}},"required":["type","value"]},"Hex64":{"type":"string","description":"64-byte hex string (128 hex chars)","pattern":"^[0-9a-fA-F]{128}$"}}}}
```

## The ContractTxResponse object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"ContractTxResponse":{"type":"object","additionalProperties":true,"properties":{"result":{}},"required":["result"]}}}}
```

## The StateResponse object

```json
{"openapi":"3.0.3","info":{"title":"trac-peer RPC (HTTP)","version":"1.0.0"},"components":{"schemas":{"StateResponse":{"type":"object","additionalProperties":false,"properties":{"key":{"type":"string"},"confirmed":{"type":"boolean"},"value":{}},"required":["key","confirmed","value"]}}}}
```
