@totalis/hip4-client 0.113.0 → 0.114.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.114.0
7
+
8
+ ### Changed
9
+
10
+ - Referral bonus state (contract `248.0.0-referral-bonus-state`).
11
+ `getMyReferralBonus` answers carry a `state`: `ENABLED` with the bonus as
12
+ before. The type also declares `DISABLED` with only a `reason`,
13
+ `NOT_ENROLLED` (the account owns no invite code that earns it), which a
14
+ later venue release answers instead of `CONTRACT_UNAVAILABLE`; for now that
15
+ account, and a deployment with the bonus off, still get
16
+ `CONTRACT_UNAVAILABLE`. Breaking for types: narrow on `state` before
17
+ reading the bonus fields.
18
+
6
19
  ## 0.113.0
7
20
 
8
21
  ### Deprecated
@@ -1536,7 +1536,7 @@ export type paths = {
1536
1536
  };
1537
1537
  /**
1538
1538
  * Get my referral bonus
1539
- * @description The authenticated account's referral bonus. A referral is someone the account's own invite code admitted; they qualify once their own Combo stake since signing up reaches qualifying_stake, and the account earns bonus for each, up to monthly_cap a UTC month by when each qualified. Referrals past the cap earn nothing that month and nothing carries over. A one-leg entry is a single-market buy, not a Combo, and a golden Combo is not the referral's own stake. The bonus is separate from the fee share in GET /v1/referrals/me. Answers CONTRACT_UNAVAILABLE where the referral bonus is off.
1539
+ * @description The authenticated account's referral bonus. A referral is someone the account's own invite code admitted; they qualify once their own Combo stake since signing up reaches qualifying_stake, and the account earns bonus for each, up to monthly_cap a UTC month by when each qualified. Referrals past the cap earn nothing that month and nothing carries over. A one-leg entry is a single-market buy, not a Combo, and a golden Combo is not the referral's own stake. The bonus is separate from the fee share in GET /v1/referrals/me. state is ENABLED with the bonus, or DISABLED with its reason where the bonus is not on for the account. Answers CONTRACT_UNAVAILABLE where the referral bonus is off, and for now also where it is not on for the account.
1540
1540
  */
1541
1541
  readonly get: operations["getMyReferralBonus"];
1542
1542
  readonly put?: never;
@@ -11200,7 +11200,7 @@ export interface operations {
11200
11200
  };
11201
11201
  readonly requestBody?: never;
11202
11202
  readonly responses: {
11203
- /** @description The referral bonus */
11203
+ /** @description The referral bonus, or why it is not on for the account */
11204
11204
  readonly 200: {
11205
11205
  headers: {
11206
11206
  readonly "Cache-Control"?: "no-store";
@@ -11208,6 +11208,11 @@ export interface operations {
11208
11208
  };
11209
11209
  content: {
11210
11210
  readonly "application/json": {
11211
+ /**
11212
+ * @description ENABLED: the account earns the referral bonus for its referrals.
11213
+ * @constant
11214
+ */
11215
+ readonly state: "ENABLED";
11211
11216
  /** @description A referral qualifies once their own Combo stake since signing up with the account's code reaches this, in HyperEVM USDC base units (10^-6). */
11212
11217
  readonly qualifying_stake: components["schemas"]["$defs-Amount"];
11213
11218
  /** @description What each qualified referral earns, in HyperEVM USDC base units (10^-6). */
@@ -11250,6 +11255,17 @@ export interface operations {
11250
11255
  /** @description Their own Combo stake since then, in HyperEVM USDC base units (10^-6). */
11251
11256
  readonly staked: components["schemas"]["$defs-Amount"];
11252
11257
  }[];
11258
+ } | {
11259
+ /**
11260
+ * @description DISABLED: the account does not earn the referral bonus; reason says why.
11261
+ * @constant
11262
+ */
11263
+ readonly state: "DISABLED";
11264
+ /**
11265
+ * @description Why the account does not earn it. NOT_ENROLLED: the account owns no invite code that earns the bonus, as for an account signed up with a wallet alone, which owns no code.
11266
+ * @enum {string}
11267
+ */
11268
+ readonly reason: "NOT_ENROLLED";
11253
11269
  };
11254
11270
  };
11255
11271
  };
@@ -1,5 +1,5 @@
1
- export declare const sdkVersion = "247.0.0-result-notifications";
2
- export declare const openapiSha256 = "ead4c5ea9d3de5a6dd887e2cd342e08d3aac2c42d7931d7d854725daaa327854";
1
+ export declare const sdkVersion = "248.0.0-referral-bonus-state";
2
+ export declare const openapiSha256 = "d057d88dad100c185d2c0833ceea0bbe41841e18d03b19a04b2c181b814511c2";
3
3
  export declare const realtimeSha256 = "cf0bafff0b355ea9fb642d4a3402dcc2a4e5fc7569a2b448184beb4043d154ef";
4
4
  export declare const jsonSchemaSha256: {
5
5
  readonly "account.schema.json": "e6cd5a75429d074f23bd7f6ffd370fa59d0e3f7dbd6aef6433e5ba0d21b5baeb";
@@ -1,6 +1,6 @@
1
1
  // Generated by scripts/generate.mjs; do not edit.
2
- export const sdkVersion = "247.0.0-result-notifications";
3
- export const openapiSha256 = "ead4c5ea9d3de5a6dd887e2cd342e08d3aac2c42d7931d7d854725daaa327854";
2
+ export const sdkVersion = "248.0.0-referral-bonus-state";
3
+ export const openapiSha256 = "d057d88dad100c185d2c0833ceea0bbe41841e18d03b19a04b2c181b814511c2";
4
4
  export const realtimeSha256 = "cf0bafff0b355ea9fb642d4a3402dcc2a4e5fc7569a2b448184beb4043d154ef";
5
5
  export const jsonSchemaSha256 = {
6
6
  "account.schema.json": "e6cd5a75429d074f23bd7f6ffd370fa59d0e3f7dbd6aef6433e5ba0d21b5baeb",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@totalis/hip4-client",
3
- "version": "0.113.0",
3
+ "version": "0.114.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": [