@totalis/hip4-client 0.111.0 → 0.112.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,20 @@
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.112.0
7
+
8
+ ### Added
9
+
10
+ Contract `247.0.0-result-notifications`, additive:
11
+
12
+ - Result notifications (TT-2875). `listMyNotifications` can answer kind
13
+ `COMBO_RESULT`, whose `subject` is the settled Combo's `position_id`, and
14
+ `SINGLE_RESULT`, whose `subject` is the HyperCore settlement credit's
15
+ `settlement_id`. `subject` now also matches those ids.
16
+ - The account stream sends `NOTIFICATION_CREATED` when a notification is
17
+ recorded for the account, with its `notification_id` and `kind`; reread
18
+ `listMyNotifications`.
19
+
6
20
  ## 0.111.0
7
21
 
8
22
  ### Added
@@ -1328,7 +1328,7 @@ export type paths = {
1328
1328
  };
1329
1329
  /**
1330
1330
  * Get one page of the leaderboard
1331
- * @description One page of 25 ranks of people with a public profile, by volume or P&L over the range, and the reader's own rank wherever it falls. Volume is GET /v1/social/people/{username}'s over the range: their account wallet's buys and sells and the Combos it opened; only people who traded rank, and a person whose volume is unknown (null on the profile) is left out. P&L is GET /v1/traders/{username}/pnl's change over the range (ALL: since it began), losses included; only people whose P&L over the range is not zero, or who traded in it (a HyperCore fill or Settlement credit, or a Combo paid for, sold, cashed out or settled; a Combo given or received free is not a trade), rank, so nobody ranks at 0 for doing nothing. Left out: the leaderboard's known roles (house market maker, makers, API operators, promotion accounts) and anyone whose profile is not public at the time of the read, even in a ranking read while it was; the ranks below close up. Ties rank by username. A ranking is read every five minutes and kept for an hour; as_of says which one a page comes from. Pass it back as as_of for the later pages, so every page and the reader's rank come from that ranking; without it the answer is the newest. An as_of no longer kept is 409 CURSOR_EXPIRED: read the first page again. Until the first read, once the newest is an hour old, and for VOLUME while the holdings ledger is behind (not yet caught up, or stopped for over five minutes), whatever as_of, the answer is 503 DEPENDENCY_STALE; a deployment with the leaderboard off, or P&L not ranked, answers 503 CONTRACT_UNAVAILABLE. Only a signed-in participant session reads it: anonymous calls and API keys are refused.
1331
+ * @description One page of 25 ranks of people with a public profile, by volume or P&L over the range, and the reader's own rank wherever it falls. Volume is GET /v1/social/people/{username}'s over the range, from the start of its hour: every dollar their account wallet moved in or out of a trade, before fees, its buys and sells, what its results paid and the Combos it opened, each stake and what it paid back when sold back or settled; only people who traded rank, and a person whose volume is unknown (null on the profile) is left out. P&L is GET /v1/traders/{username}/pnl's change over the range (ALL: since it began), losses included; only people whose P&L over the range is not zero, or who traded in it (a HyperCore fill or Settlement credit, or a Combo paid for, sold, cashed out or settled; a Combo given or received free is not a trade), rank, so nobody ranks at 0 for doing nothing. Left out: the leaderboard's known roles (house market maker, makers, API operators, promotion accounts) and anyone whose profile is not public at the time of the read, even in a ranking read while it was; the ranks below close up. Ties rank by username. A ranking is read every five minutes and kept for an hour; as_of says which one a page comes from. Pass it back as as_of for the later pages, so every page and the reader's rank come from that ranking; without it the answer is the newest. An as_of no longer kept is 409 CURSOR_EXPIRED: read the first page again. Until the first read, once the newest is an hour old, and for VOLUME while the holdings ledger is behind (not yet caught up, or stopped for over five minutes), whatever as_of, the answer is 503 DEPENDENCY_STALE; a deployment with the leaderboard off, or P&L not ranked, answers 503 CONTRACT_UNAVAILABLE. Only a signed-in participant session reads it: anonymous calls and API keys are refused.
1332
1332
  */
1333
1333
  readonly get: operations["getSocialLeaderboard"];
1334
1334
  readonly put?: never;
@@ -5681,7 +5681,7 @@ export type components = {
5681
5681
  readonly followers: number;
5682
5682
  /** @description Whether the reading account follows them. Absent without a participant session. */
5683
5683
  readonly following?: boolean;
5684
- /** @description All-time volume in 10^-8 USDC: price times size, before fees, of every buy and sell their account wallet made on a HIP-4 outcome quoted in USDC, plus the stake of every Combo ticket it opened. These are the trades their positions and activity list, and what GET /v1/social/leaderboard ranks; an outcome quoted in another asset (USDH, mainnet outcomes 0 to 83) adds nothing. Null, unknown, while the holdings ledger does not yet write their account wallet's trades. */
5684
+ /** @description All-time volume in 10^-8 USDC: every dollar their account wallet moved in or out of a trade, before fees. On HIP-4 outcomes quoted in USDC, price times size of every buy and sell and of its side of every result (a loss adds nothing, a refund half; converting shares adds nothing); on Combos, the stake of every ticket it opened and what that ticket paid it back when sold back or settled. What GET /v1/social/leaderboard ranks; an outcome quoted in another asset (USDH, mainnet outcomes 0 to 83) adds nothing. Null, unknown, while the holdings ledger does not yet write their account wallet's trades, or while a Combo log it counts has no block time read yet. */
5685
5685
  readonly volume: components["schemas"]["$defs-Amount"] | null;
5686
5686
  /** @description What everything they hold is worth now in 10^-8 USDC, the sum of the values GET /v1/social/people/{username}/positions lists, as Portfolio values its own. Null when any one is unknown, never short. */
5687
5687
  readonly positions_value: components["schemas"]["$defs-Amount"] | null;
@@ -11038,11 +11038,11 @@ export interface operations {
11038
11038
  */
11039
11039
  readonly id: string;
11040
11040
  /**
11041
- * @description What happened. FEATURE_UNLOCKED: the account unlocked the feature named by subject. ANNOUNCEMENT: Totalis sent a message, in title, body and link. BADGE_EARNED: the account earned the badge named by subject. A client shows only kinds it knows.
11041
+ * @description What happened. FEATURE_UNLOCKED: the account unlocked the feature named by subject. ANNOUNCEMENT: Totalis sent a message, in title, body and link. BADGE_EARNED: the account earned the badge named by subject. COMBO_RESULT: a Combo the account held settled. SINGLE_RESULT: a HyperCore position the account held settled. A client shows only kinds it knows.
11042
11042
  * @enum {string}
11043
11043
  */
11044
- readonly kind: "FEATURE_UNLOCKED" | "ANNOUNCEMENT" | "BADGE_EARNED";
11045
- /** @description What the notification is about. For FEATURE_UNLOCKED, the feature: REFERRALS, the account's own invite link, which admits people once the account has traded $5. For ANNOUNCEMENT, an opaque id of the message. For BADGE_EARNED, the badge: GENESIS, the Genesis Account badge (GET /v1/me/genesis). A client shows only subjects it knows. */
11044
+ readonly kind: "FEATURE_UNLOCKED" | "ANNOUNCEMENT" | "BADGE_EARNED" | "COMBO_RESULT" | "SINGLE_RESULT";
11045
+ /** @description What the notification is about. For FEATURE_UNLOCKED, the feature: REFERRALS, the account's own invite link, which admits people once the account has traded $5. For ANNOUNCEMENT, an opaque id of the message. For BADGE_EARNED, the badge: GENESIS, the Genesis Account badge (GET /v1/me/genesis). For COMBO_RESULT, the position_id of the Combo, as GET /v1/me/positions names it. For SINGLE_RESULT, the settlement_id of the credit, as GET /v1/hypercore/settlement-credits names it. A client shows only subjects it knows. */
11046
11046
  readonly subject: string;
11047
11047
  /** Format: date-time */
11048
11048
  readonly created_at: string;
@@ -191,6 +191,16 @@ export type components = {
191
191
  /** @description Log index of the change within its block. */
192
192
  readonly log_index: number;
193
193
  };
194
+ /** @description A notification was recorded for the account. */
195
+ readonly NotificationCreatedPayload: {
196
+ /**
197
+ * Format: uuid
198
+ * @description The notification, as GET /v1/me/notifications lists it.
199
+ */
200
+ readonly notification_id: string;
201
+ /** @description The notification's kind. A client acts only on kinds it knows. */
202
+ readonly kind: string;
203
+ };
194
204
  readonly EventBase: {
195
205
  /** @description Cursor of this event. Persist it after applying the event and resume after it. */
196
206
  readonly cursor: components["schemas"]["Cursor"];
@@ -203,7 +213,7 @@ export type components = {
203
213
  * @description What changed. The value selects the payload shape.
204
214
  * @enum {unknown}
205
215
  */
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";
216
+ 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" | "NOTIFICATION_CREATED";
207
217
  /**
208
218
  * Format: date-time
209
219
  * @description When the authoritative state transition happened, RFC3339 UTC. Measure receipt time locally.
@@ -361,6 +371,14 @@ export type components = {
361
371
  readonly event_type: "MAKER_CAPITAL_UPDATED";
362
372
  /** @description The maker and where the change happened on chain; reread its capital. */
363
373
  readonly payload: components["schemas"]["MakerCapitalPayload"];
374
+ }) | (components["schemas"]["EventBase"] & {
375
+ /**
376
+ * @description NOTIFICATION_CREATED: a notification was recorded for you. Account stream only.
377
+ * @constant
378
+ */
379
+ readonly event_type: "NOTIFICATION_CREATED";
380
+ /** @description The notification and its kind; reread GET /v1/me/notifications. */
381
+ readonly payload: components["schemas"]["NotificationCreatedPayload"];
364
382
  });
365
383
  readonly PublicationCheckpoint: {
366
384
  /** @description Every authorized event up to this cursor was published and delivered on this socket before this frame. */
@@ -1,6 +1,6 @@
1
- export declare const sdkVersion = "246.0.0-trader-search";
2
- export declare const openapiSha256 = "fcbe32831329289c1999fb3dcab0e0199b850aeaa0911f704fff4c0492ac425d";
3
- export declare const realtimeSha256 = "69596dce99d3ebcd4bbac4587e711017b37ce7e7830940c76b1449d78c070da3";
1
+ export declare const sdkVersion = "247.0.0-result-notifications";
2
+ export declare const openapiSha256 = "206fd68e1ad4ca3d46dbe2fc5cc8e5fda86d6f06d3dacbb6c961304b5f794dc5";
3
+ export declare const realtimeSha256 = "cf0bafff0b355ea9fb642d4a3402dcc2a4e5fc7569a2b448184beb4043d154ef";
4
4
  export declare const jsonSchemaSha256: {
5
5
  readonly "account.schema.json": "e6cd5a75429d074f23bd7f6ffd370fa59d0e3f7dbd6aef6433e5ba0d21b5baeb";
6
6
  readonly "comments.schema.json": "5773471b4442ba9d8af0dc012d71561baaf50d0e1c2571039241780848edb4a4";
@@ -15,8 +15,8 @@ export declare const jsonSchemaSha256: {
15
15
  readonly "market-data.schema.json": "8fbe5fab071fb2c99328a48abaeb436d514eb7c36c7d19dde465862c04a6129e";
16
16
  readonly "product-metadata.schema.json": "7c8ffbde878a0aedaed16814fcfd2e80038054b140886cc8736bb7b508042631";
17
17
  readonly "quote.schema.json": "52ee1f4708c8b1504e4cd2f2f9279e14c8ec8aeacac1f491441ae0e15ac3c71a";
18
- readonly "realtime.schema.json": "69596dce99d3ebcd4bbac4587e711017b37ce7e7830940c76b1449d78c070da3";
19
- readonly "social.schema.json": "de0ddadf418a41d2c2cbe714afb5c83947cd34e05b8082f0ba016e18e0b3cd51";
18
+ readonly "realtime.schema.json": "cf0bafff0b355ea9fb642d4a3402dcc2a4e5fc7569a2b448184beb4043d154ef";
19
+ readonly "social.schema.json": "42afe3d8efbc483a761596538606ec3f83689881a1af7f52edcff389c92537be";
20
20
  };
21
21
  export declare const operations: {
22
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"];
@@ -1,7 +1,7 @@
1
1
  // Generated by scripts/generate.mjs; do not edit.
2
- export const sdkVersion = "246.0.0-trader-search";
3
- export const openapiSha256 = "fcbe32831329289c1999fb3dcab0e0199b850aeaa0911f704fff4c0492ac425d";
4
- export const realtimeSha256 = "69596dce99d3ebcd4bbac4587e711017b37ce7e7830940c76b1449d78c070da3";
2
+ export const sdkVersion = "247.0.0-result-notifications";
3
+ export const openapiSha256 = "206fd68e1ad4ca3d46dbe2fc5cc8e5fda86d6f06d3dacbb6c961304b5f794dc5";
4
+ export const realtimeSha256 = "cf0bafff0b355ea9fb642d4a3402dcc2a4e5fc7569a2b448184beb4043d154ef";
5
5
  export const jsonSchemaSha256 = {
6
6
  "account.schema.json": "e6cd5a75429d074f23bd7f6ffd370fa59d0e3f7dbd6aef6433e5ba0d21b5baeb",
7
7
  "comments.schema.json": "5773471b4442ba9d8af0dc012d71561baaf50d0e1c2571039241780848edb4a4",
@@ -16,8 +16,8 @@ export const jsonSchemaSha256 = {
16
16
  "market-data.schema.json": "8fbe5fab071fb2c99328a48abaeb436d514eb7c36c7d19dde465862c04a6129e",
17
17
  "product-metadata.schema.json": "7c8ffbde878a0aedaed16814fcfd2e80038054b140886cc8736bb7b508042631",
18
18
  "quote.schema.json": "52ee1f4708c8b1504e4cd2f2f9279e14c8ec8aeacac1f491441ae0e15ac3c71a",
19
- "realtime.schema.json": "69596dce99d3ebcd4bbac4587e711017b37ce7e7830940c76b1449d78c070da3",
20
- "social.schema.json": "de0ddadf418a41d2c2cbe714afb5c83947cd34e05b8082f0ba016e18e0b3cd51"
19
+ "realtime.schema.json": "cf0bafff0b355ea9fb642d4a3402dcc2a4e5fc7569a2b448184beb4043d154ef",
20
+ "social.schema.json": "42afe3d8efbc483a761596538606ec3f83689881a1af7f52edcff389c92537be"
21
21
  };
22
22
  export const operations = {
23
23
  "client": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@totalis/hip4-client",
3
- "version": "0.111.0",
3
+ "version": "0.112.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": [