@totalis/hip4-client 0.65.2 → 0.74.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.
@@ -26,7 +26,7 @@ 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 without executing, as the operation's `failure_reason`: INSUFFICIENT_CASH on an EXPIRED_UNEXECUTED accept whose taker's Cash fell short. Present only then. */
29
+ /** @description Why the operation ended EXPIRED_UNEXECUTED, as the operation's `failure_reason`. Present only then. */
30
30
  readonly failure_reason?: components["schemas"]["OperationFailureReason"];
31
31
  /** @description When the operation last changed state, RFC3339 UTC. */
32
32
  readonly updated_at: components["schemas"]["Timestamp"];
@@ -76,10 +76,10 @@ export type components = {
76
76
  */
77
77
  readonly rfq_id: string;
78
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.
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
80
  * @enum {unknown}
81
81
  */
82
- readonly status: "ACCEPTED" | "CANCELLED" | "FAILED";
82
+ readonly status: "ACCEPTED" | "CANCELLED" | "FAILED" | "DECLINED";
83
83
  /** @description Why a FAILED RFQ ended: the accept transaction reverted or expired unexecuted. Null for every other status. */
84
84
  readonly terminal_reason: components["schemas"]["RfqTerminalReason"] | null;
85
85
  /** @description When the RFQ was durably created, RFC3339 UTC. */
@@ -95,7 +95,7 @@ export type components = {
95
95
  * @description RFQ status; FAILED requires a terminal_reason, every other status has none.
96
96
  * @enum {unknown}
97
97
  */
98
- readonly status?: "ACCEPTED" | "CANCELLED";
98
+ readonly status?: "ACCEPTED" | "CANCELLED" | "DECLINED";
99
99
  /** @description Null unless status is FAILED, then the reason the accepted trade failed. */
100
100
  readonly terminal_reason?: null;
101
101
  } | {
@@ -117,6 +117,8 @@ export type components = {
117
117
  readonly taker: components["schemas"]["taker"];
118
118
  /** @description Stake in atomic USDC (6 decimals), before taker fees; a quote's stake. */
119
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"];
120
122
  /** @description When the RFQ was durably created, RFC3339 UTC. */
121
123
  readonly created_at: components["schemas"]["Timestamp"];
122
124
  /** @description End of quote collection, RFC3339 UTC. Makers stop quoting at this instant; natural expiry emits no event. */
@@ -201,7 +203,7 @@ export type components = {
201
203
  * @description What changed. The value selects the payload shape.
202
204
  * @enum {unknown}
203
205
  */
204
- readonly event_type: "QUOTE_CREATED" | "QUOTE_REMOVED" | "QUOTE_ACCEPTED" | "RFQ_CREATED" | "RFQ_ACCEPTED" | "RFQ_CANCELLED" | "RFQ_FAILED" | "OPERATION_UPDATED" | "VAULT_BALANCE_CHANGED" | "WALLET_FUNDING_UPDATED" | "WITHDRAWAL_UPDATED" | "CORE_EXIT_UPDATED" | "WALLET_BALANCE_CHANGED" | "COLLATERAL_REDUCTION_UPDATED" | "POSITION_OPENED" | "POSITION_TRANSFERRED" | "POSITION_SETTLED" | "POSITION_CLOSED" | "POSITION_UPDATED" | "MAKER_CAPITAL_UPDATED";
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";
205
207
  /**
206
208
  * Format: date-time
207
209
  * @description When the authoritative state transition happened, RFC3339 UTC. Measure receipt time locally.
@@ -244,10 +246,10 @@ export type components = {
244
246
  readonly payload: components["schemas"]["EntryRfqPayload"] | components["schemas"]["CashoutRfqPayload"];
245
247
  }) | (components["schemas"]["EventBase"] & {
246
248
  /**
247
- * @description An RFQ had a quote accepted, was cancelled, or failed.
249
+ * @description An RFQ had a quote accepted, was cancelled, failed, or was declined by every maker that could answer it.
248
250
  * @enum {unknown}
249
251
  */
250
- readonly event_type: "RFQ_ACCEPTED" | "RFQ_CANCELLED" | "RFQ_FAILED";
252
+ readonly event_type: "RFQ_ACCEPTED" | "RFQ_CANCELLED" | "RFQ_FAILED" | "RFQ_DECLINED";
251
253
  /** @description The RFQ and its new status. */
252
254
  readonly payload: components["schemas"]["RfqPayload"];
253
255
  }) | (components["schemas"]["EventBase"] & {
@@ -559,6 +561,46 @@ export type components = {
559
561
  readonly type: "market";
560
562
  /** @description 1 to 256 unique outcome IDs (decimal strings) to follow. The snapshot and deltas cover only these outcomes. */
561
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
+ };
562
604
  };
563
605
  readonly MarketSubscribe: {
564
606
  /**
@@ -719,10 +761,10 @@ export type components = {
719
761
  /** @enum {unknown} */
720
762
  readonly OperationState: "QUEUED" | "IN_FLIGHT" | "RETRYABLE" | "UNKNOWN" | "COMMITTED" | "REVERTED" | "EXPIRED_UNEXECUTED";
721
763
  /**
722
- * @description Why an operation ended without executing. INSUFFICIENT_CASH: an ACCEPT whose taker's money (free vault Cash, or the wallet USDC its funding draws) did not cover the stake when it was to execute, for a funded accept by its `fund_by`; it ends EXPIRED_UNEXECUTED and nothing traded. The RFQ fails with the same `terminal_reason`.
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.
723
765
  * @enum {string}
724
766
  */
725
- readonly OperationFailureReason: "INSUFFICIENT_CASH";
767
+ readonly OperationFailureReason: "INSUFFICIENT_CASH" | "DEADLINE_BEFORE_CLAIM" | "AUTHORIZATION_TOO_CLOSE" | "SIGNER_QUOTE_LIFE" | "SIMULATION_REVERTED" | "QUARANTINE_EXPIRED" | "ATTESTATION_EXPIRED";
726
768
  /** Format: date-time */
727
769
  readonly Timestamp: string;
728
770
  /** Format: uint128-decimal */
@@ -959,6 +1001,34 @@ export type components = {
959
1001
  /** @description Stream cursor the client asked to resume after; null when it started without one. */
960
1002
  readonly cursor: components["schemas"]["Cursor"] | null;
961
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
+ };
962
1032
  /**
963
1033
  * Format: positive-int64-decimal
964
1034
  * @description Positive generation or version bounded by signed int64 storage.
@@ -1329,20 +1399,20 @@ export type components = {
1329
1399
  readonly source: components["schemas"]["Source"];
1330
1400
  /** @description How the reference price was derived; see the source and quality pairing. */
1331
1401
  readonly quality: components["schemas"]["Quality"];
1332
- /** @description Reference price of this side as an integer; divide by scale for the probability price between 0 and 1. */
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. */
1333
1403
  readonly value: components["schemas"]["IntegerValue"];
1334
- /** @description Best bid at scale; set only for HYPERLIQUID_L2_BOOK and HYPERLIQUID_BBO sources, otherwise null. */
1404
+ /** @description Best bid at scale; set only for HYPERLIQUID_L2_BOOK and HYPERLIQUID_BBO sources when the book has bids, otherwise null. */
1335
1405
  readonly best_bid?: components["schemas"]["IntegerValue"] | null;
1336
- /** @description Best ask at scale; set only for HYPERLIQUID_L2_BOOK and HYPERLIQUID_BBO sources, otherwise null. */
1406
+ /** @description Best ask at scale; set only for HYPERLIQUID_L2_BOOK and HYPERLIQUID_BBO sources when the book has asks, otherwise null. */
1337
1407
  readonly best_ask?: components["schemas"]["IntegerValue"] | null;
1338
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. */
1339
1409
  readonly last_trade?: components["schemas"]["IntegerValue"] | null;
1340
1410
  /** @description Hyperliquid time of last_trade, RFC 3339 UTC; null exactly when last_trade is null. */
1341
1411
  readonly last_trade_at?: components["schemas"]["Timestamp"] | null;
1342
- /** @description Crowd probability at scale: the book midpoint when best_ask - best_bid is at most 10% of scale, last_trade when the spread is at most 50% and last_trade lies within [best_bid, best_ask], otherwise null. The midpoint rounds half to even, so YES and NO chances sum to scale. chance_basis says which applied. */
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. */
1343
1413
  readonly chance?: components["schemas"]["IntegerValue"] | null;
1344
- /** @description Which input chance is: MID, the book midpoint, so a midpoint history describes it; LAST_TRADE, last_trade on a wide book, where midpoint history does not. Null exactly when chance is null. */
1345
- readonly chance_basis?: ("MID" | "LAST_TRADE") | null;
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;
1346
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. */
1347
1417
  readonly mark?: components["schemas"]["IntegerValue"] | null;
1348
1418
  /** @description Divisor for value, best_bid, best_ask, last_trade, chance and mark; currently 1000000000000000000 (18 decimals). */
@@ -14,6 +14,16 @@ export declare const controllerFunctions: {
14
14
  readonly name: "amount";
15
15
  readonly type: "uint128";
16
16
  }];
17
+ readonly withdrawMaker: readonly [{
18
+ readonly name: "makerId";
19
+ readonly type: "uint64";
20
+ }, {
21
+ readonly name: "amount";
22
+ readonly type: "uint128";
23
+ }, {
24
+ readonly name: "to";
25
+ readonly type: "address";
26
+ }];
17
27
  readonly requestMakerWithdraw: readonly [{
18
28
  readonly name: "makerId";
19
29
  readonly type: "uint64";
@@ -1,4 +1,4 @@
1
- // Generated by scripts/generate.mjs from protocol/hyperevm/ParlayVault.abi.json; do not edit.
1
+ // Generated by scripts/generate.mjs from protocol/hyperevm/ParlayVault.abi.json and ParlayVault.v1.abi.json; do not edit.
2
2
  /** Argument lists of the vault functions a maker's controller calls. */
3
3
  export const controllerFunctions = {
4
4
  "openMakerVault": [
@@ -21,6 +21,20 @@ export const controllerFunctions = {
21
21
  "type": "uint128"
22
22
  }
23
23
  ],
24
+ "withdrawMaker": [
25
+ {
26
+ "name": "makerId",
27
+ "type": "uint64"
28
+ },
29
+ {
30
+ "name": "amount",
31
+ "type": "uint128"
32
+ },
33
+ {
34
+ "name": "to",
35
+ "type": "address"
36
+ }
37
+ ],
24
38
  "requestMakerWithdraw": [
25
39
  {
26
40
  "name": "makerId",
@@ -1,23 +1,24 @@
1
- export declare const sdkVersion = "163.0.0-operation-failure-reason";
2
- export declare const openapiSha256 = "5f8993120c0337a57ed69b23baa03a3808ca741b7e0153ed92278be2f4d8a304";
3
- export declare const realtimeSha256 = "47efae07a9fe89b2560e54037ddc0e71aa9bfeff0127da84ddee6557681a1330";
1
+ export declare const sdkVersion = "203.0.0-execution-admission";
2
+ export declare const openapiSha256 = "2304ae546fe97a86cbb1147dccdebe50f5bb44080c26b88503356ac9dd1aa096";
3
+ export declare const realtimeSha256 = "6491fe1d9b5fdcfefcbee71716401effa181e7bcdf1fa4623fbb83dc5b2975cd";
4
4
  export declare const jsonSchemaSha256: {
5
- readonly "account.schema.json": "b7b080ad906842c1772694cd1bff0ea181015514251f3a4a774c344b72c94300";
6
- readonly "common.schema.json": "42fb090805f4e1237245f2c3b44d62d727dd972e4e7019cadcceb89aa3b4c2cb";
7
- readonly "core-exit.schema.json": "8ba71470c5ce0b46ca104edf00f5be21ade4088a0c281609deef638aab275e3b";
8
- readonly "error.schema.json": "ba31ea39df90d314a6c008b31f2f91159790dd35a53fa67f364fd03b452cad00";
9
- readonly "hypercore.schema.json": "00fb9ec8ce1a593e185ee4c21ef8689fc78fa8f97bb2c8f2df62babaffc99629";
10
- readonly "identity.schema.json": "112e1324739aed33198d792e5fb0ddbc52ad3e0ebbc1ba73473da0220e97267d";
5
+ readonly "account.schema.json": "5106e2d53abef190990eff113f6692dd27df5848439cf5a80a42c11e89f2bef6";
6
+ readonly "comments.schema.json": "18f4addcfa4e31c2c833fce8b8beca61d2e2ee5b6318c2ed0b479698ff56b65e";
7
+ readonly "common.schema.json": "04f51deb3cbea448e59195e26ede3212598d58a7940fe67eb2123fd9161c5edb";
8
+ readonly "core-exit.schema.json": "c7f617e815225cdcac95c236f8b73fbe288ee5713ff444c3be90eb915fc3a401";
9
+ readonly "error.schema.json": "85b2e13d449f137322779086c96d1355d0e70708647eb67b62c9b4070ed6530e";
10
+ readonly "hypercore.schema.json": "5b89b2bbff7ec8cc1b8717375d12ce9cd5ab6aa5af03c4fdc6cc753ef9583a2c";
11
+ readonly "identity.schema.json": "94534b768030736f4fd1fad285f1312454ca5fbff0b1eb5fab70416a78923bd0";
11
12
  readonly "maker-access.schema.json": "49698ee0235e42064aae0397db1e0f646bdc10d9dfa10121714ba06dd69fee3b";
12
- readonly "maker-action.schema.json": "47c6951d4a11c0efa945a755dc8e03d59f26392431b51c690324d0f56f3d47ba";
13
+ readonly "maker-action.schema.json": "dc41e52c868848e85cdeb918992cb710d34616d2803a63f6d9a658e016744a50";
13
14
  readonly "maker-telemetry.schema.json": "85b111ce0f4935299d1116071b43de12e775bef4e0c283c12f19046d34374a9c";
14
- readonly "market-data.schema.json": "b57a68ae336bce36bcdddf9a58260c85475a6c0cbaed60a281bd967c7c887706";
15
+ readonly "market-data.schema.json": "85db33fac6a29b0fa87a500bfda947d0ab3913b13f1c26663d4a7c0484c35786";
15
16
  readonly "product-metadata.schema.json": "7c8ffbde878a0aedaed16814fcfd2e80038054b140886cc8736bb7b508042631";
16
- readonly "quote.schema.json": "416387c9467e0fbfcc45227ccfeba4bb11e2457c390455a7c03226e6f4dff1de";
17
- readonly "realtime.schema.json": "47efae07a9fe89b2560e54037ddc0e71aa9bfeff0127da84ddee6557681a1330";
17
+ readonly "quote.schema.json": "5616260d399d022bde2d0130cc9f8a09f71a3dc877276adf796c7a174d21b59a";
18
+ readonly "realtime.schema.json": "6491fe1d9b5fdcfefcbee71716401effa181e7bcdf1fa4623fbb83dc5b2975cd";
18
19
  };
19
20
  export declare const operations: {
20
- readonly client: readonly ["abandonCoreExit", "acceptQuote", "activeCoreExits", "admitOwnMaker", "admitPartnerWallet", "bindEmbeddedWallet", "cancelRfq", "createCashout", "createCoreExit", "createDeposit", "createRfq", "createWalletChallenge", "createWalletSession", "createWithdrawal", "endWalletSession", "generateUsername", "getAcceptance", "getAccountActivity", "getAccountPnl", "getAccountPosition", "getBalances", "getCoreExit", "getDeployment", "getHypercorePortfolio", "getHypercoreSettlementCredits", "getIdentity", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDataConfig", "getMarketDefinitions", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketStats", "getOperation", "getOwnMaker", "getProfitLeaderboard", "getQuestion", "getQuestionRecurringRound", "getRfq", "getSeries", "getSuggestedCombo", "getTaxonomy", "getUsernameAvailability", "getVolumeLeaderboard", "getWithdrawal", "listAccountActivity", "listAccountPositions", "listControlledMakers", "listDiscovery", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listOperations", "listQuotes", "recordAcquisition", "searchCatalog", "setAvatar", "setUsername", "stream", "streamMarkets"];
21
+ readonly client: readonly ["abandonCoreExit", "acceptQuote", "activeCoreExits", "admitOwnMaker", "admitPartnerWallet", "bindEmbeddedWallet", "cancelRfq", "confirmComboCopyAgent", "confirmCoreCopyAgent", "createCashout", "createComment", "createCoreExit", "createDeposit", "createRfq", "createRunOffClaim", "createWalletChallenge", "createWalletSession", "createWithdrawal", "deleteComment", "editComment", "endWalletSession", "followTrader", "getAcceptance", "getAccountActivity", "getAccountPnl", "getAccountPosition", "getBalances", "getCopyAgents", "getCopyBudget", "getCopySettings", "getCopySummary", "getCoreExit", "getDeployment", "getHypercoreBalance", "getHypercorePortfolio", "getHypercoreSettlementCredits", "getIdentity", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDataConfig", "getMarketDefinitions", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketScoreTimeline", "getMarketStats", "getOperation", "getOwnMaker", "getPartnerReport", "getPerpMarks", "getProfitLeaderboard", "getQuestion", "getQuestionRecurringRound", "getQuestionScoreTimeline", "getRfq", "getSeries", "getSuggestedCombo", "getTaxonomy", "getTrader", "getTraderPnl", "getUsernameAvailability", "getVolumeLeaderboard", "getWithdrawal", "grantComboCopyAgent", "likeComment", "listAccountActivity", "listAccountPositions", "listComboCopies", "listCommentReplies", "listComments", "listControlledMakers", "listCopiedFills", "listCopyTrades", "listDiscovery", "listFollows", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listOperations", "listQuotes", "listTraderPositions", "listTraderTrades", "reactComment", "recordAcquisition", "refreshPicture", "requestComboCopyAgent", "requestCoreCopyAgent", "revokeComboCopyAgent", "searchCatalog", "setAvatar", "setCopyAllocation", "setCopySettings", "setPublicProfile", "setUsername", "stream", "streamMarkets", "switchOffComboCopyAgent", "switchOffCoreCopyAgent", "unfollowTrader", "unlikeComment", "unreactComment"];
21
22
  readonly maker: readonly ["cancelQuote", "confirmQuote", "createCollateralReduction", "createQuote", "getAccountActivity", "getAccountPosition", "getCollateralReduction", "getDeployment", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerTelemetryPublication", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getOperation", "getQuestion", "getQuestionRecurringRound", "getRfq", "getSeries", "getTaxonomy", "listAccountActivity", "listAccountPositions", "listDiscovery", "listMakerAcceptances", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listOperations", "listRfqs", "publishMakerTelemetry", "releaseQuoteLease", "renewQuoteLease", "searchCatalog", "stream", "submitMakerSelfFundedTransaction"];
22
23
  readonly operator: readonly ["live", "ready"];
23
24
  };
@@ -1,21 +1,22 @@
1
1
  // Generated by scripts/generate.mjs; do not edit.
2
- export const sdkVersion = "163.0.0-operation-failure-reason";
3
- export const openapiSha256 = "5f8993120c0337a57ed69b23baa03a3808ca741b7e0153ed92278be2f4d8a304";
4
- export const realtimeSha256 = "47efae07a9fe89b2560e54037ddc0e71aa9bfeff0127da84ddee6557681a1330";
2
+ export const sdkVersion = "203.0.0-execution-admission";
3
+ export const openapiSha256 = "2304ae546fe97a86cbb1147dccdebe50f5bb44080c26b88503356ac9dd1aa096";
4
+ export const realtimeSha256 = "6491fe1d9b5fdcfefcbee71716401effa181e7bcdf1fa4623fbb83dc5b2975cd";
5
5
  export const jsonSchemaSha256 = {
6
- "account.schema.json": "b7b080ad906842c1772694cd1bff0ea181015514251f3a4a774c344b72c94300",
7
- "common.schema.json": "42fb090805f4e1237245f2c3b44d62d727dd972e4e7019cadcceb89aa3b4c2cb",
8
- "core-exit.schema.json": "8ba71470c5ce0b46ca104edf00f5be21ade4088a0c281609deef638aab275e3b",
9
- "error.schema.json": "ba31ea39df90d314a6c008b31f2f91159790dd35a53fa67f364fd03b452cad00",
10
- "hypercore.schema.json": "00fb9ec8ce1a593e185ee4c21ef8689fc78fa8f97bb2c8f2df62babaffc99629",
11
- "identity.schema.json": "112e1324739aed33198d792e5fb0ddbc52ad3e0ebbc1ba73473da0220e97267d",
6
+ "account.schema.json": "5106e2d53abef190990eff113f6692dd27df5848439cf5a80a42c11e89f2bef6",
7
+ "comments.schema.json": "18f4addcfa4e31c2c833fce8b8beca61d2e2ee5b6318c2ed0b479698ff56b65e",
8
+ "common.schema.json": "04f51deb3cbea448e59195e26ede3212598d58a7940fe67eb2123fd9161c5edb",
9
+ "core-exit.schema.json": "c7f617e815225cdcac95c236f8b73fbe288ee5713ff444c3be90eb915fc3a401",
10
+ "error.schema.json": "85b2e13d449f137322779086c96d1355d0e70708647eb67b62c9b4070ed6530e",
11
+ "hypercore.schema.json": "5b89b2bbff7ec8cc1b8717375d12ce9cd5ab6aa5af03c4fdc6cc753ef9583a2c",
12
+ "identity.schema.json": "94534b768030736f4fd1fad285f1312454ca5fbff0b1eb5fab70416a78923bd0",
12
13
  "maker-access.schema.json": "49698ee0235e42064aae0397db1e0f646bdc10d9dfa10121714ba06dd69fee3b",
13
- "maker-action.schema.json": "47c6951d4a11c0efa945a755dc8e03d59f26392431b51c690324d0f56f3d47ba",
14
+ "maker-action.schema.json": "dc41e52c868848e85cdeb918992cb710d34616d2803a63f6d9a658e016744a50",
14
15
  "maker-telemetry.schema.json": "85b111ce0f4935299d1116071b43de12e775bef4e0c283c12f19046d34374a9c",
15
- "market-data.schema.json": "b57a68ae336bce36bcdddf9a58260c85475a6c0cbaed60a281bd967c7c887706",
16
+ "market-data.schema.json": "85db33fac6a29b0fa87a500bfda947d0ab3913b13f1c26663d4a7c0484c35786",
16
17
  "product-metadata.schema.json": "7c8ffbde878a0aedaed16814fcfd2e80038054b140886cc8736bb7b508042631",
17
- "quote.schema.json": "416387c9467e0fbfcc45227ccfeba4bb11e2457c390455a7c03226e6f4dff1de",
18
- "realtime.schema.json": "47efae07a9fe89b2560e54037ddc0e71aa9bfeff0127da84ddee6557681a1330"
18
+ "quote.schema.json": "5616260d399d022bde2d0130cc9f8a09f71a3dc877276adf796c7a174d21b59a",
19
+ "realtime.schema.json": "6491fe1d9b5fdcfefcbee71716401effa181e7bcdf1fa4623fbb83dc5b2975cd"
19
20
  };
20
21
  export const operations = {
21
22
  "client": [
@@ -26,22 +27,33 @@ export const operations = {
26
27
  "admitPartnerWallet",
27
28
  "bindEmbeddedWallet",
28
29
  "cancelRfq",
30
+ "confirmComboCopyAgent",
31
+ "confirmCoreCopyAgent",
29
32
  "createCashout",
33
+ "createComment",
30
34
  "createCoreExit",
31
35
  "createDeposit",
32
36
  "createRfq",
37
+ "createRunOffClaim",
33
38
  "createWalletChallenge",
34
39
  "createWalletSession",
35
40
  "createWithdrawal",
41
+ "deleteComment",
42
+ "editComment",
36
43
  "endWalletSession",
37
- "generateUsername",
44
+ "followTrader",
38
45
  "getAcceptance",
39
46
  "getAccountActivity",
40
47
  "getAccountPnl",
41
48
  "getAccountPosition",
42
49
  "getBalances",
50
+ "getCopyAgents",
51
+ "getCopyBudget",
52
+ "getCopySettings",
53
+ "getCopySummary",
43
54
  "getCoreExit",
44
55
  "getDeployment",
56
+ "getHypercoreBalance",
45
57
  "getHypercorePortfolio",
46
58
  "getHypercoreSettlementCredits",
47
59
  "getIdentity",
@@ -60,35 +72,64 @@ export const operations = {
60
72
  "getMarketHistory",
61
73
  "getMarketRecurringRound",
62
74
  "getMarketReferenceCloses",
75
+ "getMarketScoreTimeline",
63
76
  "getMarketStats",
64
77
  "getOperation",
65
78
  "getOwnMaker",
79
+ "getPartnerReport",
80
+ "getPerpMarks",
66
81
  "getProfitLeaderboard",
67
82
  "getQuestion",
68
83
  "getQuestionRecurringRound",
84
+ "getQuestionScoreTimeline",
69
85
  "getRfq",
70
86
  "getSeries",
71
87
  "getSuggestedCombo",
72
88
  "getTaxonomy",
89
+ "getTrader",
90
+ "getTraderPnl",
73
91
  "getUsernameAvailability",
74
92
  "getVolumeLeaderboard",
75
93
  "getWithdrawal",
94
+ "grantComboCopyAgent",
95
+ "likeComment",
76
96
  "listAccountActivity",
77
97
  "listAccountPositions",
98
+ "listComboCopies",
99
+ "listCommentReplies",
100
+ "listComments",
78
101
  "listControlledMakers",
102
+ "listCopiedFills",
103
+ "listCopyTrades",
79
104
  "listDiscovery",
105
+ "listFollows",
80
106
  "listMakerActivity",
81
107
  "listMakerPositions",
82
108
  "listMakerQuoteHistory",
83
109
  "listMarkets",
84
110
  "listOperations",
85
111
  "listQuotes",
112
+ "listTraderPositions",
113
+ "listTraderTrades",
114
+ "reactComment",
86
115
  "recordAcquisition",
116
+ "refreshPicture",
117
+ "requestComboCopyAgent",
118
+ "requestCoreCopyAgent",
119
+ "revokeComboCopyAgent",
87
120
  "searchCatalog",
88
121
  "setAvatar",
122
+ "setCopyAllocation",
123
+ "setCopySettings",
124
+ "setPublicProfile",
89
125
  "setUsername",
90
126
  "stream",
91
- "streamMarkets"
127
+ "streamMarkets",
128
+ "switchOffComboCopyAgent",
129
+ "switchOffCoreCopyAgent",
130
+ "unfollowTrader",
131
+ "unlikeComment",
132
+ "unreactComment"
92
133
  ],
93
134
  "maker": [
94
135
  "cancelQuote",
@@ -56,7 +56,7 @@ export type BridgedCash = {
56
56
  /**
57
57
  * The Core to HyperEVM USDC bridge: a `sendAsset` of `amount` (6-decimal base
58
58
  * units) to the system address, from Core spot by default. `sourceDex: ""`
59
- * sends from perps, which Hyperliquid documents but Totalis has not proven live.
59
+ * sends from perps; proven on testnet, not yet on mainnet.
60
60
  */
61
61
  export declare function bridgeAction(network: HyperliquidNetwork, amount: bigint, options?: {
62
62
  readonly nonce?: number;
package/dist/hypercore.js CHANGED
@@ -53,7 +53,7 @@ export function usdcUnits(text) {
53
53
  /**
54
54
  * The Core to HyperEVM USDC bridge: a `sendAsset` of `amount` (6-decimal base
55
55
  * units) to the system address, from Core spot by default. `sourceDex: ""`
56
- * sends from perps, which Hyperliquid documents but Totalis has not proven live.
56
+ * sends from perps; proven on testnet, not yet on mainnet.
57
57
  */
58
58
  export function bridgeAction(network, amount, options = {}) {
59
59
  if (amount <= 0n)
package/dist/maker.d.ts CHANGED
@@ -146,6 +146,7 @@ export declare function createMaker(options: MakerOptions): {
146
146
  controller: () => Promise<{
147
147
  approveUsdc: (amount: string | bigint) => TransactionCall;
148
148
  deposit: (amount: string | bigint) => TransactionCall;
149
+ withdraw: (amount: string | bigint, to: string) => TransactionCall;
149
150
  requestWithdraw: (amount: string | bigint, to: string) => TransactionCall;
150
151
  executeWithdraw: () => TransactionCall;
151
152
  cancelWithdraw: () => TransactionCall;
package/dist/maker.js CHANGED
@@ -478,7 +478,7 @@ export function createMaker(options) {
478
478
  };
479
479
  const offs = [
480
480
  stream.on("event", (event) => {
481
- if (event.event_type === "RFQ_ACCEPTED" || event.event_type === "RFQ_CANCELLED" || event.event_type === "RFQ_FAILED") {
481
+ if (event.event_type === "RFQ_ACCEPTED" || event.event_type === "RFQ_CANCELLED" || event.event_type === "RFQ_FAILED" || event.event_type === "RFQ_DECLINED") {
482
482
  ended.add(event.payload.rfq_id);
483
483
  if (ended.size > 10_000)
484
484
  ended.delete(ended.values().next().value);
package/dist/partner.d.ts CHANGED
@@ -2,6 +2,8 @@ import { type ApiClientOptions, type PublicEnvironment } from "./base.js";
2
2
  import type { components } from "./generated/client.js";
3
3
  import { type SignerInput } from "./signer.js";
4
4
  export type WalletAdmission = components["schemas"]["WalletAdmission"];
5
+ /** Your partner's fees, terms, balance and payouts (TT-2420). Amounts are atomic USDC strings. */
6
+ export type PartnerReport = components["schemas"]["PartnerReport"];
5
7
  /** A wallet's signed consent to one partner opening its account (TT-1688). */
6
8
  export type AdmissionConsent = {
7
9
  readonly expires_at: string;
@@ -45,8 +47,9 @@ export type PartnerServerOptions = Omit<ApiClientOptions, "accessToken" | "partn
45
47
  * The partner's server calls (TT-1678). During the invite-only launch a new
46
48
  * wallet gets an account only through a partner: admit it here with the
47
49
  * wallet's consent (`signAdmissionConsent` in your frontend), and its next
48
- * wallet sign-in creates the account, attributed to you. Refuses to run in a
49
- * browser, where the server key would be exposed.
50
+ * wallet sign-in creates the account, attributed to you. `report` reads your
51
+ * fees, terms and payouts (TT-2420). Refuses to run in a browser, where the
52
+ * server key would be exposed.
50
53
  */
51
54
  export declare function createPartnerServer(options: PartnerServerOptions): {
52
55
  /**
@@ -55,5 +58,14 @@ export declare function createPartnerServer(options: PartnerServerOptions): {
55
58
  * verify is INVALID_SIGNATURE.
56
59
  */
57
60
  admitWallet(address: string, consent: AdmissionConsent, idempotencyKey?: string): Promise<WalletAdmission>;
61
+ /**
62
+ * Your report: fees per UTC day for `[from, to)` (YYYY-MM-DD, at most 366
63
+ * days; omit both for the 30 days through today), with your terms and,
64
+ * all time, what you earned, were paid and are owed, and every payout.
65
+ */
66
+ report(range?: {
67
+ readonly from: string;
68
+ readonly to: string;
69
+ }): Promise<PartnerReport>;
58
70
  };
59
71
  export type PartnerServer = ReturnType<typeof createPartnerServer>;
package/dist/partner.js CHANGED
@@ -31,8 +31,9 @@ export async function signAdmissionConsent(request) {
31
31
  * The partner's server calls (TT-1678). During the invite-only launch a new
32
32
  * wallet gets an account only through a partner: admit it here with the
33
33
  * wallet's consent (`signAdmissionConsent` in your frontend), and its next
34
- * wallet sign-in creates the account, attributed to you. Refuses to run in a
35
- * browser, where the server key would be exposed.
34
+ * wallet sign-in creates the account, attributed to you. `report` reads your
35
+ * fees, terms and payouts (TT-2420). Refuses to run in a browser, where the
36
+ * server key would be exposed.
36
37
  */
37
38
  export function createPartnerServer(options) {
38
39
  if (typeof globalThis.document !== "undefined") {
@@ -53,5 +54,13 @@ export function createPartnerServer(options) {
53
54
  params: { header: { "Idempotency-Key": idempotencyKey } }, body: { address, consent },
54
55
  }));
55
56
  },
57
+ /**
58
+ * Your report: fees per UTC day for `[from, to)` (YYYY-MM-DD, at most 366
59
+ * days; omit both for the 30 days through today), with your terms and,
60
+ * all time, what you earned, were paid and are owed, and every payout.
61
+ */
62
+ async report(range) {
63
+ return unwrap(await client.GET("/v1/partner/report", { params: { query: range ?? {} } }));
64
+ },
56
65
  };
57
66
  }
package/dist/request.d.ts CHANGED
@@ -30,7 +30,7 @@ export declare class ApiError extends Error {
30
30
  readonly fieldViolations: readonly FieldViolation[];
31
31
  readonly retryAfterMs?: number | undefined;
32
32
  readonly name = "ApiError";
33
- /** For a flow command answered BACKOFF after every resend: send the identical request again later. */
33
+ /** For a flow command answered BACKOFF after every resend, or whose resend was refused after an earlier send's answer was lost and the outcome could not be read: send the identical request again later. */
34
34
  resend?: () => Promise<unknown>;
35
35
  constructor(status: number, code: ErrorCode | `HTTP_${number}`, retry: Retry, message: string, requestId?: string | undefined, fieldViolations?: readonly FieldViolation[], retryAfterMs?: number | undefined);
36
36
  static from(response: Response, body: unknown): ApiError;
@@ -63,15 +63,18 @@ export type RetryPolicy = {
63
63
  readonly attempts?: number;
64
64
  readonly baseDelayMs?: number;
65
65
  readonly maxDelayMs?: number;
66
+ /** The longest Retry-After waited out before a resend. Default 30 s; a longer one is returned as is, so the caller's error carries `retryAfterMs`. */
67
+ readonly maxRetryAfterMs?: number;
66
68
  readonly sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
67
69
  };
68
70
  export declare function sleep(ms: number, signal?: AbortSignal): Promise<void>;
69
71
  /**
70
72
  * Wrap fetch so each request is built once and resent byte for byte, with the
71
73
  * same Idempotency-Key, after a network failure or a BACKOFF error (honouring
72
- * Retry-After). A network failure is only retried when resending is safe: a
73
- * read, a DELETE, or a command that carries an Idempotency-Key. REFRESH and
74
- * NEVER responses are returned untouched for the caller to surface.
74
+ * a Retry-After up to `maxRetryAfterMs`; a longer one is not waited out). A
75
+ * network failure is only retried when resending is safe: a read, a DELETE,
76
+ * or a command that carries an Idempotency-Key. REFRESH and NEVER responses
77
+ * are returned untouched for the caller to surface.
75
78
  */
76
79
  export type Fetch = (request: Request) => Promise<Response>;
77
80
  export declare function retryingFetch(fetchImpl?: Fetch, policy?: RetryPolicy): Fetch;
package/dist/request.js CHANGED
@@ -33,7 +33,7 @@ export class ApiError extends Error {
33
33
  fieldViolations;
34
34
  retryAfterMs;
35
35
  name = "ApiError";
36
- /** For a flow command answered BACKOFF after every resend: send the identical request again later. */
36
+ /** For a flow command answered BACKOFF after every resend, or whose resend was refused after an earlier send's answer was lost and the outcome could not be read: send the identical request again later. */
37
37
  resend;
38
38
  constructor(status, code, retry, message, requestId, fieldViolations = [], retryAfterMs) {
39
39
  super(`${code}: ${message}`);
@@ -103,7 +103,7 @@ async function wantsBackoff(response) {
103
103
  return retry === undefined ? transient(response.status) : retry === "BACKOFF";
104
104
  }
105
105
  export function retryingFetch(fetchImpl = (request) => globalThis.fetch(request), policy = {}) {
106
- const { attempts = 5, baseDelayMs = 250, maxDelayMs = 10_000, sleep: wait = sleep } = policy;
106
+ const { attempts = 5, baseDelayMs = 250, maxDelayMs = 10_000, maxRetryAfterMs = 30_000, sleep: wait = sleep } = policy;
107
107
  return async (original) => {
108
108
  const body = original.body === null ? null : new Uint8Array(await original.arrayBuffer());
109
109
  const replayable = ["GET", "HEAD", "DELETE"].includes(original.method) || original.headers.has("Idempotency-Key");
@@ -129,8 +129,11 @@ export function retryingFetch(fetchImpl = (request) => globalThis.fetch(request)
129
129
  }
130
130
  if (attempt >= attempts || !(await wantsBackoff(response)))
131
131
  return response;
132
+ const after = retryAfterMs(response);
133
+ if (after !== undefined && after > maxRetryAfterMs)
134
+ return response;
132
135
  await response.body?.cancel();
133
- await wait(retryAfterMs(response) ?? backoff, original.signal);
136
+ await wait(after ?? backoff, original.signal);
134
137
  }
135
138
  };
136
139
  }