@lifi/perps-sdk 20.1.0 → 20.1.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/dist/cjs/types/withdrawal.d.ts +5 -5
- 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 +5 -5
- 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 +5 -5
- package/dist/types/types/withdrawal.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/types/withdrawal.ts +10 -5
- package/src/version.ts +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { ActionType, Asset, WithdrawalRoute } from '@lifi/perps-types';
|
|
1
|
+
import type { ActionType, Asset, DecimalString, WithdrawalRoute } from '@lifi/perps-types';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
3
|
export type { WithdrawalRoute };
|
|
4
4
|
export interface ProviderWithdrawableBalance {
|
|
5
5
|
assetId: string;
|
|
6
6
|
route: WithdrawalRoute;
|
|
7
|
-
available:
|
|
8
|
-
withdrawalFee?:
|
|
7
|
+
available: DecimalString;
|
|
8
|
+
withdrawalFee?: DecimalString;
|
|
9
9
|
isFeeDeducted?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export interface WithdrawableBalance {
|
|
12
12
|
asset: Asset;
|
|
13
13
|
route: WithdrawalRoute;
|
|
14
|
-
available:
|
|
15
|
-
withdrawalFee?:
|
|
14
|
+
available: DecimalString;
|
|
15
|
+
withdrawalFee?: DecimalString;
|
|
16
16
|
isFeeDeducted?: boolean;
|
|
17
17
|
}
|
|
18
18
|
export interface WithdrawFlowReady {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../../../src/types/withdrawal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
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,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,YAAY,EAAE,eAAe,EAAE,CAAA;AAQ/B,MAAM,WAAW,2BAA2B;IAE1C,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,eAAe,CAAA;IAEtB,SAAS,EAAE,aAAa,CAAA;IAMxB,aAAa,CAAC,EAAE,aAAa,CAAA;IAM7B,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AASD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,CAAA;IACZ,KAAK,EAAE,eAAe,CAAA;IAEtB,SAAS,EAAE,aAAa,CAAA;IAWxB,aAAa,CAAC,EAAE,aAAa,CAAA;IAM7B,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAOD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,OAAO,CAAA;CACrB;AASD,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,eAAe,CAAA;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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActionType, Asset, WithdrawalRoute } from '@lifi/perps-types';
|
|
1
|
+
import type { ActionType, Asset, DecimalString, WithdrawalRoute } from '@lifi/perps-types';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
3
|
export type { WithdrawalRoute };
|
|
4
4
|
/**
|
|
@@ -12,13 +12,13 @@ export interface ProviderWithdrawableBalance {
|
|
|
12
12
|
assetId: string;
|
|
13
13
|
route: WithdrawalRoute;
|
|
14
14
|
/** Withdrawable amount in the asset's own units. Always greater than zero. */
|
|
15
|
-
available:
|
|
15
|
+
available: DecimalString;
|
|
16
16
|
/**
|
|
17
17
|
* Flat venue fee on a withdrawal from this row, in the asset's own units.
|
|
18
18
|
* Absent when the venue publishes no fee for the asset. The client rejects
|
|
19
19
|
* a value that is not a non-negative decimal.
|
|
20
20
|
*/
|
|
21
|
-
withdrawalFee?:
|
|
21
|
+
withdrawalFee?: DecimalString;
|
|
22
22
|
/**
|
|
23
23
|
* `true` when the venue takes `withdrawalFee` out of the requested amount,
|
|
24
24
|
* `false` when it charges the fee in addition. Set together with
|
|
@@ -37,7 +37,7 @@ export interface WithdrawableBalance {
|
|
|
37
37
|
asset: Asset;
|
|
38
38
|
route: WithdrawalRoute;
|
|
39
39
|
/** Withdrawable amount in the asset's own units. */
|
|
40
|
-
available:
|
|
40
|
+
available: DecimalString;
|
|
41
41
|
/**
|
|
42
42
|
* Flat venue fee on a withdrawal from this row, in the asset's own units.
|
|
43
43
|
* Absent when the venue publishes no fee for the asset. With
|
|
@@ -48,7 +48,7 @@ export interface WithdrawableBalance {
|
|
|
48
48
|
* is zero or negative when the fee is at or above `available`, and the row
|
|
49
49
|
* then funds no withdrawal.
|
|
50
50
|
*/
|
|
51
|
-
withdrawalFee?:
|
|
51
|
+
withdrawalFee?: DecimalString;
|
|
52
52
|
/**
|
|
53
53
|
* Present only together with `withdrawalFee`. Absent on a row from a
|
|
54
54
|
* provider plugin that does not report it; absence means unknown, not
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../../../src/types/withdrawal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
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,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,YAAY,EAAE,eAAe,EAAE,CAAA;AAE/B;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,eAAe,CAAA;IACtB,8EAA8E;IAC9E,SAAS,EAAE,aAAa,CAAA;IACxB;;;;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,KAAK,EAAE,eAAe,CAAA;IACtB,oDAAoD;IACpD,SAAS,EAAE,aAAa,CAAA;IACxB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActionType, Asset, WithdrawalRoute } from '@lifi/perps-types';
|
|
1
|
+
import type { ActionType, Asset, DecimalString, WithdrawalRoute } from '@lifi/perps-types';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
3
|
export type { WithdrawalRoute };
|
|
4
4
|
/**
|
|
@@ -12,13 +12,13 @@ export interface ProviderWithdrawableBalance {
|
|
|
12
12
|
assetId: string;
|
|
13
13
|
route: WithdrawalRoute;
|
|
14
14
|
/** Withdrawable amount in the asset's own units. Always greater than zero. */
|
|
15
|
-
available:
|
|
15
|
+
available: DecimalString;
|
|
16
16
|
/**
|
|
17
17
|
* Flat venue fee on a withdrawal from this row, in the asset's own units.
|
|
18
18
|
* Absent when the venue publishes no fee for the asset. The client rejects
|
|
19
19
|
* a value that is not a non-negative decimal.
|
|
20
20
|
*/
|
|
21
|
-
withdrawalFee?:
|
|
21
|
+
withdrawalFee?: DecimalString;
|
|
22
22
|
/**
|
|
23
23
|
* `true` when the venue takes `withdrawalFee` out of the requested amount,
|
|
24
24
|
* `false` when it charges the fee in addition. Set together with
|
|
@@ -37,7 +37,7 @@ export interface WithdrawableBalance {
|
|
|
37
37
|
asset: Asset;
|
|
38
38
|
route: WithdrawalRoute;
|
|
39
39
|
/** Withdrawable amount in the asset's own units. */
|
|
40
|
-
available:
|
|
40
|
+
available: DecimalString;
|
|
41
41
|
/**
|
|
42
42
|
* Flat venue fee on a withdrawal from this row, in the asset's own units.
|
|
43
43
|
* Absent when the venue publishes no fee for the asset. With
|
|
@@ -48,7 +48,7 @@ export interface WithdrawableBalance {
|
|
|
48
48
|
* is zero or negative when the fee is at or above `available`, and the row
|
|
49
49
|
* then funds no withdrawal.
|
|
50
50
|
*/
|
|
51
|
-
withdrawalFee?:
|
|
51
|
+
withdrawalFee?: DecimalString;
|
|
52
52
|
/**
|
|
53
53
|
* Present only together with `withdrawalFee`. Absent on a row from a
|
|
54
54
|
* provider plugin that does not report it; absence means unknown, not
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../../../src/types/withdrawal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
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,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,YAAY,EAAE,eAAe,EAAE,CAAA;AAE/B;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,eAAe,CAAA;IACtB,8EAA8E;IAC9E,SAAS,EAAE,aAAa,CAAA;IACxB;;;;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,KAAK,EAAE,eAAe,CAAA;IACtB,oDAAoD;IACpD,SAAS,EAAE,aAAa,CAAA;IACxB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;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": "20.1.
|
|
3
|
+
"version": "20.1.1",
|
|
4
4
|
"description": "LI.FI Perps SDK for perpetuals trading",
|
|
5
5
|
"homepage": "https://github.com/lifinance/perps-sdk",
|
|
6
6
|
"bugs": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"big.js": "^7.0.1",
|
|
47
47
|
"partysocket": "^1.1.19",
|
|
48
48
|
"viem": "^2.55.18",
|
|
49
|
-
"@lifi/perps-types": "^18.
|
|
49
|
+
"@lifi/perps-types": "^18.1.0"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
package/src/types/withdrawal.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
ActionType,
|
|
3
|
+
Asset,
|
|
4
|
+
DecimalString,
|
|
5
|
+
WithdrawalRoute,
|
|
6
|
+
} from '@lifi/perps-types'
|
|
2
7
|
import type { Address } from 'viem'
|
|
3
8
|
|
|
4
9
|
export type { WithdrawalRoute }
|
|
@@ -14,13 +19,13 @@ export interface ProviderWithdrawableBalance {
|
|
|
14
19
|
assetId: string
|
|
15
20
|
route: WithdrawalRoute
|
|
16
21
|
/** Withdrawable amount in the asset's own units. Always greater than zero. */
|
|
17
|
-
available:
|
|
22
|
+
available: DecimalString
|
|
18
23
|
/**
|
|
19
24
|
* Flat venue fee on a withdrawal from this row, in the asset's own units.
|
|
20
25
|
* Absent when the venue publishes no fee for the asset. The client rejects
|
|
21
26
|
* a value that is not a non-negative decimal.
|
|
22
27
|
*/
|
|
23
|
-
withdrawalFee?:
|
|
28
|
+
withdrawalFee?: DecimalString
|
|
24
29
|
/**
|
|
25
30
|
* `true` when the venue takes `withdrawalFee` out of the requested amount,
|
|
26
31
|
* `false` when it charges the fee in addition. Set together with
|
|
@@ -40,7 +45,7 @@ export interface WithdrawableBalance {
|
|
|
40
45
|
asset: Asset
|
|
41
46
|
route: WithdrawalRoute
|
|
42
47
|
/** Withdrawable amount in the asset's own units. */
|
|
43
|
-
available:
|
|
48
|
+
available: DecimalString
|
|
44
49
|
/**
|
|
45
50
|
* Flat venue fee on a withdrawal from this row, in the asset's own units.
|
|
46
51
|
* Absent when the venue publishes no fee for the asset. With
|
|
@@ -51,7 +56,7 @@ export interface WithdrawableBalance {
|
|
|
51
56
|
* is zero or negative when the fee is at or above `available`, and the row
|
|
52
57
|
* then funds no withdrawal.
|
|
53
58
|
*/
|
|
54
|
-
withdrawalFee?:
|
|
59
|
+
withdrawalFee?: DecimalString
|
|
55
60
|
/**
|
|
56
61
|
* Present only together with `withdrawalFee`. Absent on a row from a
|
|
57
62
|
* provider plugin that does not report it; absence means unknown, not
|
package/src/version.ts
CHANGED