@totalis/hip4-client 0.109.0 → 0.111.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,33 @@
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.111.0
7
+
8
+ ### Added
9
+
10
+ Contract `246.0.0-trader-search`, additive:
11
+
12
+ - Trader search. `searchTraders` (`GET /v1/traders?q=`, no credential)
13
+ returns up to 5 public traders whose username starts with `q`, matched
14
+ without regard to case, in username order, so an exact username comes
15
+ first. Text no username can start with matches nobody.
16
+
17
+ ## 0.110.0
18
+
19
+ ### Changed
20
+
21
+ - Portfolio Margin accounts (TT-2868, contract
22
+ `245.0.0-portfolio-margin-funding`). `getHypercoreBalance` and
23
+ `getHypercorePortfolio` answer a Portfolio Margin account with its
24
+ `account_mode` and positions instead of failing `DEPENDENCY_STALE`; its
25
+ `funding` amounts `spot_usdc`, `perp_usdc`, `spot_usdc_total` and
26
+ `spot_usdc_hold` are `null`, since Hyperliquid signs its spot `hold` (and
27
+ `total` while borrowing) and total less hold is not its cash. They are typed
28
+ `string | null`; every other mode still gets strings. `readCoreCash`
29
+ answers `PORTFOLIO_MARGIN` with `spendable` `0n` whatever the spot read
30
+ says, and leaves all three fields `null` when the spot read is Portfolio
31
+ Margin's but the mode read is not.
32
+
6
33
  ## 0.109.0
7
34
 
8
35
  ### Added
@@ -51,6 +51,7 @@ export type paths = {
51
51
  readonly "/v1/leaderboard/profit": Pick<SharedPaths["/v1/leaderboard/profit"], "parameters" | "get">;
52
52
  readonly "/v1/me/public-profile": Pick<SharedPaths["/v1/me/public-profile"], "parameters" | "put">;
53
53
  readonly "/v1/me/public-profile/x": Pick<SharedPaths["/v1/me/public-profile/x"], "parameters" | "put">;
54
+ readonly "/v1/traders": Pick<SharedPaths["/v1/traders"], "parameters" | "get">;
54
55
  readonly "/v1/traders/{username}": Pick<SharedPaths["/v1/traders/{username}"], "parameters" | "get">;
55
56
  readonly "/v1/traders/{username}/trades": Pick<SharedPaths["/v1/traders/{username}/trades"], "parameters" | "get">;
56
57
  readonly "/v1/traders/{username}/positions": Pick<SharedPaths["/v1/traders/{username}/positions"], "parameters" | "get">;
@@ -138,4 +139,4 @@ export type paths = {
138
139
  readonly "/v1/makers/{maker_id}/exposure": Pick<SharedPaths["/v1/makers/{maker_id}/exposure"], "parameters" | "get">;
139
140
  readonly "/v1/makers/{maker_id}/performance": Pick<SharedPaths["/v1/makers/{maker_id}/performance"], "parameters" | "get">;
140
141
  };
141
- 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" | "getGenesis" | "getGolden" | "getGoldenMarkets" | "getGoldenOffer" | "getGoldenSuggestions" | "getHypercoreBalance" | "getHypercorePortfolio" | "getHypercoreSettlementCredits" | "getIdentity" | "getMakerActivity" | "getMakerCapital" | "getMakerExposure" | "getMakerPerformance" | "getMakerPosition" | "getMakerQuotes" | "getMakerTelemetry" | "getMakerVaultFundingTransaction" | "getMakerWithdrawal" | "getMarket" | "getMarketDataConfig" | "getMarketDefinitions" | "getMarketDisplay" | "getMarketHistory" | "getMarketRecurringRound" | "getMarketReferenceCloses" | "getMarketRoundHistory" | "getMarketScoreTimeline" | "getMarketStats" | "getMyGenesis" | "getMyReferralBonus" | "getOperation" | "getOutcomeMetadata" | "getOwnMaker" | "getPartnerAccountValue" | "getPartnerReport" | "getPerpMarks" | "getPicture" | "getProfitLeaderboard" | "getQuestion" | "getQuestionRecurringRound" | "getQuestionScoreTimeline" | "getRfq" | "getSeries" | "getSocialLeaderboard" | "getSocialPerson" | "getSocialPosition" | "getSuggestedCombo" | "getTaxonomy" | "getTrader" | "getTraderPnl" | "getUsernameAvailability" | "getVaultAgents" | "getVolumeLeaderboard" | "getWalletApproval" | "getWithdrawal" | "grantComboCopyAgent" | "grantVaultAgent" | "likeComment" | "listAccountActivity" | "listAccountPositions" | "listComboCopies" | "listComboFeed" | "listCommentReplies" | "listComments" | "listControlledMakers" | "listCopiedFills" | "listCopyTrades" | "listDiscovery" | "listFollowingFeed" | "listFollowingPositions" | "listFollows" | "listMakerActivity" | "listMakerPositions" | "listMakerQuoteHistory" | "listMarkets" | "listMyNotifications" | "listOperations" | "listPartnerFills" | "listPartnerWebhookEvents" | "listQuotes" | "listSocialActivity" | "listSocialFeed" | "listSocialPositions" | "listTraderPositions" | "listTraderTrades" | "markMyNotificationsRead" | "placeGolden" | "reactComment" | "recordAcquisition" | "recordGoldenTelegramClick" | "refreshPicture" | "removeUploadedPicture" | "requestComboCopyAgent" | "requestCoreCopyAgent" | "revokeComboCopyAgent" | "searchCatalog" | "setAvatar" | "setCopyAllocation" | "setCopySettings" | "setPublicProfile" | "setUsername" | "setXHandleShown" | "setXPictureShown" | "signGoldenGift" | "stream" | "streamMarkets" | "switchOffComboCopyAgent" | "switchOffCoreCopyAgent" | "unfollowTrader" | "unlikeComment" | "unlockGolden" | "unreactComment" | "uploadPicture">;
142
+ 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" | "getGenesis" | "getGolden" | "getGoldenMarkets" | "getGoldenOffer" | "getGoldenSuggestions" | "getHypercoreBalance" | "getHypercorePortfolio" | "getHypercoreSettlementCredits" | "getIdentity" | "getMakerActivity" | "getMakerCapital" | "getMakerExposure" | "getMakerPerformance" | "getMakerPosition" | "getMakerQuotes" | "getMakerTelemetry" | "getMakerVaultFundingTransaction" | "getMakerWithdrawal" | "getMarket" | "getMarketDataConfig" | "getMarketDefinitions" | "getMarketDisplay" | "getMarketHistory" | "getMarketRecurringRound" | "getMarketReferenceCloses" | "getMarketRoundHistory" | "getMarketScoreTimeline" | "getMarketStats" | "getMyGenesis" | "getMyReferralBonus" | "getOperation" | "getOutcomeMetadata" | "getOwnMaker" | "getPartnerAccountValue" | "getPartnerReport" | "getPerpMarks" | "getPicture" | "getProfitLeaderboard" | "getQuestion" | "getQuestionRecurringRound" | "getQuestionScoreTimeline" | "getRfq" | "getSeries" | "getSocialLeaderboard" | "getSocialPerson" | "getSocialPosition" | "getSuggestedCombo" | "getTaxonomy" | "getTrader" | "getTraderPnl" | "getUsernameAvailability" | "getVaultAgents" | "getVolumeLeaderboard" | "getWalletApproval" | "getWithdrawal" | "grantComboCopyAgent" | "grantVaultAgent" | "likeComment" | "listAccountActivity" | "listAccountPositions" | "listComboCopies" | "listComboFeed" | "listCommentReplies" | "listComments" | "listControlledMakers" | "listCopiedFills" | "listCopyTrades" | "listDiscovery" | "listFollowingFeed" | "listFollowingPositions" | "listFollows" | "listMakerActivity" | "listMakerPositions" | "listMakerQuoteHistory" | "listMarkets" | "listMyNotifications" | "listOperations" | "listPartnerFills" | "listPartnerWebhookEvents" | "listQuotes" | "listSocialActivity" | "listSocialFeed" | "listSocialPositions" | "listTraderPositions" | "listTraderTrades" | "markMyNotificationsRead" | "placeGolden" | "reactComment" | "recordAcquisition" | "recordGoldenTelegramClick" | "refreshPicture" | "removeUploadedPicture" | "requestComboCopyAgent" | "requestCoreCopyAgent" | "revokeComboCopyAgent" | "searchCatalog" | "searchTraders" | "setAvatar" | "setCopyAllocation" | "setCopySettings" | "setPublicProfile" | "setUsername" | "setXHandleShown" | "setXPictureShown" | "signGoldenGift" | "stream" | "streamMarkets" | "switchOffComboCopyAgent" | "switchOffCoreCopyAgent" | "unfollowTrader" | "unlikeComment" | "unlockGolden" | "unreactComment" | "uploadPicture">;
@@ -585,6 +585,7 @@ export declare const operationErrors: {
585
585
  readonly rotateOperatorApiKey: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_REQUEST", "NOT_FOUND", "IDEMPOTENCY_KEY_REUSED", "SECRET_UNAVAILABLE", "KEY_LIMIT_REACHED", "ROTATION_IN_PROGRESS"];
586
586
  readonly rotatePersonalApiKey: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_REQUEST", "NOT_FOUND", "IDEMPOTENCY_KEY_REUSED", "SECRET_UNAVAILABLE", "KEY_LIMIT_REACHED", "ROTATION_IN_PROGRESS"];
587
587
  readonly searchCatalog: readonly ["INVALID_QUERY", "INVALID_CURSOR", "STALE_CURSOR", "MARKET_DATA_UNAVAILABLE", "UNSUPPORTED_BROWSE_CONTRACT", "BROWSE_UNAVAILABLE"];
588
+ readonly searchTraders: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "RATE_LIMITED", "INVALID_QUERY", "SOURCE_UNAVAILABLE"];
588
589
  readonly setAvatar: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_REQUEST", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSED", "IDENTITY_NOT_FOUND", "ORIGIN_REQUIRED"];
589
590
  readonly setCopyAllocation: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "DEPENDENCY_STALE", "INVALID_REQUEST", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSED", "CONTRACT_UNAVAILABLE"];
590
591
  readonly setCopySettings: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "INVALID_REQUEST", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSED", "CONTRACT_UNAVAILABLE"];
@@ -2164,6 +2164,14 @@ export const operationErrors = {
2164
2164
  "UNSUPPORTED_BROWSE_CONTRACT",
2165
2165
  "BROWSE_UNAVAILABLE"
2166
2166
  ],
2167
+ "searchTraders": [
2168
+ "UNAUTHENTICATED",
2169
+ "FORBIDDEN",
2170
+ "AUTHORIZATION_UNAVAILABLE",
2171
+ "RATE_LIMITED",
2172
+ "INVALID_QUERY",
2173
+ "SOURCE_UNAVAILABLE"
2174
+ ],
2167
2175
  "setAvatar": [
2168
2176
  "UNAUTHENTICATED",
2169
2177
  "FORBIDDEN",
@@ -1059,6 +1059,26 @@ export type paths = {
1059
1059
  readonly patch?: never;
1060
1060
  readonly trace?: never;
1061
1061
  };
1062
+ readonly "/v1/traders": {
1063
+ readonly parameters: {
1064
+ readonly query?: never;
1065
+ readonly header?: never;
1066
+ readonly path?: never;
1067
+ readonly cookie?: never;
1068
+ };
1069
+ /**
1070
+ * Find public traders by username
1071
+ * @description Up to 5 traders whose profile is public (PUT /v1/me/public-profile) and whose username starts with q, matched without regard to case, in username order, so the trader whose username is q comes first. They are the traders GET /v1/traders/{username} serves: a private profile, or one held by an account that is not ACTIVE, never matches. Text no username can start with, such as one with a space, matches nobody. Anyone reads it, signed out or with any credential, from any origin; a supplied credential must still authenticate. A signed-out answer is the same for everyone and is cached for 30 seconds. Servers before contract 246 answer 404.
1072
+ */
1073
+ readonly get: operations["searchTraders"];
1074
+ readonly put?: never;
1075
+ readonly post?: never;
1076
+ readonly delete?: never;
1077
+ readonly options?: never;
1078
+ readonly head?: never;
1079
+ readonly patch?: never;
1080
+ readonly trace?: never;
1081
+ };
1062
1082
  readonly "/v1/traders/{username}": {
1063
1083
  readonly parameters: {
1064
1084
  readonly query?: never;
@@ -4472,21 +4492,21 @@ export type components = {
4472
4492
  };
4473
4493
  /** Format: date-time */
4474
4494
  readonly "$defs-Timestamp": string;
4475
- /** @description USDC available on HyperCore for funding. */
4495
+ /** @description USDC available on HyperCore for funding. Every amount is null when account_mode is PORTFOLIO_MARGIN, whose USDC is not defined as total minus hold, and only then. */
4476
4496
  readonly HypercoreFunding: {
4477
4497
  /**
4478
4498
  * @description Hyperliquid account abstraction: STANDARD keeps separate spot and perp balances, UNIFIED and PORTFOLIO_MARGIN pool them, UNKNOWN when the mode could not be read or is unrecognized.
4479
4499
  * @enum {unknown}
4480
4500
  */
4481
4501
  readonly account_mode: "STANDARD" | "UNIFIED" | "PORTFOLIO_MARGIN" | "UNKNOWN";
4482
- /** @description Spot USDC not held by open orders (spot_usdc_total minus spot_usdc_hold), as a decimal string. */
4483
- readonly spot_usdc: string;
4484
- /** @description Withdrawable perp USDC as a decimal string; "0" unless account_mode is STANDARD. */
4485
- readonly perp_usdc: string;
4486
- /** @description Total spot USDC, held or not, as a decimal string; "0" when the account holds no USDC. */
4487
- readonly spot_usdc_total: string;
4488
- /** @description Spot USDC held by open orders, as a decimal string; "0" when the account holds no USDC. */
4489
- readonly spot_usdc_hold: string;
4502
+ /** @description Spot USDC not held by open orders (spot_usdc_total minus spot_usdc_hold), as a decimal string; null in PORTFOLIO_MARGIN. */
4503
+ readonly spot_usdc: string | null;
4504
+ /** @description Withdrawable perp USDC as a decimal string; "0" when account_mode is UNIFIED or UNKNOWN, null in PORTFOLIO_MARGIN. */
4505
+ readonly perp_usdc: string | null;
4506
+ /** @description Total spot USDC, held or not, as a decimal string; "0" when the account holds no USDC, null in PORTFOLIO_MARGIN. */
4507
+ readonly spot_usdc_total: string | null;
4508
+ /** @description Spot USDC held by open orders, as a decimal string; "0" when the account holds no USDC, null in PORTFOLIO_MARGIN. */
4509
+ readonly spot_usdc_hold: string | null;
4490
4510
  };
4491
4511
  readonly HypercorePortfolioPosition: {
4492
4512
  /** @description Hyperliquid HIP-4 outcome ID the balance belongs to. */
@@ -10029,6 +10049,46 @@ export interface operations {
10029
10049
  readonly 503: components["responses"]["Unavailable"];
10030
10050
  };
10031
10051
  };
10052
+ readonly searchTraders: {
10053
+ readonly parameters: {
10054
+ readonly query: {
10055
+ /** @description What the usernames start with. */
10056
+ readonly q: string;
10057
+ };
10058
+ readonly header?: never;
10059
+ readonly path?: never;
10060
+ readonly cookie?: never;
10061
+ };
10062
+ readonly requestBody?: never;
10063
+ readonly responses: {
10064
+ /** @description The matching traders */
10065
+ readonly 200: {
10066
+ headers: {
10067
+ /** @description public, max-age=30 for a signed-out read, which the edge may share; no-store for one with a credential. */
10068
+ readonly "Cache-Control"?: "public, max-age=30" | "no-store";
10069
+ readonly [name: string]: unknown;
10070
+ };
10071
+ content: {
10072
+ readonly "application/json": {
10073
+ readonly items: readonly {
10074
+ readonly username: components["schemas"]["Username"];
10075
+ /** @description The seed clients draw the trader's generated avatar from, as for GET /v1/traders/{username}. */
10076
+ readonly avatar_seed: components["schemas"]["AvatarSeed"];
10077
+ /** @description The picture the trader's profile shows, as for GET /v1/traders/{username}; absent for the generated avatar. */
10078
+ readonly picture_url?: components["schemas"]["ProfilePictureUrl"];
10079
+ /** @description The trader's Genesis Account badge; absent when they have not earned it. */
10080
+ readonly genesis?: components["schemas"]["$defs-Timestamp"];
10081
+ }[];
10082
+ };
10083
+ };
10084
+ };
10085
+ readonly 400: components["responses"]["Error"];
10086
+ readonly 401: components["responses"]["Error"];
10087
+ readonly 403: components["responses"]["Error"];
10088
+ readonly 429: components["responses"]["RateLimited"];
10089
+ readonly 503: components["responses"]["Unavailable"];
10090
+ };
10091
+ };
10032
10092
  readonly getTrader: {
10033
10093
  readonly parameters: {
10034
10094
  readonly query?: never;
@@ -1,5 +1,5 @@
1
- export declare const sdkVersion = "244.0.0-rounds-live-trades";
2
- export declare const openapiSha256 = "5be33e1cd7cb9262f11128c7a87ffd725eb954196764d3a19213fd624f99a4a9";
1
+ export declare const sdkVersion = "246.0.0-trader-search";
2
+ export declare const openapiSha256 = "fcbe32831329289c1999fb3dcab0e0199b850aeaa0911f704fff4c0492ac425d";
3
3
  export declare const realtimeSha256 = "69596dce99d3ebcd4bbac4587e711017b37ce7e7830940c76b1449d78c070da3";
4
4
  export declare const jsonSchemaSha256: {
5
5
  readonly "account.schema.json": "e6cd5a75429d074f23bd7f6ffd370fa59d0e3f7dbd6aef6433e5ba0d21b5baeb";
@@ -7,7 +7,7 @@ export declare const jsonSchemaSha256: {
7
7
  readonly "common.schema.json": "04f51deb3cbea448e59195e26ede3212598d58a7940fe67eb2123fd9161c5edb";
8
8
  readonly "core-exit.schema.json": "c7f617e815225cdcac95c236f8b73fbe288ee5713ff444c3be90eb915fc3a401";
9
9
  readonly "error.schema.json": "f444f3ff2a13553f1eea5eaab0088760862691c0d02c60641065cf46022a743f";
10
- readonly "hypercore.schema.json": "5b89b2bbff7ec8cc1b8717375d12ce9cd5ab6aa5af03c4fdc6cc753ef9583a2c";
10
+ readonly "hypercore.schema.json": "521372f8980353bcdd90ca3d0292bc6b41c69dbad3164bfd501b1ca99dac4cb8";
11
11
  readonly "identity.schema.json": "896d975e5f4076cb34ae33f2dcfc41559fd3df1ed39e3d72ac9e342ca1f957fa";
12
12
  readonly "maker-access.schema.json": "49698ee0235e42064aae0397db1e0f646bdc10d9dfa10121714ba06dd69fee3b";
13
13
  readonly "maker-action.schema.json": "dc41e52c868848e85cdeb918992cb710d34616d2803a63f6d9a658e016744a50";
@@ -19,7 +19,7 @@ export declare const jsonSchemaSha256: {
19
19
  readonly "social.schema.json": "de0ddadf418a41d2c2cbe714afb5c83947cd34e05b8082f0ba016e18e0b3cd51";
20
20
  };
21
21
  export declare const operations: {
22
- 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", "getGenesis", "getGolden", "getGoldenMarkets", "getGoldenOffer", "getGoldenSuggestions", "getHypercoreBalance", "getHypercorePortfolio", "getHypercoreSettlementCredits", "getIdentity", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDataConfig", "getMarketDefinitions", "getMarketDisplay", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketRoundHistory", "getMarketScoreTimeline", "getMarketStats", "getMyGenesis", "getMyReferralBonus", "getOperation", "getOutcomeMetadata", "getOwnMaker", "getPartnerAccountValue", "getPartnerReport", "getPerpMarks", "getPicture", "getProfitLeaderboard", "getQuestion", "getQuestionRecurringRound", "getQuestionScoreTimeline", "getRfq", "getSeries", "getSocialLeaderboard", "getSocialPerson", "getSocialPosition", "getSuggestedCombo", "getTaxonomy", "getTrader", "getTraderPnl", "getUsernameAvailability", "getVaultAgents", "getVolumeLeaderboard", "getWalletApproval", "getWithdrawal", "grantComboCopyAgent", "grantVaultAgent", "likeComment", "listAccountActivity", "listAccountPositions", "listComboCopies", "listComboFeed", "listCommentReplies", "listComments", "listControlledMakers", "listCopiedFills", "listCopyTrades", "listDiscovery", "listFollowingFeed", "listFollowingPositions", "listFollows", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listMyNotifications", "listOperations", "listPartnerFills", "listPartnerWebhookEvents", "listQuotes", "listSocialActivity", "listSocialFeed", "listSocialPositions", "listTraderPositions", "listTraderTrades", "markMyNotificationsRead", "placeGolden", "reactComment", "recordAcquisition", "recordGoldenTelegramClick", "refreshPicture", "removeUploadedPicture", "requestComboCopyAgent", "requestCoreCopyAgent", "revokeComboCopyAgent", "searchCatalog", "setAvatar", "setCopyAllocation", "setCopySettings", "setPublicProfile", "setUsername", "setXHandleShown", "setXPictureShown", "signGoldenGift", "stream", "streamMarkets", "switchOffComboCopyAgent", "switchOffCoreCopyAgent", "unfollowTrader", "unlikeComment", "unlockGolden", "unreactComment", "uploadPicture"];
22
+ 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", "getGenesis", "getGolden", "getGoldenMarkets", "getGoldenOffer", "getGoldenSuggestions", "getHypercoreBalance", "getHypercorePortfolio", "getHypercoreSettlementCredits", "getIdentity", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDataConfig", "getMarketDefinitions", "getMarketDisplay", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketRoundHistory", "getMarketScoreTimeline", "getMarketStats", "getMyGenesis", "getMyReferralBonus", "getOperation", "getOutcomeMetadata", "getOwnMaker", "getPartnerAccountValue", "getPartnerReport", "getPerpMarks", "getPicture", "getProfitLeaderboard", "getQuestion", "getQuestionRecurringRound", "getQuestionScoreTimeline", "getRfq", "getSeries", "getSocialLeaderboard", "getSocialPerson", "getSocialPosition", "getSuggestedCombo", "getTaxonomy", "getTrader", "getTraderPnl", "getUsernameAvailability", "getVaultAgents", "getVolumeLeaderboard", "getWalletApproval", "getWithdrawal", "grantComboCopyAgent", "grantVaultAgent", "likeComment", "listAccountActivity", "listAccountPositions", "listComboCopies", "listComboFeed", "listCommentReplies", "listComments", "listControlledMakers", "listCopiedFills", "listCopyTrades", "listDiscovery", "listFollowingFeed", "listFollowingPositions", "listFollows", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listMyNotifications", "listOperations", "listPartnerFills", "listPartnerWebhookEvents", "listQuotes", "listSocialActivity", "listSocialFeed", "listSocialPositions", "listTraderPositions", "listTraderTrades", "markMyNotificationsRead", "placeGolden", "reactComment", "recordAcquisition", "recordGoldenTelegramClick", "refreshPicture", "removeUploadedPicture", "requestComboCopyAgent", "requestCoreCopyAgent", "revokeComboCopyAgent", "searchCatalog", "searchTraders", "setAvatar", "setCopyAllocation", "setCopySettings", "setPublicProfile", "setUsername", "setXHandleShown", "setXPictureShown", "signGoldenGift", "stream", "streamMarkets", "switchOffComboCopyAgent", "switchOffCoreCopyAgent", "unfollowTrader", "unlikeComment", "unlockGolden", "unreactComment", "uploadPicture"];
23
23
  readonly maker: readonly ["cancelQuote", "confirmQuote", "createCollateralReduction", "createQuote", "getAccountActivity", "getAccountPosition", "getCollateralReduction", "getDeployment", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerTelemetryPublication", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDisplay", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketRoundHistory", "getOperation", "getQuestion", "getQuestionRecurringRound", "getRfq", "getSeries", "getTaxonomy", "listAccountActivity", "listAccountPositions", "listDiscovery", "listMakerAcceptances", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listOperations", "listRfqs", "publishMakerTelemetry", "releaseQuoteLease", "renewQuoteLease", "searchCatalog", "stream", "submitMakerSelfFundedTransaction"];
24
24
  readonly operator: readonly ["live", "ready"];
25
25
  };
@@ -1,6 +1,6 @@
1
1
  // Generated by scripts/generate.mjs; do not edit.
2
- export const sdkVersion = "244.0.0-rounds-live-trades";
3
- export const openapiSha256 = "5be33e1cd7cb9262f11128c7a87ffd725eb954196764d3a19213fd624f99a4a9";
2
+ export const sdkVersion = "246.0.0-trader-search";
3
+ export const openapiSha256 = "fcbe32831329289c1999fb3dcab0e0199b850aeaa0911f704fff4c0492ac425d";
4
4
  export const realtimeSha256 = "69596dce99d3ebcd4bbac4587e711017b37ce7e7830940c76b1449d78c070da3";
5
5
  export const jsonSchemaSha256 = {
6
6
  "account.schema.json": "e6cd5a75429d074f23bd7f6ffd370fa59d0e3f7dbd6aef6433e5ba0d21b5baeb",
@@ -8,7 +8,7 @@ export const jsonSchemaSha256 = {
8
8
  "common.schema.json": "04f51deb3cbea448e59195e26ede3212598d58a7940fe67eb2123fd9161c5edb",
9
9
  "core-exit.schema.json": "c7f617e815225cdcac95c236f8b73fbe288ee5713ff444c3be90eb915fc3a401",
10
10
  "error.schema.json": "f444f3ff2a13553f1eea5eaab0088760862691c0d02c60641065cf46022a743f",
11
- "hypercore.schema.json": "5b89b2bbff7ec8cc1b8717375d12ce9cd5ab6aa5af03c4fdc6cc753ef9583a2c",
11
+ "hypercore.schema.json": "521372f8980353bcdd90ca3d0292bc6b41c69dbad3164bfd501b1ca99dac4cb8",
12
12
  "identity.schema.json": "896d975e5f4076cb34ae33f2dcfc41559fd3df1ed39e3d72ac9e342ca1f957fa",
13
13
  "maker-access.schema.json": "49698ee0235e42064aae0397db1e0f646bdc10d9dfa10121714ba06dd69fee3b",
14
14
  "maker-action.schema.json": "dc41e52c868848e85cdeb918992cb710d34616d2803a63f6d9a658e016744a50",
@@ -153,6 +153,7 @@ export const operations = {
153
153
  "requestCoreCopyAgent",
154
154
  "revokeComboCopyAgent",
155
155
  "searchCatalog",
156
+ "searchTraders",
156
157
  "setAvatar",
157
158
  "setCopyAllocation",
158
159
  "setCopySettings",
@@ -122,10 +122,11 @@ export type CoreAccountMode = "STANDARD" | "UNIFIED" | "PORTFOLIO_MARGIN";
122
122
  * The account's HyperCore USDC as a Combo can bridge it, read from
123
123
  * Hyperliquid. `spendable` is spot USDC `total` less `hold`, then floored
124
124
  * to USDC base units (6 decimals); `hold` already carries order holds and
125
- * position margin. A Portfolio Margin account offers none, as in the Totalis
126
- * app. `setupFee` says whether a bridge from it also pays `coreSetupFee`; it is
127
- * read only when there is something to bridge. Each is `null` when unread or
128
- * unreadable, never 0.
125
+ * position margin. A Portfolio Margin account offers none whatever its spot
126
+ * read says, as in the Totalis app. `setupFee` says whether a bridge from it
127
+ * also pays `coreSetupFee`; it is read only when there is something to
128
+ * bridge. Each is `null` when unread or unreadable, never 0, and all three
129
+ * are `null` when the spot read is Portfolio Margin's and the mode read is not.
129
130
  */
130
131
  export type CoreCash = {
131
132
  readonly mode: CoreAccountMode | null;
package/dist/hypercore.js CHANGED
@@ -198,8 +198,13 @@ export async function readCoreCash(network, account, info = hyperliquidInfo(), s
198
198
  info(network, { type: "spotClearinghouseState", user: account }, signal),
199
199
  ]);
200
200
  const mode = coreMode(settledValue(modeRead));
201
- const spot = spotUsdc(settledValue(spotRead));
202
- const spendable = mode === null || spot === null ? null : mode === "PORTFOLIO_MARGIN" ? 0n : spot;
201
+ if (mode === "PORTFOLIO_MARGIN")
202
+ return { mode, spendable: 0n, setupFee: null };
203
+ const spotAnswer = settledValue(spotRead);
204
+ if (record(spotAnswer) && spotAnswer.portfolioMarginEnabled === true)
205
+ return { mode: null, spendable: null, setupFee: null };
206
+ const spot = spotUsdc(spotAnswer);
207
+ const spendable = mode === null || spot === null ? null : spot;
203
208
  if (spendable === null || spendable === 0n)
204
209
  return { mode, spendable, setupFee: null };
205
210
  const check = await info(network, { type: "preTransferCheck", user: hyperevmUsdcBridge, source: account }, signal).then(setupFeeCharged, () => null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@totalis/hip4-client",
3
- "version": "0.109.0",
3
+ "version": "0.111.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": [