@lifi/perps-sdk-provider-lighter 8.0.0 → 8.1.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/dist/cjs/LighterProvider.d.ts.map +1 -1
- package/dist/cjs/LighterProvider.js +3 -0
- package/dist/cjs/LighterProvider.js.map +1 -1
- package/dist/cjs/constants.d.ts.map +1 -1
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/signers/LighterKeyStore.d.ts.map +1 -1
- package/dist/cjs/signers/LighterKeyStore.js.map +1 -1
- package/dist/cjs/signers/LighterReadOnlyTokenManager.d.ts.map +1 -1
- package/dist/cjs/signers/LighterReadOnlyTokenManager.js.map +1 -1
- package/dist/cjs/signers/LighterSigner.d.ts.map +1 -1
- package/dist/cjs/signers/LighterSigner.js.map +1 -1
- package/dist/cjs/signers/createAuthToken.d.ts.map +1 -1
- package/dist/cjs/signers/createAuthToken.js.map +1 -1
- package/dist/cjs/signers/wasmLoader.d.ts.map +1 -1
- package/dist/cjs/signers/wasmLoader.js.map +1 -1
- package/dist/cjs/types/account.d.ts.map +1 -1
- package/dist/cjs/types/action.d.ts.map +1 -1
- package/dist/cjs/types/action.js.map +1 -1
- package/dist/cjs/types/activity.d.ts.map +1 -1
- package/dist/cjs/types/asset.d.ts.map +1 -1
- package/dist/cjs/types/fill.d.ts.map +1 -1
- package/dist/cjs/types/order.d.ts.map +1 -1
- package/dist/cjs/types/submit.d.ts.map +1 -1
- package/dist/cjs/types/ws.d.ts.map +1 -1
- package/dist/cjs/utils/lighterAsset.d.ts.map +1 -1
- package/dist/cjs/utils/lighterAsset.js.map +1 -1
- package/dist/cjs/utils/ohlcvInterval.d.ts.map +1 -1
- package/dist/cjs/utils/ohlcvInterval.js.map +1 -1
- package/dist/cjs/utils/transferMargin.d.ts.map +1 -1
- package/dist/cjs/utils/transferMargin.js +1 -2
- package/dist/cjs/utils/transferMargin.js.map +1 -1
- package/dist/cjs/utils/wireEncoding.d.ts.map +1 -1
- package/dist/cjs/utils/wireEncoding.js.map +1 -1
- package/dist/cjs/websocket/LighterWsProvider.d.ts.map +1 -1
- package/dist/cjs/websocket/LighterWsProvider.js.map +1 -1
- package/dist/esm/LighterProvider.d.ts.map +1 -1
- package/dist/esm/LighterProvider.js +7 -0
- package/dist/esm/LighterProvider.js.map +1 -1
- package/dist/esm/constants.d.ts +15 -2
- package/dist/esm/constants.d.ts.map +1 -1
- package/dist/esm/constants.js +15 -2
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/signers/LighterKeyStore.d.ts +31 -2
- package/dist/esm/signers/LighterKeyStore.d.ts.map +1 -1
- package/dist/esm/signers/LighterKeyStore.js +24 -1
- package/dist/esm/signers/LighterKeyStore.js.map +1 -1
- package/dist/esm/signers/LighterReadOnlyTokenManager.d.ts +23 -3
- package/dist/esm/signers/LighterReadOnlyTokenManager.d.ts.map +1 -1
- package/dist/esm/signers/LighterReadOnlyTokenManager.js +4 -0
- package/dist/esm/signers/LighterReadOnlyTokenManager.js.map +1 -1
- package/dist/esm/signers/LighterSigner.d.ts +49 -7
- package/dist/esm/signers/LighterSigner.d.ts.map +1 -1
- package/dist/esm/signers/LighterSigner.js +11 -1
- package/dist/esm/signers/LighterSigner.js.map +1 -1
- package/dist/esm/signers/createAuthToken.d.ts +8 -2
- package/dist/esm/signers/createAuthToken.d.ts.map +1 -1
- package/dist/esm/signers/createAuthToken.js.map +1 -1
- package/dist/esm/signers/wasmLoader.d.ts +14 -2
- package/dist/esm/signers/wasmLoader.d.ts.map +1 -1
- package/dist/esm/signers/wasmLoader.js.map +1 -1
- package/dist/esm/types/account.d.ts +58 -8
- package/dist/esm/types/account.d.ts.map +1 -1
- package/dist/esm/types/action.d.ts +72 -18
- package/dist/esm/types/action.d.ts.map +1 -1
- package/dist/esm/types/action.js +72 -18
- package/dist/esm/types/action.js.map +1 -1
- package/dist/esm/types/activity.d.ts +64 -10
- package/dist/esm/types/activity.d.ts.map +1 -1
- package/dist/esm/types/asset.d.ts +72 -12
- package/dist/esm/types/asset.d.ts.map +1 -1
- package/dist/esm/types/fill.d.ts +14 -2
- package/dist/esm/types/fill.d.ts.map +1 -1
- package/dist/esm/types/order.d.ts +27 -4
- package/dist/esm/types/order.d.ts.map +1 -1
- package/dist/esm/types/submit.d.ts +26 -4
- package/dist/esm/types/submit.d.ts.map +1 -1
- package/dist/esm/types/ws.d.ts +56 -8
- package/dist/esm/types/ws.d.ts.map +1 -1
- package/dist/esm/utils/lighterAsset.d.ts +7 -1
- package/dist/esm/utils/lighterAsset.d.ts.map +1 -1
- package/dist/esm/utils/lighterAsset.js +7 -1
- package/dist/esm/utils/lighterAsset.js.map +1 -1
- package/dist/esm/utils/ohlcvInterval.d.ts +6 -1
- package/dist/esm/utils/ohlcvInterval.d.ts.map +1 -1
- package/dist/esm/utils/ohlcvInterval.js +6 -1
- package/dist/esm/utils/ohlcvInterval.js.map +1 -1
- package/dist/esm/utils/transferMargin.d.ts.map +1 -1
- package/dist/esm/utils/transferMargin.js +2 -3
- package/dist/esm/utils/transferMargin.js.map +1 -1
- package/dist/esm/utils/wireEncoding.d.ts +58 -23
- package/dist/esm/utils/wireEncoding.d.ts.map +1 -1
- package/dist/esm/utils/wireEncoding.js +58 -23
- package/dist/esm/utils/wireEncoding.js.map +1 -1
- package/dist/esm/websocket/LighterWsProvider.d.ts +6 -0
- package/dist/esm/websocket/LighterWsProvider.d.ts.map +1 -1
- package/dist/esm/websocket/LighterWsProvider.js +6 -0
- package/dist/esm/websocket/LighterWsProvider.js.map +1 -1
- package/dist/types/LighterProvider.d.ts.map +1 -1
- package/dist/types/constants.d.ts +15 -2
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/signers/LighterKeyStore.d.ts +31 -2
- package/dist/types/signers/LighterKeyStore.d.ts.map +1 -1
- package/dist/types/signers/LighterReadOnlyTokenManager.d.ts +23 -3
- package/dist/types/signers/LighterReadOnlyTokenManager.d.ts.map +1 -1
- package/dist/types/signers/LighterSigner.d.ts +49 -7
- package/dist/types/signers/LighterSigner.d.ts.map +1 -1
- package/dist/types/signers/createAuthToken.d.ts +8 -2
- package/dist/types/signers/createAuthToken.d.ts.map +1 -1
- package/dist/types/signers/wasmLoader.d.ts +14 -2
- package/dist/types/signers/wasmLoader.d.ts.map +1 -1
- package/dist/types/types/account.d.ts +58 -8
- package/dist/types/types/account.d.ts.map +1 -1
- package/dist/types/types/action.d.ts +72 -18
- package/dist/types/types/action.d.ts.map +1 -1
- package/dist/types/types/activity.d.ts +64 -10
- package/dist/types/types/activity.d.ts.map +1 -1
- package/dist/types/types/asset.d.ts +72 -12
- package/dist/types/types/asset.d.ts.map +1 -1
- package/dist/types/types/fill.d.ts +14 -2
- package/dist/types/types/fill.d.ts.map +1 -1
- package/dist/types/types/order.d.ts +27 -4
- package/dist/types/types/order.d.ts.map +1 -1
- package/dist/types/types/submit.d.ts +26 -4
- package/dist/types/types/submit.d.ts.map +1 -1
- package/dist/types/types/ws.d.ts +56 -8
- package/dist/types/types/ws.d.ts.map +1 -1
- package/dist/types/utils/lighterAsset.d.ts +7 -1
- package/dist/types/utils/lighterAsset.d.ts.map +1 -1
- package/dist/types/utils/ohlcvInterval.d.ts +6 -1
- package/dist/types/utils/ohlcvInterval.d.ts.map +1 -1
- package/dist/types/utils/transferMargin.d.ts.map +1 -1
- package/dist/types/utils/wireEncoding.d.ts +58 -23
- package/dist/types/utils/wireEncoding.d.ts.map +1 -1
- package/dist/types/websocket/LighterWsProvider.d.ts +6 -0
- package/dist/types/websocket/LighterWsProvider.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/LighterProvider.ts +8 -0
- package/src/constants.ts +15 -2
- package/src/signers/LighterKeyStore.ts +31 -2
- package/src/signers/LighterReadOnlyTokenManager.ts +23 -3
- package/src/signers/LighterSigner.ts +49 -7
- package/src/signers/createAuthToken.ts +8 -2
- package/src/signers/wasmLoader.ts +14 -2
- package/src/types/account.ts +58 -8
- package/src/types/action.ts +72 -18
- package/src/types/activity.ts +64 -10
- package/src/types/asset.ts +72 -12
- package/src/types/fill.ts +14 -2
- package/src/types/order.ts +27 -4
- package/src/types/submit.ts +26 -4
- package/src/types/ws.ts +56 -8
- package/src/utils/lighterAsset.ts +7 -1
- package/src/utils/ohlcvInterval.ts +6 -1
- package/src/utils/transferMargin.ts +2 -6
- package/src/utils/wireEncoding.ts +58 -23
- package/src/websocket/LighterWsProvider.ts +6 -0
package/dist/esm/types/action.js
CHANGED
|
@@ -1,41 +1,95 @@
|
|
|
1
1
|
// Shapes of `wasmSignParams` per action. The backend populates these and the
|
|
2
2
|
// SDK passes them to the WASM signer alongside SDK-managed fields (nonce,
|
|
3
3
|
// account_index, api_key_index).
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Lighter wire value for limit orders.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
5
8
|
export const LT_ORDER_TYPE_LIMIT = 0;
|
|
6
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Lighter wire value for market orders.
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
7
13
|
export const LT_ORDER_TYPE_MARKET = 1;
|
|
8
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Lighter wire value for stop-loss market orders.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
9
18
|
export const LT_ORDER_TYPE_STOP_LOSS = 2;
|
|
10
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Lighter wire value for stop-loss limit orders.
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
11
23
|
export const LT_ORDER_TYPE_STOP_LOSS_LIMIT = 3;
|
|
12
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Lighter wire value for take-profit market orders.
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
13
28
|
export const LT_ORDER_TYPE_TAKE_PROFIT = 4;
|
|
14
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Lighter wire value for take-profit limit orders.
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
15
33
|
export const LT_ORDER_TYPE_TAKE_PROFIT_LIMIT = 5;
|
|
16
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Lighter wire value for TWAP orders.
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
17
38
|
export const LT_ORDER_TYPE_TWAP = 6;
|
|
18
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Lighter wire value for immediate-or-cancel time in force.
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
19
43
|
export const LT_TIME_IN_FORCE_IOC = 0;
|
|
20
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Lighter wire value for good-til-cancelled time in force.
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
21
48
|
export const LT_TIME_IN_FORCE_GTC = 1;
|
|
22
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Lighter wire value for post-only time in force.
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
23
53
|
export const LT_TIME_IN_FORCE_POST_ONLY = 2;
|
|
24
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Lighter cross-margin mode value.
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
25
58
|
export const LT_MARGIN_MODE_CROSS = 0;
|
|
26
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Lighter isolated-margin mode value.
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
27
63
|
export const LT_MARGIN_MODE_ISOLATED = 1;
|
|
28
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Lighter margin-direction value for removing margin.
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
29
68
|
export const LT_MARGIN_DIRECTION_REMOVE = 0;
|
|
30
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Lighter margin-direction value for adding margin.
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
31
73
|
export const LT_MARGIN_DIRECTION_ADD = 1;
|
|
32
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Lighter route selector for perpetuals transfers.
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
33
78
|
export const LT_ROUTE_PERP = 0;
|
|
34
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Lighter route selector for spot transfers.
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
35
83
|
export const LT_ROUTE_SPOT = 1;
|
|
36
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Lighter spot USDC asset id.
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
37
88
|
export const LT_ASSET_ID_USDC = 3;
|
|
38
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* Wire sentinel for an omitted trigger price.
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
39
93
|
export const LT_NIL_TRIGGER_PRICE = 0;
|
|
40
94
|
/**
|
|
41
95
|
* Sentinel the lighter-go WASM signer translates to "default 28-day expiry
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.js","sourceRoot":"","sources":["../../../src/types/action.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,0EAA0E;AAC1E,iCAAiC;AA6GjC
|
|
1
|
+
{"version":3,"file":"action.js","sourceRoot":"","sources":["../../../src/types/action.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,0EAA0E;AAC1E,iCAAiC;AA6GjC;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAA;AACpC;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AACrC;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAA;AACxC;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAA;AAC9C;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAA;AAC1C;;;GAGG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAA;AAChD;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAA;AAEnC;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AACrC;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AACrC;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAA;AAE3C;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AACrC;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAA;AAExC;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAA;AAC3C;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAA;AAExC;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAA;AAC9B;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAA;AAE9B;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAA;AAEjC;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AACrC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,CAAA"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Deposit history row returned by Lighter. `amount` is a decimal asset amount,
|
|
3
|
+
* `timestamp` is Unix milliseconds, and `l1_tx_hash` identifies the settlement
|
|
4
|
+
* transaction on the L1 bridge.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
2
8
|
export interface LtDepositHistoryItem {
|
|
3
9
|
id: string;
|
|
4
10
|
asset_id: number;
|
|
@@ -7,13 +13,24 @@ export interface LtDepositHistoryItem {
|
|
|
7
13
|
status: string;
|
|
8
14
|
l1_tx_hash: string;
|
|
9
15
|
}
|
|
10
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Paginated deposit-history response from Lighter. `cursor` is an opaque
|
|
18
|
+
* continuation value for the next page.
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
11
22
|
export interface LtDepositHistoryResponse {
|
|
12
23
|
code: number;
|
|
13
24
|
deposits: LtDepositHistoryItem[];
|
|
14
25
|
cursor?: string;
|
|
15
26
|
}
|
|
16
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Withdrawal history row returned by Lighter. `amount` is a decimal asset
|
|
29
|
+
* amount, `timestamp` is Unix milliseconds, and `l1_tx_hash` identifies the
|
|
30
|
+
* associated L1 transaction.
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
17
34
|
export interface LtWithdrawHistoryItem {
|
|
18
35
|
id: string;
|
|
19
36
|
asset_id: number;
|
|
@@ -23,13 +40,24 @@ export interface LtWithdrawHistoryItem {
|
|
|
23
40
|
type: string;
|
|
24
41
|
l1_tx_hash: string;
|
|
25
42
|
}
|
|
26
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Paginated withdrawal-history response from Lighter. `cursor` is an opaque
|
|
45
|
+
* continuation value for the next page.
|
|
46
|
+
*
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
27
49
|
export interface LtWithdrawHistoryResponse {
|
|
28
50
|
code: number;
|
|
29
51
|
withdraws: LtWithdrawHistoryItem[];
|
|
30
52
|
cursor?: string;
|
|
31
53
|
}
|
|
32
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Funding-payment history row for one perpetual position. `change`,
|
|
56
|
+
* `position_size`, and `rate` are decimal strings; `timestamp` is a Unix
|
|
57
|
+
* timestamp in seconds and `position_side` is Lighter's side literal.
|
|
58
|
+
*
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
33
61
|
export interface LtPositionFunding {
|
|
34
62
|
timestamp: number;
|
|
35
63
|
market_id: number;
|
|
@@ -39,26 +67,47 @@ export interface LtPositionFunding {
|
|
|
39
67
|
position_size: string;
|
|
40
68
|
position_side: string;
|
|
41
69
|
}
|
|
42
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Paginated position-funding response from Lighter. `next_cursor` is an opaque
|
|
72
|
+
* continuation value for the next page.
|
|
73
|
+
*
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
43
76
|
export interface LtPositionFundingsResponse {
|
|
44
77
|
code: number;
|
|
45
78
|
position_fundings: LtPositionFunding[];
|
|
46
79
|
next_cursor?: string;
|
|
47
80
|
}
|
|
48
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Liquidation event row returned by Lighter. `executed_at` is a Unix timestamp
|
|
83
|
+
* in milliseconds.
|
|
84
|
+
*
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
49
87
|
export interface LtLiquidation {
|
|
50
88
|
id: number;
|
|
51
89
|
market_id: number;
|
|
52
90
|
type: string;
|
|
53
91
|
executed_at: number;
|
|
54
92
|
}
|
|
55
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Paginated liquidation-history response from Lighter. `next_cursor` is an
|
|
95
|
+
* opaque continuation value for the next page.
|
|
96
|
+
*
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
56
99
|
export interface LtLiquidationsResponse {
|
|
57
100
|
code: number;
|
|
58
101
|
liquidations: LtLiquidation[];
|
|
59
102
|
next_cursor?: string;
|
|
60
103
|
}
|
|
61
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Asset transfer-history row returned by Lighter. Amounts and fees are decimal
|
|
106
|
+
* strings in the asset's precision; route literals identify the source and
|
|
107
|
+
* destination account ledger (`spot` or `perps`).
|
|
108
|
+
*
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
62
111
|
export interface LtTransfer {
|
|
63
112
|
id: string;
|
|
64
113
|
asset_id: number;
|
|
@@ -74,7 +123,12 @@ export interface LtTransfer {
|
|
|
74
123
|
to_route: 'spot' | 'perps';
|
|
75
124
|
tx_hash: string;
|
|
76
125
|
}
|
|
77
|
-
/**
|
|
126
|
+
/**
|
|
127
|
+
* Paginated transfer-history response from Lighter. `cursor` is an opaque
|
|
128
|
+
* continuation value for the next page.
|
|
129
|
+
*
|
|
130
|
+
* @public
|
|
131
|
+
*/
|
|
78
132
|
export interface LtTransferHistoryResponse {
|
|
79
133
|
code: number;
|
|
80
134
|
transfers: LtTransfer[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../src/types/activity.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../src/types/activity.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,oBAAoB,EAAE,CAAA;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,qBAAqB,EAAE,CAAA;IAClC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;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yB;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,UAAU,EAAE,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Venue configuration nested in a Lighter perpetual-market descriptor.
|
|
3
|
+
* Numeric fields are Lighter wire mode values; booleans indicate whether the
|
|
4
|
+
* market is currently restricted or hidden.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
2
8
|
export interface LtMarketConfig {
|
|
3
9
|
market_margin_mode: number;
|
|
4
10
|
insurance_fund_account_index: number;
|
|
@@ -8,7 +14,14 @@ export interface LtMarketConfig {
|
|
|
8
14
|
funding_fee_discounts_enabled: boolean;
|
|
9
15
|
hidden: boolean;
|
|
10
16
|
}
|
|
11
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Perpetual-market metadata returned by Lighter's order-book-details endpoint.
|
|
19
|
+
* Decimal strings use the market's native asset/quote precision. Decimal-count
|
|
20
|
+
* fields describe supported and canonical order precision; fee and margin
|
|
21
|
+
* fractions use Lighter's wire representation.
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
12
25
|
export interface LtPerpsOrderBookDetail {
|
|
13
26
|
symbol: string;
|
|
14
27
|
market_id: number;
|
|
@@ -44,7 +57,13 @@ export interface LtPerpsOrderBookDetail {
|
|
|
44
57
|
market_config: LtMarketConfig;
|
|
45
58
|
strategy_index: number;
|
|
46
59
|
}
|
|
47
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Spot-market metadata returned by Lighter's order-book-details endpoint.
|
|
62
|
+
* Decimal strings use the market's native asset/quote precision; decimal-count
|
|
63
|
+
* fields describe supported order precision.
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
48
67
|
export interface LtSpotOrderBookDetail {
|
|
49
68
|
symbol: string;
|
|
50
69
|
market_id: number;
|
|
@@ -72,13 +91,22 @@ export interface LtSpotOrderBookDetail {
|
|
|
72
91
|
daily_price_change: number;
|
|
73
92
|
daily_chart: Record<string, unknown>;
|
|
74
93
|
}
|
|
75
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* Response envelope containing both perpetual and spot market descriptors.
|
|
96
|
+
*
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
76
99
|
export interface LtOrderBookDetailsResponse {
|
|
77
100
|
code: number;
|
|
78
101
|
order_book_details: LtPerpsOrderBookDetail[];
|
|
79
102
|
spot_order_book_details: LtSpotOrderBookDetail[];
|
|
80
103
|
}
|
|
81
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Token metadata returned by Lighter's token-list endpoint. `market` identifies
|
|
106
|
+
* whether the token is associated with a perpetual or spot market.
|
|
107
|
+
*
|
|
108
|
+
* @public
|
|
109
|
+
*/
|
|
82
110
|
export interface LtToken {
|
|
83
111
|
symbol: string;
|
|
84
112
|
name: string;
|
|
@@ -86,12 +114,21 @@ export interface LtToken {
|
|
|
86
114
|
logo_extension: string;
|
|
87
115
|
market: 'PERPS' | 'SPOT';
|
|
88
116
|
}
|
|
89
|
-
/**
|
|
117
|
+
/**
|
|
118
|
+
* Response envelope for Lighter's token-list endpoint.
|
|
119
|
+
*
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
90
122
|
export interface LtTokenListResponse {
|
|
91
123
|
code: number;
|
|
92
124
|
tokens: LtToken[];
|
|
93
125
|
}
|
|
94
|
-
/**
|
|
126
|
+
/**
|
|
127
|
+
* Asset metadata returned by Lighter. `l1_decimals` is the token precision on
|
|
128
|
+
* L1; `decimals` is the Lighter ledger precision.
|
|
129
|
+
*
|
|
130
|
+
* @public
|
|
131
|
+
*/
|
|
95
132
|
export interface LtAssetDetail {
|
|
96
133
|
asset_id: number;
|
|
97
134
|
symbol: string;
|
|
@@ -99,12 +136,21 @@ export interface LtAssetDetail {
|
|
|
99
136
|
decimals: number;
|
|
100
137
|
l1_address: string;
|
|
101
138
|
}
|
|
102
|
-
/**
|
|
139
|
+
/**
|
|
140
|
+
* Response envelope for Lighter's asset-details endpoint.
|
|
141
|
+
*
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
103
144
|
export interface LtAssetDetailsResponse {
|
|
104
145
|
code: number;
|
|
105
146
|
asset_details: LtAssetDetail[];
|
|
106
147
|
}
|
|
107
|
-
/**
|
|
148
|
+
/**
|
|
149
|
+
* OHLCV candle returned by Lighter. `t` is the candle timestamp in Unix
|
|
150
|
+
* milliseconds; `o`, `h`, `l`, and `c` are prices and `v` is volume.
|
|
151
|
+
*
|
|
152
|
+
* @public
|
|
153
|
+
*/
|
|
108
154
|
export interface LtCandle {
|
|
109
155
|
t: number;
|
|
110
156
|
o: number;
|
|
@@ -113,20 +159,34 @@ export interface LtCandle {
|
|
|
113
159
|
c: number;
|
|
114
160
|
v: number;
|
|
115
161
|
}
|
|
116
|
-
/**
|
|
162
|
+
/**
|
|
163
|
+
* Response envelope for a Lighter candle query. `r` is the endpoint's result
|
|
164
|
+
* value and `c` contains the returned candles.
|
|
165
|
+
*
|
|
166
|
+
* @public
|
|
167
|
+
*/
|
|
117
168
|
export interface LtCandlesResponse {
|
|
118
169
|
code: number;
|
|
119
170
|
r: string;
|
|
120
171
|
c: LtCandle[];
|
|
121
172
|
}
|
|
122
|
-
/**
|
|
173
|
+
/**
|
|
174
|
+
* Funding-rate snapshot for one Lighter perpetual market. `rate` is the
|
|
175
|
+
* venue-provided funding-rate value for the named exchange and market.
|
|
176
|
+
*
|
|
177
|
+
* @public
|
|
178
|
+
*/
|
|
123
179
|
export interface LtFundingRate {
|
|
124
180
|
market_id: number;
|
|
125
181
|
exchange: string;
|
|
126
182
|
symbol: string;
|
|
127
183
|
rate: number;
|
|
128
184
|
}
|
|
129
|
-
/**
|
|
185
|
+
/**
|
|
186
|
+
* Response envelope containing current funding rates by market.
|
|
187
|
+
*
|
|
188
|
+
* @public
|
|
189
|
+
*/
|
|
130
190
|
export interface LtFundingRatesResponse {
|
|
131
191
|
code: number;
|
|
132
192
|
funding_rates: LtFundingRate[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../../src/types/asset.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../../src/types/asset.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,kBAAkB,EAAE,MAAM,CAAA;IAC1B,4BAA4B,EAAE,MAAM,CAAA;IACpC,gBAAgB,EAAE,MAAM,CAAA;IACxB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,aAAa,EAAE,MAAM,CAAA;IACrB,6BAA6B,EAAE,OAAO,CAAA;IACtC,MAAM,EAAE,OAAO,CAAA;CAChB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,iBAAiB,EAAE,MAAM,CAAA;IACzB,uBAAuB,EAAE,MAAM,CAAA;IAC/B,wBAAwB,EAAE,MAAM,CAAA;IAChC,wBAAwB,EAAE,MAAM,CAAA;IAChC,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,gBAAgB,EAAE,MAAM,CAAA;IACxB,+BAA+B,EAAE,MAAM,CAAA;IACvC,2BAA2B,EAAE,MAAM,CAAA;IACnC,2BAA2B,EAAE,MAAM,CAAA;IACnC,w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SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,aAAa,EAAE,CAAA;CAC/B"}
|
package/dist/esm/types/fill.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Public trade/fill row returned by Lighter's `/api/v1/trades` endpoint.
|
|
3
|
+
* Size, price, and notional fields are decimal strings in market precision;
|
|
4
|
+
* `timestamp` and `transaction_time` are Unix millisecond timestamps. The
|
|
5
|
+
* optional fee fields are integer fee ticks and may be absent on older rows.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
2
9
|
export type LtTrade = {
|
|
3
10
|
trade_id: number;
|
|
4
11
|
tx_hash: string;
|
|
@@ -22,7 +29,12 @@ export type LtTrade = {
|
|
|
22
29
|
taker_entry_quote_before?: string;
|
|
23
30
|
maker_entry_quote_before?: string;
|
|
24
31
|
};
|
|
25
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Paginated trade-history response from Lighter. `next_cursor` is an opaque
|
|
34
|
+
* continuation value for the next page.
|
|
35
|
+
*
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
26
38
|
export interface LtTradesResponse {
|
|
27
39
|
code: number;
|
|
28
40
|
next_cursor: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fill.d.ts","sourceRoot":"","sources":["../../../src/types/fill.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"fill.d.ts","sourceRoot":"","sources":["../../../src/types/fill.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IAIjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAA;IAGxB,0BAA0B,EAAE,MAAM,CAAA;IAClC,0BAA0B,EAAE,MAAM,CAAA;IAKlC,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC,CAAA;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,OAAO,EAAE,CAAA;CAClB"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Order payload returned by Lighter's REST API. Amounts and prices are decimal
|
|
3
|
+
* strings in market precision. `order_expiry` is an absolute Unix-millisecond
|
|
4
|
+
* expiry; `created_at`, `updated_at`, and `transaction_time` are Unix seconds.
|
|
5
|
+
* Enum-like side, type, time-in-force, status, and trigger fields retain
|
|
6
|
+
* Lighter's wire strings.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
2
10
|
export type LtOrder = {
|
|
3
11
|
order_index: number;
|
|
4
12
|
client_order_index: number;
|
|
@@ -33,13 +41,24 @@ export type LtOrder = {
|
|
|
33
41
|
updated_at: number;
|
|
34
42
|
transaction_time: number;
|
|
35
43
|
};
|
|
36
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Paginated order-history response from Lighter. `next_cursor` is an opaque
|
|
46
|
+
* continuation value for the next page.
|
|
47
|
+
*
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
37
50
|
export interface LtOrdersResponse {
|
|
38
51
|
code: number;
|
|
39
52
|
next_cursor: string;
|
|
40
53
|
orders: LtOrder[];
|
|
41
54
|
}
|
|
42
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Single order-book level returned by Lighter. Amounts and prices are decimal
|
|
57
|
+
* strings in the market's native precision; expiry and transaction time are
|
|
58
|
+
* Unix milliseconds.
|
|
59
|
+
*
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
43
62
|
export interface LtOrderBookOrder {
|
|
44
63
|
order_index: number;
|
|
45
64
|
order_id: string;
|
|
@@ -50,7 +69,11 @@ export interface LtOrderBookOrder {
|
|
|
50
69
|
order_expiry: number;
|
|
51
70
|
transaction_time: number;
|
|
52
71
|
}
|
|
53
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Order-book response containing separate ask and bid levels plus their counts.
|
|
74
|
+
*
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
54
77
|
export interface LtOrderBookOrdersResponse {
|
|
55
78
|
code: number;
|
|
56
79
|
total_asks: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.d.ts","sourceRoot":"","sources":["../../../src/types/order.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"order.d.ts","sourceRoot":"","sources":["../../../src/types/order.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,MAAM,CAAA;IACvB,YAAY,EAAE,MAAM,C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,CAAA;IACb,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,gBAAgB,EAAE,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,gBAAgB,EAAE,CAAA;CACzB"}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Request body for Lighter's `/api/v1/sendTx` endpoint. `tx_type` and
|
|
3
|
+
* `tx_info` are the signed WASM transaction envelope; `price_protection` is an
|
|
4
|
+
* optional venue-side execution guard.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
2
8
|
export interface LtSendTxRequest {
|
|
3
9
|
tx_type: number;
|
|
4
10
|
tx_info: string;
|
|
5
11
|
price_protection?: boolean;
|
|
6
12
|
}
|
|
7
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Response from Lighter's `/api/v1/sendTx` endpoint. `tx_hash` identifies the
|
|
15
|
+
* submitted transaction; timing and quota fields are optional venue estimates.
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
8
19
|
export interface LtSendTxResponse {
|
|
9
20
|
code: number;
|
|
10
21
|
message: string;
|
|
@@ -12,12 +23,23 @@ export interface LtSendTxResponse {
|
|
|
12
23
|
predicted_execution_time_ms?: number;
|
|
13
24
|
volume_quota_remaining?: number;
|
|
14
25
|
}
|
|
15
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Batch request body for Lighter's transaction submission endpoint.
|
|
28
|
+
* `tx_types` is a JSON-encoded number array and `tx_infos` a JSON-encoded
|
|
29
|
+
* string array; corresponding entries are submitted in array order.
|
|
30
|
+
*
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
16
33
|
export interface LtSendTxBatchRequest {
|
|
17
34
|
tx_types: string;
|
|
18
35
|
tx_infos: string;
|
|
19
36
|
}
|
|
20
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Batch submission response from Lighter. Each `tx_hash` corresponds to the
|
|
39
|
+
* transaction at the same index in the submitted batch.
|
|
40
|
+
*
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
21
43
|
export interface LtSendTxBatchResponse {
|
|
22
44
|
code: number;
|
|
23
45
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit.d.ts","sourceRoot":"","sources":["../../../src/types/submit.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"submit.d.ts","sourceRoot":"","sources":["../../../src/types/submit.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,2BAA2B,CAAC,EAAE,MAAM,CAAA;IACpC,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,2BAA2B,CAAC,EAAE,MAAM,CAAA;IACpC,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAChC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE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