@totalis/hip4-client 0.0.0-stage → 0.65.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/CHANGELOG.md +1541 -0
  2. package/LICENSE +202 -0
  3. package/README.md +143 -2
  4. package/dist/api-keys.d.ts +118 -0
  5. package/dist/api-keys.js +104 -0
  6. package/dist/audience-contract.d.ts +52 -0
  7. package/dist/audience-contract.js +1 -0
  8. package/dist/base.d.ts +41 -0
  9. package/dist/base.js +60 -0
  10. package/dist/client.d.ts +16 -0
  11. package/dist/client.js +15 -0
  12. package/dist/controller.d.ts +50 -0
  13. package/dist/controller.js +60 -0
  14. package/dist/errors.d.ts +3 -0
  15. package/dist/errors.js +3 -0
  16. package/dist/flow-errors.d.ts +61 -0
  17. package/dist/flow-errors.js +70 -0
  18. package/dist/generated/account-read.d.ts +2009 -0
  19. package/dist/generated/account-read.js +1 -0
  20. package/dist/generated/api-keys.d.ts +1303 -0
  21. package/dist/generated/api-keys.js +1 -0
  22. package/dist/generated/browse.d.ts +938 -0
  23. package/dist/generated/browse.js +1 -0
  24. package/dist/generated/client.d.ts +73 -0
  25. package/dist/generated/client.js +1 -0
  26. package/dist/generated/errors.d.ts +404 -0
  27. package/dist/generated/errors.js +1342 -0
  28. package/dist/generated/maker.d.ts +47 -0
  29. package/dist/generated/maker.js +1 -0
  30. package/dist/generated/openapi.d.ts +8044 -0
  31. package/dist/generated/openapi.js +1 -0
  32. package/dist/generated/operator.d.ts +7 -0
  33. package/dist/generated/operator.js +1 -0
  34. package/dist/generated/realtime.d.ts +1416 -0
  35. package/dist/generated/realtime.js +1 -0
  36. package/dist/generated/vault-abi.d.ts +39 -0
  37. package/dist/generated/vault-abi.js +56 -0
  38. package/dist/generated/version.d.ts +23 -0
  39. package/dist/generated/version.js +143 -0
  40. package/dist/hypercore.d.ts +111 -0
  41. package/dist/hypercore.js +132 -0
  42. package/dist/maker.d.ts +205 -0
  43. package/dist/maker.js +608 -0
  44. package/dist/money.d.ts +59 -0
  45. package/dist/money.js +66 -0
  46. package/dist/operator.d.ts +4 -0
  47. package/dist/operator.js +4 -0
  48. package/dist/pagination.d.ts +20 -0
  49. package/dist/pagination.js +27 -0
  50. package/dist/partner.d.ts +59 -0
  51. package/dist/partner.js +57 -0
  52. package/dist/realtime.d.ts +19 -0
  53. package/dist/realtime.js +10 -0
  54. package/dist/request.d.ts +112 -0
  55. package/dist/request.js +187 -0
  56. package/dist/signer.d.ts +51 -0
  57. package/dist/signer.js +90 -0
  58. package/dist/stream.d.ts +133 -0
  59. package/dist/stream.js +318 -0
  60. package/dist/totalis.d.ts +656 -0
  61. package/dist/totalis.js +1160 -0
  62. package/dist/typed-data.d.ts +330 -0
  63. package/dist/typed-data.js +340 -0
  64. package/dist/ui.d.ts +54 -0
  65. package/dist/ui.js +77 -0
  66. package/dist/wallet-session.d.ts +45 -0
  67. package/dist/wallet-session.js +61 -0
  68. package/examples/browser-wallet.html +69 -0
  69. package/examples/browser-wallet.mjs +57 -0
  70. package/examples/node-bot.mjs +57 -0
  71. package/examples/onboard.mjs +132 -0
  72. package/examples/partner-frontend.mjs +44 -0
  73. package/examples/partner-server.mjs +22 -0
  74. package/package.json +104 -4
@@ -0,0 +1,1416 @@
1
+ export type paths = Record<string, never>;
2
+ export type webhooks = Record<string, never>;
3
+ export type components = {
4
+ schemas: {
5
+ readonly AccountReadInvalidation: components["schemas"]["Invalidation"];
6
+ readonly Cursor: {
7
+ /**
8
+ * Format: uuid
9
+ * @description Identifier of the delivery stream journal this cursor belongs to.
10
+ */
11
+ readonly stream_id: string;
12
+ /**
13
+ * Format: uuid
14
+ * @description Journal generation; a restore or reset starts a new generation, and sequences from different generations are never compared.
15
+ */
16
+ readonly generation_id: string;
17
+ /** @description Decimal position within the generation. It strictly increases but can skip numbers in a filtered view. */
18
+ readonly sequence: string;
19
+ };
20
+ readonly OperationUpdatedPayload: {
21
+ /** @description Operation identifier (32-byte hex). Read GET /v1/me/operations/{operation_id} for the full resource. */
22
+ readonly operation_id: components["schemas"]["Bytes32"];
23
+ /** @description Operation type, as the operation's kind: ACCEPT, SELL_BACK, CASHOUT_TRANSFER, WITHDRAW_USER and the others GET /v1/me/operations/{operation_id} names. Treat unlisted values as opaque. */
24
+ readonly kind: string;
25
+ /** @description Operation status after this change. QUEUED, IN_FLIGHT, RETRYABLE and UNKNOWN are nonterminal; COMMITTED (on chain), REVERTED and EXPIRED_UNEXECUTED are terminal. */
26
+ readonly status: components["schemas"]["OperationState"];
27
+ /** @description Chain transaction hash of the latest submission; null until a transaction has been submitted. */
28
+ readonly transaction_hash: components["schemas"]["Bytes32"] | null;
29
+ /** @description Why the operation ended without executing, as the operation's `failure_reason`: INSUFFICIENT_CASH on an EXPIRED_UNEXECUTED accept whose taker's Cash fell short. Present only then. */
30
+ readonly failure_reason?: components["schemas"]["OperationFailureReason"];
31
+ /** @description When the operation last changed state, RFC3339 UTC. */
32
+ readonly updated_at: components["schemas"]["Timestamp"];
33
+ };
34
+ readonly VaultBalanceChangedPayload: {
35
+ /** @description Linked wallet address whose vault balance changed. */
36
+ readonly address: components["schemas"]["LowercaseNonZeroAddress"];
37
+ /** @description Claimable vault balance of the address after the change, in atomic USDC (6 decimals); not the size of the change. */
38
+ readonly amount: components["schemas"]["Amount"];
39
+ /** @description Chain transaction that produced the balance change. */
40
+ readonly transaction_hash: components["schemas"]["Bytes32"];
41
+ /**
42
+ * @description Always COMMITTED: the change was observed in a committed chain transaction.
43
+ * @constant
44
+ */
45
+ readonly status: "COMMITTED";
46
+ };
47
+ /** @description A quote left an RFQ's book. An entry quote also stops being acceptable at its `accept_before`, which sends no event. */
48
+ readonly QuoteRemovedPayload: {
49
+ /** @description RFQ whose book lost the quote. */
50
+ readonly rfq_id: components["schemas"]["Uuid"];
51
+ /** @description Quote that left the book. */
52
+ readonly quote_id: components["schemas"]["Bytes32"];
53
+ /**
54
+ * @description Why it left. CANCELLED: the maker cancelled or declined it, its acceptance timed out, or the maker's quote lease lapsed. REPLACED: the maker created a newer quote on the RFQ. ACCEPTED: the maker's confirm accepted it.
55
+ * @enum {unknown}
56
+ */
57
+ readonly status: "CANCELLED" | "REPLACED" | "ACCEPTED";
58
+ };
59
+ readonly WalletFundingPayload: {
60
+ /** @description The acceptance whose wallet funding changed; its accept Idempotency-Key. */
61
+ readonly acceptance_id: components["schemas"]["Uuid"];
62
+ /**
63
+ * @description Wallet funding status after the change: DEPOSIT_QUEUED, AWAITING_VAULT_CREDIT, ACCEPT_QUEUED, UNKNOWN, ACCEPTED, EXPIRED_REQUOTE or FAILED.
64
+ * @enum {unknown}
65
+ */
66
+ readonly status: "DEPOSIT_QUEUED" | "AWAITING_VAULT_CREDIT" | "ACCEPT_QUEUED" | "UNKNOWN" | "ACCEPTED" | "EXPIRED_REQUOTE" | "FAILED";
67
+ /** @description When the wallet funding last changed, RFC3339 UTC. */
68
+ readonly updated_at: components["schemas"]["Timestamp"];
69
+ /** @description The acceptance's `fund_by`, from `ACCEPT_QUEUED` on: send any HyperCore to wallet transfer that funds it before this time. */
70
+ readonly fund_by?: components["schemas"]["Timestamp"];
71
+ };
72
+ readonly RfqPayload: ({
73
+ /**
74
+ * Format: uuid
75
+ * @description RFQ this event reports.
76
+ */
77
+ readonly rfq_id: string;
78
+ /**
79
+ * @description RFQ status after this event. ACCEPTED: a quote was accepted and confirmed. CANCELLED: the owner cancelled it or a newer intent generation replaced it. FAILED: the accepted trade failed on chain.
80
+ * @enum {unknown}
81
+ */
82
+ readonly status: "ACCEPTED" | "CANCELLED" | "FAILED";
83
+ /** @description Why a FAILED RFQ ended: the accept transaction reverted or expired unexecuted. Null for every other status. */
84
+ readonly terminal_reason: components["schemas"]["RfqTerminalReason"] | null;
85
+ /** @description When the RFQ was durably created, RFC3339 UTC. */
86
+ readonly created_at: components["schemas"]["Timestamp"];
87
+ /** @description End of quote collection, RFC3339 UTC. Makers stop quoting at this instant; natural expiry emits no event. */
88
+ readonly expires_at: components["schemas"]["Timestamp"];
89
+ /** @description Automatic-RFQ intent this RFQ belongs to. Present together with intent_generation only for RFQs created with an intent. */
90
+ readonly intent_id?: components["schemas"]["Uuid"];
91
+ /** @description Generation of the intent; a newer generation supersedes older RFQs of the same intent. Present only with intent_id. */
92
+ readonly intent_generation?: components["schemas"]["PositiveInt64String"];
93
+ } & components["schemas"]["IntentIdentityPair"]) & ({
94
+ /**
95
+ * @description RFQ status; FAILED requires a terminal_reason, every other status has none.
96
+ * @enum {unknown}
97
+ */
98
+ readonly status?: "ACCEPTED" | "CANCELLED";
99
+ /** @description Null unless status is FAILED, then the reason the accepted trade failed. */
100
+ readonly terminal_reason?: null;
101
+ } | {
102
+ /**
103
+ * @description RFQ status; FAILED requires a terminal_reason, every other status has none.
104
+ * @constant
105
+ */
106
+ readonly status?: "FAILED";
107
+ /** @description Null unless status is FAILED, then the reason the accepted trade failed. */
108
+ readonly terminal_reason?: components["schemas"]["RfqTerminalReason"];
109
+ });
110
+ /** @description The whole entry RFQ as GET /v1/rfqs/{rfq_id} returns it while open, without status: the event says it is OPEN. */
111
+ readonly EntryRfqPayload: {
112
+ /** @description Entry RFQ that opened. */
113
+ readonly rfq_id: components["schemas"]["rfq_id"];
114
+ /** @description Always ENTRY for this payload. */
115
+ readonly kind: components["schemas"]["kind"];
116
+ /** @description Wallet that signs the accept and will own the position; a quote's taker. */
117
+ readonly taker: components["schemas"]["taker"];
118
+ /** @description Stake in atomic USDC (6 decimals), before taker fees; a quote's stake. */
119
+ readonly stake: components["schemas"]["Amount"];
120
+ /** @description When the RFQ was durably created, RFC3339 UTC. */
121
+ readonly created_at: components["schemas"]["Timestamp"];
122
+ /** @description End of quote collection, RFC3339 UTC. Makers stop quoting at this instant; natural expiry emits no event. */
123
+ readonly expires_at: components["schemas"]["Timestamp"];
124
+ /** @description Requested legs in strictly increasing outcome_id order; a quote's legs. */
125
+ readonly legs: components["schemas"]["legs"];
126
+ /** @description Automatic-RFQ intent this RFQ belongs to. Present together with intent_generation only for RFQs created with an intent. */
127
+ readonly intent_id?: components["schemas"]["Uuid"];
128
+ /** @description Generation of the intent; a newer generation supersedes older RFQs of the same intent. Present only with intent_id. */
129
+ readonly intent_generation?: components["schemas"]["PositiveInt64String"];
130
+ } & components["schemas"]["IntentIdentityPair"];
131
+ readonly CashoutRfqPayload: {
132
+ /**
133
+ * Format: uuid
134
+ * @description Cash-out RFQ that opened.
135
+ */
136
+ readonly rfq_id: string;
137
+ /** @description When the RFQ was durably created, RFC3339 UTC. */
138
+ readonly created_at: components["schemas"]["Timestamp"];
139
+ /** @description End of cash-out quote collection, RFC3339 UTC. */
140
+ readonly expires_at: components["schemas"]["Timestamp"];
141
+ /**
142
+ * @description Always CASHOUT for this payload.
143
+ * @constant
144
+ */
145
+ readonly kind: "CASHOUT";
146
+ /** @description Position the owner wants to cash out. */
147
+ readonly position_id: components["schemas"]["Bytes32"];
148
+ /** @description Current owner of the position, who would sell it. */
149
+ readonly owner: components["schemas"]["LowercaseNonZeroAddress"];
150
+ /** @description legStateOf(legs, decision_read_gas) value read at decision_block; a quote must sign this exact value. */
151
+ readonly leg_state: components["schemas"]["Bytes32"];
152
+ /** @description The position's on-chain legs hash; the hash of legs must match it. */
153
+ readonly legs_hash: components["schemas"]["Bytes32"];
154
+ /** @description Pinned HyperEVM block number (decimal) for every pricing read: the position, owner, maker capacity, buyer balance and legStateOf. */
155
+ readonly decision_block: components["schemas"]["UInt64String"];
156
+ /**
157
+ * @description Exact gas limit, always 500000, to pass to the legStateOf read at decision_block.
158
+ * @constant
159
+ */
160
+ readonly decision_read_gas: "500000";
161
+ /** @description Maker that wrote the position originally. */
162
+ readonly maker_id: components["schemas"]["NonZeroUInt64String"];
163
+ /** @description The position's stake after the taker fee, tickets(position_id).stake, in atomic USDC (6 decimals); fixed when the position opened. */
164
+ readonly net_stake: components["schemas"]["Amount"];
165
+ /** @description What the position pays if every leg wins, tickets(position_id).payout, in atomic USDC (6 decimals); fixed when the position opened. */
166
+ readonly payout: components["schemas"]["Amount"];
167
+ /** @description The position's canonical legs in leg order. */
168
+ readonly legs: readonly components["schemas"]["Leg"][];
169
+ /** @description Automatic-RFQ intent this RFQ belongs to. Present together with intent_generation only for RFQs created with an intent. */
170
+ readonly intent_id?: components["schemas"]["Uuid"];
171
+ /** @description Generation of the intent; present only with intent_id. */
172
+ readonly intent_generation?: components["schemas"]["PositiveInt64String"];
173
+ } & components["schemas"]["IntentIdentityPair"];
174
+ /** @description A position changed on chain. */
175
+ readonly PositionEventPayload: {
176
+ /** @description Position that changed; the contract's ticketId. Read GET /v1/me/positions/{position_id}, or the maker's position, for its status and amounts. */
177
+ readonly position_id: components["schemas"]["Bytes32"];
178
+ /** @description HyperEVM block number (decimal) of the change. */
179
+ readonly block_number: components["schemas"]["UInt64String"];
180
+ /** @description Log index of the change within its block. */
181
+ readonly log_index: number;
182
+ };
183
+ /** @description A maker's vault capital changed on chain. */
184
+ readonly MakerCapitalPayload: {
185
+ /** @description Maker whose vault capital changed. Read GET /v1/makers/{maker_id}/capital for the figures. */
186
+ readonly maker_id: components["schemas"]["NonZeroUInt64String"];
187
+ /** @description HyperEVM block number (decimal) of the change. */
188
+ readonly block_number: components["schemas"]["UInt64String"];
189
+ /** @description Log index of the change within its block. */
190
+ readonly log_index: number;
191
+ };
192
+ readonly EventBase: {
193
+ /** @description Cursor of this event. Persist it after applying the event and resume after it. */
194
+ readonly cursor: components["schemas"]["Cursor"];
195
+ /**
196
+ * Format: uuid
197
+ * @description Unique event identifier for deduplicating at-least-once delivery; order comes from cursor.sequence.
198
+ */
199
+ readonly event_id: string;
200
+ /**
201
+ * @description What changed. The value selects the payload shape.
202
+ * @enum {unknown}
203
+ */
204
+ readonly event_type: "QUOTE_CREATED" | "QUOTE_REMOVED" | "QUOTE_ACCEPTED" | "RFQ_CREATED" | "RFQ_ACCEPTED" | "RFQ_CANCELLED" | "RFQ_FAILED" | "OPERATION_UPDATED" | "VAULT_BALANCE_CHANGED" | "WALLET_FUNDING_UPDATED" | "WITHDRAWAL_UPDATED" | "CORE_EXIT_UPDATED" | "WALLET_BALANCE_CHANGED" | "COLLATERAL_REDUCTION_UPDATED" | "POSITION_OPENED" | "POSITION_TRANSFERRED" | "POSITION_SETTLED" | "POSITION_CLOSED" | "POSITION_UPDATED" | "MAKER_CAPITAL_UPDATED";
205
+ /**
206
+ * Format: date-time
207
+ * @description When the authoritative state transition happened, RFC3339 UTC. Measure receipt time locally.
208
+ */
209
+ readonly occurred_at: string;
210
+ /** @description Event-specific body that identifies the resource and its new state. Reread the named HTTP resource for the complete representation. */
211
+ readonly payload: unknown;
212
+ };
213
+ readonly Event: (components["schemas"]["EventBase"] & {
214
+ /**
215
+ * @description QUOTE_CREATED: a maker created a quote on an RFQ you own. Account stream only.
216
+ * @constant
217
+ */
218
+ readonly event_type: "QUOTE_CREATED";
219
+ /** @description The whole quote, identical to its item in the RFQ's quote list; accept it with its quote_id. */
220
+ readonly payload: components["schemas"]["Quote"];
221
+ }) | (components["schemas"]["EventBase"] & {
222
+ /**
223
+ * @description QUOTE_REMOVED: a quote left the book of an RFQ you own. Account stream only.
224
+ * @constant
225
+ */
226
+ readonly event_type: "QUOTE_REMOVED";
227
+ /** @description The quote and why it left. */
228
+ readonly payload: components["schemas"]["QuoteRemovedPayload"];
229
+ }) | (components["schemas"]["EventBase"] & {
230
+ /**
231
+ * @description QUOTE_ACCEPTED: a taker accepted this maker's quote and awaits its confirm. Maker stream only.
232
+ * @constant
233
+ */
234
+ readonly event_type: "QUOTE_ACCEPTED";
235
+ /** @description The same item the maker snapshot's acceptances carry; confirm or decline it at /v1/quotes/{quote_id}/confirm before deadline. */
236
+ readonly payload: components["schemas"]["MakerAcceptance"];
237
+ }) | (components["schemas"]["EventBase"] & {
238
+ /**
239
+ * @description RFQ_CREATED: an entry or cash-out RFQ opened.
240
+ * @constant
241
+ */
242
+ readonly event_type: "RFQ_CREATED";
243
+ /** @description The whole open RFQ, discriminated by kind: an entry RFQ as makers quote it, or complete public cash-out decision evidence for pricing a cash-out quote. */
244
+ readonly payload: components["schemas"]["EntryRfqPayload"] | components["schemas"]["CashoutRfqPayload"];
245
+ }) | (components["schemas"]["EventBase"] & {
246
+ /**
247
+ * @description An RFQ had a quote accepted, was cancelled, or failed.
248
+ * @enum {unknown}
249
+ */
250
+ readonly event_type: "RFQ_ACCEPTED" | "RFQ_CANCELLED" | "RFQ_FAILED";
251
+ /** @description The RFQ and its new status. */
252
+ readonly payload: components["schemas"]["RfqPayload"];
253
+ }) | (components["schemas"]["EventBase"] & {
254
+ /**
255
+ * @description OPERATION_UPDATED: an operation, such as an accept, sell-back, transfer or withdrawal payout, changed status.
256
+ * @constant
257
+ */
258
+ readonly event_type: "OPERATION_UPDATED";
259
+ /** @description Current status of the operation and its kind. */
260
+ readonly payload: components["schemas"]["OperationUpdatedPayload"];
261
+ }) | (components["schemas"]["EventBase"] & {
262
+ /**
263
+ * @description VAULT_BALANCE_CHANGED: a committed transaction changed a linked wallet's vault balance.
264
+ * @constant
265
+ */
266
+ readonly event_type: "VAULT_BALANCE_CHANGED";
267
+ /** @description The wallet, its new vault balance and the transaction. */
268
+ readonly payload: components["schemas"]["VaultBalanceChangedPayload"];
269
+ }) | (components["schemas"]["EventBase"] & {
270
+ /**
271
+ * @description WALLET_FUNDING_UPDATED: the wallet funding of an acceptance changed status.
272
+ * @constant
273
+ */
274
+ readonly event_type: "WALLET_FUNDING_UPDATED";
275
+ /** @description The acceptance and its wallet funding's new status. */
276
+ readonly payload: components["schemas"]["WalletFundingPayload"];
277
+ }) | (components["schemas"]["EventBase"] & {
278
+ /**
279
+ * @description WITHDRAWAL_UPDATED: a withdrawal was admitted or changed state.
280
+ * @constant
281
+ */
282
+ readonly event_type: "WITHDRAWAL_UPDATED";
283
+ /** @description The whole withdrawal as GET /v1/me/withdrawals/{withdrawal_id} returns it; follow a withdrawal from these events alone. */
284
+ readonly payload: components["schemas"]["Withdrawal"];
285
+ }) | (components["schemas"]["EventBase"] & {
286
+ /**
287
+ * @description CORE_EXIT_UPDATED: a HyperCore exit changed status.
288
+ * @constant
289
+ */
290
+ readonly event_type: "CORE_EXIT_UPDATED";
291
+ /** @description The exit and its new stored status. */
292
+ readonly payload: {
293
+ /** @description HyperCore exit that changed. */
294
+ readonly exit_id: components["schemas"]["Uuid"];
295
+ /**
296
+ * @description Stored exit status. Refresh GET /v1/core-exits/{exit_id} for the full resource.
297
+ * @enum {unknown}
298
+ */
299
+ readonly status: "PENDING" | "SENT" | "CREDITED" | "RECOVERED" | "FAILED" | "ABANDONED";
300
+ /** @description When the exit last changed, RFC3339 UTC. */
301
+ readonly updated_at: components["schemas"]["Timestamp"];
302
+ };
303
+ }) | (components["schemas"]["EventBase"] & {
304
+ /**
305
+ * @description WALLET_BALANCE_CHANGED: an observed USDC transfer touched a linked wallet.
306
+ * @constant
307
+ */
308
+ readonly event_type: "WALLET_BALANCE_CHANGED";
309
+ /** @description An observed USDC transfer touched this linked wallet. Refresh GET /v1/me/balances for the wallet balance. */
310
+ readonly payload: {
311
+ /** @description Linked wallet the transfer touched, as sender or recipient. */
312
+ readonly address: components["schemas"]["LowercaseNonZeroAddress"];
313
+ /** @description Chain transaction of the observed USDC transfer. */
314
+ readonly transaction_hash: components["schemas"]["Bytes32"];
315
+ /** @description HyperEVM block number (decimal) of the transfer. */
316
+ readonly block_number: string;
317
+ };
318
+ }) | (components["schemas"]["EventBase"] & {
319
+ /**
320
+ * @description COLLATERAL_REDUCTION_UPDATED: a maker collateral-reduction job changed status.
321
+ * @constant
322
+ */
323
+ readonly event_type: "COLLATERAL_REDUCTION_UPDATED";
324
+ /** @description The job, its new status and its operation once durable. */
325
+ readonly payload: {
326
+ /** @description Collateral-reduction job that changed. */
327
+ readonly job_id: components["schemas"]["Uuid"];
328
+ /**
329
+ * @description Stored job status. Refresh GET /v1/makers/{maker_id}/collateral-reductions/{job_id} for the full resource; its operation reports OPERATION_UPDATED.
330
+ * @enum {unknown}
331
+ */
332
+ readonly status: "QUEUED" | "SOLVING" | "NO_IMPROVEMENT" | "DURABLE" | "FAILED";
333
+ /** @description Chain operation executing the reduction; null until the job is durable. */
334
+ readonly operation_id: components["schemas"]["Bytes32"] | null;
335
+ /** @description When the job last changed, RFC3339 UTC. */
336
+ readonly updated_at: components["schemas"]["Timestamp"];
337
+ };
338
+ }) | (components["schemas"]["EventBase"] & {
339
+ /**
340
+ * @description A position opened (the fill of an entry), changed owner (a transfer), settled, closed (a sell-back or claim), or otherwise changed. The owner and the underwriting maker receive it; a transfer also reaches the previous owner.
341
+ * @enum {unknown}
342
+ */
343
+ readonly event_type: "POSITION_OPENED" | "POSITION_TRANSFERRED" | "POSITION_SETTLED" | "POSITION_CLOSED" | "POSITION_UPDATED";
344
+ /** @description The position and where the change happened on chain; reread the position for its status. */
345
+ readonly payload: components["schemas"]["PositionEventPayload"];
346
+ }) | (components["schemas"]["EventBase"] & {
347
+ /**
348
+ * @description MAKER_CAPITAL_UPDATED: a maker's vault capital changed. Maker stream only.
349
+ * @constant
350
+ */
351
+ readonly event_type: "MAKER_CAPITAL_UPDATED";
352
+ /** @description The maker and where the change happened on chain; reread its capital. */
353
+ readonly payload: components["schemas"]["MakerCapitalPayload"];
354
+ });
355
+ readonly PublicationCheckpoint: {
356
+ /** @description Every authorized event up to this cursor was published and delivered on this socket before this frame. */
357
+ readonly cursor: components["schemas"]["Cursor"];
358
+ /** @description Database commit cut the checkpoint covers, RFC3339 UTC. It is not renewed by reading, so its age is the publication lag. */
359
+ readonly source_cut_at: components["schemas"]["Timestamp"];
360
+ /** @description Database clock when the checkpoint was read, RFC3339 UTC. */
361
+ readonly server_time: components["schemas"]["Timestamp"];
362
+ };
363
+ readonly PublicationFrame: {
364
+ /**
365
+ * @description Frame discriminator, always publication.
366
+ * @constant
367
+ */
368
+ readonly channel: "publication";
369
+ /** @description Publication coverage, sent each heartbeat to subscriptions that set publication_freshness. Null when no checkpoint is available; treat freshness as unproven. */
370
+ readonly data: components["schemas"]["PublicationCheckpoint"] | null;
371
+ };
372
+ readonly Snapshot: {
373
+ /** @description Stream cursor the snapshot is consistent with. Events after it follow on the stream; reconnect with it to replay them. */
374
+ readonly cursor: components["schemas"]["Cursor"];
375
+ /** @description Current live state keyed by class, each class holding at most 100 items with the same item shape as its truncated route. Maker snapshots carry open_rfqs, acceptances and operations. Account snapshots carry rfqs, quotes, acceptances and operations, plus open_rfqs when the subscription set open_rfqs. quotes holds the live quotes on the account's open RFQs, the same items as QUOTE_CREATED; its route is each open RFQ's quote list. acceptances holds, for an account, its acceptances still PENDING_CONFIRM, each read again at GET /v1/quotes/{quote_id}/acceptance, and for a maker the acceptances awaiting its confirm, earliest deadline first, paged at /v1/makers/{maker_id}/acceptances. */
376
+ readonly resources: unknown;
377
+ /** @description Classes the snapshot truncated, each with the HTTP route that pages the rest. Absent when nothing was truncated. */
378
+ readonly truncated?: readonly {
379
+ /** @description Truncated resource class, such as quotes or operations. */
380
+ readonly resource: string;
381
+ /** @description HTTP route that pages the complete class. */
382
+ readonly href: string;
383
+ }[];
384
+ };
385
+ readonly AccountSubscription: {
386
+ /**
387
+ * @description The credential's own account: its RFQs, quotes, acceptances, operations and balances.
388
+ * @constant
389
+ */
390
+ readonly type: "account";
391
+ /** @description Last durably applied cursor to resume after. Omit it to start from a snapshot. Scoped keys need replay:read to send one. */
392
+ readonly cursor?: components["schemas"]["Cursor"];
393
+ /** @description Opt in to every open RFQ, not only your own, in the snapshot's open_rfqs and as RFQ events. Needs rfq:read; without it the server closes with SUBSCRIPTION_DENIED. */
394
+ readonly open_rfqs?: boolean;
395
+ /** @description Opt in to readInvalidated frames for the account this credential reads. The server derives the scope and returns it in the subscriptionResponse. Without it, a session or unscoped key still gets readInvalidated frames for its own ACTIVITY and POSITIONS; scoped keys get none. */
396
+ readonly account_reads?: boolean;
397
+ /** @description Opt in to publication checkpoints and a 1000 ms authenticated heartbeat. */
398
+ readonly publication_freshness?: boolean;
399
+ };
400
+ readonly MakerSubscription: {
401
+ /**
402
+ * @description A maker the credential acts for: open RFQs, acceptances of its quotes, and its operations and capital.
403
+ * @constant
404
+ */
405
+ readonly type: "maker";
406
+ /** @description The maker to stream. A maker key names its own maker; a dashboard session names a maker it is a member of. */
407
+ readonly maker_id: components["schemas"]["NonZeroUInt64String"];
408
+ /** @description Last durably applied cursor to resume after. Omit it to start from a snapshot. Scoped keys need replay:read to send one. */
409
+ readonly cursor?: components["schemas"]["Cursor"];
410
+ /** @description Opt in to readInvalidated frames for the maker's account reads. The server derives the scope and returns it in the subscriptionResponse. */
411
+ readonly account_reads?: boolean;
412
+ /** @description Opt in to publication checkpoints and a 1000 ms authenticated heartbeat. */
413
+ readonly publication_freshness?: boolean;
414
+ };
415
+ readonly Subscribe: {
416
+ /**
417
+ * @description Always subscribe. The client sends this one frame first, and only once: close the socket to end the subscription.
418
+ * @constant
419
+ */
420
+ readonly method: "subscribe";
421
+ /** @description Exactly one subscription, discriminated by type. The credential must act for it. */
422
+ readonly subscription: components["schemas"]["AccountSubscription"] | components["schemas"]["MakerSubscription"];
423
+ };
424
+ readonly SubscriptionResponse: {
425
+ /**
426
+ * @description Frame discriminator, always subscriptionResponse. The server sends it once, right after accepting the subscribe.
427
+ * @constant
428
+ */
429
+ readonly channel: "subscriptionResponse";
430
+ /** @description The accepted subscription and where its events start. */
431
+ readonly data: {
432
+ /**
433
+ * @description The method this frame answers, always subscribe.
434
+ * @constant
435
+ */
436
+ readonly method: "subscribe";
437
+ /** @description The accepted subscription, echoed without its cursor. */
438
+ readonly subscription: {
439
+ /**
440
+ * @description The credential's own account: its RFQs, quotes, acceptances, operations and balances.
441
+ * @constant
442
+ */
443
+ readonly type: "account";
444
+ /** @description Opt in to every open RFQ, not only your own, in the snapshot's open_rfqs and as RFQ events. Needs rfq:read; without it the server closes with SUBSCRIPTION_DENIED. */
445
+ readonly open_rfqs?: boolean;
446
+ /** @description Opt in to readInvalidated frames for the account this credential reads. The server derives the scope and returns it in the subscriptionResponse. Without it, a session or unscoped key still gets readInvalidated frames for its own ACTIVITY and POSITIONS; scoped keys get none. */
447
+ readonly account_reads?: boolean;
448
+ /** @description Opt in to publication checkpoints and a 1000 ms authenticated heartbeat. */
449
+ readonly publication_freshness?: boolean;
450
+ } | {
451
+ /**
452
+ * @description A maker the credential acts for: open RFQs, acceptances of its quotes, and its operations and capital.
453
+ * @constant
454
+ */
455
+ readonly type: "maker";
456
+ /** @description The maker to stream. A maker key names its own maker; a dashboard session names a maker it is a member of. */
457
+ readonly maker_id: components["schemas"]["NonZeroUInt64String"];
458
+ /** @description Opt in to readInvalidated frames for the maker's account reads. The server derives the scope and returns it in the subscriptionResponse. */
459
+ readonly account_reads?: boolean;
460
+ /** @description Opt in to publication checkpoints and a 1000 ms authenticated heartbeat. */
461
+ readonly publication_freshness?: boolean;
462
+ };
463
+ /**
464
+ * Format: uuid
465
+ * @description Server-assigned identifier of this connection.
466
+ */
467
+ readonly connection_id: string;
468
+ /**
469
+ * Format: date-time
470
+ * @description Server clock when the session opened, RFC3339 UTC.
471
+ */
472
+ readonly server_time: string;
473
+ /**
474
+ * @description Idle heartbeat interval in milliseconds: 1000 when the subscription set publication_freshness, otherwise 15000.
475
+ * @enum {unknown}
476
+ */
477
+ readonly heartbeat_interval_ms: 1000 | 15000;
478
+ /**
479
+ * @description How the stream starts. REPLAY: the subscription cursor is valid and events after it follow. SNAPSHOT: no cursor was sent and a snapshot follows. RESET: the cursor is stale, ahead or from another generation; replace local state with the snapshot that follows.
480
+ * @enum {unknown}
481
+ */
482
+ readonly resume: "REPLAY" | "SNAPSHOT" | "RESET";
483
+ /** @description Events are delivered strictly after this cursor: the subscription cursor on REPLAY, otherwise the snapshot's cursor. */
484
+ readonly cursor: components["schemas"]["Cursor"];
485
+ /** @description Read-invalidation subscription the server derived from the credential. Present only when the subscription set account_reads. */
486
+ readonly account_reads?: components["schemas"]["ReadSubscription"];
487
+ };
488
+ };
489
+ readonly SnapshotFrame: {
490
+ /**
491
+ * @description Frame discriminator, always snapshot.
492
+ * @constant
493
+ */
494
+ readonly channel: "snapshot";
495
+ /** @description Principal-scoped live state and the cursor it is consistent with. */
496
+ readonly data: components["schemas"]["Snapshot"];
497
+ };
498
+ readonly EventFrame: {
499
+ /**
500
+ * @description Frame discriminator, always event.
501
+ * @constant
502
+ */
503
+ readonly channel: "event";
504
+ /** @description The committed journal event. */
505
+ readonly data: components["schemas"]["Event"];
506
+ };
507
+ readonly ReadInvalidatedFrame: {
508
+ /**
509
+ * @description Frame discriminator, always readInvalidated. Sent to subscriptions that set account_reads, and for its own ACTIVITY and POSITIONS to every account subscription on a session or unscoped key.
510
+ * @constant
511
+ */
512
+ readonly channel: "readInvalidated";
513
+ /** @description The account reads to refetch. */
514
+ readonly data: components["schemas"]["Invalidation"];
515
+ };
516
+ readonly ResetFrame: {
517
+ /**
518
+ * @description Frame discriminator, always reset. The server closes right after; discard local state, reload over HTTP and reconnect.
519
+ * @constant
520
+ */
521
+ readonly channel: "reset";
522
+ };
523
+ readonly DrainFrame: {
524
+ /**
525
+ * @description Frame discriminator, always drain.
526
+ * @constant
527
+ */
528
+ readonly channel: "drain";
529
+ /** @description When the server closes this connection and when to reconnect. */
530
+ readonly data: {
531
+ /** @description When the server closes this connection with CONNECTION_DRAIN, RFC3339 UTC. Open a replacement and resume from the last applied cursor before then. */
532
+ readonly deadline: components["schemas"]["Timestamp"];
533
+ /** @description Suggested delay in milliseconds before opening the replacement connection; currently 1000. */
534
+ readonly retry_after_ms: number;
535
+ };
536
+ };
537
+ readonly MarketRefresh: {
538
+ /**
539
+ * @description Frame discriminator, always marketRefresh.
540
+ * @constant
541
+ */
542
+ readonly channel: "marketRefresh";
543
+ /** @description The market catalog changed; refetch it. */
544
+ readonly data: {
545
+ /** @description Current market catalog generation. Refetch the catalog when it differs from the one you hold. */
546
+ readonly catalog_generation: string;
547
+ /**
548
+ * @description HTTP route to refetch, always /v1/markets.
549
+ * @constant
550
+ */
551
+ readonly resource: "/v1/markets";
552
+ };
553
+ };
554
+ readonly MarketSubscription: {
555
+ /**
556
+ * @description Always market.
557
+ * @constant
558
+ */
559
+ readonly type: "market";
560
+ /** @description 1 to 256 unique outcome IDs (decimal strings) to follow. The snapshot and deltas cover only these outcomes. */
561
+ readonly outcome_ids: readonly components["schemas"]["UInt32String"][];
562
+ };
563
+ readonly MarketSubscribe: {
564
+ /**
565
+ * @description Always subscribe. The client sends this one frame first.
566
+ * @constant
567
+ */
568
+ readonly method: "subscribe";
569
+ /** @description The outcomes to follow. */
570
+ readonly subscription: components["schemas"]["MarketSubscription"];
571
+ };
572
+ readonly MarketSubscriptionResponse: {
573
+ /**
574
+ * @description Frame discriminator, always subscriptionResponse.
575
+ * @constant
576
+ */
577
+ readonly channel: "subscriptionResponse";
578
+ /** @description The accepted subscription. */
579
+ readonly data: {
580
+ /**
581
+ * @description The method this frame answers, always subscribe.
582
+ * @constant
583
+ */
584
+ readonly method: "subscribe";
585
+ /** @description The accepted subscription, echoed. */
586
+ readonly subscription: components["schemas"]["MarketSubscription"];
587
+ /**
588
+ * Format: date-time
589
+ * @description Server clock when the session opened, RFC3339 UTC.
590
+ */
591
+ readonly server_time: string;
592
+ /**
593
+ * @description Idle heartbeat interval in milliseconds, always 15000.
594
+ * @constant
595
+ */
596
+ readonly heartbeat_interval_ms: 15000;
597
+ /**
598
+ * @description Largest frame the server sends, in bytes (1 MiB).
599
+ * @constant
600
+ */
601
+ readonly max_frame_bytes: 1048576;
602
+ };
603
+ };
604
+ readonly MarketSnapshotFrame: {
605
+ /**
606
+ * @description Frame discriminator, always snapshot.
607
+ * @constant
608
+ */
609
+ readonly channel: "snapshot";
610
+ /** @description Complete state of the selected outcomes. Replace all local market-stream state with it. */
611
+ readonly data: components["schemas"]["MarketPublicationSnapshot"];
612
+ };
613
+ readonly MarketDeltaFrame: {
614
+ /**
615
+ * @description Frame discriminator, always delta.
616
+ * @constant
617
+ */
618
+ readonly channel: "delta";
619
+ /** @description Changes to the selected outcomes since this socket's last snapshot or delta. */
620
+ readonly data: components["schemas"]["MarketPublicationDelta"];
621
+ };
622
+ readonly MarketPublicationSnapshot: {
623
+ /**
624
+ * @description Publication schema version, always "1".
625
+ * @constant
626
+ */
627
+ readonly schema_version: "1";
628
+ /** @description Market-data producer that built this state. A different producer requires a new snapshot. */
629
+ readonly producer_id: components["schemas"]["Uuid"];
630
+ /** @description Catalog generation the markets belong to. */
631
+ readonly catalog_generation: components["schemas"]["PositiveInt64"];
632
+ /** @description Reference-price feed generation; the producer starts a new, higher generation when it restarts the feed. */
633
+ readonly feed_generation: components["schemas"]["PositiveInt64"];
634
+ /**
635
+ * @description Complete for the selected outcome hot set.
636
+ * @constant
637
+ */
638
+ readonly complete: true;
639
+ /** @description Publication version of this state. The first delta's previous_version equals it. */
640
+ readonly version: components["schemas"]["PositiveInt64"];
641
+ /** @description Catalog entry of each selected outcome. */
642
+ readonly catalog: readonly components["schemas"]["PublicationCatalogMarket"][];
643
+ /** @description Reference price for each side of each selected outcome. */
644
+ readonly references: readonly components["schemas"]["PublicationReference"][];
645
+ };
646
+ /** @description Selected public market state changes. Timestamp-only reference observations are applied privately but may be omitted from this stream. Price, best bid/ask, availability, reason, source, quality, scale, freshness and feed-generation changes remain material. Reference timestamps identify the last delivered observation, not a client-side freshness lease. Use published freshness/eligibility and stream recovery. Versions can be sparse; every delta is anchored to the receiving socket's cursor. Catalog or producer replacement requires a new snapshot/reset. */
647
+ readonly MarketPublicationDelta: {
648
+ /**
649
+ * @description Publication schema version, always "1".
650
+ * @constant
651
+ */
652
+ readonly schema_version: "1";
653
+ /** @description Market-data producer; always equal to the snapshot's producer. */
654
+ readonly producer_id: components["schemas"]["Uuid"];
655
+ /** @description Catalog generation; always equal to the snapshot's, since a catalog change resets the stream. */
656
+ readonly catalog_generation: components["schemas"]["PositiveInt64"];
657
+ /** @description Reference-price feed generation of the upserted references. */
658
+ readonly feed_generation: components["schemas"]["PositiveInt64"];
659
+ /** @description Must exactly equal this socket's last accepted snapshot or delta version. Different sockets can receive different anchors for the same update after joining during suppressed observations. On a mismatch, resnapshot; never infer missing state. */
660
+ readonly previous_version: components["schemas"]["PositiveInt64"];
661
+ /** @description Strictly greater than previous_version, but need not equal previous_version + 1. Timestamp-only suppression and coalescing can skip intermediate versions. Accept the sparse advance only when previous_version matches this socket's cursor, then store this version. */
662
+ readonly version: components["schemas"]["PositiveInt64"];
663
+ /** @description Selected catalog entries that were added or changed; replace them whole. */
664
+ readonly catalog_upserts: readonly components["schemas"]["PublicationCatalogMarket"][];
665
+ /** @description Selected outcomes removed from the catalog. */
666
+ readonly catalog_removals: readonly components["schemas"]["PublicationCatalogRemoval"][];
667
+ /** @description Selected reference prices that changed materially; replace them whole. */
668
+ readonly reference_upserts: readonly components["schemas"]["PublicationReference"][];
669
+ /** @description Selected reference prices that were removed. */
670
+ readonly reference_removals: readonly components["schemas"]["PublicationReferenceRemoval"][];
671
+ };
672
+ readonly LowercaseNonZeroAddress: string;
673
+ /** Format: uint64-decimal */
674
+ readonly UInt64String: string;
675
+ readonly NonZeroUInt64String: components["schemas"]["UInt64String"] & unknown;
676
+ readonly Scope: {
677
+ /** @description EVM chain ID of the deployment, as a decimal string. */
678
+ readonly chain_id: string;
679
+ /** @description Lowercase vault contract address of the deployment. */
680
+ readonly vault: components["schemas"]["LowercaseNonZeroAddress"];
681
+ /** @description Account or maker whose data the read returns. */
682
+ readonly subject: {
683
+ /**
684
+ * @description ACCOUNT for a personal account read.
685
+ * @constant
686
+ */
687
+ readonly kind: "ACCOUNT";
688
+ /** @description Participant ID of the authenticated account. */
689
+ readonly account_id: string;
690
+ /** @description Lowercase linked wallet address whose personal history and positions are read. */
691
+ readonly wallet: components["schemas"]["LowercaseNonZeroAddress"];
692
+ } | {
693
+ /**
694
+ * @description MAKER for a maker read.
695
+ * @constant
696
+ */
697
+ readonly kind: "MAKER";
698
+ /** @description On-chain maker ID whose data is read, as a decimal string; equals maker_id in the path. */
699
+ readonly maker_id: components["schemas"]["NonZeroUInt64String"];
700
+ };
701
+ };
702
+ /** @description Account reads that changed: refetch the named resources for the scope. */
703
+ readonly Invalidation: {
704
+ /**
705
+ * @description Account-read contract version of the invalidation; always "1".
706
+ * @constant
707
+ */
708
+ readonly contract_version: "1";
709
+ /** @description Account or maker scope whose reads changed; the same scope the subscriptionResponse's account_reads names when the subscription set account_reads. */
710
+ readonly scope: components["schemas"]["Scope"];
711
+ /** @description Revision of the changed reads, as a decimal string; a higher revision supersedes a lower one. */
712
+ readonly revision: string;
713
+ /** @description Account reads to refetch. */
714
+ readonly resources: readonly ("BALANCES" | "CAPITAL" | "ACTIVITY" | "POSITIONS" | "PERFORMANCE" | "TELEMETRY" | "QUOTES" | "ACCESS")[];
715
+ /** @description Stream cursor of the change; persist it like an event cursor. */
716
+ readonly cursor: components["schemas"]["Cursor"];
717
+ };
718
+ readonly Bytes32: string;
719
+ /** @enum {unknown} */
720
+ readonly OperationState: "QUEUED" | "IN_FLIGHT" | "RETRYABLE" | "UNKNOWN" | "COMMITTED" | "REVERTED" | "EXPIRED_UNEXECUTED";
721
+ /**
722
+ * @description Why an operation ended without executing. INSUFFICIENT_CASH: an ACCEPT whose taker's money (free vault Cash, or the wallet USDC its funding draws) did not cover the stake when it was to execute, for a funded accept by its `fund_by`; it ends EXPIRED_UNEXECUTED and nothing traded. The RFQ fails with the same `terminal_reason`.
723
+ * @enum {string}
724
+ */
725
+ readonly OperationFailureReason: "INSUFFICIENT_CASH";
726
+ /** Format: date-time */
727
+ readonly Timestamp: string;
728
+ /** Format: uint128-decimal */
729
+ readonly Amount: string;
730
+ /** Format: uuid */
731
+ readonly Uuid: string;
732
+ /** @description Positive signed 64-bit decimal integer, at most 9223372036854775807. */
733
+ readonly PositiveInt64String: string;
734
+ readonly IntentIdentityPair: {
735
+ /** @description Automatic-RFQ intent (UUIDv7) the RFQ belongs to. */
736
+ readonly intent_id: components["schemas"]["Uuid"];
737
+ /** @description Generation of that intent, as a decimal string; a higher generation supersedes the intent's earlier RFQs. */
738
+ readonly intent_generation: components["schemas"]["PositiveInt64String"];
739
+ } | {
740
+ readonly intent_id?: never;
741
+ readonly intent_generation?: never;
742
+ };
743
+ /** @enum {string} */
744
+ readonly RfqTerminalReason: "REVERTED" | "EXPIRED_UNEXECUTED" | "INSUFFICIENT_CASH";
745
+ /**
746
+ * Format: uuid
747
+ * @description Identifier of this RFQ (UUID).
748
+ */
749
+ readonly rfq_id: string;
750
+ /**
751
+ * @description RFQ kind; ENTRY asks makers to quote a new position.
752
+ * @constant
753
+ */
754
+ readonly kind: "ENTRY";
755
+ /** @description Wallet that signs the accept and will own the position. */
756
+ readonly taker: string;
757
+ readonly UInt32String: string;
758
+ /** @enum {string} */
759
+ readonly Side: "YES" | "NO";
760
+ /** @description One (outcome, side) pair, as markets and positions name it. */
761
+ readonly Leg: {
762
+ /** @description HIP-4 outcome ID the leg is on, as a decimal string. The signed Leg encodes it as uint32. */
763
+ readonly outcome_id: components["schemas"]["UInt32String"];
764
+ /** @description Outcome side the leg backs. The signed Leg encodes YES as 0 and NO as 1. */
765
+ readonly side: components["schemas"]["Side"];
766
+ };
767
+ /** @description Requested legs in strictly increasing outcome_id order. */
768
+ readonly legs: readonly components["schemas"]["Leg"][];
769
+ readonly Uint256: string;
770
+ /** @description Entry terms a maker quotes; they mirror the signed Quote and TakerAccept structs field for field. */
771
+ readonly QuoteTerms: {
772
+ /** @description On-chain maker ID of the quoting maker. */
773
+ readonly maker_id: components["schemas"]["NonZeroUInt64String"];
774
+ /** @description Legs the quote covers; must equal the RFQ legs in order. The signed Leg encodes outcome_id as uint32 and side as uint8, 0 for YES and 1 for NO. */
775
+ readonly legs: readonly components["schemas"]["Leg"][];
776
+ /** @description Taker stake in atomic USDC (6 decimals), before taker fees. */
777
+ readonly stake: components["schemas"]["Amount"];
778
+ /** @description Gross amount the position pays if every leg wins, in atomic USDC (6 decimals), before the profit fee. */
779
+ readonly payout: components["schemas"]["Amount"];
780
+ /** @description Profit fee in basis points, charged at claim on the winning profit (payout minus net stake). */
781
+ readonly fee_bps: number;
782
+ /** @description Entry fee in basis points taken from the stake at accept: net stake is stake minus floor(stake * taker_fee_bps / 10000). */
783
+ readonly taker_fee_bps: number;
784
+ /** @description Wallet that must sign the accept and will own the position. */
785
+ readonly taker: string;
786
+ /** @description Unix seconds after which the quote can no longer be accepted. */
787
+ readonly expiry: components["schemas"]["UInt64String"];
788
+ /** @description Random uint256, as a decimal string, that makes each signed quote unique. */
789
+ readonly salt: components["schemas"]["Uint256"];
790
+ };
791
+ /** @description A maker's offer to open a position on an entry RFQ. */
792
+ readonly EntryQuote: {
793
+ /** @description Quote ID: the EIP-712 digest of `entry` as the `Quote` struct. Accept it with `POST /v1/quotes/{quote_id}/accept`. */
794
+ readonly quote_id: components["schemas"]["Bytes32"];
795
+ /** @description RFQ this quote answers. */
796
+ readonly rfq_id: components["schemas"]["Uuid"];
797
+ /**
798
+ * @description Always `ENTRY`: the quote opens a new position.
799
+ * @constant
800
+ */
801
+ readonly kind: "ENTRY";
802
+ /** @description Venue-wide publication sequence number; a higher value was created later. */
803
+ readonly sequence: number;
804
+ /** @description Accept the quote before this time, as an RFC3339 UTC timestamp: 14 seconds before `entry.expiry`, which leaves time for the maker to confirm and the trade to land. Fixed when the quote is created; an accept at or after it is refused as expired. */
805
+ readonly accept_before: components["schemas"]["Timestamp"];
806
+ /** @description Entry terms. To accept, the taker signs them as the EIP-712 `TakerAccept` struct. */
807
+ readonly entry: components["schemas"]["QuoteTerms"];
808
+ };
809
+ readonly Hash32: string;
810
+ /** @description Sell-back terms: the underwriting maker buys the position back and it closes. They mirror the signed SellBack struct. */
811
+ readonly SellBackTerms: {
812
+ /** @description Position the quote is for; the signed SellBack names it ticketId. */
813
+ readonly position_id: components["schemas"]["Hash32"];
814
+ /** @description Buyback price the original maker pays the owner to close the ticket, in atomic USDC (6 decimals). */
815
+ readonly price: components["schemas"]["Amount"];
816
+ /** @description Current position owner, who sells the ticket back. */
817
+ readonly owner: components["schemas"]["LowercaseNonZeroAddress"];
818
+ /** @description Unix seconds after which the quote can no longer be executed. */
819
+ readonly expiry: components["schemas"]["UInt64String"];
820
+ /** @description Random uint256, as a decimal string, that makes each signed quote unique. */
821
+ readonly salt: components["schemas"]["Uint256"];
822
+ /** @description Position leg state the quote was priced against; must equal the RFQ's leg_state. */
823
+ readonly leg_state: components["schemas"]["Hash32"];
824
+ };
825
+ /** @description A cash-out offer from the maker that backs the position: its vault buys the position back for `price`. */
826
+ readonly SellBackQuote: {
827
+ /** @description Quote ID: the EIP-712 digest of `sell_back` as the `SellBack` struct, which the owner signs to accept. */
828
+ readonly quote_id: components["schemas"]["Bytes32"];
829
+ /** @description RFQ this quote answers. */
830
+ readonly rfq_id: components["schemas"]["Uuid"];
831
+ /**
832
+ * @description Always `SELL_BACK`: the backing maker buys the position back.
833
+ * @constant
834
+ */
835
+ readonly kind: "SELL_BACK";
836
+ /** @description Venue-wide publication sequence number; a higher value was created later. */
837
+ readonly sequence: number;
838
+ /** @description Sell-back terms the owner accepts by signing `quote_id` as `SellBack`. */
839
+ readonly sell_back: components["schemas"]["SellBackTerms"];
840
+ };
841
+ /** @description Transfer terms: another maker buys the position and becomes its owner. They mirror the signed CashoutTransfer struct. */
842
+ readonly TransferTerms: {
843
+ /** @description Position the quote is for; the signed CashoutTransfer names it ticketId. */
844
+ readonly position_id: components["schemas"]["Hash32"];
845
+ /** @description Price the buyer pays the seller for the whole position, in atomic USDC (6 decimals). */
846
+ readonly price: components["schemas"]["Amount"];
847
+ /** @description Current position owner, who sells the ticket. */
848
+ readonly seller: components["schemas"]["LowercaseNonZeroAddress"];
849
+ /** @description The bidding maker's current quote signer, which becomes the owner and pays from its own vault balance. */
850
+ readonly buyer: components["schemas"]["LowercaseNonZeroAddress"];
851
+ /** @description Unix seconds after which the quote can no longer be executed. */
852
+ readonly expiry: components["schemas"]["UInt64String"];
853
+ /** @description Random uint256, as a decimal string, that makes each signed quote unique. */
854
+ readonly salt: components["schemas"]["Uint256"];
855
+ /** @description Position leg state the quote was priced against; must equal the RFQ's leg_state. */
856
+ readonly leg_state: components["schemas"]["Hash32"];
857
+ };
858
+ /** @description A cash-out offer from another maker: it pays the owner `price` and takes over the position. */
859
+ readonly TransferQuote: {
860
+ /** @description Quote ID: the EIP-712 digest of `transfer` as the `CashoutTransfer` struct, which the owner signs to accept. */
861
+ readonly quote_id: components["schemas"]["Bytes32"];
862
+ /** @description RFQ this quote answers. */
863
+ readonly rfq_id: components["schemas"]["Uuid"];
864
+ /**
865
+ * @description Always `TRANSFER`: another maker takes over the position.
866
+ * @constant
867
+ */
868
+ readonly kind: "TRANSFER";
869
+ /** @description Venue-wide publication sequence number; a higher value was created later. */
870
+ readonly sequence: number;
871
+ /** @description Transfer terms the owner accepts by signing `quote_id` as `CashoutTransfer`. */
872
+ readonly transfer: components["schemas"]["TransferTerms"];
873
+ };
874
+ /** @description One live, unsigned quote on an RFQ, told apart by `kind`. List quotes, the account snapshot's quotes and `QUOTE_CREATED` carry the same item. */
875
+ readonly Quote: components["schemas"]["EntryQuote"] | components["schemas"]["SellBackQuote"] | components["schemas"]["TransferQuote"];
876
+ /** @description A taker's accept of your entry quote. */
877
+ readonly EntryMakerAcceptance: {
878
+ /** @description The accepted quote. Confirm with `POST /v1/quotes/{quote_id}/confirm`. */
879
+ readonly quote_id: components["schemas"]["Bytes32"];
880
+ /** @description RFQ this quote answers. */
881
+ readonly rfq_id: components["schemas"]["Uuid"];
882
+ /**
883
+ * @description Always `ENTRY`: the accepted quote opens a new position.
884
+ * @constant
885
+ */
886
+ readonly kind: "ENTRY";
887
+ /** @description Confirm before this instant, an RFC3339 UTC timestamp. A later answer cannot reopen the acceptance. */
888
+ readonly deadline: components["schemas"]["Timestamp"];
889
+ /** @description Accepted entry terms; sign them as `Quote`. */
890
+ readonly entry: components["schemas"]["QuoteTerms"];
891
+ };
892
+ /** @description An owner's accept of your sell-back quote. */
893
+ readonly SellBackMakerAcceptance: {
894
+ /** @description The accepted quote. Confirm with `POST /v1/quotes/{quote_id}/confirm`. */
895
+ readonly quote_id: components["schemas"]["Bytes32"];
896
+ /** @description RFQ this quote answers. */
897
+ readonly rfq_id: components["schemas"]["Uuid"];
898
+ /**
899
+ * @description Always `SELL_BACK`: your vault buys the position back.
900
+ * @constant
901
+ */
902
+ readonly kind: "SELL_BACK";
903
+ /** @description Confirm before this instant, an RFC3339 UTC timestamp. A later answer cannot reopen the acceptance. */
904
+ readonly deadline: components["schemas"]["Timestamp"];
905
+ /** @description Accepted sell-back terms; sign them as `SellBack`. */
906
+ readonly sell_back: components["schemas"]["SellBackTerms"];
907
+ };
908
+ /** @description An owner's accept of your transfer quote. */
909
+ readonly TransferMakerAcceptance: {
910
+ /** @description The accepted quote. Confirm with `POST /v1/quotes/{quote_id}/confirm`. */
911
+ readonly quote_id: components["schemas"]["Bytes32"];
912
+ /** @description RFQ this quote answers. */
913
+ readonly rfq_id: components["schemas"]["Uuid"];
914
+ /**
915
+ * @description Always `TRANSFER`: you take over the position.
916
+ * @constant
917
+ */
918
+ readonly kind: "TRANSFER";
919
+ /** @description Confirm before this instant, an RFC3339 UTC timestamp. A later answer cannot reopen the acceptance. */
920
+ readonly deadline: components["schemas"]["Timestamp"];
921
+ /** @description Accepted transfer terms; sign them as `CashoutTransfer`. */
922
+ readonly transfer: components["schemas"]["TransferTerms"];
923
+ };
924
+ /** @description A taker's accept of your quote, waiting for your confirm until `deadline`, told apart by `kind`. `QUOTE_ACCEPTED`, the maker snapshot's `acceptances` and List pending acceptances carry the same item. It never includes the taker's signature or `acceptance_id`. */
925
+ readonly MakerAcceptance: components["schemas"]["EntryMakerAcceptance"] | components["schemas"]["SellBackMakerAcceptance"] | components["schemas"]["TransferMakerAcceptance"];
926
+ readonly Withdrawal: {
927
+ /** @description Server-assigned ID of this withdrawal. */
928
+ readonly withdrawal_id: components["schemas"]["Uuid"];
929
+ /** @description Embedded wallet that pays out. */
930
+ readonly account: components["schemas"]["LowercaseNonZeroAddress"];
931
+ /** @description External address that receives the USDC. */
932
+ readonly destination: components["schemas"]["LowercaseNonZeroAddress"];
933
+ /** @description Total amount sent to destination, in atomic USDC (6 decimals). */
934
+ readonly amount: components["schemas"]["Amount"];
935
+ /** @description Part of amount first withdrawn from the vault to the wallet, in atomic USDC; "0" when the wallet already covered it. */
936
+ readonly shortfall_amount: components["schemas"]["Amount"];
937
+ /**
938
+ * @description VAULT_WITHDRAWAL_QUEUED: the vault top-up is queued and the payout waits for it; PAYOUT_SUBMITTED: the payout is queued or relayed; PAYOUT_COMMITTED: destination received amount (terminal); FAILED: the withdrawal stopped and nothing left the Totalis balance: a vault top-up that committed stays in the wallet (terminal).
939
+ * @enum {unknown}
940
+ */
941
+ readonly status: "VAULT_WITHDRAWAL_QUEUED" | "PAYOUT_SUBMITTED" | "PAYOUT_COMMITTED" | "FAILED";
942
+ /** @description Operation of the vault top-up; null when there is no shortfall. */
943
+ readonly vault_operation_id: components["schemas"]["Bytes32"] | null;
944
+ /** @description Operation of the relayed payout; null until the vault top-up commits. */
945
+ readonly payout_operation_id: components["schemas"]["Bytes32"] | null;
946
+ /** @description HyperEVM transaction of the payout; null until it is broadcast. */
947
+ readonly payout_transaction_hash: components["schemas"]["Bytes32"] | null;
948
+ /** @description When the withdrawal last changed, RFC3339 UTC. */
949
+ readonly updated_at: components["schemas"]["Timestamp"];
950
+ };
951
+ readonly ReadSubscription: {
952
+ /**
953
+ * @description Account-read contract version of the subscription; always "1".
954
+ * @constant
955
+ */
956
+ readonly contract_version: "1";
957
+ /** @description Account or maker scope the server derived from the credential for this stream. */
958
+ readonly scope: components["schemas"]["Scope"];
959
+ /** @description Stream cursor the client asked to resume after; null when it started without one. */
960
+ readonly cursor: components["schemas"]["Cursor"] | null;
961
+ };
962
+ /**
963
+ * Format: positive-int64-decimal
964
+ * @description Positive generation or version bounded by signed int64 storage.
965
+ */
966
+ readonly PositiveInt64: string;
967
+ /** @enum {string} */
968
+ readonly MarketState: "ACTIVE" | "CLOSED" | "UNSUPPORTED";
969
+ readonly ResultUnresolved: {
970
+ /**
971
+ * @description AVAILABLE: the native result was read successfully.
972
+ * @constant
973
+ */
974
+ readonly availability: "AVAILABLE";
975
+ /**
976
+ * @description UNRESOLVED: the native market has not recorded a result.
977
+ * @constant
978
+ */
979
+ readonly result_state: "UNRESOLVED";
980
+ };
981
+ /** @description Native result numerator in the inclusive range zero through Q = 100000000. */
982
+ readonly FactorNumerator: string;
983
+ readonly NonZeroBytes32: components["schemas"]["Bytes32"] & unknown;
984
+ readonly ResultNumeric: {
985
+ /**
986
+ * @description AVAILABLE: the native result was read successfully.
987
+ * @constant
988
+ */
989
+ readonly availability: "AVAILABLE";
990
+ /**
991
+ * @description NUMERIC_RECORDED: the native market recorded a numeric payout for the YES side.
992
+ * @constant
993
+ */
994
+ readonly result_state: "NUMERIC_RECORDED";
995
+ /** @description YES payout as a fraction of factor_scale; 100000000 pays YES in full, 0 pays NO in full. */
996
+ readonly yes_factor_numerator: components["schemas"]["FactorNumerator"];
997
+ /**
998
+ * @description Denominator for yes_factor_numerator; always 100000000.
999
+ * @constant
1000
+ */
1001
+ readonly factor_scale: "100000000";
1002
+ /** @description HyperEVM block number of the native read that observed this result. */
1003
+ readonly recorded_at_block: components["schemas"]["PositiveInt64"];
1004
+ /** @description SHA-256 over the chain, contracts, block number and hash, outcome and result of the native read that observed this result. */
1005
+ readonly evidence_digest: components["schemas"]["NonZeroBytes32"];
1006
+ };
1007
+ readonly ResultNonnumeric: {
1008
+ /**
1009
+ * @description AVAILABLE: the native result was read successfully.
1010
+ * @constant
1011
+ */
1012
+ readonly availability: "AVAILABLE";
1013
+ /**
1014
+ * @description RECOGNIZED_NONNUMERIC_OBSERVED: the native market recorded a recognized result that carries no numeric payout factor.
1015
+ * @constant
1016
+ */
1017
+ readonly result_state: "RECOGNIZED_NONNUMERIC_OBSERVED";
1018
+ /** @description HyperEVM block number of the native read that observed this result. */
1019
+ readonly recorded_at_block: components["schemas"]["PositiveInt64"];
1020
+ /** @description SHA-256 over the chain, contracts, block number and hash, outcome and result of the native read that observed this result. */
1021
+ readonly evidence_digest: components["schemas"]["NonZeroBytes32"];
1022
+ };
1023
+ readonly ResultUnavailable: {
1024
+ /**
1025
+ * @description UNAVAILABLE: the native result could not be read; reason says why.
1026
+ * @constant
1027
+ */
1028
+ readonly availability: "UNAVAILABLE";
1029
+ /**
1030
+ * @description NOT_QUERIED: not read yet; NATIVE_READ_FAILED: the on-chain read failed; RPC_UNAVAILABLE: no RPC provider answered; MALFORMED_RETURN: the contract returned an unexpected shape; PROVIDER_DISAGREEMENT: providers returned different results; UNSUPPORTED_PROTOCOL_VERSION: the outcome uses an unsupported protocol version.
1031
+ * @enum {string}
1032
+ */
1033
+ readonly reason: "NOT_QUERIED" | "NATIVE_READ_FAILED" | "RPC_UNAVAILABLE" | "MALFORMED_RETURN" | "PROVIDER_DISAGREEMENT" | "UNSUPPORTED_PROTOCOL_VERSION";
1034
+ };
1035
+ readonly Result: components["schemas"]["ResultUnresolved"] | components["schemas"]["ResultNumeric"] | components["schemas"]["ResultNonnumeric"] | components["schemas"]["ResultUnavailable"];
1036
+ readonly EligibilityEnabled: {
1037
+ /**
1038
+ * @description ENABLED: Totalis currently accepts new positions on this market.
1039
+ * @constant
1040
+ */
1041
+ readonly state: "ENABLED";
1042
+ };
1043
+ readonly EligibilityDisabled: {
1044
+ /**
1045
+ * @description DISABLED: Totalis does not currently accept new positions on this market; reason says why.
1046
+ * @constant
1047
+ */
1048
+ readonly state: "DISABLED";
1049
+ /**
1050
+ * @description Why new positions are refused. UNSUPPORTED_PROTOCOL_VERSION, UNSUPPORTED_QUOTE_ASSET and IDENTITY_CONFLICT are permanent support failures; MARKET_NOT_ACTIVE means the native market is no longer live; NATIVE_STATE_UNAVAILABLE, NATIVE_STATE_STALE, REFERENCE_UNAVAILABLE, REFERENCE_STALE and SOURCE_GENERATION_MISMATCH are temporary data outages; FINANCIAL_PROFILE_DISABLED means trading is switched off in this environment; SOURCE_UNQUALIFIED marks cached catalog copies that carry no live eligibility.
1051
+ * @enum {string}
1052
+ */
1053
+ readonly reason: "UNSUPPORTED_PROTOCOL_VERSION" | "UNSUPPORTED_QUOTE_ASSET" | "IDENTITY_CONFLICT" | "DEADLINE_UNAVAILABLE" | "SOURCE_UNQUALIFIED" | "FINANCIAL_PROFILE_DISABLED" | "MARKET_NOT_ACTIVE" | "NATIVE_STATE_UNAVAILABLE" | "NATIVE_STATE_STALE" | "DEADLINE_BUFFER_ENTERED" | "REFERENCE_UNAVAILABLE" | "REFERENCE_STALE" | "SOURCE_GENERATION_MISMATCH";
1054
+ };
1055
+ readonly Eligibility: components["schemas"]["EligibilityEnabled"] | components["schemas"]["EligibilityDisabled"];
1056
+ /** @description Reviewed UTC source windows and retained legacy admission metadata. These fields do not control trading availability. Null times require external evidence or are not defined. Settlement boundaries never promise settlement or mutate native lifecycle. */
1057
+ readonly Timing: null | {
1058
+ /** @description Scheduled time of the underlying event in Unix seconds, taken from the market definition; null when the template has no scheduled event. */
1059
+ readonly scheduled_event_at: components["schemas"]["PositiveInt64"] | null;
1060
+ /** @description End of the source observation window in Unix seconds, such as a price fixing time or touch deadline; null when the template defines none. */
1061
+ readonly observation_ends_at: components["schemas"]["PositiveInt64"] | null;
1062
+ /** @description Source backstop date in Unix seconds by which the market resolves even if the event has not happened; null when the template defines none. */
1063
+ readonly resolution_backstop_at: components["schemas"]["PositiveInt64"] | null;
1064
+ /** @description End of the evidence window in Unix seconds, the source evidence date plus evidence_delay_seconds; null when the template has no evidence date. */
1065
+ readonly evidence_ends_at: components["schemas"]["PositiveInt64"] | null;
1066
+ /** @description Earliest source-defined settlement instant in Unix seconds, qualified by settlement_boundary; null when unknown. It is not a promise that settlement happens then. */
1067
+ readonly settlement_not_before: components["schemas"]["PositiveInt64"] | null;
1068
+ /**
1069
+ * @deprecated
1070
+ * @description Legacy metadata only. Does not control market visibility or Combo entry. Use native lifecycle and eligibility.
1071
+ */
1072
+ readonly admission_cutoff_at: components["schemas"]["PositiveInt64"] | null;
1073
+ /**
1074
+ * @description Timing format version; currently always 1.
1075
+ * @constant
1076
+ */
1077
+ readonly version: "1";
1078
+ /**
1079
+ * @description Hyperliquid network whose reviewed template definition produced these windows.
1080
+ * @enum {unknown}
1081
+ */
1082
+ readonly network: "mainnet" | "testnet";
1083
+ /** @description Hyperliquid outcome template the windows were read from, for example priceTouch or binaryPrice. */
1084
+ readonly template_id: string;
1085
+ /**
1086
+ * @description How observation_ends_at bounds the window: INCLUSIVE includes that instant, EXCLUSIVE stops just before it, INSTANT means a single fixing at that instant, UNKNOWN means the template defines no observation boundary.
1087
+ * @enum {unknown}
1088
+ */
1089
+ readonly observation_boundary: "INCLUSIVE" | "EXCLUSIVE" | "INSTANT" | "UNKNOWN";
1090
+ /**
1091
+ * @description INCLUSIVE allows settlement at settlement_not_before, EXCLUSIVE only after it; UNKNOWN exactly when settlement_not_before is null.
1092
+ * @enum {unknown}
1093
+ */
1094
+ readonly settlement_boundary: "INCLUSIVE" | "EXCLUSIVE" | "UNKNOWN";
1095
+ /** @description Reviewed code for how the template resolves, for example PRICE_OBSERVATION, TOUCH_OR_WINDOW_END or WINNER_OR_ELIMINATION_OR_BACKSTOP. */
1096
+ readonly settlement_rule: string;
1097
+ /**
1098
+ * @deprecated
1099
+ * @description Legacy classification retained for existing clients; no separate Totalis admission calendar is enforced.
1100
+ * @enum {unknown}
1101
+ */
1102
+ readonly admission_policy: "BEFORE_SCHEDULED_EVENT" | "SOURCE_UPPER_BOUND" | "UNAVAILABLE";
1103
+ /** @description Reviewed allowance in seconds between the event and the official result fixing; 0 when none applies. */
1104
+ readonly fixing_delay_seconds: number;
1105
+ /** @description Seconds added to the source evidence date to form evidence_ends_at; 0 when the template has no evidence window. */
1106
+ readonly evidence_delay_seconds: number;
1107
+ /** @description Code for the off-chain or venue event that can resolve the market, for example OFFICIAL_DECISION or TOUCH_OR_DELISTING; empty when none is defined. */
1108
+ readonly external_event: string;
1109
+ /** @description True when the market can resolve before its source window ends, for example on a price touch or an early official result. */
1110
+ readonly early_resolution: boolean;
1111
+ };
1112
+ readonly DeadlineAvailable: {
1113
+ /** @description Reviewed source windows for the market; null for markets without a reviewed template, such as recurring rounds. */
1114
+ readonly timing: components["schemas"]["Timing"];
1115
+ /**
1116
+ * @description AVAILABLE: a source date was derived for this market.
1117
+ * @constant
1118
+ */
1119
+ readonly availability: "AVAILABLE";
1120
+ /**
1121
+ * @deprecated
1122
+ * @description Legacy buffered source-date metadata retained for compatibility. Neither this value nor its buffer controls trading, visibility or settlement.
1123
+ */
1124
+ readonly resolution_deadline: components["schemas"]["PositiveInt64"];
1125
+ /**
1126
+ * @deprecated
1127
+ * @description Legacy source-date encoding only; not an execution buffer.
1128
+ */
1129
+ readonly safety_buffer_seconds: string;
1130
+ /**
1131
+ * @description How the source date was derived: STRUCTURED_METADATA from a reviewed template field, OPERATOR_OVERRIDE from a reviewed per-question override, PINNED_GRAMMAR from the retired description grammar.
1132
+ * @enum {string}
1133
+ */
1134
+ readonly derivation_kind: "STRUCTURED_METADATA" | "PINNED_GRAMMAR" | "OPERATOR_OVERRIDE";
1135
+ /** @description Reviewed market class the date rule applies to, for example PRICE_BINARY, PRICE_TOUCH or SPORTS_TOURNAMENT. */
1136
+ readonly market_class: string;
1137
+ /** @description Version of the date rule set that classified the market. */
1138
+ readonly market_class_version: components["schemas"]["PositiveInt64"];
1139
+ /** @description Version of the parser that read the source date from the market definition. */
1140
+ readonly parser_version: components["schemas"]["PositiveInt64"];
1141
+ /** @description Version of the legacy safety-buffer policy used for resolution_deadline. */
1142
+ readonly buffer_version: components["schemas"]["PositiveInt64"];
1143
+ /** @description SHA-256 of the native question or outcome definition the date was derived from. */
1144
+ readonly source_digest: components["schemas"]["NonZeroBytes32"];
1145
+ /** @description SHA-256 identifying the date rule set and template registry used for the derivation. */
1146
+ readonly grammar_digest: components["schemas"]["NonZeroBytes32"];
1147
+ /** @description SHA-256 of the raw source catalog snapshot the date was derived from. */
1148
+ readonly fixture_digest: components["schemas"]["NonZeroBytes32"];
1149
+ };
1150
+ readonly DeadlineUnavailable: {
1151
+ /** @description Reviewed source windows when the template supplies them even though no source date was derived; otherwise null. */
1152
+ readonly timing: components["schemas"]["Timing"];
1153
+ /**
1154
+ * @description UNAVAILABLE: no source date could be derived; reason says why.
1155
+ * @constant
1156
+ */
1157
+ readonly availability: "UNAVAILABLE";
1158
+ /**
1159
+ * @description UNQUALIFIED_MARKET_CLASS: no reviewed rule covers this market; MISSING_STRUCTURED_SOURCE: the template has no usable date field; AMBIGUOUS_DESCRIPTION: the definition could not be parsed to one date; UNSUPPORTED_PROTOCOL_VERSION: the outcome uses an unsupported protocol version.
1160
+ * @enum {string}
1161
+ */
1162
+ readonly reason: "UNQUALIFIED_MARKET_CLASS" | "MISSING_STRUCTURED_SOURCE" | "AMBIGUOUS_DESCRIPTION" | "UNSUPPORTED_PROTOCOL_VERSION";
1163
+ };
1164
+ readonly Deadline: components["schemas"]["DeadlineAvailable"] | components["schemas"]["DeadlineUnavailable"];
1165
+ readonly "$defs-DeadlineAvailable": {
1166
+ /**
1167
+ * @description AVAILABLE: a source date was derived for this market.
1168
+ * @constant
1169
+ */
1170
+ readonly availability: "AVAILABLE";
1171
+ /** @description Legacy buffered source date in Unix seconds: the source date plus safety_buffer_seconds. It does not control trading, visibility or settlement. */
1172
+ readonly resolution_deadline: components["schemas"]["PositiveInt64"];
1173
+ /** @description Legacy buffer in seconds added to the source date to form resolution_deadline; not an execution buffer. */
1174
+ readonly safety_buffer_seconds: string;
1175
+ /**
1176
+ * @description How the source date was derived: STRUCTURED_METADATA from a reviewed template field, OPERATOR_OVERRIDE from a reviewed per-question override, PINNED_GRAMMAR from the retired description grammar.
1177
+ * @enum {string}
1178
+ */
1179
+ readonly derivation_kind: "STRUCTURED_METADATA" | "PINNED_GRAMMAR" | "OPERATOR_OVERRIDE";
1180
+ /** @description Reviewed market class the date rule applies to, for example PRICE_BINARY. */
1181
+ readonly market_class: string;
1182
+ /** @description Version of the date rule set that classified the market. */
1183
+ readonly market_class_version: components["schemas"]["PositiveInt64"];
1184
+ /** @description Version of the parser that read the source date from the market definition. */
1185
+ readonly parser_version: components["schemas"]["PositiveInt64"];
1186
+ /** @description Version of the legacy safety-buffer policy used for resolution_deadline. */
1187
+ readonly buffer_version: components["schemas"]["PositiveInt64"];
1188
+ /** @description SHA-256 of the native question or outcome definition the date was derived from. */
1189
+ readonly source_digest: components["schemas"]["NonZeroBytes32"];
1190
+ /** @description SHA-256 identifying the date rule set and template registry used for the derivation. */
1191
+ readonly grammar_digest: components["schemas"]["NonZeroBytes32"];
1192
+ /** @description SHA-256 of the raw source catalog snapshot the date was derived from. */
1193
+ readonly fixture_digest: components["schemas"]["NonZeroBytes32"];
1194
+ };
1195
+ readonly "$defs-DeadlineUnavailable": {
1196
+ /**
1197
+ * @description UNAVAILABLE: no source date could be derived; reason says why.
1198
+ * @constant
1199
+ */
1200
+ readonly availability: "UNAVAILABLE";
1201
+ /**
1202
+ * @description UNQUALIFIED_MARKET_CLASS: no reviewed rule covers this market; MISSING_STRUCTURED_SOURCE: the template has no usable date field; AMBIGUOUS_DESCRIPTION: the definition could not be parsed to one date; UNSUPPORTED_PROTOCOL_VERSION: the outcome uses an unsupported protocol version.
1203
+ * @enum {string}
1204
+ */
1205
+ readonly reason: "UNQUALIFIED_MARKET_CLASS" | "MISSING_STRUCTURED_SOURCE" | "AMBIGUOUS_DESCRIPTION" | "UNSUPPORTED_PROTOCOL_VERSION";
1206
+ };
1207
+ readonly "$defs-Deadline": components["schemas"]["$defs-DeadlineAvailable"] | components["schemas"]["$defs-DeadlineUnavailable"];
1208
+ /** Format: uint256-decimal */
1209
+ readonly Uint: string;
1210
+ readonly PublicationCatalogSide: {
1211
+ /** @description Market side, YES or NO. */
1212
+ readonly side: components["schemas"]["Side"];
1213
+ /** @description Hyperliquid coin name of this side, # followed by outcome_id times 10 plus the side index. */
1214
+ readonly coin: string;
1215
+ /** @description Hyperliquid asset ID used to trade this side. */
1216
+ readonly asset_id: components["schemas"]["Uint"];
1217
+ };
1218
+ readonly PublicationCatalogMarket: {
1219
+ /** @description Hyperliquid outcome ID of the market. */
1220
+ readonly outcome_id: components["schemas"]["UInt32String"];
1221
+ /** @description Hyperliquid question ID, or 4294967295 for a standalone market. */
1222
+ readonly native_question_id: components["schemas"]["UInt32String"];
1223
+ /**
1224
+ * @description STANDALONE for a market with no question, NAMED for a named outcome of a question, FALLBACK for a question's fallback outcome; absent from older producers.
1225
+ * @enum {string}
1226
+ */
1227
+ readonly relationship_kind?: "FALLBACK" | "NAMED" | "STANDALONE";
1228
+ /**
1229
+ * @description SUPPORTED, or why Totalis cannot support the market: UNSUPPORTED_PROTOCOL_VERSION, UNSUPPORTED_QUOTE_ASSET or IDENTITY_CONFLICT; absent from older producers.
1230
+ * @enum {string}
1231
+ */
1232
+ readonly support_state?: "SUPPORTED" | "UNSUPPORTED_PROTOCOL_VERSION" | "UNSUPPORTED_QUOTE_ASSET" | "IDENTITY_CONFLICT";
1233
+ /** @description Display title derived from the market definition. */
1234
+ readonly title: string;
1235
+ /** @description Native lifecycle: ACTIVE, CLOSED or UNSUPPORTED. */
1236
+ readonly state: components["schemas"]["MarketState"];
1237
+ /** @description Native result as last read from HyperEVM. */
1238
+ readonly result: components["schemas"]["Result"];
1239
+ /** @description Revision of this market's catalog metadata; it increases when the metadata changes. */
1240
+ readonly metadata_revision: components["schemas"]["PositiveInt64"];
1241
+ /** @description Whether Totalis currently accepts new positions on this market. */
1242
+ readonly eligibility: components["schemas"]["Eligibility"];
1243
+ /** @description Hyperliquid deployer venue of the market, empty for Hyperliquid's own markets. Current producers always send it; when absent (older producers) consumers treat the deployer as unlisted and refuse the market as a Combo leg. */
1244
+ readonly venue?: string;
1245
+ /** @description Consumers-first rollout accepts the previous producer deadline without timing; current producers emit the full temporal deadline. Unknown fields remain rejected. */
1246
+ readonly deadline: components["schemas"]["Deadline"] | components["schemas"]["$defs-Deadline"];
1247
+ /** @description The YES and NO sides, in that order. */
1248
+ readonly sides: readonly components["schemas"]["PublicationCatalogSide"][];
1249
+ /** @description Publication version at which this item last changed; at most the packet's terminal version. */
1250
+ readonly version: components["schemas"]["PositiveInt64"];
1251
+ };
1252
+ readonly SourceQualityPair: {
1253
+ /**
1254
+ * @description Hyperliquid price feed; HYPERLIQUID_FAST_ASSET_CTXS in this branch.
1255
+ * @constant
1256
+ */
1257
+ readonly source: "HYPERLIQUID_FAST_ASSET_CTXS";
1258
+ /**
1259
+ * @description Asset context values carry BOOK_MID or MARK_PRICE quality.
1260
+ * @enum {unknown}
1261
+ */
1262
+ readonly quality: "BOOK_MID" | "MARK_PRICE";
1263
+ } | {
1264
+ /**
1265
+ * @description Hyperliquid price feed; HYPERLIQUID_ALL_MIDS in this branch.
1266
+ * @constant
1267
+ */
1268
+ readonly source: "HYPERLIQUID_ALL_MIDS";
1269
+ /**
1270
+ * @description All-mids values always carry ALL_MIDS_FALLBACK quality.
1271
+ * @constant
1272
+ */
1273
+ readonly quality: "ALL_MIDS_FALLBACK";
1274
+ } | {
1275
+ /**
1276
+ * @description Hyperliquid price feed; HYPERLIQUID_L2_BOOK in this branch.
1277
+ * @constant
1278
+ */
1279
+ readonly source: "HYPERLIQUID_L2_BOOK";
1280
+ /**
1281
+ * @description Order book values always carry BOOK_MID quality.
1282
+ * @constant
1283
+ */
1284
+ readonly quality: "BOOK_MID";
1285
+ } | {
1286
+ /**
1287
+ * @description Hyperliquid price feed; HYPERLIQUID_BBO in this branch.
1288
+ * @constant
1289
+ */
1290
+ readonly source: "HYPERLIQUID_BBO";
1291
+ /**
1292
+ * @description Best bid and offer values always carry BOOK_MID quality.
1293
+ * @constant
1294
+ */
1295
+ readonly quality: "BOOK_MID";
1296
+ } | {
1297
+ /**
1298
+ * @description Hyperliquid price feed; HYPERLIQUID_TRADES in this branch.
1299
+ * @constant
1300
+ */
1301
+ readonly source: "HYPERLIQUID_TRADES";
1302
+ /**
1303
+ * @description Trade values always carry TRADE quality.
1304
+ * @constant
1305
+ */
1306
+ readonly quality: "TRADE";
1307
+ };
1308
+ /** @enum {string} */
1309
+ readonly Source: "HYPERLIQUID_FAST_ASSET_CTXS" | "HYPERLIQUID_ALL_MIDS" | "HYPERLIQUID_L2_BOOK" | "HYPERLIQUID_BBO" | "HYPERLIQUID_TRADES";
1310
+ /** @enum {string} */
1311
+ readonly Quality: "BOOK_MID" | "MARK_PRICE" | "ALL_MIDS_FALLBACK" | "TRADE";
1312
+ /**
1313
+ * Format: uint256-decimal
1314
+ * @description Nonnegative integer value paired with an explicit positive scale.
1315
+ */
1316
+ readonly IntegerValue: string;
1317
+ /**
1318
+ * Format: uint256-decimal
1319
+ * @description Positive base-10 scale for an integer value.
1320
+ */
1321
+ readonly Scale: string;
1322
+ readonly FeedReferenceAvailable: {
1323
+ /**
1324
+ * @description AVAILABLE: a qualified reference price has been observed for this side.
1325
+ * @constant
1326
+ */
1327
+ readonly availability: "AVAILABLE";
1328
+ /** @description Hyperliquid feed the reference price came from. */
1329
+ readonly source: components["schemas"]["Source"];
1330
+ /** @description How the reference price was derived; see the source and quality pairing. */
1331
+ readonly quality: components["schemas"]["Quality"];
1332
+ /** @description Reference price of this side as an integer; divide by scale for the probability price between 0 and 1. */
1333
+ readonly value: components["schemas"]["IntegerValue"];
1334
+ /** @description Best bid at scale; set only for HYPERLIQUID_L2_BOOK and HYPERLIQUID_BBO sources, otherwise null. */
1335
+ readonly best_bid?: components["schemas"]["IntegerValue"] | null;
1336
+ /** @description Best ask at scale; set only for HYPERLIQUID_L2_BOOK and HYPERLIQUID_BBO sources, otherwise null. */
1337
+ readonly best_ask?: components["schemas"]["IntegerValue"] | null;
1338
+ /** @description Price of the latest book execution on this side at scale, kept across restarts; a fill prints on both sides at prices summing to scale. Null when no trade is known. */
1339
+ readonly last_trade?: components["schemas"]["IntegerValue"] | null;
1340
+ /** @description Hyperliquid time of last_trade, RFC 3339 UTC; null exactly when last_trade is null. */
1341
+ readonly last_trade_at?: components["schemas"]["Timestamp"] | null;
1342
+ /** @description Crowd probability at scale: the book midpoint when best_ask - best_bid is at most 10% of scale, last_trade when the spread is at most 50% and last_trade lies within [best_bid, best_ask], otherwise null. The midpoint rounds half to even, so YES and NO chances sum to scale. chance_basis says which applied. */
1343
+ readonly chance?: components["schemas"]["IntegerValue"] | null;
1344
+ /** @description Which input chance is: MID, the book midpoint, so a midpoint history describes it; LAST_TRADE, last_trade on a wide book, where midpoint history does not. Null exactly when chance is null. */
1345
+ readonly chance_basis?: ("MID" | "LAST_TRADE") | null;
1346
+ /** @description Value of one held share at scale: chance when known, else best_bid, else 0 when only asks exist; null when no book is known. Not a price a trade receives. */
1347
+ readonly mark?: components["schemas"]["IntegerValue"] | null;
1348
+ /** @description Divisor for value, best_bid, best_ask, last_trade, chance and mark; currently 1000000000000000000 (18 decimals). */
1349
+ readonly scale: components["schemas"]["Scale"];
1350
+ /**
1351
+ * @description FRESH when received within the last 15 seconds, otherwise STALE.
1352
+ * @enum {string}
1353
+ */
1354
+ readonly freshness: "FRESH" | "STALE";
1355
+ /** @description Reference-price feed generation that produced this value; a higher generation starts whenever the feed is re-snapshotted, for example after a restart or catalog change. */
1356
+ readonly feed_generation: components["schemas"]["PositiveInt64"];
1357
+ /** @description Hyperliquid timestamp of the observation as RFC 3339 UTC; null when the source provides none. */
1358
+ readonly source_time: components["schemas"]["Timestamp"] | null;
1359
+ /** @description When Totalis received the observation, RFC 3339 UTC. */
1360
+ readonly received_at: components["schemas"]["Timestamp"];
1361
+ } & components["schemas"]["SourceQualityPair"];
1362
+ readonly FeedReferenceUnavailable: {
1363
+ /**
1364
+ * @description UNAVAILABLE: no qualified reference price exists for this side; reason says why.
1365
+ * @constant
1366
+ */
1367
+ readonly availability: "UNAVAILABLE";
1368
+ /** @description Hyperliquid feed that was expected to supply the price. */
1369
+ readonly source: components["schemas"]["Source"];
1370
+ /**
1371
+ * @description NOT_OBSERVED: no price seen yet; AMBIGUOUS_SOURCE: the source gave conflicting values; STALE_GENERATION: the last price belongs to an older feed generation; UNSUPPORTED_MARKET: the market is not supported; SOURCE_UNQUALIFIED: the copy carries no live price, as in cached catalog pages and finished markets that left the catalog.
1372
+ * @enum {string}
1373
+ */
1374
+ readonly reason: "NOT_OBSERVED" | "AMBIGUOUS_SOURCE" | "STALE_GENERATION" | "UNSUPPORTED_MARKET" | "SOURCE_UNQUALIFIED";
1375
+ /**
1376
+ * @description Always UNKNOWN while no price is available.
1377
+ * @constant
1378
+ */
1379
+ readonly freshness: "UNKNOWN";
1380
+ /** @description Last update time of the market record this state was derived from, RFC 3339 UTC; 1970-01-01T00:00:00Z in cached catalog copies. */
1381
+ readonly received_at: components["schemas"]["Timestamp"];
1382
+ };
1383
+ readonly FeedReference: components["schemas"]["FeedReferenceAvailable"] | components["schemas"]["FeedReferenceUnavailable"];
1384
+ readonly PublicationReference: {
1385
+ /** @description Hyperliquid outcome ID of the market. */
1386
+ readonly outcome_id: components["schemas"]["UInt32String"];
1387
+ /** @description Market side the reference belongs to, YES or NO. */
1388
+ readonly side: components["schemas"]["Side"];
1389
+ /** @description Current reference price of this side, or why none is available. */
1390
+ readonly reference: components["schemas"]["FeedReference"];
1391
+ /** @description Publication version at which this reference last changed. */
1392
+ readonly version: components["schemas"]["PositiveInt64"];
1393
+ };
1394
+ readonly PublicationCatalogRemoval: {
1395
+ /** @description Hyperliquid outcome ID removed from the catalog. */
1396
+ readonly outcome_id: components["schemas"]["UInt32String"];
1397
+ /** @description Publication version of the removal. */
1398
+ readonly version: components["schemas"]["PositiveInt64"];
1399
+ };
1400
+ readonly PublicationReferenceRemoval: {
1401
+ /** @description Hyperliquid outcome ID whose reference was removed. */
1402
+ readonly outcome_id: components["schemas"]["UInt32String"];
1403
+ /** @description Market side whose reference was removed, YES or NO. */
1404
+ readonly side: components["schemas"]["Side"];
1405
+ /** @description Publication version of the removal. */
1406
+ readonly version: components["schemas"]["PositiveInt64"];
1407
+ };
1408
+ };
1409
+ responses: never;
1410
+ parameters: never;
1411
+ requestBodies: never;
1412
+ headers: never;
1413
+ pathItems: never;
1414
+ };
1415
+ export type $defs = Record<string, never>;
1416
+ export type operations = Record<string, never>;