@totalis/hip4-client 0.94.0 → 0.96.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,34 @@
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.96.0
7
+
8
+ ### Added
9
+
10
+ - Genesis badge on usernames (contract `227.0.0-genesis-badge`). `getIdentity`,
11
+ `getTrader`, comment authors, both leaderboards and `listComboFeed` carry an
12
+ optional `genesis`, when the account earned the Genesis Account badge.
13
+ Others see it only while the account's public profile is on.
14
+
15
+ ## 0.95.0
16
+
17
+ ### Added
18
+
19
+ - Position lists filter on `outcome_id` (contract
20
+ `224.0.0-position-outcome-filter`). `listMakerPositions` and
21
+ `listAccountPositions` return only positions with a leg on that HIP-4
22
+ outcome, resolved or not.
23
+ - Badge notifications (contract `225.0.0-badge-notifications`).
24
+ `listMyNotifications` can answer a notification of kind `BADGE_EARNED`,
25
+ whose `subject` names the badge earned: `GENESIS`, the Genesis Account
26
+ badge (`getMyGenesis`). Clients that switch on `kind` exhaustively must
27
+ handle it.
28
+ - Received Combos on trader profiles (contract `226.0.0-received-combos`).
29
+ `GET /v1/traders/{username}/trades` can answer a trade of kind
30
+ `COMBO_RECEIVED`: a Combo ticket someone else passed to the trader, such as
31
+ a free Combo, with its `combo` and no price. Clients that switch on `kind`
32
+ exhaustively must handle it.
33
+
6
34
  ## 0.94.0
7
35
 
8
36
  ### Added
@@ -1168,6 +1168,11 @@ export type components = {
1168
1168
  * @example LOST
1169
1169
  */
1170
1170
  readonly PositionMakerResultQueryOptional: "WON" | "LOST" | "EVEN";
1171
+ /**
1172
+ * @description Return only positions with a leg on this HIP-4 outcome, resolved or not.
1173
+ * @example 29071
1174
+ */
1175
+ readonly PositionOutcomeQueryOptional: components["schemas"]["UInt32String"];
1171
1176
  /**
1172
1177
  * @description Return only positions with this lifecycle status.
1173
1178
  * @example OPEN
@@ -1654,6 +1659,11 @@ export interface operations {
1654
1659
  * @example LOST
1655
1660
  */
1656
1661
  readonly maker_result?: components["parameters"]["PositionMakerResultQueryOptional"];
1662
+ /**
1663
+ * @description Return only positions with a leg on this HIP-4 outcome, resolved or not.
1664
+ * @example 29071
1665
+ */
1666
+ readonly outcome_id?: components["parameters"]["PositionOutcomeQueryOptional"];
1657
1667
  };
1658
1668
  readonly header?: {
1659
1669
  /** @description Required for browser sessions; API keys do not require an Origin. */
@@ -1713,6 +1723,11 @@ export interface operations {
1713
1723
  * @example LOST
1714
1724
  */
1715
1725
  readonly maker_result?: components["parameters"]["PositionMakerResultQueryOptional"];
1726
+ /**
1727
+ * @description Return only positions with a leg on this HIP-4 outcome, resolved or not.
1728
+ * @example 29071
1729
+ */
1730
+ readonly outcome_id?: components["parameters"]["PositionOutcomeQueryOptional"];
1716
1731
  };
1717
1732
  readonly header?: {
1718
1733
  /** @description Required for browser sessions; API keys do not require an Origin. */
@@ -944,7 +944,7 @@ export type paths = {
944
944
  };
945
945
  /**
946
946
  * List a public trader's trades
947
- * @description A public trader's trades, newest first: each HyperCore fill GET /v1/leaderboard/volume counts as theirs (on their Totalis embedded wallet, or an order the app placed on another linked wallet), each Combo ticket a wallet of theirs opened, when it did (a ticket passed to them on is not their entry), and each sold back from a wallet of theirs, when it was. Poll the first page for new trades; ids are stable. The cursor never expires. 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. A username with no public profile, whether private, unknown or held by an account that is not ACTIVE, is 404 NOT_FOUND, signed in or not.
947
+ * @description A public trader's trades, newest first: each HyperCore fill GET /v1/leaderboard/volume counts as theirs (on their Totalis embedded wallet, or an order the app placed on another linked wallet), each Combo ticket a wallet of theirs opened, when it did (a ticket passed to them is not their entry), each Combo ticket passed to a wallet of theirs from a wallet that was not theirs, when it was (since contract 226), and each sold back from a wallet of theirs, when it was. Poll the first page for new trades; ids are stable. The cursor never expires. 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. A username with no public profile, whether private, unknown or held by an account that is not ACTIVE, is 404 NOT_FOUND, signed in or not.
948
948
  */
949
949
  readonly get: operations["listTraderTrades"];
950
950
  readonly put?: never;
@@ -3054,6 +3054,8 @@ export type components = {
3054
3054
  readonly avatar_seed: components["schemas"]["AvatarSeed"];
3055
3055
  /** @description The trader's X picture, shown in place of the generated avatar; absent when there is none. */
3056
3056
  readonly picture_url?: components["schemas"]["XPictureUrl"];
3057
+ /** @description The trader's Genesis Account badge; absent when they have not earned it. Servers before contract 227 omit it. */
3058
+ readonly genesis?: components["schemas"]["$defs-Timestamp"];
3057
3059
  /** @description HyperEVM block time of the ticket's opening. */
3058
3060
  readonly opened_at: components["schemas"]["$defs-Timestamp"];
3059
3061
  } & components["schemas"]["TraderComboFields"];
@@ -3621,10 +3623,10 @@ export type components = {
3621
3623
  readonly PageLimit: number;
3622
3624
  /** @description Opaque list cursor. Send a previous response's next_cursor back unchanged; never build or parse one. */
3623
3625
  readonly PageCursor: string;
3626
+ readonly UInt32String: string;
3624
3627
  readonly LowercaseNonZeroAddress: string;
3625
3628
  /** @description 3 to 20 lowercase letters, digits or underscores. Unique across accounts. */
3626
3629
  readonly Username: string;
3627
- readonly UInt32String: string;
3628
3630
  readonly Leg: {
3629
3631
  /** @description HIP-4 outcome ID of the leg, as a decimal string. */
3630
3632
  readonly outcome_id: components["schemas"]["UInt32String"];
@@ -4203,6 +4205,8 @@ export type components = {
4203
4205
  readonly x_username?: components["schemas"]["XUsername"];
4204
4206
  /** @description Whether the public trader profile shows x_username: true until the account hides it with PUT /v1/me/public-profile/x, whether or not X is linked. Servers before contract 210 omit it. */
4205
4207
  readonly x_shown?: boolean;
4208
+ /** @description The account's Genesis Account badge (GET /v1/me/genesis), shown whether or not its public profile is on; absent until it is earned. Servers before contract 227 omit it. */
4209
+ readonly genesis?: components["schemas"]["$defs-Timestamp"];
4206
4210
  };
4207
4211
  readonly NonZeroAddress: components["schemas"]["Address"] & unknown;
4208
4212
  /** Format: uri */
@@ -4989,6 +4993,8 @@ export type components = {
4989
4993
  readonly avatar_seed: components["schemas"]["AvatarSeed"];
4990
4994
  /** @description The author's X picture, as GET /v1/me serves it to them; absent when the server has none. Servers before contract 186 omit it. */
4991
4995
  readonly picture_url?: components["schemas"]["XPictureUrl"];
4996
+ /** @description The author's Genesis Account badge, read now; absent when they have not earned it or have their public profile off. Servers before contract 227 omit it. */
4997
+ readonly genesis?: components["schemas"]["$defs-Timestamp"];
4992
4998
  } | null;
4993
4999
  /** @description The text, or null once it is deleted. */
4994
5000
  readonly body: components["schemas"]["CommentBody"] | null;
@@ -6606,6 +6612,11 @@ export type components = {
6606
6612
  * @example LOST
6607
6613
  */
6608
6614
  readonly PositionMakerResultQueryOptional: "WON" | "LOST" | "EVEN";
6615
+ /**
6616
+ * @description Return only positions with a leg on this HIP-4 outcome, resolved or not.
6617
+ * @example 29071
6618
+ */
6619
+ readonly PositionOutcomeQueryOptional: components["schemas"]["UInt32String"];
6609
6620
  /**
6610
6621
  * @description Position ID: the contract's ticketId (lowercase bytes32 hex).
6611
6622
  * @example 0x5e0f6a2b8c4d1e3f7a9b0c2d4e6f8a1b3c5d7e9f0a2b4c6d8e0f1a3b5c7d9e1f
@@ -6867,6 +6878,11 @@ export interface operations {
6867
6878
  * @example LOST
6868
6879
  */
6869
6880
  readonly maker_result?: components["parameters"]["PositionMakerResultQueryOptional"];
6881
+ /**
6882
+ * @description Return only positions with a leg on this HIP-4 outcome, resolved or not.
6883
+ * @example 29071
6884
+ */
6885
+ readonly outcome_id?: components["parameters"]["PositionOutcomeQueryOptional"];
6870
6886
  };
6871
6887
  readonly header?: {
6872
6888
  /**
@@ -7014,6 +7030,11 @@ export interface operations {
7014
7030
  * @example LOST
7015
7031
  */
7016
7032
  readonly maker_result?: components["parameters"]["PositionMakerResultQueryOptional"];
7033
+ /**
7034
+ * @description Return only positions with a leg on this HIP-4 outcome, resolved or not.
7035
+ * @example 29071
7036
+ */
7037
+ readonly outcome_id?: components["parameters"]["PositionOutcomeQueryOptional"];
7017
7038
  };
7018
7039
  readonly header?: {
7019
7040
  /**
@@ -8460,6 +8481,8 @@ export interface operations {
8460
8481
  readonly avatar_seed?: components["schemas"]["AvatarSeed"];
8461
8482
  /** @description The profile picture of the X account linked to the trader's Privy login, which clients show in place of the generated avatar. The same picture GET /v1/me serves the trader, as of when the ranking was read. Absent when the server has no picture for the trader. Servers before contract 167 omit it. */
8462
8483
  readonly picture_url?: components["schemas"]["XPictureUrl"];
8484
+ /** @description The Genesis Account badge, as of when the ranking was read: absent when the trader has not earned it or has their public profile off. Servers before contract 227 omit it. */
8485
+ readonly genesis?: components["schemas"]["$defs-Timestamp"];
8463
8486
  /** @description USDC in units of 10^-8, always above zero. */
8464
8487
  readonly volume: components["schemas"]["$defs-Amount"];
8465
8488
  }[];
@@ -8514,6 +8537,8 @@ export interface operations {
8514
8537
  readonly avatar_seed: components["schemas"]["AvatarSeed"];
8515
8538
  /** @description The profile picture of the X account linked to the trader's Privy login, which clients show in place of the generated avatar. The same picture GET /v1/me serves the trader, as of when the ranking was read. Absent when the server has no picture for the trader. Servers before contract 167 omit it. */
8516
8539
  readonly picture_url?: components["schemas"]["XPictureUrl"];
8540
+ /** @description The Genesis Account badge, as of when the ranking was read: absent when the trader has not earned it or has their public profile off. Servers before contract 227 omit it. */
8541
+ readonly genesis?: components["schemas"]["$defs-Timestamp"];
8517
8542
  /** @description USDC in atomic units (10^-6), always above zero. */
8518
8543
  readonly profit: components["schemas"]["$defs-Amount"];
8519
8544
  }[];
@@ -8629,6 +8654,8 @@ export interface operations {
8629
8654
  readonly picture_url?: components["schemas"]["XPictureUrl"];
8630
8655
  /** @description The handle of the X account linked to the trader's Privy login, as for GET /v1/me. Absent when there is none or the trader hid it with PUT /v1/me/public-profile/x; a signed-out answer the edge cached may show it for up to 30 seconds after it changes. Servers before contract 210 omit it. */
8631
8656
  readonly x_username?: components["schemas"]["XUsername"];
8657
+ /** @description The trader's Genesis Account badge; absent when they have not earned it. Servers before contract 227 omit it. */
8658
+ readonly genesis?: components["schemas"]["$defs-Timestamp"];
8632
8659
  /** @description The account wallet the trader trades from, as GET /v1/me shows it to them. */
8633
8660
  readonly account: components["schemas"]["LowercaseNonZeroAddress"];
8634
8661
  /** @description When the trader turned the profile on. */
@@ -8695,11 +8722,11 @@ export interface operations {
8695
8722
  /** @description Stable, opaque ID of the trade: the same trade has the same ID on every read, so a client polling the first page drops what it has seen. */
8696
8723
  readonly id: string;
8697
8724
  /**
8698
- * @description CORE_FILL: a HyperCore fill, in fill. COMBO_ENTRY: a Combo ticket the trader opened, in combo. COMBO_CASHOUT: a Combo ticket the trader sold back, in combo; the sale price is not shown.
8725
+ * @description CORE_FILL: a HyperCore fill, in fill. COMBO_ENTRY: a Combo ticket the trader opened, in combo. COMBO_RECEIVED: a Combo ticket someone else passed to the trader, such as a free Combo, in combo; any price it passed at is not shown, and it adds nothing to volume. Servers before contract 226 leave it out. COMBO_CASHOUT: a Combo ticket the trader sold back, in combo; the sale price is not shown.
8699
8726
  * @enum {string}
8700
8727
  */
8701
- readonly kind: "CORE_FILL" | "COMBO_ENTRY" | "COMBO_CASHOUT";
8702
- /** @description When it happened: the fill's HyperCore block time, or the HyperEVM block time of the ticket's opening or sale. */
8728
+ readonly kind: "CORE_FILL" | "COMBO_ENTRY" | "COMBO_RECEIVED" | "COMBO_CASHOUT";
8729
+ /** @description When it happened: the fill's HyperCore block time, or the HyperEVM block time of the ticket's opening, passing or sale. */
8703
8730
  readonly at: components["schemas"]["$defs-Timestamp"];
8704
8731
  /** TraderFill */
8705
8732
  readonly fill?: {
@@ -9254,11 +9281,11 @@ export interface operations {
9254
9281
  */
9255
9282
  readonly id: string;
9256
9283
  /**
9257
- * @description What happened. FEATURE_UNLOCKED: the account unlocked the feature named by subject. ANNOUNCEMENT: Totalis sent a message, in title, body and link. A client shows only kinds it knows.
9284
+ * @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.
9258
9285
  * @enum {string}
9259
9286
  */
9260
- readonly kind: "FEATURE_UNLOCKED" | "ANNOUNCEMENT";
9261
- /** @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. A client shows only subjects it knows. */
9287
+ readonly kind: "FEATURE_UNLOCKED" | "ANNOUNCEMENT" | "BADGE_EARNED";
9288
+ /** @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. */
9262
9289
  readonly subject: string;
9263
9290
  /** Format: date-time */
9264
9291
  readonly created_at: string;
@@ -1,14 +1,14 @@
1
- export declare const sdkVersion = "223.0.0-announcements";
2
- export declare const openapiSha256 = "c66b5d72a81151c7e70f54c9d8ca6641d72adadc12e1c17c7fdb66578729e7c9";
1
+ export declare const sdkVersion = "227.0.0-genesis-badge";
2
+ export declare const openapiSha256 = "110977fb90ba64f8d7e1317a7053fa93d75aaff9b16cee63dea4abd20da505ca";
3
3
  export declare const realtimeSha256 = "32e56c8bb642401f5b03e9c38274087c09bebb73ffe60c0d34432c2e78ce1e15";
4
4
  export declare const jsonSchemaSha256: {
5
5
  readonly "account.schema.json": "c11a94438d5f7b54e08d3b559098ce2671f4c9aad3a79feb684b7a81f77d809a";
6
- readonly "comments.schema.json": "7cb61352e5a0280fa34951fdcc2d934062bf628da4743f0dc8c763d0b79b7611";
6
+ readonly "comments.schema.json": "b3e35b9b1bd90b763658fcd25910ec123d44713cdf608b4e52667c91b78f0aa5";
7
7
  readonly "common.schema.json": "04f51deb3cbea448e59195e26ede3212598d58a7940fe67eb2123fd9161c5edb";
8
8
  readonly "core-exit.schema.json": "c7f617e815225cdcac95c236f8b73fbe288ee5713ff444c3be90eb915fc3a401";
9
9
  readonly "error.schema.json": "a980d4d81ea2f8528d24d79a6cf3823b15690d21e81a1852039ae12c4ce0a393";
10
10
  readonly "hypercore.schema.json": "5b89b2bbff7ec8cc1b8717375d12ce9cd5ab6aa5af03c4fdc6cc753ef9583a2c";
11
- readonly "identity.schema.json": "f369f35c612dabd076a6e9525791a008797b8cdbb7e5a5f246b242bad4739aa8";
11
+ readonly "identity.schema.json": "02e333b88c82d89abd6f1c9b739935db1701c67aa53b4fcc487f1d78d8c99dcc";
12
12
  readonly "maker-access.schema.json": "49698ee0235e42064aae0397db1e0f646bdc10d9dfa10121714ba06dd69fee3b";
13
13
  readonly "maker-action.schema.json": "dc41e52c868848e85cdeb918992cb710d34616d2803a63f6d9a658e016744a50";
14
14
  readonly "maker-telemetry.schema.json": "85b111ce0f4935299d1116071b43de12e775bef4e0c283c12f19046d34374a9c";
@@ -1,15 +1,15 @@
1
1
  // Generated by scripts/generate.mjs; do not edit.
2
- export const sdkVersion = "223.0.0-announcements";
3
- export const openapiSha256 = "c66b5d72a81151c7e70f54c9d8ca6641d72adadc12e1c17c7fdb66578729e7c9";
2
+ export const sdkVersion = "227.0.0-genesis-badge";
3
+ export const openapiSha256 = "110977fb90ba64f8d7e1317a7053fa93d75aaff9b16cee63dea4abd20da505ca";
4
4
  export const realtimeSha256 = "32e56c8bb642401f5b03e9c38274087c09bebb73ffe60c0d34432c2e78ce1e15";
5
5
  export const jsonSchemaSha256 = {
6
6
  "account.schema.json": "c11a94438d5f7b54e08d3b559098ce2671f4c9aad3a79feb684b7a81f77d809a",
7
- "comments.schema.json": "7cb61352e5a0280fa34951fdcc2d934062bf628da4743f0dc8c763d0b79b7611",
7
+ "comments.schema.json": "b3e35b9b1bd90b763658fcd25910ec123d44713cdf608b4e52667c91b78f0aa5",
8
8
  "common.schema.json": "04f51deb3cbea448e59195e26ede3212598d58a7940fe67eb2123fd9161c5edb",
9
9
  "core-exit.schema.json": "c7f617e815225cdcac95c236f8b73fbe288ee5713ff444c3be90eb915fc3a401",
10
10
  "error.schema.json": "a980d4d81ea2f8528d24d79a6cf3823b15690d21e81a1852039ae12c4ce0a393",
11
11
  "hypercore.schema.json": "5b89b2bbff7ec8cc1b8717375d12ce9cd5ab6aa5af03c4fdc6cc753ef9583a2c",
12
- "identity.schema.json": "f369f35c612dabd076a6e9525791a008797b8cdbb7e5a5f246b242bad4739aa8",
12
+ "identity.schema.json": "02e333b88c82d89abd6f1c9b739935db1701c67aa53b4fcc487f1d78d8c99dcc",
13
13
  "maker-access.schema.json": "49698ee0235e42064aae0397db1e0f646bdc10d9dfa10121714ba06dd69fee3b",
14
14
  "maker-action.schema.json": "dc41e52c868848e85cdeb918992cb710d34616d2803a63f6d9a658e016744a50",
15
15
  "maker-telemetry.schema.json": "85b111ce0f4935299d1116071b43de12e775bef4e0c283c12f19046d34374a9c",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@totalis/hip4-client",
3
- "version": "0.94.0",
3
+ "version": "0.96.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": [