@lifi/perps-sdk 29.3.0 → 31.0.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/README.md +5 -1
- package/dist/cjs/types/withdrawal.d.ts.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/types/withdrawal.d.ts +14 -2
- package/dist/esm/types/withdrawal.d.ts.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/types/withdrawal.d.ts +14 -2
- package/dist/types/types/withdrawal.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +5 -3
- package/src/types/withdrawal.ts +14 -2
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -23,9 +23,13 @@ Core of the [LI.FI Perps SDK](https://public-perps-docs.mintlify.app/) — a Typ
|
|
|
23
23
|
Install the core SDK plus the provider plugin(s) for the DEX(es) you target:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
pnpm add @lifi/perps-sdk @lifi/perps-sdk-provider-hyperliquid
|
|
26
|
+
pnpm add @lifi/perps-sdk @lifi/perps-sdk-provider-hyperliquid viem@2.57.11
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
`viem` is a peer dependency of each SDK package, so your app installs the one
|
|
30
|
+
`viem` copy that the SDK uses. The packages accept only `viem` 2.57.11, because
|
|
31
|
+
`viem` 2.57.12 and later reject the Hyperliquid EIP-712 type names.
|
|
32
|
+
|
|
29
33
|
| Package | Install for |
|
|
30
34
|
| --- | --- |
|
|
31
35
|
| `@lifi/perps-sdk` | every project |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../../../src/types/withdrawal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,KAAK,EACL,aAAa,EACb,kBAAkB,EAClB,cAAc,EACf,MAAM,mBAAmB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AA;IAErB,KAAK,EAAE,UAAU,EAAE,CAAA;CACpB;AAQD,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,yBAAyB,CAAA"}
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
|
@@ -9,7 +9,13 @@ import type { Address } from 'viem';
|
|
|
9
9
|
export interface ProviderWithdrawableBalance {
|
|
10
10
|
/** Provider-native `Asset.id`; never a display symbol. */
|
|
11
11
|
assetId: string;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* The withdrawal route: the provider category that a withdrawal from this row
|
|
14
|
+
* names. On a pooled account, a row can name a category that has no `Balance`
|
|
15
|
+
* row of the same asset. For example, a pooled collateral asset is one `spot`
|
|
16
|
+
* `Balance` row, but its withdrawable row names a `perps` or `hyperliquid`
|
|
17
|
+
* route. Do not join a withdrawable row to a `Balance` row by this value.
|
|
18
|
+
*/
|
|
13
19
|
categoryId: string;
|
|
14
20
|
/** Withdrawable amount in the asset's own units. Always greater than zero. */
|
|
15
21
|
available: DecimalString;
|
|
@@ -41,7 +47,13 @@ export interface ProviderWithdrawableBalance {
|
|
|
41
47
|
*/
|
|
42
48
|
export interface WithdrawableBalance {
|
|
43
49
|
asset: Asset;
|
|
44
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* The withdrawal route: the provider category that a withdrawal from this row
|
|
52
|
+
* names. On a pooled account, a row can name a category that has no `Balance`
|
|
53
|
+
* row of the same asset. For example, a pooled collateral asset is one `spot`
|
|
54
|
+
* `Balance` row, but its withdrawable row names a `perps` or `hyperliquid`
|
|
55
|
+
* route. Do not join a withdrawable row to a `Balance` row by this value.
|
|
56
|
+
*/
|
|
45
57
|
categoryId: string;
|
|
46
58
|
/** Withdrawable amount in the asset's own units. */
|
|
47
59
|
available: DecimalString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../../../src/types/withdrawal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,KAAK,EACL,aAAa,EACb,kBAAkB,EAClB,cAAc,EACf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAA;IACf
|
|
1
|
+
{"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../../../src/types/withdrawal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,KAAK,EACL,aAAa,EACb,kBAAkB,EAClB,cAAc,EACf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAA;IACf;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,SAAS,EAAE,aAAa,CAAA;IACxB;;;;OAIG;IACH,GAAG,EAAE,aAAa,CAAA;IAClB;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,CAAA;IACZ;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB,oDAAoD;IACpD,SAAS,EAAE,aAAa,CAAA;IACxB;;;;OAIG;IACH,GAAG,EAAE,aAAa,CAAA;IAClB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,cAAc,CAAA;IACpB,qFAAqF;IACrF,GAAG,EAAE,aAAa,CAAA;IAClB;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC3C;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,kBAAkB,CAAA;IAC1B,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAChC;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,OAAO,CAAA;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,eAAe,CAAA;IACrB,qEAAqE;IACrE,KAAK,EAAE,UAAU,EAAE,CAAA;CACpB;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,yBAAyB,CAAA"}
|
package/dist/esm/version.d.ts
CHANGED
package/dist/esm/version.js
CHANGED
|
@@ -9,7 +9,13 @@ import type { Address } from 'viem';
|
|
|
9
9
|
export interface ProviderWithdrawableBalance {
|
|
10
10
|
/** Provider-native `Asset.id`; never a display symbol. */
|
|
11
11
|
assetId: string;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* The withdrawal route: the provider category that a withdrawal from this row
|
|
14
|
+
* names. On a pooled account, a row can name a category that has no `Balance`
|
|
15
|
+
* row of the same asset. For example, a pooled collateral asset is one `spot`
|
|
16
|
+
* `Balance` row, but its withdrawable row names a `perps` or `hyperliquid`
|
|
17
|
+
* route. Do not join a withdrawable row to a `Balance` row by this value.
|
|
18
|
+
*/
|
|
13
19
|
categoryId: string;
|
|
14
20
|
/** Withdrawable amount in the asset's own units. Always greater than zero. */
|
|
15
21
|
available: DecimalString;
|
|
@@ -41,7 +47,13 @@ export interface ProviderWithdrawableBalance {
|
|
|
41
47
|
*/
|
|
42
48
|
export interface WithdrawableBalance {
|
|
43
49
|
asset: Asset;
|
|
44
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* The withdrawal route: the provider category that a withdrawal from this row
|
|
52
|
+
* names. On a pooled account, a row can name a category that has no `Balance`
|
|
53
|
+
* row of the same asset. For example, a pooled collateral asset is one `spot`
|
|
54
|
+
* `Balance` row, but its withdrawable row names a `perps` or `hyperliquid`
|
|
55
|
+
* route. Do not join a withdrawable row to a `Balance` row by this value.
|
|
56
|
+
*/
|
|
45
57
|
categoryId: string;
|
|
46
58
|
/** Withdrawable amount in the asset's own units. */
|
|
47
59
|
available: DecimalString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../../../src/types/withdrawal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,KAAK,EACL,aAAa,EACb,kBAAkB,EAClB,cAAc,EACf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAA;IACf
|
|
1
|
+
{"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../../../src/types/withdrawal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,KAAK,EACL,aAAa,EACb,kBAAkB,EAClB,cAAc,EACf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAA;IACf;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,SAAS,EAAE,aAAa,CAAA;IACxB;;;;OAIG;IACH,GAAG,EAAE,aAAa,CAAA;IAClB;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,CAAA;IACZ;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB,oDAAoD;IACpD,SAAS,EAAE,aAAa,CAAA;IACxB;;;;OAIG;IACH,GAAG,EAAE,aAAa,CAAA;IAClB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,cAAc,CAAA;IACpB,qFAAqF;IACrF,GAAG,EAAE,aAAa,CAAA;IAClB;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC3C;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,kBAAkB,CAAA;IAC1B,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAChC;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,OAAO,CAAA;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,eAAe,CAAA;IACrB,qEAAqE;IACrE,KAAK,EAAE,UAAU,EAAE,CAAA;CACpB;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,yBAAyB,CAAA"}
|
package/dist/types/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/perps-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "31.0.0",
|
|
4
4
|
"description": "LI.FI Perps SDK for perpetuals trading",
|
|
5
5
|
"homepage": "https://github.com/lifinance/perps-sdk",
|
|
6
6
|
"bugs": {
|
|
@@ -45,8 +45,10 @@
|
|
|
45
45
|
"@lifi/types": "^18.3.0",
|
|
46
46
|
"big.js": "^7.0.1",
|
|
47
47
|
"partysocket": "^1.1.19",
|
|
48
|
-
"
|
|
49
|
-
|
|
48
|
+
"@lifi/perps-types": "^27.0.0"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"viem": ">=2.57.11 <2.57.12"
|
|
50
52
|
},
|
|
51
53
|
"publishConfig": {
|
|
52
54
|
"access": "public"
|
package/src/types/withdrawal.ts
CHANGED
|
@@ -16,7 +16,13 @@ import type { Address } from 'viem'
|
|
|
16
16
|
export interface ProviderWithdrawableBalance {
|
|
17
17
|
/** Provider-native `Asset.id`; never a display symbol. */
|
|
18
18
|
assetId: string
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The withdrawal route: the provider category that a withdrawal from this row
|
|
21
|
+
* names. On a pooled account, a row can name a category that has no `Balance`
|
|
22
|
+
* row of the same asset. For example, a pooled collateral asset is one `spot`
|
|
23
|
+
* `Balance` row, but its withdrawable row names a `perps` or `hyperliquid`
|
|
24
|
+
* route. Do not join a withdrawable row to a `Balance` row by this value.
|
|
25
|
+
*/
|
|
20
26
|
categoryId: string
|
|
21
27
|
/** Withdrawable amount in the asset's own units. Always greater than zero. */
|
|
22
28
|
available: DecimalString
|
|
@@ -49,7 +55,13 @@ export interface ProviderWithdrawableBalance {
|
|
|
49
55
|
*/
|
|
50
56
|
export interface WithdrawableBalance {
|
|
51
57
|
asset: Asset
|
|
52
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* The withdrawal route: the provider category that a withdrawal from this row
|
|
60
|
+
* names. On a pooled account, a row can name a category that has no `Balance`
|
|
61
|
+
* row of the same asset. For example, a pooled collateral asset is one `spot`
|
|
62
|
+
* `Balance` row, but its withdrawable row names a `perps` or `hyperliquid`
|
|
63
|
+
* route. Do not join a withdrawable row to a `Balance` row by this value.
|
|
64
|
+
*/
|
|
53
65
|
categoryId: string
|
|
54
66
|
/** Withdrawable amount in the asset's own units. */
|
|
55
67
|
available: DecimalString
|
package/src/version.ts
CHANGED