@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.
@@ -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: string;
8
- withdrawalFee?: string;
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: string;
15
- withdrawalFee?: string;
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,EAAE,UAAU,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC3E,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,MAAM,CAAA;IAMjB,aAAa,CAAC,EAAE,MAAM,CAAA;IAMtB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AASD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,CAAA;IACZ,KAAK,EAAE,eAAe,CAAA;IAEtB,SAAS,EAAE,MAAM,CAAA;IAWjB,aAAa,CAAC,EAA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@@
1
1
  export declare const name = "@lifi/perps-sdk";
2
- export declare const version = "20.1.0";
2
+ export declare const version = "20.1.1";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = exports.name = void 0;
4
4
  exports.name = '@lifi/perps-sdk';
5
- exports.version = '20.1.0';
5
+ exports.version = '20.1.1';
6
6
  //# sourceMappingURL=version.js.map
@@ -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: string;
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?: string;
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: string;
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?: string;
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,EAAE,UAAU,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC3E,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,MAAM,CAAA;IACjB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;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,MAAM,CAAA;IACjB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;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"}
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"}
@@ -9,5 +9,5 @@ export declare const name = "@lifi/perps-sdk";
9
9
  *
10
10
  * @public
11
11
  */
12
- export declare const version = "20.1.0";
12
+ export declare const version = "20.1.1";
13
13
  //# sourceMappingURL=version.d.ts.map
@@ -9,5 +9,5 @@ export const name = '@lifi/perps-sdk';
9
9
  *
10
10
  * @public
11
11
  */
12
- export const version = '20.1.0';
12
+ export const version = '20.1.1';
13
13
  //# sourceMappingURL=version.js.map
@@ -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: string;
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?: string;
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: string;
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?: string;
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,EAAE,UAAU,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,KAAK,EAAE,O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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"}
@@ -9,5 +9,5 @@ export declare const name = "@lifi/perps-sdk";
9
9
  *
10
10
  * @public
11
11
  */
12
- export declare const version = "20.1.0";
12
+ export declare const version = "20.1.1";
13
13
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/perps-sdk",
3
- "version": "20.1.0",
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.0.0"
49
+ "@lifi/perps-types": "^18.1.0"
50
50
  },
51
51
  "publishConfig": {
52
52
  "access": "public"
@@ -1,4 +1,9 @@
1
- import type { ActionType, Asset, WithdrawalRoute } from '@lifi/perps-types'
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: string
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?: string
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: string
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?: string
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
@@ -10,4 +10,4 @@ export const name = '@lifi/perps-sdk'
10
10
  *
11
11
  * @public
12
12
  */
13
- export const version = '20.1.0'
13
+ export const version = '20.1.1'