@totalis/hip4-client 0.93.1 → 0.95.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.95.0
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Position lists filter on `outcome_id` (contract
|
|
11
|
+
`224.0.0-position-outcome-filter`). `listMakerPositions` and
|
|
12
|
+
`listAccountPositions` return only positions with a leg on that HIP-4
|
|
13
|
+
outcome, resolved or not.
|
|
14
|
+
- Badge notifications (contract `225.0.0-badge-notifications`).
|
|
15
|
+
`listMyNotifications` can answer a notification of kind `BADGE_EARNED`,
|
|
16
|
+
whose `subject` names the badge earned: `GENESIS`, the Genesis Account
|
|
17
|
+
badge (`getMyGenesis`). Clients that switch on `kind` exhaustively must
|
|
18
|
+
handle it.
|
|
19
|
+
- Received Combos on trader profiles (contract `226.0.0-received-combos`).
|
|
20
|
+
`GET /v1/traders/{username}/trades` can answer a trade of kind
|
|
21
|
+
`COMBO_RECEIVED`: a Combo ticket someone else passed to the trader, such as
|
|
22
|
+
a free Combo, with its `combo` and no price. Clients that switch on `kind`
|
|
23
|
+
exhaustively must handle it.
|
|
24
|
+
|
|
25
|
+
## 0.94.0
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- Announcements (contract `223.0.0-announcements`). `listMyNotifications`
|
|
30
|
+
can answer a notification of kind `ANNOUNCEMENT`, a message Totalis sent,
|
|
31
|
+
with optional `title`, `body` and `link` (an app path starting with `/` or
|
|
32
|
+
an https URL). Clients that switch on `kind` exhaustively must handle it.
|
|
33
|
+
|
|
6
34
|
## 0.93.1
|
|
7
35
|
|
|
8
36
|
### Fixed
|
|
@@ -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
|
|
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;
|
|
@@ -3621,10 +3621,10 @@ export type components = {
|
|
|
3621
3621
|
readonly PageLimit: number;
|
|
3622
3622
|
/** @description Opaque list cursor. Send a previous response's next_cursor back unchanged; never build or parse one. */
|
|
3623
3623
|
readonly PageCursor: string;
|
|
3624
|
+
readonly UInt32String: string;
|
|
3624
3625
|
readonly LowercaseNonZeroAddress: string;
|
|
3625
3626
|
/** @description 3 to 20 lowercase letters, digits or underscores. Unique across accounts. */
|
|
3626
3627
|
readonly Username: string;
|
|
3627
|
-
readonly UInt32String: string;
|
|
3628
3628
|
readonly Leg: {
|
|
3629
3629
|
/** @description HIP-4 outcome ID of the leg, as a decimal string. */
|
|
3630
3630
|
readonly outcome_id: components["schemas"]["UInt32String"];
|
|
@@ -6606,6 +6606,11 @@ export type components = {
|
|
|
6606
6606
|
* @example LOST
|
|
6607
6607
|
*/
|
|
6608
6608
|
readonly PositionMakerResultQueryOptional: "WON" | "LOST" | "EVEN";
|
|
6609
|
+
/**
|
|
6610
|
+
* @description Return only positions with a leg on this HIP-4 outcome, resolved or not.
|
|
6611
|
+
* @example 29071
|
|
6612
|
+
*/
|
|
6613
|
+
readonly PositionOutcomeQueryOptional: components["schemas"]["UInt32String"];
|
|
6609
6614
|
/**
|
|
6610
6615
|
* @description Position ID: the contract's ticketId (lowercase bytes32 hex).
|
|
6611
6616
|
* @example 0x5e0f6a2b8c4d1e3f7a9b0c2d4e6f8a1b3c5d7e9f0a2b4c6d8e0f1a3b5c7d9e1f
|
|
@@ -6867,6 +6872,11 @@ export interface operations {
|
|
|
6867
6872
|
* @example LOST
|
|
6868
6873
|
*/
|
|
6869
6874
|
readonly maker_result?: components["parameters"]["PositionMakerResultQueryOptional"];
|
|
6875
|
+
/**
|
|
6876
|
+
* @description Return only positions with a leg on this HIP-4 outcome, resolved or not.
|
|
6877
|
+
* @example 29071
|
|
6878
|
+
*/
|
|
6879
|
+
readonly outcome_id?: components["parameters"]["PositionOutcomeQueryOptional"];
|
|
6870
6880
|
};
|
|
6871
6881
|
readonly header?: {
|
|
6872
6882
|
/**
|
|
@@ -7014,6 +7024,11 @@ export interface operations {
|
|
|
7014
7024
|
* @example LOST
|
|
7015
7025
|
*/
|
|
7016
7026
|
readonly maker_result?: components["parameters"]["PositionMakerResultQueryOptional"];
|
|
7027
|
+
/**
|
|
7028
|
+
* @description Return only positions with a leg on this HIP-4 outcome, resolved or not.
|
|
7029
|
+
* @example 29071
|
|
7030
|
+
*/
|
|
7031
|
+
readonly outcome_id?: components["parameters"]["PositionOutcomeQueryOptional"];
|
|
7017
7032
|
};
|
|
7018
7033
|
readonly header?: {
|
|
7019
7034
|
/**
|
|
@@ -8695,11 +8710,11 @@ export interface operations {
|
|
|
8695
8710
|
/** @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
8711
|
readonly id: string;
|
|
8697
8712
|
/**
|
|
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.
|
|
8713
|
+
* @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
8714
|
* @enum {string}
|
|
8700
8715
|
*/
|
|
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. */
|
|
8716
|
+
readonly kind: "CORE_FILL" | "COMBO_ENTRY" | "COMBO_RECEIVED" | "COMBO_CASHOUT";
|
|
8717
|
+
/** @description When it happened: the fill's HyperCore block time, or the HyperEVM block time of the ticket's opening, passing or sale. */
|
|
8703
8718
|
readonly at: components["schemas"]["$defs-Timestamp"];
|
|
8704
8719
|
/** TraderFill */
|
|
8705
8720
|
readonly fill?: {
|
|
@@ -9254,11 +9269,11 @@ export interface operations {
|
|
|
9254
9269
|
*/
|
|
9255
9270
|
readonly id: string;
|
|
9256
9271
|
/**
|
|
9257
|
-
* @description What happened. FEATURE_UNLOCKED: the account unlocked the feature named by subject.
|
|
9272
|
+
* @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
9273
|
* @enum {string}
|
|
9259
9274
|
*/
|
|
9260
|
-
readonly kind: "FEATURE_UNLOCKED";
|
|
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. A client shows only subjects it knows. */
|
|
9275
|
+
readonly kind: "FEATURE_UNLOCKED" | "ANNOUNCEMENT" | "BADGE_EARNED";
|
|
9276
|
+
/** @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
9277
|
readonly subject: string;
|
|
9263
9278
|
/** Format: date-time */
|
|
9264
9279
|
readonly created_at: string;
|
|
@@ -9267,6 +9282,12 @@ export interface operations {
|
|
|
9267
9282
|
* @description When the account first read it; absent while unread.
|
|
9268
9283
|
*/
|
|
9269
9284
|
readonly read_at?: string;
|
|
9285
|
+
/** @description An ANNOUNCEMENT's title, one line of plain text. */
|
|
9286
|
+
readonly title?: string;
|
|
9287
|
+
/** @description An ANNOUNCEMENT's message, plain text that may hold line breaks. */
|
|
9288
|
+
readonly body?: string;
|
|
9289
|
+
/** @description Where an ANNOUNCEMENT points, when it does: an app path starting with / or an https URL. */
|
|
9290
|
+
readonly link?: string;
|
|
9270
9291
|
}[];
|
|
9271
9292
|
readonly unread: number;
|
|
9272
9293
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const sdkVersion = "
|
|
2
|
-
export declare const openapiSha256 = "
|
|
1
|
+
export declare const sdkVersion = "226.0.0-received-combos";
|
|
2
|
+
export declare const openapiSha256 = "4237cbd41c0190ffacea8b1936896c9028e2a12ceeb21ddf19d10a93d73fb7ee";
|
|
3
3
|
export declare const realtimeSha256 = "32e56c8bb642401f5b03e9c38274087c09bebb73ffe60c0d34432c2e78ce1e15";
|
|
4
4
|
export declare const jsonSchemaSha256: {
|
|
5
5
|
readonly "account.schema.json": "c11a94438d5f7b54e08d3b559098ce2671f4c9aad3a79feb684b7a81f77d809a";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated by scripts/generate.mjs; do not edit.
|
|
2
|
-
export const sdkVersion = "
|
|
3
|
-
export const openapiSha256 = "
|
|
2
|
+
export const sdkVersion = "226.0.0-received-combos";
|
|
3
|
+
export const openapiSha256 = "4237cbd41c0190ffacea8b1936896c9028e2a12ceeb21ddf19d10a93d73fb7ee";
|
|
4
4
|
export const realtimeSha256 = "32e56c8bb642401f5b03e9c38274087c09bebb73ffe60c0d34432c2e78ce1e15";
|
|
5
5
|
export const jsonSchemaSha256 = {
|
|
6
6
|
"account.schema.json": "c11a94438d5f7b54e08d3b559098ce2671f4c9aad3a79feb684b7a81f77d809a",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@totalis/hip4-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.95.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": [
|