@totalis/hip4-client 0.0.0-stage → 0.73.0

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