@totalis/hip4-client 0.78.0 → 0.79.1
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,40 @@
|
|
|
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.79.1
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
|
|
10
|
+
- `grantVaultAgent` answers `503 CONTRACT_UNAVAILABLE` on a vault whose
|
|
11
|
+
generation has no `setAgent`, instead of relaying a grant that never lands.
|
|
12
|
+
|
|
13
|
+
## 0.79.0
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Follow settings (`followTrader`, `listFollows`) take `mode` per product: `COPY`
|
|
18
|
+
or `COUNTER`. A counter of a single buys the outcome's other side, priced
|
|
19
|
+
against 1 less the trader's price and sized from what the trader spent; a
|
|
20
|
+
counter of a Combo flips every leg and takes the best quote paying more than
|
|
21
|
+
its net stake (TT-2628). Contract `207.0.0-copy-modes`.
|
|
22
|
+
- `counter_exit_floor_bps` on Combo settings: the least a counter Combo cashes
|
|
23
|
+
out for when the trader cashes out: what the follower receives, net of the
|
|
24
|
+
vault's profit fee, in basis points of what they staked, 0 to 100000, 10000
|
|
25
|
+
(never below the stake) when left out. Below it, the cash-out is skipped and
|
|
26
|
+
the ticket held to settlement. Core refuses any value but 10000.
|
|
27
|
+
- `new_positions_only` on core settings: copy a buy only when it opens the
|
|
28
|
+
trader's position. Combos refuse `true`.
|
|
29
|
+
- Copy journal rows (`listCopyTrades`, `listComboCopies`) answer `mode`; their
|
|
30
|
+
`side` and `legs` are now the account's own, flipped for a counter.
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- `slippage_bps` (max worst entry) allows up to 5000 (50%), from 2000. Writes
|
|
35
|
+
that leave out `mode`, `new_positions_only` and `counter_exit_floor_bps` keep
|
|
36
|
+
meaning `COPY`, every buy copied and a 10000 floor.
|
|
37
|
+
- `createDeposit`'s 0.10 USDC floor covers a Privy external login wallet as
|
|
38
|
+
well as an embedded one; any other wallet still moves at least 1 USDC.
|
|
39
|
+
|
|
6
40
|
## 0.78.0
|
|
7
41
|
|
|
8
42
|
### Added
|
|
@@ -414,7 +414,7 @@ export declare const operationErrors: {
|
|
|
414
414
|
readonly getVolumeLeaderboard: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_QUERY", "CONTRACT_UNAVAILABLE"];
|
|
415
415
|
readonly getWithdrawal: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_REQUEST", "NOT_FOUND"];
|
|
416
416
|
readonly grantComboCopyAgent: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "CONTRACT_UNAVAILABLE", "NOT_FOUND", "INVALID_REQUEST", "FINANCIAL_ACTIONS_DISABLED", "DEPENDENCY_STALE", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSED"];
|
|
417
|
-
readonly grantVaultAgent: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "INVALID_REQUEST", "FINANCIAL_ACTIONS_DISABLED", "DEPENDENCY_STALE", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSED"];
|
|
417
|
+
readonly grantVaultAgent: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "CONTRACT_UNAVAILABLE", "INVALID_REQUEST", "FINANCIAL_ACTIONS_DISABLED", "DEPENDENCY_STALE", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSED"];
|
|
418
418
|
readonly likeComment: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "NOT_FOUND", "INVALID_IDEMPOTENCY_KEY"];
|
|
419
419
|
readonly listAccountActivity: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_QUERY", "ORIGIN_REQUIRED", "NOT_FOUND", "SOURCE_UNAVAILABLE", "CONTRACT_UNAVAILABLE", "CURSOR_EXPIRED"];
|
|
420
420
|
readonly listAccountPositions: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_QUERY", "ORIGIN_REQUIRED", "NOT_FOUND", "SOURCE_UNAVAILABLE", "CONTRACT_UNAVAILABLE", "CURSOR_EXPIRED"];
|
package/dist/generated/errors.js
CHANGED
|
@@ -1066,7 +1066,7 @@ export type paths = {
|
|
|
1066
1066
|
readonly put?: never;
|
|
1067
1067
|
/**
|
|
1068
1068
|
* Relay the account's grant or revoke of a device's vault agent
|
|
1069
|
-
* @description Relays the account's EIP-712 signature over AgentGrant(account, agent, valid_until, nonce) to setAgent; Totalis pays the gas. agent is a key one of the account's devices holds, so it can sign the account's named Combo accepts, cash-outs and Exits to its own wallet or Core spot without a wallet prompt. valid_until is unix seconds, in the future and at most 180 days away (the vault's limit); 0 revokes at once. nonce must exceed the agent's last grant (GET /v1/me/vault-agents), so a client uses the current unix time. Only the account's own signature (or its ERC-1271 verdict) grants. 403 FORBIDDEN for a copy agent, whose grants go through /v1/me/copy-agents. While financial actions run off only a revoke is relayed. A retry with the same Idempotency-Key returns the same operation.
|
|
1069
|
+
* @description Relays the account's EIP-712 signature over AgentGrant(account, agent, valid_until, nonce) to setAgent; Totalis pays the gas. agent is a key one of the account's devices holds, so it can sign the account's named Combo accepts, cash-outs and Exits to its own wallet or Core spot without a wallet prompt. valid_until is unix seconds, in the future and at most 180 days away (the vault's limit); 0 revokes at once. nonce must exceed the agent's last grant (GET /v1/me/vault-agents), so a client uses the current unix time. Only the account's own signature (or its ERC-1271 verdict) grants. 403 FORBIDDEN for a copy agent, whose grants go through /v1/me/copy-agents. While financial actions run off only a revoke is relayed. 503 CONTRACT_UNAVAILABLE when the vault has no setAgent. A retry with the same Idempotency-Key returns the same operation.
|
|
1070
1070
|
*/
|
|
1071
1071
|
readonly post: operations["grantVaultAgent"];
|
|
1072
1072
|
readonly delete?: never;
|
|
@@ -2523,10 +2523,19 @@ export type components = {
|
|
|
2523
2523
|
readonly max_per_trade: components["schemas"]["$defs-Amount"];
|
|
2524
2524
|
/** @description Most positions copied from this trader open at once. */
|
|
2525
2525
|
readonly max_open: number;
|
|
2526
|
-
/** @description
|
|
2526
|
+
/** @description Max worst entry: the worst price a copy accepts against the trader's, in basis points, 0 to 5000 (50%); a copy outside it is skipped. A COUNTER of a Combo has no band from the trader, whose price says nothing of the flipped Combo's: it takes the best quote paying more than its net stake. */
|
|
2527
2527
|
readonly slippage_bps: number;
|
|
2528
2528
|
/** @description Copy the trader's reductions and cash-outs too. */
|
|
2529
2529
|
readonly mirror_exits: boolean;
|
|
2530
|
+
/**
|
|
2531
|
+
* @description COPY takes the trader's side. COUNTER takes the other side: a single buys the outcome's other side, priced against 1 less the trader's price and sized from what the trader spent; a Combo flips every leg, so it pays only if every one of the trader's legs loses. A counter mirrors the trader's exits as a copy does: a single's sells are priced against 1 less the trader's price, and a Combo's cash-out at no less than counter_exit_floor_bps of what the follower staked, as the trader's cash-out prices their ticket, not the flipped one. After a change of mode, buys in a market are not copied while copies of it are held on the other side. Left out of a write, COPY.
|
|
2532
|
+
* @enum {unknown}
|
|
2533
|
+
*/
|
|
2534
|
+
readonly mode?: "COPY" | "COUNTER";
|
|
2535
|
+
/** @description Copy a buy only when it opens the trader's position, never one adding to it. Core only: every Combo opens a new position, so combos refuses true. Left out of a write, false. */
|
|
2536
|
+
readonly new_positions_only?: boolean;
|
|
2537
|
+
/** @description The least a COUNTER Combo cashes out for when the trader cashes out: what the follower receives, after the vault's profit fee on a sell-back, in basis points of what they staked, fee included, 0 to 100000: 10000 never sells for less than the stake, 8000 accepts up to a 20% loss, 0 takes the best quote at any price. With none at or above it, the cash-out is skipped and the ticket held to settlement. Combos only: listed on combos, never on core, and core refuses any value but 10000. Left out of a write, 10000. */
|
|
2538
|
+
readonly counter_exit_floor_bps?: number;
|
|
2530
2539
|
};
|
|
2531
2540
|
readonly FollowSettingsFields: {
|
|
2532
2541
|
/** @description How the follow copies HyperCore orders. */
|
|
@@ -8266,13 +8275,18 @@ export interface operations {
|
|
|
8266
8275
|
readonly decided_at?: components["schemas"]["$defs-Timestamp"];
|
|
8267
8276
|
/** @description HIP-4 outcome ID, as a decimal string. */
|
|
8268
8277
|
readonly outcome_id: components["schemas"]["UInt32String"];
|
|
8269
|
-
/** @description
|
|
8278
|
+
/** @description The side the account traded: the trader's, or its other side for a COUNTER. */
|
|
8270
8279
|
readonly side: components["schemas"]["Side"];
|
|
8271
8280
|
/**
|
|
8272
|
-
* @description ENTRY: the trader bought, and the copy buys. REDUCE: the trader sold part of their holding, and the copy sells that fraction of the account's copied shares. CLOSE and EXIT: the trader sold all of it, and the copy sells all copied shares.
|
|
8281
|
+
* @description ENTRY: the trader bought, and the copy buys, or for a COUNTER buys the other side. REDUCE: the trader sold part of their holding, and the copy sells that fraction of the account's copied shares. CLOSE and EXIT: the trader sold all of it, and the copy sells all copied shares.
|
|
8273
8282
|
* @enum {string}
|
|
8274
8283
|
*/
|
|
8275
8284
|
readonly kind: "ENTRY" | "REDUCE" | "CLOSE" | "EXIT";
|
|
8285
|
+
/**
|
|
8286
|
+
* @description Whether this copied the trader's trade or took its other side.
|
|
8287
|
+
* @enum {unknown}
|
|
8288
|
+
*/
|
|
8289
|
+
readonly mode: "COPY" | "COUNTER";
|
|
8276
8290
|
/**
|
|
8277
8291
|
* CopyLeaderTrade
|
|
8278
8292
|
* @description The trader's trade, all of its fills together.
|
|
@@ -8354,11 +8368,16 @@ export interface operations {
|
|
|
8354
8368
|
/** @description When the copy reached its outcome; absent while PENDING. */
|
|
8355
8369
|
readonly decided_at?: components["schemas"]["$defs-Timestamp"];
|
|
8356
8370
|
/**
|
|
8357
|
-
* @description ENTRY: the trader opened a Combo, and the copy opens the same legs at the account's stake. EXIT: the trader cashed theirs out, and the copy cashes out the account's copy.
|
|
8371
|
+
* @description ENTRY: the trader opened a Combo, and the copy opens the same legs, or for a COUNTER each leg's other side, at the account's stake. EXIT: the trader cashed theirs out, and the copy cashes out the account's copy.
|
|
8358
8372
|
* @enum {string}
|
|
8359
8373
|
*/
|
|
8360
8374
|
readonly kind: "ENTRY" | "EXIT";
|
|
8361
|
-
/**
|
|
8375
|
+
/**
|
|
8376
|
+
* @description Whether this copied the trader's trade or took its other side.
|
|
8377
|
+
* @enum {unknown}
|
|
8378
|
+
*/
|
|
8379
|
+
readonly mode: "COPY" | "COUNTER";
|
|
8380
|
+
/** @description The legs the account's copy takes: the trader's, each on its other side for a COUNTER. */
|
|
8362
8381
|
readonly legs: readonly components["schemas"]["TraderLeg"][];
|
|
8363
8382
|
/**
|
|
8364
8383
|
* ComboCopyLeaderTrade
|
|
@@ -10784,7 +10803,7 @@ export interface operations {
|
|
|
10784
10803
|
readonly "application/json": components["schemas"]["DepositAccepted"];
|
|
10785
10804
|
};
|
|
10786
10805
|
};
|
|
10787
|
-
/** @description A deposit moves at least 0.10 USDC from a
|
|
10806
|
+
/** @description A deposit moves at least 0.10 USDC from a Privy login wallet, embedded or external, and 1 USDC from any other, and a wallet that controls a maker cannot deposit (`INVALID_REQUEST`). */
|
|
10788
10807
|
readonly 400: components["responses"]["Error"];
|
|
10789
10808
|
readonly 401: components["responses"]["Error"];
|
|
10790
10809
|
/** @description Wallet sessions and Totalis app sessions only: an API key cannot deposit. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const sdkVersion = "
|
|
2
|
-
export declare const openapiSha256 = "
|
|
1
|
+
export declare const sdkVersion = "207.0.0-copy-modes";
|
|
2
|
+
export declare const openapiSha256 = "3d418204ef35fc0569a5d38291b6a894e4d88e0de24e26e379d218e72d636765";
|
|
3
3
|
export declare const realtimeSha256 = "1cac740e108e84ad1979f6ccc71089efd840404cb72d1612a86edc02769637e3";
|
|
4
4
|
export declare const jsonSchemaSha256: {
|
|
5
5
|
readonly "account.schema.json": "5106e2d53abef190990eff113f6692dd27df5848439cf5a80a42c11e89f2bef6";
|
|
@@ -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 = "207.0.0-copy-modes";
|
|
3
|
+
export const openapiSha256 = "3d418204ef35fc0569a5d38291b6a894e4d88e0de24e26e379d218e72d636765";
|
|
4
4
|
export const realtimeSha256 = "1cac740e108e84ad1979f6ccc71089efd840404cb72d1612a86edc02769637e3";
|
|
5
5
|
export const jsonSchemaSha256 = {
|
|
6
6
|
"account.schema.json": "5106e2d53abef190990eff113f6692dd27df5848439cf5a80a42c11e89f2bef6",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@totalis/hip4-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.79.1",
|
|
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": [
|