@totalis/hip4-client 0.98.0 → 0.99.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 CHANGED
@@ -3,6 +3,19 @@
3
3
  `@totalis/hip4-client` follows [semantic versioning](https://semver.org).
4
4
  The contract version the generated types come from is `sdkVersion` in `./version`.
5
5
 
6
+ ## 0.99.0
7
+
8
+ ### Added
9
+
10
+ - Partner account value (TT-2795, contract `232.0.0-partner-account-value`,
11
+ major 228, additive). `getPartnerAccountValue`
12
+ (`GET /v1/partner/accounts/{wallet}/account-value`, partner server key)
13
+ answers the `AccountValue` the user's own `getAccountValue` does, for a wallet
14
+ the partner admitted that still signs for the account it opened; any other
15
+ wallet is `404 NOT_FOUND`, and a deployment with financial actions off is
16
+ `503 FINANCIAL_ACTIONS_DISABLED`. 600 reads a minute per partner.
17
+ `createPartnerServer` gains `accountValue(wallet)` for it.
18
+
6
19
  ## 0.98.0
7
20
 
8
21
  ### Added
@@ -27,6 +27,7 @@ export type paths = {
27
27
  readonly "/v1/partner/report": Pick<SharedPaths["/v1/partner/report"], "parameters" | "get">;
28
28
  readonly "/v1/partner/fills": Pick<SharedPaths["/v1/partner/fills"], "parameters" | "get">;
29
29
  readonly "/v1/partner/webhook-events": Pick<SharedPaths["/v1/partner/webhook-events"], "parameters" | "get">;
30
+ readonly "/v1/partner/accounts/{wallet}/account-value": Pick<SharedPaths["/v1/partner/accounts/{wallet}/account-value"], "parameters" | "get">;
30
31
  readonly "/v1/me/acquisition": Pick<SharedPaths["/v1/me/acquisition"], "parameters" | "put">;
31
32
  readonly "/v1/me/username": Pick<SharedPaths["/v1/me/username"], "parameters" | "put">;
32
33
  readonly "/v1/me/username/availability": Pick<SharedPaths["/v1/me/username/availability"], "parameters" | "get">;
@@ -122,4 +123,4 @@ export type paths = {
122
123
  readonly "/v1/makers/{maker_id}/exposure": Pick<SharedPaths["/v1/makers/{maker_id}/exposure"], "parameters" | "get">;
123
124
  readonly "/v1/makers/{maker_id}/performance": Pick<SharedPaths["/v1/makers/{maker_id}/performance"], "parameters" | "get">;
124
125
  };
125
- export type operations = Pick<SharedOperations, "abandonCoreExit" | "acceptQuote" | "activeCoreExits" | "admitOwnMaker" | "admitPartnerWallet" | "approveWallet" | "bindEmbeddedWallet" | "cancelRfq" | "confirmComboCopyAgent" | "confirmCoreCopyAgent" | "createCashout" | "createComment" | "createCoreExit" | "createDeposit" | "createGoldenRfq" | "createRfq" | "createRunOffClaim" | "createWalletChallenge" | "createWalletSession" | "createWithdrawal" | "deleteComment" | "editComment" | "endWalletSession" | "followTrader" | "getAcceptance" | "getAccountActivity" | "getAccountPnl" | "getAccountPosition" | "getAccountValue" | "getBalances" | "getCopyAgents" | "getCopyBudget" | "getCopySettings" | "getCopySummary" | "getCoreExit" | "getDeployment" | "getGolden" | "getGoldenMarkets" | "getGoldenOffer" | "getGoldenSuggestions" | "getHypercoreBalance" | "getHypercorePortfolio" | "getHypercoreSettlementCredits" | "getIdentity" | "getMakerActivity" | "getMakerCapital" | "getMakerExposure" | "getMakerPerformance" | "getMakerPosition" | "getMakerQuotes" | "getMakerTelemetry" | "getMakerVaultFundingTransaction" | "getMakerWithdrawal" | "getMarket" | "getMarketDataConfig" | "getMarketDefinitions" | "getMarketHistory" | "getMarketRecurringRound" | "getMarketReferenceCloses" | "getMarketScoreTimeline" | "getMarketStats" | "getMyGenesis" | "getMyReferralBonus" | "getOperation" | "getOwnMaker" | "getPartnerReport" | "getPerpMarks" | "getProfitLeaderboard" | "getQuestion" | "getQuestionRecurringRound" | "getQuestionScoreTimeline" | "getRfq" | "getSeries" | "getSuggestedCombo" | "getTaxonomy" | "getTrader" | "getTraderPnl" | "getUsernameAvailability" | "getVaultAgents" | "getVolumeLeaderboard" | "getWalletApproval" | "getWithdrawal" | "grantComboCopyAgent" | "grantVaultAgent" | "likeComment" | "listAccountActivity" | "listAccountPositions" | "listComboCopies" | "listComboFeed" | "listCommentReplies" | "listComments" | "listControlledMakers" | "listCopiedFills" | "listCopyTrades" | "listDiscovery" | "listFollows" | "listMakerActivity" | "listMakerPositions" | "listMakerQuoteHistory" | "listMarkets" | "listMyNotifications" | "listOperations" | "listPartnerFills" | "listPartnerWebhookEvents" | "listQuotes" | "listTraderPositions" | "listTraderTrades" | "markMyNotificationsRead" | "placeGolden" | "reactComment" | "recordAcquisition" | "recordGoldenTelegramClick" | "refreshPicture" | "requestComboCopyAgent" | "requestCoreCopyAgent" | "revokeComboCopyAgent" | "searchCatalog" | "setAvatar" | "setCopyAllocation" | "setCopySettings" | "setPublicProfile" | "setUsername" | "setXHandleShown" | "signGoldenGift" | "stream" | "streamMarkets" | "switchOffComboCopyAgent" | "switchOffCoreCopyAgent" | "unfollowTrader" | "unlikeComment" | "unlockGolden" | "unreactComment">;
126
+ export type operations = Pick<SharedOperations, "abandonCoreExit" | "acceptQuote" | "activeCoreExits" | "admitOwnMaker" | "admitPartnerWallet" | "approveWallet" | "bindEmbeddedWallet" | "cancelRfq" | "confirmComboCopyAgent" | "confirmCoreCopyAgent" | "createCashout" | "createComment" | "createCoreExit" | "createDeposit" | "createGoldenRfq" | "createRfq" | "createRunOffClaim" | "createWalletChallenge" | "createWalletSession" | "createWithdrawal" | "deleteComment" | "editComment" | "endWalletSession" | "followTrader" | "getAcceptance" | "getAccountActivity" | "getAccountPnl" | "getAccountPosition" | "getAccountValue" | "getBalances" | "getCopyAgents" | "getCopyBudget" | "getCopySettings" | "getCopySummary" | "getCoreExit" | "getDeployment" | "getGolden" | "getGoldenMarkets" | "getGoldenOffer" | "getGoldenSuggestions" | "getHypercoreBalance" | "getHypercorePortfolio" | "getHypercoreSettlementCredits" | "getIdentity" | "getMakerActivity" | "getMakerCapital" | "getMakerExposure" | "getMakerPerformance" | "getMakerPosition" | "getMakerQuotes" | "getMakerTelemetry" | "getMakerVaultFundingTransaction" | "getMakerWithdrawal" | "getMarket" | "getMarketDataConfig" | "getMarketDefinitions" | "getMarketHistory" | "getMarketRecurringRound" | "getMarketReferenceCloses" | "getMarketScoreTimeline" | "getMarketStats" | "getMyGenesis" | "getMyReferralBonus" | "getOperation" | "getOwnMaker" | "getPartnerAccountValue" | "getPartnerReport" | "getPerpMarks" | "getProfitLeaderboard" | "getQuestion" | "getQuestionRecurringRound" | "getQuestionScoreTimeline" | "getRfq" | "getSeries" | "getSuggestedCombo" | "getTaxonomy" | "getTrader" | "getTraderPnl" | "getUsernameAvailability" | "getVaultAgents" | "getVolumeLeaderboard" | "getWalletApproval" | "getWithdrawal" | "grantComboCopyAgent" | "grantVaultAgent" | "likeComment" | "listAccountActivity" | "listAccountPositions" | "listComboCopies" | "listComboFeed" | "listCommentReplies" | "listComments" | "listControlledMakers" | "listCopiedFills" | "listCopyTrades" | "listDiscovery" | "listFollows" | "listMakerActivity" | "listMakerPositions" | "listMakerQuoteHistory" | "listMarkets" | "listMyNotifications" | "listOperations" | "listPartnerFills" | "listPartnerWebhookEvents" | "listQuotes" | "listTraderPositions" | "listTraderTrades" | "markMyNotificationsRead" | "placeGolden" | "reactComment" | "recordAcquisition" | "recordGoldenTelegramClick" | "refreshPicture" | "requestComboCopyAgent" | "requestCoreCopyAgent" | "revokeComboCopyAgent" | "searchCatalog" | "setAvatar" | "setCopyAllocation" | "setCopySettings" | "setPublicProfile" | "setUsername" | "setXHandleShown" | "signGoldenGift" | "stream" | "streamMarkets" | "switchOffComboCopyAgent" | "switchOffCoreCopyAgent" | "unfollowTrader" | "unlikeComment" | "unlockGolden" | "unreactComment">;
@@ -477,6 +477,7 @@ export declare const operationErrors: {
477
477
  readonly getMyReferralBonus: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "INVALID_QUERY", "CONTRACT_UNAVAILABLE"];
478
478
  readonly getOperation: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_REQUEST", "NOT_FOUND", "IDENTITY_NOT_FOUND"];
479
479
  readonly getOwnMaker: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "ORIGIN_REQUIRED", "NOT_FOUND", "IDENTITY_NOT_FOUND"];
480
+ readonly getPartnerAccountValue: readonly ["INVALID_REQUEST", "UNAUTHENTICATED", "FORBIDDEN", "NOT_FOUND", "RATE_LIMITED", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "FINANCIAL_ACTIONS_DISABLED", "SOURCE_UNAVAILABLE"];
480
481
  readonly getPartnerReport: readonly ["INVALID_QUERY", "UNAUTHENTICATED", "FORBIDDEN", "RATE_LIMITED", "AUTHORIZATION_UNAVAILABLE", "SOURCE_UNAVAILABLE"];
481
482
  readonly getPerpMarks: readonly ["NOT_FOUND", "MARKET_DATA_UNAVAILABLE", "INVALID_QUERY"];
482
483
  readonly getPersonalApiKeyCapabilities: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_REQUEST", "NOT_FOUND"];
@@ -1311,6 +1311,17 @@ export const operationErrors = {
1311
1311
  "NOT_FOUND",
1312
1312
  "IDENTITY_NOT_FOUND"
1313
1313
  ],
1314
+ "getPartnerAccountValue": [
1315
+ "INVALID_REQUEST",
1316
+ "UNAUTHENTICATED",
1317
+ "FORBIDDEN",
1318
+ "NOT_FOUND",
1319
+ "RATE_LIMITED",
1320
+ "AUTHORIZATION_UNAVAILABLE",
1321
+ "DEPENDENCY_STALE",
1322
+ "FINANCIAL_ACTIONS_DISABLED",
1323
+ "SOURCE_UNAVAILABLE"
1324
+ ],
1314
1325
  "getPartnerReport": [
1315
1326
  "INVALID_QUERY",
1316
1327
  "UNAUTHENTICATED",
@@ -575,6 +575,26 @@ export type paths = {
575
575
  readonly patch?: never;
576
576
  readonly trace?: never;
577
577
  };
578
+ readonly "/v1/partner/accounts/{wallet}/account-value": {
579
+ readonly parameters: {
580
+ readonly query?: never;
581
+ readonly header?: never;
582
+ readonly path?: never;
583
+ readonly cookie?: never;
584
+ };
585
+ /**
586
+ * Get a user's account value
587
+ * @description The value of an account your admission of this wallet opened, the body Get account value returns to the user, read with your server key so you can keep a user's history after their own key lapses.
588
+ */
589
+ readonly get: operations["getPartnerAccountValue"];
590
+ readonly put?: never;
591
+ readonly post?: never;
592
+ readonly delete?: never;
593
+ readonly options?: never;
594
+ readonly head?: never;
595
+ readonly patch?: never;
596
+ readonly trace?: never;
597
+ };
578
598
  readonly "/v1/me/acquisition": {
579
599
  readonly parameters: {
580
600
  readonly query?: never;
@@ -4599,6 +4619,43 @@ export type components = {
4599
4619
  /** @description Whether more events follow. */
4600
4620
  readonly has_more: boolean;
4601
4621
  };
4622
+ readonly Checkpoint: {
4623
+ /** @description Last HyperEVM block the vault projection has indexed; the read reflects chain state up to and including this block. */
4624
+ readonly block_number: components["schemas"]["UInt64String"];
4625
+ /**
4626
+ * @description CURRENT when the projection is within 32 blocks of a chain head observed in the last two minutes; STALE when it lags, so figures may be behind.
4627
+ * @enum {unknown}
4628
+ */
4629
+ readonly projection_state: "CURRENT" | "STALE";
4630
+ };
4631
+ /** @description What the account holds at Totalis at one HyperEVM block, in atomic USDC (6 decimals, "1000000" = 1 USDC): wallet USDC, its cash in the vault and in vaults running off, what it paid for its open positions, and the profit it can still claim, net of the fee. Every amount is read from the chain at block_number. HyperCore balances are not included; read them from Hyperliquid. */
4632
+ readonly AccountValue: {
4633
+ /** @description The account's wallet, lowercase. */
4634
+ readonly account: components["schemas"]["LowercaseNonZeroAddress"];
4635
+ /**
4636
+ * @description CURRENT when every amount was read at block_number; UNKNOWN when the chain could not be read, or the projection did not reach that block in time, and every amount is null. Read again later.
4637
+ * @enum {unknown}
4638
+ */
4639
+ readonly state: "CURRENT" | "UNKNOWN";
4640
+ /** @description The account's value: wallet_usdc + vault_cash + run_off_cash + open_cost + claimable_profit. Null unless state is CURRENT. */
4641
+ readonly amount: components["schemas"]["$defs-Amount"] | null;
4642
+ /** @description The HyperEVM block every amount was read at. Null unless state is CURRENT. */
4643
+ readonly block_number: components["schemas"]["UInt64String"] | null;
4644
+ /** @description USDC in the account's wallet on HyperEVM, including any already committed to a Totalis withdrawal or stake that has not landed. Null unless state is CURRENT. */
4645
+ readonly wallet_usdc: components["schemas"]["$defs-Amount"] | null;
4646
+ /** @description All the account's cash in the vault, including any held for an operation that has not landed, so it can exceed GET /v1/me/balances' free vault cash. Null unless state is CURRENT. */
4647
+ readonly vault_cash: components["schemas"]["$defs-Amount"] | null;
4648
+ /** @description The account's cash in vaults running off, all together; GET /v1/me/balances lists it per vault. Null unless state is CURRENT. */
4649
+ readonly run_off_cash: components["schemas"]["$defs-Amount"] | null;
4650
+ /** @description How many positions the account holds that have not settled: OPEN and AWAITING_SETTLEMENT in GET /v1/me/positions. Null unless state is CURRENT. */
4651
+ readonly open_positions: number | null;
4652
+ /** @description What the account paid for those positions: the sum of their acquisition_cost. Null unless state is CURRENT. */
4653
+ readonly open_cost: components["schemas"]["$defs-Amount"] | null;
4654
+ /** @description What claiming every SETTLED_UNCLAIMED position would pay the account: each one's unclaimed_profit minus floor(unclaimed_profit * fee_bps / 10000). Null unless state is CURRENT. */
4655
+ readonly claimable_profit: components["schemas"]["$defs-Amount"] | null;
4656
+ /** @description The vault projection the read used to find the account's positions. When state is CURRENT it has reached block_number. */
4657
+ readonly checkpoint: components["schemas"]["Checkpoint"];
4658
+ };
4602
4659
  /** @description One tagged landing on the app. Values come from utm_source, utm_medium, utm_campaign and ref; the path carries no query string. */
4603
4660
  readonly AcquisitionTouch: {
4604
4661
  readonly source?: string;
@@ -5894,15 +5951,6 @@ export type components = {
5894
5951
  */
5895
5952
  readonly state: "CURRENT" | "UNKNOWN" | "STALE";
5896
5953
  };
5897
- readonly Checkpoint: {
5898
- /** @description Last HyperEVM block the vault projection has indexed; the read reflects chain state up to and including this block. */
5899
- readonly block_number: components["schemas"]["UInt64String"];
5900
- /**
5901
- * @description CURRENT when the projection is within 32 blocks of a chain head observed in the last two minutes; STALE when it lags, so figures may be behind.
5902
- * @enum {unknown}
5903
- */
5904
- readonly projection_state: "CURRENT" | "STALE";
5905
- };
5906
5954
  /**
5907
5955
  * @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.
5908
5956
  * @enum {string}
@@ -5970,34 +6018,6 @@ export type components = {
5970
6018
  /** @description The account's cash in vaults running off, one item per vault holding any or with a claim in flight, outside amount: it is owned but never spendable here. A Totalis embedded wallet's moves to its HyperCore spot balance automatically. Any other wallet claims it to its own wallet, part of Cash, with one Exit signed for that vault and sent with Create run-off claim; a sponsored claim must move at least 1 USDC (1000000), so offer it only when state is CURRENT, vault_free is at least that and claim is null. Smaller amounts stay in the vault. Empty when no vault is running off. */
5971
6019
  readonly run_off: readonly components["schemas"]["RunOffCash"][];
5972
6020
  };
5973
- /** @description What the account holds at Totalis at one HyperEVM block, in atomic USDC (6 decimals, "1000000" = 1 USDC): wallet USDC, its cash in the vault and in vaults running off, what it paid for its open positions, and the profit it can still claim, net of the fee. Every amount is read from the chain at block_number. HyperCore balances are not included; read them from Hyperliquid. */
5974
- readonly AccountValue: {
5975
- /** @description The account's wallet, lowercase. */
5976
- readonly account: components["schemas"]["LowercaseNonZeroAddress"];
5977
- /**
5978
- * @description CURRENT when every amount was read at block_number; UNKNOWN when the chain could not be read, or the projection did not reach that block in time, and every amount is null. Read again later.
5979
- * @enum {unknown}
5980
- */
5981
- readonly state: "CURRENT" | "UNKNOWN";
5982
- /** @description The account's value: wallet_usdc + vault_cash + run_off_cash + open_cost + claimable_profit. Null unless state is CURRENT. */
5983
- readonly amount: components["schemas"]["$defs-Amount"] | null;
5984
- /** @description The HyperEVM block every amount was read at. Null unless state is CURRENT. */
5985
- readonly block_number: components["schemas"]["UInt64String"] | null;
5986
- /** @description USDC in the account's wallet on HyperEVM, including any already committed to a Totalis withdrawal or stake that has not landed. Null unless state is CURRENT. */
5987
- readonly wallet_usdc: components["schemas"]["$defs-Amount"] | null;
5988
- /** @description All the account's cash in the vault, including any held for an operation that has not landed, so it can exceed GET /v1/me/balances' free vault cash. Null unless state is CURRENT. */
5989
- readonly vault_cash: components["schemas"]["$defs-Amount"] | null;
5990
- /** @description The account's cash in vaults running off, all together; GET /v1/me/balances lists it per vault. Null unless state is CURRENT. */
5991
- readonly run_off_cash: components["schemas"]["$defs-Amount"] | null;
5992
- /** @description How many positions the account holds that have not settled: OPEN and AWAITING_SETTLEMENT in GET /v1/me/positions. Null unless state is CURRENT. */
5993
- readonly open_positions: number | null;
5994
- /** @description What the account paid for those positions: the sum of their acquisition_cost. Null unless state is CURRENT. */
5995
- readonly open_cost: components["schemas"]["$defs-Amount"] | null;
5996
- /** @description What claiming every SETTLED_UNCLAIMED position would pay the account: each one's unclaimed_profit minus floor(unclaimed_profit * fee_bps / 10000). Null unless state is CURRENT. */
5997
- readonly claimable_profit: components["schemas"]["$defs-Amount"] | null;
5998
- /** @description The vault projection the read used to find the account's positions. When state is CURRENT it has reached block_number. */
5999
- readonly checkpoint: components["schemas"]["Checkpoint"];
6000
- };
6001
6021
  readonly OperationList: {
6002
6022
  /** @description Operations newest first by creation time. */
6003
6023
  readonly operations: readonly components["schemas"]["Operation"][];
@@ -8144,6 +8164,43 @@ export interface operations {
8144
8164
  readonly 503: components["responses"]["Unavailable"];
8145
8165
  };
8146
8166
  };
8167
+ readonly getPartnerAccountValue: {
8168
+ readonly parameters: {
8169
+ readonly query?: never;
8170
+ readonly header?: never;
8171
+ readonly path: {
8172
+ /**
8173
+ * @description The wallet you admitted, still signing for the account it opened.
8174
+ * @example 0x8ba1f109551bD432803012645Ac136ddd64DBA72
8175
+ */
8176
+ readonly wallet: components["schemas"]["Address"];
8177
+ };
8178
+ readonly cookie?: never;
8179
+ };
8180
+ readonly requestBody?: never;
8181
+ readonly responses: {
8182
+ /** @description The account's value and its parts. When state is UNKNOWN every amount is null; read again later. No caching. */
8183
+ readonly 200: {
8184
+ headers: {
8185
+ readonly [name: string]: unknown;
8186
+ };
8187
+ content: {
8188
+ readonly "application/json": components["schemas"]["AccountValue"];
8189
+ };
8190
+ };
8191
+ /** @description `INVALID_REQUEST`: wallet is not a 0x-prefixed 20-byte hex address. */
8192
+ readonly 400: components["responses"]["Error"];
8193
+ /** @description The partner server key is missing, unknown or revoked, or your partner is suspended. */
8194
+ readonly 401: components["responses"]["Error"];
8195
+ /** @description Any credential but a partner server key, or any request with an `Origin`, is refused: read account values from your server. */
8196
+ readonly 403: components["responses"]["Error"];
8197
+ /** @description `NOT_FOUND`: you did not admit this wallet, it has no account yet, or it no longer signs for the account it opened. A wallet another partner admitted, or no partner, answers the same. */
8198
+ readonly 404: components["responses"]["Error"];
8199
+ readonly 429: components["responses"]["RateLimited"];
8200
+ /** @description The value is temporarily unavailable; resend after `Retry-After`. */
8201
+ readonly 503: components["responses"]["Unavailable"];
8202
+ };
8203
+ };
8147
8204
  readonly recordAcquisition: {
8148
8205
  readonly parameters: {
8149
8206
  readonly query?: never;
@@ -1,5 +1,5 @@
1
- export declare const sdkVersion = "231.0.0-partner-webhook-events";
2
- export declare const openapiSha256 = "153af0c29c1c8e4c69d5223c04b30f32186065262348f4c4713a5b6ea53d851d";
1
+ export declare const sdkVersion = "232.0.0-partner-account-value";
2
+ export declare const openapiSha256 = "25a67887e4f47ba0b0c9f35c3a6c6f4b598f89fc865e857b03ec2df67a825880";
3
3
  export declare const realtimeSha256 = "32e56c8bb642401f5b03e9c38274087c09bebb73ffe60c0d34432c2e78ce1e15";
4
4
  export declare const jsonSchemaSha256: {
5
5
  readonly "account.schema.json": "e6cd5a75429d074f23bd7f6ffd370fa59d0e3f7dbd6aef6433e5ba0d21b5baeb";
@@ -18,7 +18,7 @@ export declare const jsonSchemaSha256: {
18
18
  readonly "realtime.schema.json": "32e56c8bb642401f5b03e9c38274087c09bebb73ffe60c0d34432c2e78ce1e15";
19
19
  };
20
20
  export declare const operations: {
21
- readonly client: readonly ["abandonCoreExit", "acceptQuote", "activeCoreExits", "admitOwnMaker", "admitPartnerWallet", "approveWallet", "bindEmbeddedWallet", "cancelRfq", "confirmComboCopyAgent", "confirmCoreCopyAgent", "createCashout", "createComment", "createCoreExit", "createDeposit", "createGoldenRfq", "createRfq", "createRunOffClaim", "createWalletChallenge", "createWalletSession", "createWithdrawal", "deleteComment", "editComment", "endWalletSession", "followTrader", "getAcceptance", "getAccountActivity", "getAccountPnl", "getAccountPosition", "getAccountValue", "getBalances", "getCopyAgents", "getCopyBudget", "getCopySettings", "getCopySummary", "getCoreExit", "getDeployment", "getGolden", "getGoldenMarkets", "getGoldenOffer", "getGoldenSuggestions", "getHypercoreBalance", "getHypercorePortfolio", "getHypercoreSettlementCredits", "getIdentity", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDataConfig", "getMarketDefinitions", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketScoreTimeline", "getMarketStats", "getMyGenesis", "getMyReferralBonus", "getOperation", "getOwnMaker", "getPartnerReport", "getPerpMarks", "getProfitLeaderboard", "getQuestion", "getQuestionRecurringRound", "getQuestionScoreTimeline", "getRfq", "getSeries", "getSuggestedCombo", "getTaxonomy", "getTrader", "getTraderPnl", "getUsernameAvailability", "getVaultAgents", "getVolumeLeaderboard", "getWalletApproval", "getWithdrawal", "grantComboCopyAgent", "grantVaultAgent", "likeComment", "listAccountActivity", "listAccountPositions", "listComboCopies", "listComboFeed", "listCommentReplies", "listComments", "listControlledMakers", "listCopiedFills", "listCopyTrades", "listDiscovery", "listFollows", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listMyNotifications", "listOperations", "listPartnerFills", "listPartnerWebhookEvents", "listQuotes", "listTraderPositions", "listTraderTrades", "markMyNotificationsRead", "placeGolden", "reactComment", "recordAcquisition", "recordGoldenTelegramClick", "refreshPicture", "requestComboCopyAgent", "requestCoreCopyAgent", "revokeComboCopyAgent", "searchCatalog", "setAvatar", "setCopyAllocation", "setCopySettings", "setPublicProfile", "setUsername", "setXHandleShown", "signGoldenGift", "stream", "streamMarkets", "switchOffComboCopyAgent", "switchOffCoreCopyAgent", "unfollowTrader", "unlikeComment", "unlockGolden", "unreactComment"];
21
+ readonly client: readonly ["abandonCoreExit", "acceptQuote", "activeCoreExits", "admitOwnMaker", "admitPartnerWallet", "approveWallet", "bindEmbeddedWallet", "cancelRfq", "confirmComboCopyAgent", "confirmCoreCopyAgent", "createCashout", "createComment", "createCoreExit", "createDeposit", "createGoldenRfq", "createRfq", "createRunOffClaim", "createWalletChallenge", "createWalletSession", "createWithdrawal", "deleteComment", "editComment", "endWalletSession", "followTrader", "getAcceptance", "getAccountActivity", "getAccountPnl", "getAccountPosition", "getAccountValue", "getBalances", "getCopyAgents", "getCopyBudget", "getCopySettings", "getCopySummary", "getCoreExit", "getDeployment", "getGolden", "getGoldenMarkets", "getGoldenOffer", "getGoldenSuggestions", "getHypercoreBalance", "getHypercorePortfolio", "getHypercoreSettlementCredits", "getIdentity", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDataConfig", "getMarketDefinitions", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketScoreTimeline", "getMarketStats", "getMyGenesis", "getMyReferralBonus", "getOperation", "getOwnMaker", "getPartnerAccountValue", "getPartnerReport", "getPerpMarks", "getProfitLeaderboard", "getQuestion", "getQuestionRecurringRound", "getQuestionScoreTimeline", "getRfq", "getSeries", "getSuggestedCombo", "getTaxonomy", "getTrader", "getTraderPnl", "getUsernameAvailability", "getVaultAgents", "getVolumeLeaderboard", "getWalletApproval", "getWithdrawal", "grantComboCopyAgent", "grantVaultAgent", "likeComment", "listAccountActivity", "listAccountPositions", "listComboCopies", "listComboFeed", "listCommentReplies", "listComments", "listControlledMakers", "listCopiedFills", "listCopyTrades", "listDiscovery", "listFollows", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listMyNotifications", "listOperations", "listPartnerFills", "listPartnerWebhookEvents", "listQuotes", "listTraderPositions", "listTraderTrades", "markMyNotificationsRead", "placeGolden", "reactComment", "recordAcquisition", "recordGoldenTelegramClick", "refreshPicture", "requestComboCopyAgent", "requestCoreCopyAgent", "revokeComboCopyAgent", "searchCatalog", "setAvatar", "setCopyAllocation", "setCopySettings", "setPublicProfile", "setUsername", "setXHandleShown", "signGoldenGift", "stream", "streamMarkets", "switchOffComboCopyAgent", "switchOffCoreCopyAgent", "unfollowTrader", "unlikeComment", "unlockGolden", "unreactComment"];
22
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"];
23
23
  readonly operator: readonly ["live", "ready"];
24
24
  };
@@ -1,6 +1,6 @@
1
1
  // Generated by scripts/generate.mjs; do not edit.
2
- export const sdkVersion = "231.0.0-partner-webhook-events";
3
- export const openapiSha256 = "153af0c29c1c8e4c69d5223c04b30f32186065262348f4c4713a5b6ea53d851d";
2
+ export const sdkVersion = "232.0.0-partner-account-value";
3
+ export const openapiSha256 = "25a67887e4f47ba0b0c9f35c3a6c6f4b598f89fc865e857b03ec2df67a825880";
4
4
  export const realtimeSha256 = "32e56c8bb642401f5b03e9c38274087c09bebb73ffe60c0d34432c2e78ce1e15";
5
5
  export const jsonSchemaSha256 = {
6
6
  "account.schema.json": "e6cd5a75429d074f23bd7f6ffd370fa59d0e3f7dbd6aef6433e5ba0d21b5baeb",
@@ -85,6 +85,7 @@ export const operations = {
85
85
  "getMyReferralBonus",
86
86
  "getOperation",
87
87
  "getOwnMaker",
88
+ "getPartnerAccountValue",
88
89
  "getPartnerReport",
89
90
  "getPerpMarks",
90
91
  "getProfitLeaderboard",
package/dist/partner.d.ts CHANGED
@@ -7,6 +7,8 @@ export type PartnerReport = components["schemas"]["PartnerReport"];
7
7
  /** A page of fee events on your users' positions (TT-2749). Amounts are atomic USDC strings. */
8
8
  export type PartnerFillPage = components["schemas"]["PartnerFillPage"];
9
9
  export type PartnerWebhookEventPage = components["schemas"]["PartnerWebhookEventPage"];
10
+ /** What an account holds at Totalis at one HyperEVM block (TT-2787). Amounts are atomic USDC strings. */
11
+ export type PartnerAccountValue = components["schemas"]["AccountValue"];
10
12
  /** A wallet's signed consent to one partner opening its account (TT-1688). */
11
13
  export type AdmissionConsent = {
12
14
  readonly expires_at: string;
@@ -52,8 +54,9 @@ export type PartnerServerOptions = Omit<ApiClientOptions, "accessToken" | "partn
52
54
  * wallet's consent (`signAdmissionConsent` in your frontend), and its next
53
55
  * wallet sign-in creates the account, attributed to you. `report` reads your
54
56
  * fees, terms and payouts (TT-2420), and `fills` each fee event on your
55
- * users' positions (TT-2749), and `webhookEvents` reads back the webhook
56
- * events Totalis queued for you (TT-2794). Refuses to run in a browser or a React Native
57
+ * users' positions (TT-2749), `webhookEvents` reads back the webhook
58
+ * events Totalis queued for you (TT-2794), and `accountValue` the value of an
59
+ * account you admitted (TT-2795). Refuses to run in a browser or a React Native
57
60
  * app, where the server key would be exposed.
58
61
  */
59
62
  export declare function createPartnerServer(options: PartnerServerOptions): {
@@ -98,5 +101,12 @@ export declare function createPartnerServer(options: PartnerServerOptions): {
98
101
  readonly cursor?: string;
99
102
  readonly limit?: number;
100
103
  }): Promise<PartnerWebhookEventPage>;
104
+ /**
105
+ * The value of the account your admission of `wallet` opened, the body
106
+ * the user's own Get account value returns, read with your server key so
107
+ * you can keep it after the user's key lapses. A wallet you did not
108
+ * admit, or one no longer signing for that account, is a 404.
109
+ */
110
+ accountValue(wallet: string): Promise<PartnerAccountValue>;
101
111
  };
102
112
  export type PartnerServer = ReturnType<typeof createPartnerServer>;
package/dist/partner.js CHANGED
@@ -34,8 +34,9 @@ export async function signAdmissionConsent(request) {
34
34
  * wallet's consent (`signAdmissionConsent` in your frontend), and its next
35
35
  * wallet sign-in creates the account, attributed to you. `report` reads your
36
36
  * fees, terms and payouts (TT-2420), and `fills` each fee event on your
37
- * users' positions (TT-2749), and `webhookEvents` reads back the webhook
38
- * events Totalis queued for you (TT-2794). Refuses to run in a browser or a React Native
37
+ * users' positions (TT-2749), `webhookEvents` reads back the webhook
38
+ * events Totalis queued for you (TT-2794), and `accountValue` the value of an
39
+ * account you admitted (TT-2795). Refuses to run in a browser or a React Native
39
40
  * app, where the server key would be exposed.
40
41
  */
41
42
  export function createPartnerServer(options) {
@@ -86,5 +87,14 @@ export function createPartnerServer(options) {
86
87
  async webhookEvents(query) {
87
88
  return unwrap(await client.GET("/v1/partner/webhook-events", { params: { query: query ?? {} } }));
88
89
  },
90
+ /**
91
+ * The value of the account your admission of `wallet` opened, the body
92
+ * the user's own Get account value returns, read with your server key so
93
+ * you can keep it after the user's key lapses. A wallet you did not
94
+ * admit, or one no longer signing for that account, is a 404.
95
+ */
96
+ async accountValue(wallet) {
97
+ return unwrap(await client.GET("/v1/partner/accounts/{wallet}/account-value", { params: { path: { wallet } } }));
98
+ },
89
99
  };
90
100
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@totalis/hip4-client",
3
- "version": "0.98.0",
3
+ "version": "0.99.0",
4
4
  "description": "Totalis HIP-4 SDK: typed HTTP clients, signer-agnostic typed data, a retrying request layer, pagination, a realtime stream and taker/maker flows",
5
5
  "type": "module",
6
6
  "files": [