@totalis/hip4-client 0.124.0 → 0.126.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 (41) hide show
  1. package/CHANGELOG.md +389 -0
  2. package/README.md +9 -5
  3. package/dist/api-keys.d.ts +21 -2
  4. package/dist/api-keys.js +12 -10
  5. package/dist/audience-contract.d.ts +1 -2
  6. package/dist/client.d.ts +1 -1
  7. package/dist/client.js +1 -1
  8. package/dist/flow-errors.d.ts +1 -1
  9. package/dist/flow-errors.js +1 -1
  10. package/dist/generated/account-read.d.ts +150 -126
  11. package/dist/generated/api-keys.d.ts +19 -10
  12. package/dist/generated/browse.d.ts +12 -12
  13. package/dist/generated/client.d.ts +5 -2
  14. package/dist/generated/errors.d.ts +15 -8
  15. package/dist/generated/errors.js +47 -35
  16. package/dist/generated/maker.d.ts +3 -4
  17. package/dist/generated/openapi.d.ts +833 -893
  18. package/dist/generated/realtime.d.ts +66 -93
  19. package/dist/generated/vault-abi.d.ts +57 -0
  20. package/dist/generated/vault-abi.js +77 -0
  21. package/dist/generated/version.d.ts +16 -16
  22. package/dist/generated/version.js +20 -18
  23. package/dist/maker.d.ts +134 -54
  24. package/dist/maker.js +257 -147
  25. package/dist/money.d.ts +8 -6
  26. package/dist/money.js +7 -7
  27. package/dist/partner.d.ts +2 -0
  28. package/dist/partner.js +2 -1
  29. package/dist/request.d.ts +11 -2
  30. package/dist/request.js +7 -2
  31. package/dist/totalis.d.ts +147 -232
  32. package/dist/totalis.js +290 -269
  33. package/dist/typed-data.d.ts +6 -0
  34. package/dist/typed-data.js +8 -0
  35. package/dist/ui.d.ts +6 -10
  36. package/dist/ui.js +15 -13
  37. package/dist/vault-reads.d.ts +46 -0
  38. package/dist/vault-reads.js +72 -0
  39. package/examples/browser-wallet.mjs +1 -1
  40. package/examples/node-bot.mjs +15 -12
  41. package/package.json +1 -1
@@ -26,8 +26,8 @@ export type components = {
26
26
  readonly status: components["schemas"]["OperationState"];
27
27
  /** @description Chain transaction hash of the latest submission; null until a transaction has been submitted. */
28
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"];
29
+ /** @description Why the operation ended EXPIRED_UNEXECUTED, as the operation's `reason`. Present only then. */
30
+ readonly reason?: components["schemas"]["OperationFailureReason"];
31
31
  /** @description When the operation last changed state, RFC3339 UTC. */
32
32
  readonly updated_at: components["schemas"]["Timestamp"];
33
33
  };
@@ -44,14 +44,14 @@ export type components = {
44
44
  */
45
45
  readonly status: "COMMITTED";
46
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. */
47
+ /** @description A quote left an RFQ's book. */
48
48
  readonly QuoteRemovedPayload: {
49
49
  /** @description RFQ whose book lost the quote. */
50
50
  readonly rfq_id: components["schemas"]["Uuid"];
51
51
  /** @description Quote that left the book. */
52
52
  readonly quote_id: components["schemas"]["Bytes32"];
53
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.
54
+ * @description Why it left. CANCELLED: the maker cancelled or declined it, its acceptance timed out, or the maker missed a confirm. REPLACED: the maker created a newer quote on the RFQ. ACCEPTED: the maker's confirm accepted it.
55
55
  * @enum {unknown}
56
56
  */
57
57
  readonly status: "CANCELLED" | "REPLACED" | "ACCEPTED";
@@ -66,48 +66,42 @@ export type components = {
66
66
  readonly status: "DEPOSIT_QUEUED" | "AWAITING_VAULT_CREDIT" | "ACCEPT_QUEUED" | "UNKNOWN" | "ACCEPTED" | "EXPIRED_REQUOTE" | "FAILED";
67
67
  /** @description When the wallet funding last changed, RFC3339 UTC. */
68
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
69
  };
72
- readonly RfqPayload: ({
70
+ readonly RfqPayload: {
73
71
  /**
74
72
  * Format: uuid
75
73
  * @description RFQ this event reports.
76
74
  */
77
75
  readonly rfq_id: string;
78
76
  /**
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.
77
+ * @description RFQ status after this event. ACCEPTED: a quote was accepted and confirmed. CANCELLED: the owner cancelled it. FAILED: the accepted trade failed on chain. DECLINED: every maker that could answer declined to quote it.
80
78
  * @enum {unknown}
81
79
  */
82
80
  readonly status: "ACCEPTED" | "CANCELLED" | "FAILED" | "DECLINED";
83
81
  /** @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;
82
+ readonly reason: components["schemas"]["RfqTerminalReason"] | null;
85
83
  /** @description When the RFQ was durably created, RFC3339 UTC. */
86
84
  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. */
85
+ /** @description The latest end of quote collection, RFC3339 UTC. Makers stop quoting at this instant; natural expiry emits no event. An RFQ its taker opened can close sooner, when the taker cancels or goes quiet or a cash-out's position moves on, which makers hear as `RFQ_CANCELLED`. */
88
86
  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
87
  /** @description Gross payout of the quote the taker accepted, in atomic USDC (6 decimals), before the profit fee. Present only on RFQ_ACCEPTED of an entry RFQ, on maker-audience events: every maker learns what won, never which maker. */
94
88
  readonly accepted_payout?: components["schemas"]["Amount"];
95
- } & components["schemas"]["IntentIdentityPair"]) & ({
89
+ } & ({
96
90
  /**
97
- * @description RFQ status; FAILED requires a terminal_reason, every other status has none.
91
+ * @description RFQ status; FAILED requires a reason, every other status has none.
98
92
  * @enum {unknown}
99
93
  */
100
94
  readonly status?: "ACCEPTED" | "CANCELLED" | "DECLINED";
101
95
  /** @description Null unless status is FAILED, then the reason the accepted trade failed. */
102
- readonly terminal_reason?: null;
96
+ readonly reason?: null;
103
97
  } | {
104
98
  /**
105
- * @description RFQ status; FAILED requires a terminal_reason, every other status has none.
99
+ * @description RFQ status; FAILED requires a reason, every other status has none.
106
100
  * @constant
107
101
  */
108
102
  readonly status?: "FAILED";
109
103
  /** @description Null unless status is FAILED, then the reason the accepted trade failed. */
110
- readonly terminal_reason?: components["schemas"]["RfqTerminalReason"];
104
+ readonly reason?: components["schemas"]["RfqTerminalReason"];
111
105
  });
112
106
  /** @description The whole entry RFQ as GET /v1/rfqs/{rfq_id} returns it while open, without status: the event says it is OPEN. */
113
107
  readonly EntryRfqPayload: {
@@ -123,15 +117,11 @@ export type components = {
123
117
  readonly net_stake?: components["schemas"]["Amount"];
124
118
  /** @description When the RFQ was durably created, RFC3339 UTC. */
125
119
  readonly created_at: components["schemas"]["Timestamp"];
126
- /** @description End of quote collection, RFC3339 UTC. Makers stop quoting at this instant; natural expiry emits no event. */
120
+ /** @description The latest end of quote collection, RFC3339 UTC. Makers stop quoting at this instant; natural expiry emits no event. An RFQ its taker opened can close sooner, when the taker cancels or goes quiet or a cash-out's position moves on, which makers hear as `RFQ_CANCELLED`. */
127
121
  readonly expires_at: components["schemas"]["Timestamp"];
128
122
  /** @description Requested legs in strictly increasing outcome_id order; a quote's legs. */
129
123
  readonly legs: components["schemas"]["legs"];
130
- /** @description Automatic-RFQ intent this RFQ belongs to. Present together with intent_generation only for RFQs created with an intent. */
131
- readonly intent_id?: components["schemas"]["Uuid"];
132
- /** @description Generation of the intent; a newer generation supersedes older RFQs of the same intent. Present only with intent_id. */
133
- readonly intent_generation?: components["schemas"]["PositiveInt64String"];
134
- } & components["schemas"]["IntentIdentityPair"];
124
+ };
135
125
  readonly CashoutRfqPayload: {
136
126
  /**
137
127
  * Format: uuid
@@ -140,7 +130,7 @@ export type components = {
140
130
  readonly rfq_id: string;
141
131
  /** @description When the RFQ was durably created, RFC3339 UTC. */
142
132
  readonly created_at: components["schemas"]["Timestamp"];
143
- /** @description End of cash-out quote collection, RFC3339 UTC. */
133
+ /** @description The latest end of cash-out quote collection, RFC3339 UTC. A cash-out RFQ its owner opened can close sooner, when the owner cancels or goes quiet or its position moves on, which makers hear as `RFQ_CANCELLED`. */
144
134
  readonly expires_at: components["schemas"]["Timestamp"];
145
135
  /**
146
136
  * @description Always CASHOUT for this payload.
@@ -149,19 +139,8 @@ export type components = {
149
139
  readonly kind: "CASHOUT";
150
140
  /** @description Position the owner wants to cash out. */
151
141
  readonly position_id: components["schemas"]["Bytes32"];
152
- /** @description Current owner of the position, who would sell it. */
153
- readonly owner: components["schemas"]["LowercaseNonZeroAddress"];
154
- /** @description legStateOf(legs, decision_read_gas) value read at decision_block; a quote must sign this exact value. */
155
- readonly leg_state: components["schemas"]["Bytes32"];
156
- /** @description The position's on-chain legs hash; the hash of legs must match it. */
157
- readonly legs_hash: components["schemas"]["Bytes32"];
158
- /** @description Pinned HyperEVM block number (decimal) for every pricing read: the position, owner, maker capacity, buyer balance and legStateOf. */
159
- readonly decision_block: components["schemas"]["UInt64String"];
160
- /**
161
- * @description Exact gas limit, always 500000, to pass to the legStateOf read at decision_block.
162
- * @constant
163
- */
164
- readonly decision_read_gas: "500000";
142
+ /** @description The position's owner, who would sell it and signs the accept. */
143
+ readonly taker: components["schemas"]["LowercaseNonZeroAddress"];
165
144
  /** @description Maker that wrote the position originally. */
166
145
  readonly maker_id: components["schemas"]["NonZeroUInt64String"];
167
146
  /** @description The position's stake after the taker fee, tickets(position_id).stake, in atomic USDC (6 decimals); fixed when the position opened. */
@@ -170,11 +149,7 @@ export type components = {
170
149
  readonly payout: components["schemas"]["Amount"];
171
150
  /** @description The position's canonical legs in leg order. */
172
151
  readonly legs: readonly components["schemas"]["Leg"][];
173
- /** @description Automatic-RFQ intent this RFQ belongs to. Present together with intent_generation only for RFQs created with an intent. */
174
- readonly intent_id?: components["schemas"]["Uuid"];
175
- /** @description Generation of the intent; present only with intent_id. */
176
- readonly intent_generation?: components["schemas"]["PositiveInt64String"];
177
- } & components["schemas"]["IntentIdentityPair"];
152
+ };
178
153
  /** @description A position changed on chain. */
179
154
  readonly PositionEventPayload: {
180
155
  /** @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. */
@@ -426,12 +401,12 @@ export type components = {
426
401
  * @description The credential's own account: its RFQs, quotes, acceptances, operations and balances.
427
402
  * @constant
428
403
  */
429
- readonly type: "account";
404
+ readonly kind: "account";
430
405
  /** @description Last durably applied cursor to resume after. Omit it to start from a snapshot. Scoped keys need replay:read to send one. */
431
406
  readonly cursor?: components["schemas"]["Cursor"];
432
407
  /** @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. */
433
408
  readonly open_rfqs?: boolean;
434
- /** @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. */
409
+ /** @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, POSITIONS and HOLDINGS; scoped keys get none. */
435
410
  readonly account_reads?: boolean;
436
411
  /** @description Opt in to publication checkpoints and a 1000 ms authenticated heartbeat. */
437
412
  readonly publication_freshness?: boolean;
@@ -441,7 +416,7 @@ export type components = {
441
416
  * @description A maker the credential acts for: open RFQs, acceptances of its quotes, and its operations and capital.
442
417
  * @constant
443
418
  */
444
- readonly type: "maker";
419
+ readonly kind: "maker";
445
420
  /** @description The maker to stream. A maker key names its own maker; a dashboard session names a maker it is a member of. */
446
421
  readonly maker_id: components["schemas"]["NonZeroUInt64String"];
447
422
  /** @description Last durably applied cursor to resume after. Omit it to start from a snapshot. Scoped keys need replay:read to send one. */
@@ -459,7 +434,7 @@ export type components = {
459
434
  * @constant
460
435
  */
461
436
  readonly method: "subscribe";
462
- /** @description Exactly one subscription, discriminated by type. The credential must act for it. */
437
+ /** @description Exactly one subscription, discriminated by kind. The credential must act for it. */
463
438
  readonly subscription: components["schemas"]["AccountSubscription"] | components["schemas"]["MakerSubscription"];
464
439
  };
465
440
  readonly SubscriptionResponse: {
@@ -481,10 +456,10 @@ export type components = {
481
456
  * @description The credential's own account: its RFQs, quotes, acceptances, operations and balances.
482
457
  * @constant
483
458
  */
484
- readonly type: "account";
459
+ readonly kind: "account";
485
460
  /** @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. */
486
461
  readonly open_rfqs?: boolean;
487
- /** @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. */
462
+ /** @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, POSITIONS and HOLDINGS; scoped keys get none. */
488
463
  readonly account_reads?: boolean;
489
464
  /** @description Opt in to publication checkpoints and a 1000 ms authenticated heartbeat. */
490
465
  readonly publication_freshness?: boolean;
@@ -493,7 +468,7 @@ export type components = {
493
468
  * @description A maker the credential acts for: open RFQs, acceptances of its quotes, and its operations and capital.
494
469
  * @constant
495
470
  */
496
- readonly type: "maker";
471
+ readonly kind: "maker";
497
472
  /** @description The maker to stream. A maker key names its own maker; a dashboard session names a maker it is a member of. */
498
473
  readonly maker_id: components["schemas"]["NonZeroUInt64String"];
499
474
  /** @description Opt in to readInvalidated frames for the maker's account reads. The server derives the scope and returns it in the subscriptionResponse. */
@@ -549,7 +524,7 @@ export type components = {
549
524
  };
550
525
  readonly ReadInvalidatedFrame: {
551
526
  /**
552
- * @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.
527
+ * @description Frame discriminator, always readInvalidated. Sent to subscriptions that set account_reads, and for its own ACTIVITY, POSITIONS and HOLDINGS to every account subscription on a session or unscoped key.
553
528
  * @constant
554
529
  */
555
530
  readonly channel: "readInvalidated";
@@ -599,7 +574,7 @@ export type components = {
599
574
  * @description Always market.
600
575
  * @constant
601
576
  */
602
- readonly type: "market";
577
+ readonly kind: "market";
603
578
  /** @description 1 to 256 unique outcome IDs (decimal strings) to follow. The snapshot and deltas cover only these outcomes. */
604
579
  readonly outcome_ids: readonly components["schemas"]["UInt32String"][];
605
580
  /** @description Opt in to a publication frame every 5000 ms while the socket is current. */
@@ -1150,7 +1125,7 @@ export type components = {
1150
1125
  /** @description Publication version of this state. The first delta's previous_version equals it. */
1151
1126
  readonly version: components["schemas"]["PositiveInt64"];
1152
1127
  /** @description Catalog entry of each selected outcome. */
1153
- readonly catalog: readonly components["schemas"]["PublicationCatalogMarket"][];
1128
+ readonly catalog: readonly components["schemas"]["StreamCatalogMarket"][];
1154
1129
  /** @description Reference price for each side of each selected outcome. */
1155
1130
  readonly references: readonly components["schemas"]["PublicationReference"][];
1156
1131
  };
@@ -1172,7 +1147,7 @@ export type components = {
1172
1147
  /** @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. */
1173
1148
  readonly version: components["schemas"]["PositiveInt64"];
1174
1149
  /** @description Selected catalog entries that were added or changed; replace them whole. */
1175
- readonly catalog_upserts: readonly components["schemas"]["PublicationCatalogMarket"][];
1150
+ readonly catalog_upserts: readonly components["schemas"]["StreamCatalogMarket"][];
1176
1151
  /** @description Selected outcomes removed from the catalog. */
1177
1152
  readonly catalog_removals: readonly components["schemas"]["PublicationCatalogRemoval"][];
1178
1153
  /** @description Selected reference prices that changed materially; replace them whole. */
@@ -1222,7 +1197,7 @@ export type components = {
1222
1197
  /** @description Revision of the changed reads, as a decimal string; a higher revision supersedes a lower one. */
1223
1198
  readonly revision: string;
1224
1199
  /** @description Account reads to refetch. */
1225
- readonly resources: readonly ("BALANCES" | "CAPITAL" | "ACTIVITY" | "POSITIONS" | "PERFORMANCE" | "TELEMETRY" | "QUOTES" | "ACCESS")[];
1200
+ readonly resources: readonly ("BALANCES" | "CAPITAL" | "ACTIVITY" | "POSITIONS" | "HOLDINGS" | "PERFORMANCE" | "TELEMETRY" | "QUOTES" | "ACCESS")[];
1226
1201
  /** @description Stream cursor of the change; persist it like an event cursor. */
1227
1202
  readonly cursor: components["schemas"]["Cursor"];
1228
1203
  };
@@ -1230,7 +1205,7 @@ export type components = {
1230
1205
  /** @enum {unknown} */
1231
1206
  readonly OperationState: "QUEUED" | "IN_FLIGHT" | "RETRYABLE" | "UNKNOWN" | "COMMITTED" | "REVERTED" | "EXPIRED_UNEXECUTED";
1232
1207
  /**
1233
- * @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.
1208
+ * @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 approval draws) did not cover the stake when it was to execute; one drawing the wallet waits at least six seconds after the accept arrived for a HyperCore transfer to land; the RFQ fails with the same `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.
1234
1209
  * @enum {string}
1235
1210
  */
1236
1211
  readonly OperationFailureReason: "INSUFFICIENT_CASH" | "DEADLINE_BEFORE_CLAIM" | "AUTHORIZATION_TOO_CLOSE" | "SIGNER_QUOTE_LIFE" | "SIMULATION_REVERTED" | "QUARANTINE_EXPIRED" | "ATTESTATION_EXPIRED";
@@ -1240,17 +1215,6 @@ export type components = {
1240
1215
  readonly Amount: string;
1241
1216
  /** Format: uuid */
1242
1217
  readonly Uuid: string;
1243
- /** @description Positive signed 64-bit decimal integer, at most 9223372036854775807. */
1244
- readonly PositiveInt64String: string;
1245
- readonly IntentIdentityPair: {
1246
- /** @description Automatic-RFQ intent (UUIDv7) the RFQ belongs to. */
1247
- readonly intent_id: components["schemas"]["Uuid"];
1248
- /** @description Generation of that intent, as a decimal string; a higher generation supersedes the intent's earlier RFQs. */
1249
- readonly intent_generation: components["schemas"]["PositiveInt64String"];
1250
- } | {
1251
- readonly intent_id?: never;
1252
- readonly intent_generation?: never;
1253
- };
1254
1218
  /** @enum {string} */
1255
1219
  readonly RfqTerminalReason: "REVERTED" | "EXPIRED_UNEXECUTED" | "INSUFFICIENT_CASH";
1256
1220
  /**
@@ -1301,7 +1265,7 @@ export type components = {
1301
1265
  };
1302
1266
  /** @description A maker's offer to open a position on an entry RFQ. */
1303
1267
  readonly EntryQuote: {
1304
- /** @description Quote ID: the EIP-712 digest of `entry` as the `Quote` struct. Accept it with `POST /v1/quotes/{quote_id}/accept`. */
1268
+ /** @description Quote ID. Accept it with `POST /v1/quotes/{quote_id}/accept`; it becomes the position's `position_id`. */
1305
1269
  readonly quote_id: components["schemas"]["Bytes32"];
1306
1270
  /** @description RFQ this quote answers. */
1307
1271
  readonly rfq_id: components["schemas"]["Uuid"];
@@ -1312,30 +1276,33 @@ export type components = {
1312
1276
  readonly kind: "ENTRY";
1313
1277
  /** @description Venue-wide publication sequence number; a higher value was created later. */
1314
1278
  readonly sequence: number;
1315
- /** @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. */
1316
- readonly accept_before: components["schemas"]["Timestamp"];
1317
- /** @description Entry terms. To accept, the taker signs them as the EIP-712 `TakerAccept` struct. */
1318
- readonly entry: components["schemas"]["QuoteTerms"];
1279
+ /** @description What the position pays if every leg wins, in atomic USDC (6 decimals), before the profit fee. */
1280
+ readonly payout: components["schemas"]["Amount"];
1281
+ /** @description What the taker signs to accept. The SDK signs it for you. */
1282
+ readonly signing: {
1283
+ /** @description The entry terms the taker signs as the EIP-712 `TakerAccept` struct to accept. */
1284
+ readonly entry: components["schemas"]["QuoteTerms"];
1285
+ };
1319
1286
  };
1320
1287
  readonly Hash32: string;
1321
1288
  /** @description Sell-back terms: the underwriting maker buys the position back and it closes. They mirror the signed SellBack struct. */
1322
1289
  readonly SellBackTerms: {
1323
1290
  /** @description Position the quote is for; the signed SellBack names it ticketId. */
1324
1291
  readonly position_id: components["schemas"]["Hash32"];
1325
- /** @description Buyback price the original maker pays the owner to close the ticket, in atomic USDC (6 decimals). */
1292
+ /** @description Buyback price the original maker pays the owner to close the position, in atomic USDC (6 decimals). */
1326
1293
  readonly price: components["schemas"]["Amount"];
1327
- /** @description Current position owner, who sells the ticket back. */
1294
+ /** @description Current position owner, who sells the position back. */
1328
1295
  readonly owner: components["schemas"]["LowercaseNonZeroAddress"];
1329
1296
  /** @description Unix seconds after which the quote can no longer be executed. */
1330
1297
  readonly expiry: components["schemas"]["UInt64String"];
1331
1298
  /** @description Random uint256, as a decimal string, that makes each signed quote unique. */
1332
1299
  readonly salt: components["schemas"]["Uint256"];
1333
- /** @description Position leg state the quote was priced against; must equal the RFQ's leg_state. */
1300
+ /** @description Position leg state, legStateOf(legs, 500000), the quote was priced against. */
1334
1301
  readonly leg_state: components["schemas"]["Hash32"];
1335
1302
  };
1336
1303
  /** @description A cash-out offer from the maker that backs the position: its vault buys the position back for `price`. */
1337
1304
  readonly SellBackQuote: {
1338
- /** @description Quote ID: the EIP-712 digest of `sell_back` as the `SellBack` struct, which the owner signs to accept. */
1305
+ /** @description Quote ID. Accept it with `POST /v1/quotes/{quote_id}/accept`. */
1339
1306
  readonly quote_id: components["schemas"]["Bytes32"];
1340
1307
  /** @description RFQ this quote answers. */
1341
1308
  readonly rfq_id: components["schemas"]["Uuid"];
@@ -1346,8 +1313,13 @@ export type components = {
1346
1313
  readonly kind: "SELL_BACK";
1347
1314
  /** @description Venue-wide publication sequence number; a higher value was created later. */
1348
1315
  readonly sequence: number;
1349
- /** @description Sell-back terms the owner accepts by signing `quote_id` as `SellBack`. */
1350
- readonly sell_back: components["schemas"]["SellBackTerms"];
1316
+ /** @description What the maker pays to close the position, in atomic USDC (6 decimals). */
1317
+ readonly price: components["schemas"]["Amount"];
1318
+ /** @description What the taker signs to accept. The SDK signs it for you. */
1319
+ readonly signing: {
1320
+ /** @description The sell-back terms the taker signs as the EIP-712 `SellBack` struct, whose digest is `quote_id`, to accept. */
1321
+ readonly sell_back: components["schemas"]["SellBackTerms"];
1322
+ };
1351
1323
  };
1352
1324
  /** @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. */
1353
1325
  readonly Quote: components["schemas"]["EntryQuote"] | components["schemas"]["SellBackQuote"];
@@ -1422,7 +1394,7 @@ export type components = {
1422
1394
  * @description Freshness of the whole read. CURRENT: every source is fresh and reconciled. STALE: a source lags or has not reconciled, such as a catching-up projection, a pending reorg rescan or a period not fully covered; amounts may be displayed with their age but never authorize an action. UNAVAILABLE: a required source could not be read, so the amounts it backs are null.
1423
1395
  * @enum {string}
1424
1396
  */
1425
- readonly status: "CURRENT" | "STALE" | "UNAVAILABLE";
1397
+ readonly freshness: "CURRENT" | "STALE" | "UNAVAILABLE";
1426
1398
  };
1427
1399
  readonly "$defs-Amount": string;
1428
1400
  /** @description Non-negative amount in atomic USDC (6 decimals, "1000000" = 1 USDC); null when it could not be established, never zero in its place. */
@@ -1450,28 +1422,28 @@ export type components = {
1450
1422
  /** @description Operations holding this reservation. */
1451
1423
  readonly operation_ids: readonly string[];
1452
1424
  /** @description Reserved amount in atomic USDC (6 decimals, "1000000" = 1 USDC). */
1453
- readonly value: components["schemas"]["$defs-Amount"];
1425
+ readonly amount: components["schemas"]["$defs-Amount"];
1454
1426
  /**
1455
1427
  * @description ACTIVE: held and not yet reflected on-chain; UNKNOWN: outcome unknown, still counted as held.
1456
1428
  * @enum {string}
1457
1429
  */
1458
1430
  readonly status: "ACTIVE" | "UNKNOWN";
1459
1431
  };
1460
- /** @description Maker capital lanes and derived collateral, in atomic USDC (6 decimals, "1000000" = 1 USDC). Amounts are null when unavailable; context.status is their freshness. */
1432
+ /** @description Maker capital lanes and derived collateral, in atomic USDC (6 decimals, "1000000" = 1 USDC). Amounts are null when unavailable; context.freshness says how fresh they are. */
1461
1433
  readonly MakerCapital: {
1462
- /** @description Freshness of this read: the oldest source observation and one status for every amount in the response. */
1434
+ /** @description Freshness of this read: the oldest source observation and one freshness for every amount in the response. */
1463
1435
  readonly context: components["schemas"]["ReadContext"];
1464
- /** @description Maker owner (its controller) from the same indexed vault row as the lanes. */
1465
- readonly owner: components["schemas"]["LowercaseNonZeroAddress"];
1436
+ /** @description Maker controller, from the same indexed vault row as the lanes. */
1437
+ readonly controller: components["schemas"]["LowercaseNonZeroAddress"];
1466
1438
  /** @description Maker signer (its quote signer) from the same indexed vault row as the lanes. The zero address means the maker was opened without one and cannot quote. */
1467
1439
  readonly signer: string;
1468
1440
  /** @description Maker vault lane V from the vault contract, including escrow and payables. */
1469
1441
  readonly vault_gross: components["schemas"]["UnsignedMetric"];
1470
- /** @description Bettor net stakes escrowed in this maker's open tickets (E). */
1442
+ /** @description Bettor net stakes escrowed in this maker's open positions (E). */
1471
1443
  readonly stake_escrow: components["schemas"]["UnsignedMetric"];
1472
- /** @description Settled winnings owed to ticket holders and not yet claimed (P). */
1444
+ /** @description Settled winnings owed to position holders and not yet claimed (P). */
1473
1445
  readonly payable_owed: components["schemas"]["UnsignedMetric"];
1474
- /** @description Original open maker exposure G: payout minus net stake summed over open tickets. */
1446
+ /** @description Original open maker exposure G: payout minus net stake summed over open positions. */
1475
1447
  readonly gross_open: components["schemas"]["UnsignedMetric"];
1476
1448
  /** @description Maker discount lane D from the vault contract, which offsets gross_open in the requirement. */
1477
1449
  readonly discount: components["schemas"]["UnsignedMetric"];
@@ -1479,7 +1451,7 @@ export type components = {
1479
1451
  readonly requirement: components["schemas"]["UnsignedMetric"];
1480
1452
  /** @description Collateral headroom F = max(V - E - P - R, 0). Not a guarantee of quote acceptance. */
1481
1453
  readonly free_collateral: components["schemas"]["UnsignedMetric"];
1482
- /** @description Signed C = V - E - P. Excludes open-ticket valuation; not equity or NAV. */
1454
+ /** @description Signed C = V - E - P. Excludes open-position valuation; not equity or NAV. */
1483
1455
  readonly capital_net_of_senior_liabilities: components["schemas"]["Metric"];
1484
1456
  /** @description Admission reservations H the venue holds for this maker that are not yet reflected on-chain; the sum of reservations. */
1485
1457
  readonly pending_commitments: components["schemas"]["UnsignedMetric"];
@@ -1637,14 +1609,14 @@ export type components = {
1637
1609
  * @description ENABLED: Totalis currently accepts new positions on this market.
1638
1610
  * @constant
1639
1611
  */
1640
- readonly state: "ENABLED";
1612
+ readonly status: "ENABLED";
1641
1613
  };
1642
1614
  readonly EligibilityDisabled: {
1643
1615
  /**
1644
1616
  * @description DISABLED: Totalis does not currently accept new positions on this market; reason says why.
1645
1617
  * @constant
1646
1618
  */
1647
- readonly state: "DISABLED";
1619
+ readonly status: "DISABLED";
1648
1620
  /**
1649
1621
  * @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.
1650
1622
  * @enum {string}
@@ -1812,7 +1784,8 @@ export type components = {
1812
1784
  /** @description Hyperliquid asset ID used to trade this side. */
1813
1785
  readonly asset_id: components["schemas"]["Uint"];
1814
1786
  };
1815
- readonly PublicationCatalogMarket: {
1787
+ /** @description A catalog market as the public market stream sends it: the publication's catalog market (PublicationCatalogMarket), naming its lifecycle and eligibility status as every public market does. */
1788
+ readonly StreamCatalogMarket: {
1816
1789
  /** @description Hyperliquid outcome ID of the market. */
1817
1790
  readonly outcome_id: components["schemas"]["UInt32String"];
1818
1791
  /** @description Hyperliquid question ID, or 4294967295 for a standalone market. */
@@ -1830,7 +1803,7 @@ export type components = {
1830
1803
  /** @description Display title derived from the market definition. */
1831
1804
  readonly title: string;
1832
1805
  /** @description Native lifecycle: ACTIVE, CLOSED or UNSUPPORTED. */
1833
- readonly state: components["schemas"]["MarketState"];
1806
+ readonly status: components["schemas"]["MarketState"];
1834
1807
  /** @description Native result as last read from HyperEVM. */
1835
1808
  readonly result: components["schemas"]["Result"];
1836
1809
  /** @description Revision of this market's catalog metadata; it increases when the metadata changes. */
@@ -47,3 +47,60 @@ export declare const controllerFunctions: {
47
47
  readonly type: "uint64";
48
48
  }];
49
49
  };
50
+ /** The vault views a maker reads to price a cash-out: tickets(position_id) and legStateOf(legs, readGas). */
51
+ export declare const vaultReads: {
52
+ readonly tickets: {
53
+ readonly inputs: readonly [{
54
+ readonly name: "";
55
+ readonly type: "bytes32";
56
+ }];
57
+ readonly outputs: readonly [{
58
+ readonly name: "makerId";
59
+ readonly type: "uint64";
60
+ }, {
61
+ readonly name: "owner";
62
+ readonly type: "address";
63
+ }, {
64
+ readonly name: "stake";
65
+ readonly type: "uint128";
66
+ }, {
67
+ readonly name: "payout";
68
+ readonly type: "uint128";
69
+ }, {
70
+ readonly name: "worst0";
71
+ readonly type: "uint128";
72
+ }, {
73
+ readonly name: "feeBps";
74
+ readonly type: "uint16";
75
+ }, {
76
+ readonly name: "status";
77
+ readonly type: "uint8";
78
+ }, {
79
+ readonly name: "residual";
80
+ readonly type: "uint128";
81
+ }, {
82
+ readonly name: "legsHash";
83
+ readonly type: "bytes32";
84
+ }];
85
+ };
86
+ readonly legStateOf: {
87
+ readonly inputs: readonly [{
88
+ readonly name: "legs";
89
+ readonly type: "tuple[]";
90
+ readonly components: readonly [{
91
+ readonly name: "outcomeId";
92
+ readonly type: "uint32";
93
+ }, {
94
+ readonly name: "side";
95
+ readonly type: "uint8";
96
+ }];
97
+ }, {
98
+ readonly name: "readGas";
99
+ readonly type: "uint256";
100
+ }];
101
+ readonly outputs: readonly [{
102
+ readonly name: "";
103
+ readonly type: "bytes32";
104
+ }];
105
+ };
106
+ };
@@ -68,3 +68,80 @@ export const controllerFunctions = {
68
68
  }
69
69
  ]
70
70
  };
71
+ /** The vault views a maker reads to price a cash-out: tickets(position_id) and legStateOf(legs, readGas). */
72
+ export const vaultReads = {
73
+ "tickets": {
74
+ "inputs": [
75
+ {
76
+ "name": "",
77
+ "type": "bytes32"
78
+ }
79
+ ],
80
+ "outputs": [
81
+ {
82
+ "name": "makerId",
83
+ "type": "uint64"
84
+ },
85
+ {
86
+ "name": "owner",
87
+ "type": "address"
88
+ },
89
+ {
90
+ "name": "stake",
91
+ "type": "uint128"
92
+ },
93
+ {
94
+ "name": "payout",
95
+ "type": "uint128"
96
+ },
97
+ {
98
+ "name": "worst0",
99
+ "type": "uint128"
100
+ },
101
+ {
102
+ "name": "feeBps",
103
+ "type": "uint16"
104
+ },
105
+ {
106
+ "name": "status",
107
+ "type": "uint8"
108
+ },
109
+ {
110
+ "name": "residual",
111
+ "type": "uint128"
112
+ },
113
+ {
114
+ "name": "legsHash",
115
+ "type": "bytes32"
116
+ }
117
+ ]
118
+ },
119
+ "legStateOf": {
120
+ "inputs": [
121
+ {
122
+ "name": "legs",
123
+ "type": "tuple[]",
124
+ "components": [
125
+ {
126
+ "name": "outcomeId",
127
+ "type": "uint32"
128
+ },
129
+ {
130
+ "name": "side",
131
+ "type": "uint8"
132
+ }
133
+ ]
134
+ },
135
+ {
136
+ "name": "readGas",
137
+ "type": "uint256"
138
+ }
139
+ ],
140
+ "outputs": [
141
+ {
142
+ "name": "",
143
+ "type": "bytes32"
144
+ }
145
+ ]
146
+ }
147
+ };