@totalis/hip4-client 0.123.0 → 0.125.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.
- package/CHANGELOG.md +391 -0
- package/README.md +9 -5
- package/dist/api-keys.d.ts +21 -2
- package/dist/api-keys.js +12 -10
- package/dist/audience-contract.d.ts +1 -2
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/flow-errors.d.ts +1 -1
- package/dist/flow-errors.js +1 -1
- package/dist/generated/account-read.d.ts +150 -126
- package/dist/generated/api-keys.d.ts +19 -10
- package/dist/generated/browse.d.ts +12 -12
- package/dist/generated/client.d.ts +5 -2
- package/dist/generated/errors.d.ts +15 -8
- package/dist/generated/errors.js +47 -35
- package/dist/generated/maker.d.ts +3 -4
- package/dist/generated/openapi.d.ts +828 -892
- package/dist/generated/realtime.d.ts +68 -93
- package/dist/generated/vault-abi.d.ts +57 -0
- package/dist/generated/vault-abi.js +77 -0
- package/dist/generated/version.d.ts +16 -16
- package/dist/generated/version.js +20 -18
- package/dist/maker.d.ts +134 -54
- package/dist/maker.js +257 -147
- package/dist/money.d.ts +8 -6
- package/dist/money.js +7 -7
- package/dist/partner.d.ts +2 -0
- package/dist/partner.js +2 -1
- package/dist/request.d.ts +11 -2
- package/dist/request.js +7 -2
- package/dist/totalis.d.ts +147 -232
- package/dist/totalis.js +290 -269
- package/dist/typed-data.d.ts +6 -0
- package/dist/typed-data.js +8 -0
- package/dist/ui.d.ts +6 -10
- package/dist/ui.js +15 -13
- package/dist/vault-reads.d.ts +46 -0
- package/dist/vault-reads.js +72 -0
- package/examples/browser-wallet.mjs +1 -1
- package/examples/node-bot.mjs +15 -12
- 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 `
|
|
30
|
-
readonly
|
|
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.
|
|
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
|
|
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,46 +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
|
|
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
|
|
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
|
|
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
|
|
90
|
-
readonly
|
|
91
|
-
|
|
92
|
-
readonly intent_generation?: components["schemas"]["PositiveInt64String"];
|
|
93
|
-
} & components["schemas"]["IntentIdentityPair"]) & ({
|
|
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. */
|
|
88
|
+
readonly accepted_payout?: components["schemas"]["Amount"];
|
|
89
|
+
} & ({
|
|
94
90
|
/**
|
|
95
|
-
* @description RFQ status; FAILED requires a
|
|
91
|
+
* @description RFQ status; FAILED requires a reason, every other status has none.
|
|
96
92
|
* @enum {unknown}
|
|
97
93
|
*/
|
|
98
94
|
readonly status?: "ACCEPTED" | "CANCELLED" | "DECLINED";
|
|
99
95
|
/** @description Null unless status is FAILED, then the reason the accepted trade failed. */
|
|
100
|
-
readonly
|
|
96
|
+
readonly reason?: null;
|
|
101
97
|
} | {
|
|
102
98
|
/**
|
|
103
|
-
* @description RFQ status; FAILED requires a
|
|
99
|
+
* @description RFQ status; FAILED requires a reason, every other status has none.
|
|
104
100
|
* @constant
|
|
105
101
|
*/
|
|
106
102
|
readonly status?: "FAILED";
|
|
107
103
|
/** @description Null unless status is FAILED, then the reason the accepted trade failed. */
|
|
108
|
-
readonly
|
|
104
|
+
readonly reason?: components["schemas"]["RfqTerminalReason"];
|
|
109
105
|
});
|
|
110
106
|
/** @description The whole entry RFQ as GET /v1/rfqs/{rfq_id} returns it while open, without status: the event says it is OPEN. */
|
|
111
107
|
readonly EntryRfqPayload: {
|
|
@@ -121,15 +117,11 @@ export type components = {
|
|
|
121
117
|
readonly net_stake?: components["schemas"]["Amount"];
|
|
122
118
|
/** @description When the RFQ was durably created, RFC3339 UTC. */
|
|
123
119
|
readonly created_at: components["schemas"]["Timestamp"];
|
|
124
|
-
/** @description
|
|
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`. */
|
|
125
121
|
readonly expires_at: components["schemas"]["Timestamp"];
|
|
126
122
|
/** @description Requested legs in strictly increasing outcome_id order; a quote's legs. */
|
|
127
123
|
readonly legs: components["schemas"]["legs"];
|
|
128
|
-
|
|
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"];
|
|
124
|
+
};
|
|
133
125
|
readonly CashoutRfqPayload: {
|
|
134
126
|
/**
|
|
135
127
|
* Format: uuid
|
|
@@ -138,7 +130,7 @@ export type components = {
|
|
|
138
130
|
readonly rfq_id: string;
|
|
139
131
|
/** @description When the RFQ was durably created, RFC3339 UTC. */
|
|
140
132
|
readonly created_at: components["schemas"]["Timestamp"];
|
|
141
|
-
/** @description
|
|
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`. */
|
|
142
134
|
readonly expires_at: components["schemas"]["Timestamp"];
|
|
143
135
|
/**
|
|
144
136
|
* @description Always CASHOUT for this payload.
|
|
@@ -147,19 +139,8 @@ export type components = {
|
|
|
147
139
|
readonly kind: "CASHOUT";
|
|
148
140
|
/** @description Position the owner wants to cash out. */
|
|
149
141
|
readonly position_id: components["schemas"]["Bytes32"];
|
|
150
|
-
/** @description
|
|
151
|
-
readonly
|
|
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";
|
|
142
|
+
/** @description The position's owner, who would sell it and signs the accept. */
|
|
143
|
+
readonly taker: components["schemas"]["LowercaseNonZeroAddress"];
|
|
163
144
|
/** @description Maker that wrote the position originally. */
|
|
164
145
|
readonly maker_id: components["schemas"]["NonZeroUInt64String"];
|
|
165
146
|
/** @description The position's stake after the taker fee, tickets(position_id).stake, in atomic USDC (6 decimals); fixed when the position opened. */
|
|
@@ -168,11 +149,7 @@ export type components = {
|
|
|
168
149
|
readonly payout: components["schemas"]["Amount"];
|
|
169
150
|
/** @description The position's canonical legs in leg order. */
|
|
170
151
|
readonly legs: readonly components["schemas"]["Leg"][];
|
|
171
|
-
|
|
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"];
|
|
152
|
+
};
|
|
176
153
|
/** @description A position changed on chain. */
|
|
177
154
|
readonly PositionEventPayload: {
|
|
178
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. */
|
|
@@ -424,12 +401,12 @@ export type components = {
|
|
|
424
401
|
* @description The credential's own account: its RFQs, quotes, acceptances, operations and balances.
|
|
425
402
|
* @constant
|
|
426
403
|
*/
|
|
427
|
-
readonly
|
|
404
|
+
readonly kind: "account";
|
|
428
405
|
/** @description Last durably applied cursor to resume after. Omit it to start from a snapshot. Scoped keys need replay:read to send one. */
|
|
429
406
|
readonly cursor?: components["schemas"]["Cursor"];
|
|
430
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. */
|
|
431
408
|
readonly open_rfqs?: boolean;
|
|
432
|
-
/** @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
|
|
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. */
|
|
433
410
|
readonly account_reads?: boolean;
|
|
434
411
|
/** @description Opt in to publication checkpoints and a 1000 ms authenticated heartbeat. */
|
|
435
412
|
readonly publication_freshness?: boolean;
|
|
@@ -439,7 +416,7 @@ export type components = {
|
|
|
439
416
|
* @description A maker the credential acts for: open RFQs, acceptances of its quotes, and its operations and capital.
|
|
440
417
|
* @constant
|
|
441
418
|
*/
|
|
442
|
-
readonly
|
|
419
|
+
readonly kind: "maker";
|
|
443
420
|
/** @description The maker to stream. A maker key names its own maker; a dashboard session names a maker it is a member of. */
|
|
444
421
|
readonly maker_id: components["schemas"]["NonZeroUInt64String"];
|
|
445
422
|
/** @description Last durably applied cursor to resume after. Omit it to start from a snapshot. Scoped keys need replay:read to send one. */
|
|
@@ -457,7 +434,7 @@ export type components = {
|
|
|
457
434
|
* @constant
|
|
458
435
|
*/
|
|
459
436
|
readonly method: "subscribe";
|
|
460
|
-
/** @description Exactly one subscription, discriminated by
|
|
437
|
+
/** @description Exactly one subscription, discriminated by kind. The credential must act for it. */
|
|
461
438
|
readonly subscription: components["schemas"]["AccountSubscription"] | components["schemas"]["MakerSubscription"];
|
|
462
439
|
};
|
|
463
440
|
readonly SubscriptionResponse: {
|
|
@@ -479,10 +456,10 @@ export type components = {
|
|
|
479
456
|
* @description The credential's own account: its RFQs, quotes, acceptances, operations and balances.
|
|
480
457
|
* @constant
|
|
481
458
|
*/
|
|
482
|
-
readonly
|
|
459
|
+
readonly kind: "account";
|
|
483
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. */
|
|
484
461
|
readonly open_rfqs?: boolean;
|
|
485
|
-
/** @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
|
|
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. */
|
|
486
463
|
readonly account_reads?: boolean;
|
|
487
464
|
/** @description Opt in to publication checkpoints and a 1000 ms authenticated heartbeat. */
|
|
488
465
|
readonly publication_freshness?: boolean;
|
|
@@ -491,7 +468,7 @@ export type components = {
|
|
|
491
468
|
* @description A maker the credential acts for: open RFQs, acceptances of its quotes, and its operations and capital.
|
|
492
469
|
* @constant
|
|
493
470
|
*/
|
|
494
|
-
readonly
|
|
471
|
+
readonly kind: "maker";
|
|
495
472
|
/** @description The maker to stream. A maker key names its own maker; a dashboard session names a maker it is a member of. */
|
|
496
473
|
readonly maker_id: components["schemas"]["NonZeroUInt64String"];
|
|
497
474
|
/** @description Opt in to readInvalidated frames for the maker's account reads. The server derives the scope and returns it in the subscriptionResponse. */
|
|
@@ -547,7 +524,7 @@ export type components = {
|
|
|
547
524
|
};
|
|
548
525
|
readonly ReadInvalidatedFrame: {
|
|
549
526
|
/**
|
|
550
|
-
* @description Frame discriminator, always readInvalidated. Sent to subscriptions that set account_reads, and for its own ACTIVITY and
|
|
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.
|
|
551
528
|
* @constant
|
|
552
529
|
*/
|
|
553
530
|
readonly channel: "readInvalidated";
|
|
@@ -597,7 +574,7 @@ export type components = {
|
|
|
597
574
|
* @description Always market.
|
|
598
575
|
* @constant
|
|
599
576
|
*/
|
|
600
|
-
readonly
|
|
577
|
+
readonly kind: "market";
|
|
601
578
|
/** @description 1 to 256 unique outcome IDs (decimal strings) to follow. The snapshot and deltas cover only these outcomes. */
|
|
602
579
|
readonly outcome_ids: readonly components["schemas"]["UInt32String"][];
|
|
603
580
|
/** @description Opt in to a publication frame every 5000 ms while the socket is current. */
|
|
@@ -1148,7 +1125,7 @@ export type components = {
|
|
|
1148
1125
|
/** @description Publication version of this state. The first delta's previous_version equals it. */
|
|
1149
1126
|
readonly version: components["schemas"]["PositiveInt64"];
|
|
1150
1127
|
/** @description Catalog entry of each selected outcome. */
|
|
1151
|
-
readonly catalog: readonly components["schemas"]["
|
|
1128
|
+
readonly catalog: readonly components["schemas"]["StreamCatalogMarket"][];
|
|
1152
1129
|
/** @description Reference price for each side of each selected outcome. */
|
|
1153
1130
|
readonly references: readonly components["schemas"]["PublicationReference"][];
|
|
1154
1131
|
};
|
|
@@ -1170,7 +1147,7 @@ export type components = {
|
|
|
1170
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. */
|
|
1171
1148
|
readonly version: components["schemas"]["PositiveInt64"];
|
|
1172
1149
|
/** @description Selected catalog entries that were added or changed; replace them whole. */
|
|
1173
|
-
readonly catalog_upserts: readonly components["schemas"]["
|
|
1150
|
+
readonly catalog_upserts: readonly components["schemas"]["StreamCatalogMarket"][];
|
|
1174
1151
|
/** @description Selected outcomes removed from the catalog. */
|
|
1175
1152
|
readonly catalog_removals: readonly components["schemas"]["PublicationCatalogRemoval"][];
|
|
1176
1153
|
/** @description Selected reference prices that changed materially; replace them whole. */
|
|
@@ -1220,7 +1197,7 @@ export type components = {
|
|
|
1220
1197
|
/** @description Revision of the changed reads, as a decimal string; a higher revision supersedes a lower one. */
|
|
1221
1198
|
readonly revision: string;
|
|
1222
1199
|
/** @description Account reads to refetch. */
|
|
1223
|
-
readonly resources: readonly ("BALANCES" | "CAPITAL" | "ACTIVITY" | "POSITIONS" | "PERFORMANCE" | "TELEMETRY" | "QUOTES" | "ACCESS")[];
|
|
1200
|
+
readonly resources: readonly ("BALANCES" | "CAPITAL" | "ACTIVITY" | "POSITIONS" | "HOLDINGS" | "PERFORMANCE" | "TELEMETRY" | "QUOTES" | "ACCESS")[];
|
|
1224
1201
|
/** @description Stream cursor of the change; persist it like an event cursor. */
|
|
1225
1202
|
readonly cursor: components["schemas"]["Cursor"];
|
|
1226
1203
|
};
|
|
@@ -1228,7 +1205,7 @@ export type components = {
|
|
|
1228
1205
|
/** @enum {unknown} */
|
|
1229
1206
|
readonly OperationState: "QUEUED" | "IN_FLIGHT" | "RETRYABLE" | "UNKNOWN" | "COMMITTED" | "REVERTED" | "EXPIRED_UNEXECUTED";
|
|
1230
1207
|
/**
|
|
1231
|
-
* @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
|
|
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.
|
|
1232
1209
|
* @enum {string}
|
|
1233
1210
|
*/
|
|
1234
1211
|
readonly OperationFailureReason: "INSUFFICIENT_CASH" | "DEADLINE_BEFORE_CLAIM" | "AUTHORIZATION_TOO_CLOSE" | "SIGNER_QUOTE_LIFE" | "SIMULATION_REVERTED" | "QUARANTINE_EXPIRED" | "ATTESTATION_EXPIRED";
|
|
@@ -1238,17 +1215,6 @@ export type components = {
|
|
|
1238
1215
|
readonly Amount: string;
|
|
1239
1216
|
/** Format: uuid */
|
|
1240
1217
|
readonly Uuid: string;
|
|
1241
|
-
/** @description Positive signed 64-bit decimal integer, at most 9223372036854775807. */
|
|
1242
|
-
readonly PositiveInt64String: string;
|
|
1243
|
-
readonly IntentIdentityPair: {
|
|
1244
|
-
/** @description Automatic-RFQ intent (UUIDv7) the RFQ belongs to. */
|
|
1245
|
-
readonly intent_id: components["schemas"]["Uuid"];
|
|
1246
|
-
/** @description Generation of that intent, as a decimal string; a higher generation supersedes the intent's earlier RFQs. */
|
|
1247
|
-
readonly intent_generation: components["schemas"]["PositiveInt64String"];
|
|
1248
|
-
} | {
|
|
1249
|
-
readonly intent_id?: never;
|
|
1250
|
-
readonly intent_generation?: never;
|
|
1251
|
-
};
|
|
1252
1218
|
/** @enum {string} */
|
|
1253
1219
|
readonly RfqTerminalReason: "REVERTED" | "EXPIRED_UNEXECUTED" | "INSUFFICIENT_CASH";
|
|
1254
1220
|
/**
|
|
@@ -1299,7 +1265,7 @@ export type components = {
|
|
|
1299
1265
|
};
|
|
1300
1266
|
/** @description A maker's offer to open a position on an entry RFQ. */
|
|
1301
1267
|
readonly EntryQuote: {
|
|
1302
|
-
/** @description Quote ID
|
|
1268
|
+
/** @description Quote ID. Accept it with `POST /v1/quotes/{quote_id}/accept`; it becomes the position's `position_id`. */
|
|
1303
1269
|
readonly quote_id: components["schemas"]["Bytes32"];
|
|
1304
1270
|
/** @description RFQ this quote answers. */
|
|
1305
1271
|
readonly rfq_id: components["schemas"]["Uuid"];
|
|
@@ -1310,30 +1276,33 @@ export type components = {
|
|
|
1310
1276
|
readonly kind: "ENTRY";
|
|
1311
1277
|
/** @description Venue-wide publication sequence number; a higher value was created later. */
|
|
1312
1278
|
readonly sequence: number;
|
|
1313
|
-
/** @description
|
|
1314
|
-
readonly
|
|
1315
|
-
/** @description
|
|
1316
|
-
readonly
|
|
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
|
+
};
|
|
1317
1286
|
};
|
|
1318
1287
|
readonly Hash32: string;
|
|
1319
1288
|
/** @description Sell-back terms: the underwriting maker buys the position back and it closes. They mirror the signed SellBack struct. */
|
|
1320
1289
|
readonly SellBackTerms: {
|
|
1321
1290
|
/** @description Position the quote is for; the signed SellBack names it ticketId. */
|
|
1322
1291
|
readonly position_id: components["schemas"]["Hash32"];
|
|
1323
|
-
/** @description Buyback price the original maker pays the owner to close the
|
|
1292
|
+
/** @description Buyback price the original maker pays the owner to close the position, in atomic USDC (6 decimals). */
|
|
1324
1293
|
readonly price: components["schemas"]["Amount"];
|
|
1325
|
-
/** @description Current position owner, who sells the
|
|
1294
|
+
/** @description Current position owner, who sells the position back. */
|
|
1326
1295
|
readonly owner: components["schemas"]["LowercaseNonZeroAddress"];
|
|
1327
1296
|
/** @description Unix seconds after which the quote can no longer be executed. */
|
|
1328
1297
|
readonly expiry: components["schemas"]["UInt64String"];
|
|
1329
1298
|
/** @description Random uint256, as a decimal string, that makes each signed quote unique. */
|
|
1330
1299
|
readonly salt: components["schemas"]["Uint256"];
|
|
1331
|
-
/** @description Position leg state the quote was priced against
|
|
1300
|
+
/** @description Position leg state, legStateOf(legs, 500000), the quote was priced against. */
|
|
1332
1301
|
readonly leg_state: components["schemas"]["Hash32"];
|
|
1333
1302
|
};
|
|
1334
1303
|
/** @description A cash-out offer from the maker that backs the position: its vault buys the position back for `price`. */
|
|
1335
1304
|
readonly SellBackQuote: {
|
|
1336
|
-
/** @description Quote ID
|
|
1305
|
+
/** @description Quote ID. Accept it with `POST /v1/quotes/{quote_id}/accept`. */
|
|
1337
1306
|
readonly quote_id: components["schemas"]["Bytes32"];
|
|
1338
1307
|
/** @description RFQ this quote answers. */
|
|
1339
1308
|
readonly rfq_id: components["schemas"]["Uuid"];
|
|
@@ -1344,8 +1313,13 @@ export type components = {
|
|
|
1344
1313
|
readonly kind: "SELL_BACK";
|
|
1345
1314
|
/** @description Venue-wide publication sequence number; a higher value was created later. */
|
|
1346
1315
|
readonly sequence: number;
|
|
1347
|
-
/** @description
|
|
1348
|
-
readonly
|
|
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
|
+
};
|
|
1349
1323
|
};
|
|
1350
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. */
|
|
1351
1325
|
readonly Quote: components["schemas"]["EntryQuote"] | components["schemas"]["SellBackQuote"];
|
|
@@ -1420,7 +1394,7 @@ export type components = {
|
|
|
1420
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.
|
|
1421
1395
|
* @enum {string}
|
|
1422
1396
|
*/
|
|
1423
|
-
readonly
|
|
1397
|
+
readonly freshness: "CURRENT" | "STALE" | "UNAVAILABLE";
|
|
1424
1398
|
};
|
|
1425
1399
|
readonly "$defs-Amount": string;
|
|
1426
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. */
|
|
@@ -1448,28 +1422,28 @@ export type components = {
|
|
|
1448
1422
|
/** @description Operations holding this reservation. */
|
|
1449
1423
|
readonly operation_ids: readonly string[];
|
|
1450
1424
|
/** @description Reserved amount in atomic USDC (6 decimals, "1000000" = 1 USDC). */
|
|
1451
|
-
readonly
|
|
1425
|
+
readonly amount: components["schemas"]["$defs-Amount"];
|
|
1452
1426
|
/**
|
|
1453
1427
|
* @description ACTIVE: held and not yet reflected on-chain; UNKNOWN: outcome unknown, still counted as held.
|
|
1454
1428
|
* @enum {string}
|
|
1455
1429
|
*/
|
|
1456
1430
|
readonly status: "ACTIVE" | "UNKNOWN";
|
|
1457
1431
|
};
|
|
1458
|
-
/** @description Maker capital lanes and derived collateral, in atomic USDC (6 decimals, "1000000" = 1 USDC). Amounts are null when unavailable; context.
|
|
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. */
|
|
1459
1433
|
readonly MakerCapital: {
|
|
1460
|
-
/** @description Freshness of this read: the oldest source observation and one
|
|
1434
|
+
/** @description Freshness of this read: the oldest source observation and one freshness for every amount in the response. */
|
|
1461
1435
|
readonly context: components["schemas"]["ReadContext"];
|
|
1462
|
-
/** @description Maker
|
|
1463
|
-
readonly
|
|
1436
|
+
/** @description Maker controller, from the same indexed vault row as the lanes. */
|
|
1437
|
+
readonly controller: components["schemas"]["LowercaseNonZeroAddress"];
|
|
1464
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. */
|
|
1465
1439
|
readonly signer: string;
|
|
1466
1440
|
/** @description Maker vault lane V from the vault contract, including escrow and payables. */
|
|
1467
1441
|
readonly vault_gross: components["schemas"]["UnsignedMetric"];
|
|
1468
|
-
/** @description Bettor net stakes escrowed in this maker's open
|
|
1442
|
+
/** @description Bettor net stakes escrowed in this maker's open positions (E). */
|
|
1469
1443
|
readonly stake_escrow: components["schemas"]["UnsignedMetric"];
|
|
1470
|
-
/** @description Settled winnings owed to
|
|
1444
|
+
/** @description Settled winnings owed to position holders and not yet claimed (P). */
|
|
1471
1445
|
readonly payable_owed: components["schemas"]["UnsignedMetric"];
|
|
1472
|
-
/** @description Original open maker exposure G: payout minus net stake summed over open
|
|
1446
|
+
/** @description Original open maker exposure G: payout minus net stake summed over open positions. */
|
|
1473
1447
|
readonly gross_open: components["schemas"]["UnsignedMetric"];
|
|
1474
1448
|
/** @description Maker discount lane D from the vault contract, which offsets gross_open in the requirement. */
|
|
1475
1449
|
readonly discount: components["schemas"]["UnsignedMetric"];
|
|
@@ -1477,7 +1451,7 @@ export type components = {
|
|
|
1477
1451
|
readonly requirement: components["schemas"]["UnsignedMetric"];
|
|
1478
1452
|
/** @description Collateral headroom F = max(V - E - P - R, 0). Not a guarantee of quote acceptance. */
|
|
1479
1453
|
readonly free_collateral: components["schemas"]["UnsignedMetric"];
|
|
1480
|
-
/** @description Signed C = V - E - P. Excludes open-
|
|
1454
|
+
/** @description Signed C = V - E - P. Excludes open-position valuation; not equity or NAV. */
|
|
1481
1455
|
readonly capital_net_of_senior_liabilities: components["schemas"]["Metric"];
|
|
1482
1456
|
/** @description Admission reservations H the venue holds for this maker that are not yet reflected on-chain; the sum of reservations. */
|
|
1483
1457
|
readonly pending_commitments: components["schemas"]["UnsignedMetric"];
|
|
@@ -1635,14 +1609,14 @@ export type components = {
|
|
|
1635
1609
|
* @description ENABLED: Totalis currently accepts new positions on this market.
|
|
1636
1610
|
* @constant
|
|
1637
1611
|
*/
|
|
1638
|
-
readonly
|
|
1612
|
+
readonly status: "ENABLED";
|
|
1639
1613
|
};
|
|
1640
1614
|
readonly EligibilityDisabled: {
|
|
1641
1615
|
/**
|
|
1642
1616
|
* @description DISABLED: Totalis does not currently accept new positions on this market; reason says why.
|
|
1643
1617
|
* @constant
|
|
1644
1618
|
*/
|
|
1645
|
-
readonly
|
|
1619
|
+
readonly status: "DISABLED";
|
|
1646
1620
|
/**
|
|
1647
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.
|
|
1648
1622
|
* @enum {string}
|
|
@@ -1810,7 +1784,8 @@ export type components = {
|
|
|
1810
1784
|
/** @description Hyperliquid asset ID used to trade this side. */
|
|
1811
1785
|
readonly asset_id: components["schemas"]["Uint"];
|
|
1812
1786
|
};
|
|
1813
|
-
|
|
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: {
|
|
1814
1789
|
/** @description Hyperliquid outcome ID of the market. */
|
|
1815
1790
|
readonly outcome_id: components["schemas"]["UInt32String"];
|
|
1816
1791
|
/** @description Hyperliquid question ID, or 4294967295 for a standalone market. */
|
|
@@ -1828,7 +1803,7 @@ export type components = {
|
|
|
1828
1803
|
/** @description Display title derived from the market definition. */
|
|
1829
1804
|
readonly title: string;
|
|
1830
1805
|
/** @description Native lifecycle: ACTIVE, CLOSED or UNSUPPORTED. */
|
|
1831
|
-
readonly
|
|
1806
|
+
readonly status: components["schemas"]["MarketState"];
|
|
1832
1807
|
/** @description Native result as last read from HyperEVM. */
|
|
1833
1808
|
readonly result: components["schemas"]["Result"];
|
|
1834
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
|
+
};
|