@clober/v2-sdk 0.0.66 → 0.0.68
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/abis/rebalancer/minter-abi.js +0 -32
- package/dist/cjs/abis/rebalancer/minter-abi.js.map +1 -1
- package/dist/cjs/abis/rebalancer/operator-abi.js +5 -0
- package/dist/cjs/abis/rebalancer/operator-abi.js.map +1 -1
- package/dist/cjs/abis/rebalancer/rebalancer-abi.js +38 -36
- package/dist/cjs/abis/rebalancer/rebalancer-abi.js.map +1 -1
- package/dist/cjs/abis/rebalancer/strategy-abi.js +29 -0
- package/dist/cjs/abis/rebalancer/strategy-abi.js.map +1 -1
- package/dist/cjs/apis/odos.js +2 -2
- package/dist/cjs/apis/odos.js.map +1 -1
- package/dist/cjs/apis/pool.js +12 -2
- package/dist/cjs/apis/pool.js.map +1 -1
- package/dist/cjs/call.js +28 -9
- package/dist/cjs/call.js.map +1 -1
- package/dist/cjs/constants/addresses.js +8 -8
- package/dist/cjs/constants/permit.js +3 -2
- package/dist/cjs/constants/permit.js.map +1 -1
- package/dist/cjs/constants/subgraph.js +10 -14
- package/dist/cjs/constants/subgraph.js.map +1 -1
- package/dist/cjs/model/pool.js +29 -1
- package/dist/cjs/model/pool.js.map +1 -1
- package/dist/cjs/type.js.map +1 -1
- package/dist/cjs/utils/order.js +36 -21
- package/dist/cjs/utils/order.js.map +1 -1
- package/dist/cjs/view.js.map +1 -1
- package/dist/esm/abis/rebalancer/minter-abi.js +0 -32
- package/dist/esm/abis/rebalancer/minter-abi.js.map +1 -1
- package/dist/esm/abis/rebalancer/operator-abi.js +5 -0
- package/dist/esm/abis/rebalancer/operator-abi.js.map +1 -1
- package/dist/esm/abis/rebalancer/rebalancer-abi.js +38 -36
- package/dist/esm/abis/rebalancer/rebalancer-abi.js.map +1 -1
- package/dist/esm/abis/rebalancer/strategy-abi.js +29 -0
- package/dist/esm/abis/rebalancer/strategy-abi.js.map +1 -1
- package/dist/esm/apis/odos.js +2 -2
- package/dist/esm/apis/odos.js.map +1 -1
- package/dist/esm/apis/pool.js +13 -3
- package/dist/esm/apis/pool.js.map +1 -1
- package/dist/esm/call.js +40 -20
- package/dist/esm/call.js.map +1 -1
- package/dist/esm/constants/addresses.js +8 -8
- package/dist/esm/constants/permit.js +3 -2
- package/dist/esm/constants/permit.js.map +1 -1
- package/dist/esm/constants/subgraph.js +10 -14
- package/dist/esm/constants/subgraph.js.map +1 -1
- package/dist/esm/model/pool.js +29 -1
- package/dist/esm/model/pool.js.map +1 -1
- package/dist/esm/type.js.map +1 -1
- package/dist/esm/utils/order.js +35 -21
- package/dist/esm/utils/order.js.map +1 -1
- package/dist/esm/view.js +7 -6
- package/dist/esm/view.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/abis/rebalancer/minter-abi.d.ts +0 -24
- package/dist/types/abis/rebalancer/minter-abi.d.ts.map +1 -1
- package/dist/types/abis/rebalancer/operator-abi.d.ts +4 -0
- package/dist/types/abis/rebalancer/operator-abi.d.ts.map +1 -1
- package/dist/types/abis/rebalancer/rebalancer-abi.d.ts +30 -28
- package/dist/types/abis/rebalancer/rebalancer-abi.d.ts.map +1 -1
- package/dist/types/abis/rebalancer/strategy-abi.d.ts +23 -0
- package/dist/types/abis/rebalancer/strategy-abi.d.ts.map +1 -1
- package/dist/types/apis/odos.d.ts +2 -2
- package/dist/types/apis/odos.d.ts.map +1 -1
- package/dist/types/apis/pool.d.ts.map +1 -1
- package/dist/types/approval.d.ts +3 -3
- package/dist/types/approval.d.ts.map +1 -1
- package/dist/types/call.d.ts +45 -24
- package/dist/types/call.d.ts.map +1 -1
- package/dist/types/constants/permit.d.ts +2 -2
- package/dist/types/constants/permit.d.ts.map +1 -1
- package/dist/types/constants/subgraph.d.ts.map +1 -1
- package/dist/types/model/open-order.d.ts +10 -8
- package/dist/types/model/open-order.d.ts.map +1 -1
- package/dist/types/model/pool.d.ts +15 -6
- package/dist/types/model/pool.d.ts.map +1 -1
- package/dist/types/type.d.ts +7 -5
- package/dist/types/type.d.ts.map +1 -1
- package/dist/types/utils/order.d.ts +3 -2
- package/dist/types/utils/order.d.ts.map +1 -1
- package/dist/types/view.d.ts +21 -14
- package/dist/types/view.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -14,34 +14,10 @@ export declare const MINTER_ABI: readonly [{
|
|
|
14
14
|
}];
|
|
15
15
|
readonly stateMutability: "nonpayable";
|
|
16
16
|
readonly type: "constructor";
|
|
17
|
-
}, {
|
|
18
|
-
readonly inputs: readonly [{
|
|
19
|
-
readonly internalType: "address";
|
|
20
|
-
readonly name: "target";
|
|
21
|
-
readonly type: "address";
|
|
22
|
-
}];
|
|
23
|
-
readonly name: "AddressEmptyCode";
|
|
24
|
-
readonly type: "error";
|
|
25
17
|
}, {
|
|
26
18
|
readonly inputs: readonly [];
|
|
27
19
|
readonly name: "ERC20TransferFailed";
|
|
28
20
|
readonly type: "error";
|
|
29
|
-
}, {
|
|
30
|
-
readonly inputs: readonly [];
|
|
31
|
-
readonly name: "FailedCall";
|
|
32
|
-
readonly type: "error";
|
|
33
|
-
}, {
|
|
34
|
-
readonly inputs: readonly [{
|
|
35
|
-
readonly internalType: "uint256";
|
|
36
|
-
readonly name: "balance";
|
|
37
|
-
readonly type: "uint256";
|
|
38
|
-
}, {
|
|
39
|
-
readonly internalType: "uint256";
|
|
40
|
-
readonly name: "needed";
|
|
41
|
-
readonly type: "uint256";
|
|
42
|
-
}];
|
|
43
|
-
readonly name: "InsufficientBalance";
|
|
44
|
-
readonly type: "error";
|
|
45
21
|
}, {
|
|
46
22
|
readonly inputs: readonly [];
|
|
47
23
|
readonly name: "NativeTransferFailed";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minter-abi.d.ts","sourceRoot":"","sources":["../../../../src/abis/rebalancer/minter-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"minter-abi.d.ts","sourceRoot":"","sources":["../../../../src/abis/rebalancer/minter-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiOb,CAAA"}
|
|
@@ -248,6 +248,10 @@ export declare const OPERATOR_ABI: readonly [{
|
|
|
248
248
|
readonly internalType: "Tick";
|
|
249
249
|
readonly name: "tickB";
|
|
250
250
|
readonly type: "int24";
|
|
251
|
+
}, {
|
|
252
|
+
readonly internalType: "uint64";
|
|
253
|
+
readonly name: "alpha";
|
|
254
|
+
readonly type: "uint64";
|
|
251
255
|
}];
|
|
252
256
|
readonly name: "updatePrice";
|
|
253
257
|
readonly outputs: readonly [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-abi.d.ts","sourceRoot":"","sources":["../../../../src/abis/rebalancer/operator-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"operator-abi.d.ts","sourceRoot":"","sources":["../../../../src/abis/rebalancer/operator-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkXf,CAAA"}
|
|
@@ -10,14 +10,6 @@ export declare const REBALANCER_ABI: readonly [{
|
|
|
10
10
|
}];
|
|
11
11
|
readonly stateMutability: "nonpayable";
|
|
12
12
|
readonly type: "constructor";
|
|
13
|
-
}, {
|
|
14
|
-
readonly inputs: readonly [{
|
|
15
|
-
readonly internalType: "address";
|
|
16
|
-
readonly name: "target";
|
|
17
|
-
readonly type: "address";
|
|
18
|
-
}];
|
|
19
|
-
readonly name: "AddressEmptyCode";
|
|
20
|
-
readonly type: "error";
|
|
21
13
|
}, {
|
|
22
14
|
readonly inputs: readonly [];
|
|
23
15
|
readonly name: "AlreadyOpened";
|
|
@@ -26,22 +18,6 @@ export declare const REBALANCER_ABI: readonly [{
|
|
|
26
18
|
readonly inputs: readonly [];
|
|
27
19
|
readonly name: "ERC20TransferFailed";
|
|
28
20
|
readonly type: "error";
|
|
29
|
-
}, {
|
|
30
|
-
readonly inputs: readonly [];
|
|
31
|
-
readonly name: "FailedCall";
|
|
32
|
-
readonly type: "error";
|
|
33
|
-
}, {
|
|
34
|
-
readonly inputs: readonly [{
|
|
35
|
-
readonly internalType: "uint256";
|
|
36
|
-
readonly name: "balance";
|
|
37
|
-
readonly type: "uint256";
|
|
38
|
-
}, {
|
|
39
|
-
readonly internalType: "uint256";
|
|
40
|
-
readonly name: "needed";
|
|
41
|
-
readonly type: "uint256";
|
|
42
|
-
}];
|
|
43
|
-
readonly name: "InsufficientBalance";
|
|
44
|
-
readonly type: "error";
|
|
45
21
|
}, {
|
|
46
22
|
readonly inputs: readonly [];
|
|
47
23
|
readonly name: "InvalidAmount";
|
|
@@ -600,13 +576,39 @@ export declare const REBALANCER_ABI: readonly [{
|
|
|
600
576
|
}];
|
|
601
577
|
readonly name: "getLiquidity";
|
|
602
578
|
readonly outputs: readonly [{
|
|
603
|
-
readonly
|
|
579
|
+
readonly components: readonly [{
|
|
580
|
+
readonly internalType: "uint256";
|
|
581
|
+
readonly name: "reserve";
|
|
582
|
+
readonly type: "uint256";
|
|
583
|
+
}, {
|
|
584
|
+
readonly internalType: "uint256";
|
|
585
|
+
readonly name: "claimable";
|
|
586
|
+
readonly type: "uint256";
|
|
587
|
+
}, {
|
|
588
|
+
readonly internalType: "uint256";
|
|
589
|
+
readonly name: "cancelable";
|
|
590
|
+
readonly type: "uint256";
|
|
591
|
+
}];
|
|
592
|
+
readonly internalType: "struct IRebalancer.Liquidity";
|
|
604
593
|
readonly name: "liquidityA";
|
|
605
|
-
readonly type: "
|
|
594
|
+
readonly type: "tuple";
|
|
606
595
|
}, {
|
|
607
|
-
readonly
|
|
596
|
+
readonly components: readonly [{
|
|
597
|
+
readonly internalType: "uint256";
|
|
598
|
+
readonly name: "reserve";
|
|
599
|
+
readonly type: "uint256";
|
|
600
|
+
}, {
|
|
601
|
+
readonly internalType: "uint256";
|
|
602
|
+
readonly name: "claimable";
|
|
603
|
+
readonly type: "uint256";
|
|
604
|
+
}, {
|
|
605
|
+
readonly internalType: "uint256";
|
|
606
|
+
readonly name: "cancelable";
|
|
607
|
+
readonly type: "uint256";
|
|
608
|
+
}];
|
|
609
|
+
readonly internalType: "struct IRebalancer.Liquidity";
|
|
608
610
|
readonly name: "liquidityB";
|
|
609
|
-
readonly type: "
|
|
611
|
+
readonly type: "tuple";
|
|
610
612
|
}];
|
|
611
613
|
readonly stateMutability: "view";
|
|
612
614
|
readonly type: "function";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rebalancer-abi.d.ts","sourceRoot":"","sources":["../../../../src/abis/rebalancer/rebalancer-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"rebalancer-abi.d.ts","sourceRoot":"","sources":["../../../../src/abis/rebalancer/rebalancer-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgtCjB,CAAA"}
|
|
@@ -34,6 +34,10 @@ export declare const STRATEGY_ABI: readonly [{
|
|
|
34
34
|
readonly inputs: readonly [];
|
|
35
35
|
readonly name: "InvalidTick";
|
|
36
36
|
readonly type: "error";
|
|
37
|
+
}, {
|
|
38
|
+
readonly inputs: readonly [];
|
|
39
|
+
readonly name: "InvalidValue";
|
|
40
|
+
readonly type: "error";
|
|
37
41
|
}, {
|
|
38
42
|
readonly inputs: readonly [];
|
|
39
43
|
readonly name: "NotOperator";
|
|
@@ -177,6 +181,11 @@ export declare const STRATEGY_ABI: readonly [{
|
|
|
177
181
|
readonly internalType: "Tick";
|
|
178
182
|
readonly name: "tickB";
|
|
179
183
|
readonly type: "int24";
|
|
184
|
+
}, {
|
|
185
|
+
readonly indexed: false;
|
|
186
|
+
readonly internalType: "uint256";
|
|
187
|
+
readonly name: "alpha";
|
|
188
|
+
readonly type: "uint256";
|
|
180
189
|
}];
|
|
181
190
|
readonly name: "UpdatePrice";
|
|
182
191
|
readonly type: "event";
|
|
@@ -250,6 +259,16 @@ export declare const STRATEGY_ABI: readonly [{
|
|
|
250
259
|
}];
|
|
251
260
|
readonly stateMutability: "view";
|
|
252
261
|
readonly type: "function";
|
|
262
|
+
}, {
|
|
263
|
+
readonly inputs: readonly [];
|
|
264
|
+
readonly name: "getAlpha";
|
|
265
|
+
readonly outputs: readonly [{
|
|
266
|
+
readonly internalType: "uint256";
|
|
267
|
+
readonly name: "";
|
|
268
|
+
readonly type: "uint256";
|
|
269
|
+
}];
|
|
270
|
+
readonly stateMutability: "view";
|
|
271
|
+
readonly type: "function";
|
|
253
272
|
}, {
|
|
254
273
|
readonly inputs: readonly [{
|
|
255
274
|
readonly internalType: "bytes32";
|
|
@@ -478,6 +497,10 @@ export declare const STRATEGY_ABI: readonly [{
|
|
|
478
497
|
readonly internalType: "Tick";
|
|
479
498
|
readonly name: "tickB";
|
|
480
499
|
readonly type: "int24";
|
|
500
|
+
}, {
|
|
501
|
+
readonly internalType: "uint256";
|
|
502
|
+
readonly name: "alpha";
|
|
503
|
+
readonly type: "uint256";
|
|
481
504
|
}];
|
|
482
505
|
readonly name: "updatePrice";
|
|
483
506
|
readonly outputs: readonly [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strategy-abi.d.ts","sourceRoot":"","sources":["../../../../src/abis/rebalancer/strategy-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"strategy-abi.d.ts","sourceRoot":"","sources":["../../../../src/abis/rebalancer/strategy-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAipBf,CAAA"}
|
|
@@ -8,7 +8,7 @@ export declare function fetchQuote({ chainId, amountIn, tokenIn, tokenOut, slipp
|
|
|
8
8
|
tokenOut: Currency;
|
|
9
9
|
slippageLimitPercent: number;
|
|
10
10
|
userAddress: `0x${string}`;
|
|
11
|
-
testnetPrice?: number;
|
|
11
|
+
testnetPrice?: number | undefined;
|
|
12
12
|
}): Promise<{
|
|
13
13
|
amountOut: bigint;
|
|
14
14
|
pathId: string;
|
|
@@ -20,7 +20,7 @@ export declare function fetchCallData({ chainId, amountIn, tokenIn, tokenOut, sl
|
|
|
20
20
|
tokenOut: Currency;
|
|
21
21
|
slippageLimitPercent: number;
|
|
22
22
|
userAddress: `0x${string}`;
|
|
23
|
-
testnetPrice?: number;
|
|
23
|
+
testnetPrice?: number | undefined;
|
|
24
24
|
}): Promise<{
|
|
25
25
|
amountOut: bigint;
|
|
26
26
|
data: `0x${string}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odos.d.ts","sourceRoot":"","sources":["../../../src/apis/odos.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAkB,MAAM,oBAAoB,CAAA;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,wBAAsB,YAAY,CAAC,CAAC,EAClC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,CAAC,CAAC,CAWZ;AAED,wBAAsB,UAAU,CAAC,EAC/B,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,oBAAoB,EACpB,WAAW,EACX,YAAY,GACb,EAAE;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,QAAQ,CAAA;IACjB,QAAQ,EAAE,QAAQ,CAAA;IAClB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,WAAW,EAAE,KAAK,MAAM,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"odos.d.ts","sourceRoot":"","sources":["../../../src/apis/odos.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAkB,MAAM,oBAAoB,CAAA;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,wBAAsB,YAAY,CAAC,CAAC,EAClC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,CAAC,CAAC,CAWZ;AAED,wBAAsB,UAAU,CAAC,EAC/B,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,oBAAoB,EACpB,WAAW,EACX,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AAE,KAAK,MAAM,EAAE,EACnB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../../../src/apis/pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAQpC,wBAAsB,SAAS,CAC7B,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,SAAS,EAClB,cAAc,EAAE,KAAK,MAAM,EAAE,EAAE,EAC/B,IAAI,EAAE,KAAK,MAAM,EAAE,EACnB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,IAAI,CAAC,CA4Ef"}
|
package/dist/types/approval.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WalletClient } from 'viem';
|
|
2
2
|
import { CHAIN_IDS } from './constants/chain';
|
|
3
|
-
import type {
|
|
3
|
+
import type { DefaultWriteContractOptions } from './type';
|
|
4
4
|
/**
|
|
5
5
|
* @dev This function relates with `viem` dependency
|
|
6
6
|
* Sets approval of all open orders for the specified account on the given chain.
|
|
@@ -28,7 +28,7 @@ import type { DefaultOptions } from './type';
|
|
|
28
28
|
export declare const setApprovalOfOpenOrdersForAll: ({ chainId, walletClient, options, }: {
|
|
29
29
|
chainId: CHAIN_IDS;
|
|
30
30
|
walletClient: WalletClient;
|
|
31
|
-
options?:
|
|
31
|
+
options?: DefaultWriteContractOptions;
|
|
32
32
|
}) => Promise<`0x${string}` | undefined>;
|
|
33
33
|
/**
|
|
34
34
|
* @dev This function relates with `viem` dependency
|
|
@@ -62,6 +62,6 @@ export declare const approveERC20: ({ chainId, walletClient, token, amount, opti
|
|
|
62
62
|
walletClient: WalletClient;
|
|
63
63
|
token: `0x${string}`;
|
|
64
64
|
amount?: string;
|
|
65
|
-
options?:
|
|
65
|
+
options?: DefaultWriteContractOptions;
|
|
66
66
|
}) => Promise<`0x${string}` | undefined>;
|
|
67
67
|
//# sourceMappingURL=approval.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../src/approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,YAAY,EAAE,MAAM,MAAM,CAAA;AAEzE,OAAO,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAA;AAGxD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../src/approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,YAAY,EAAE,MAAM,MAAM,CAAA;AAEzE,OAAO,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAA;AAGxD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAA;AAIzD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,6BAA6B,wCAIvC;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,YAAY,EAAE,YAAY,CAAA;IAC1B,OAAO,CAAC,EAAE,2BAA2B,CAAA;CACtC,KAAG,QAAQ,KAAK,MAAM,EAAE,GAAG,SAAS,CA2CpC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,YAAY,uDAMtB;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,YAAY,EAAE,YAAY,CAAA;IAC1B,KAAK,EAAE,KAAK,MAAM,EAAE,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,2BAA2B,CAAA;CACtC,KAAG,QAAQ,KAAK,MAAM,EAAE,GAAG,SAAS,CAsDpC,CAAA"}
|
package/dist/types/call.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CHAIN_IDS } from './constants/chain';
|
|
2
|
-
import type { Currency6909Flow, CurrencyFlow,
|
|
2
|
+
import type { Currency6909Flow, CurrencyFlow, DefaultWriteContractOptions, ERC20PermitParam, Transaction } from './type';
|
|
3
3
|
/**
|
|
4
4
|
* Build a transaction to open a market.
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@ import type { Currency6909Flow, CurrencyFlow, DefaultOptions, ERC20PermitParam,
|
|
|
7
7
|
* @param userAddress The address of the user.
|
|
8
8
|
* @param inputToken The address of the input token.
|
|
9
9
|
* @param outputToken The address of the output token.
|
|
10
|
-
* @param options {@link
|
|
10
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
11
11
|
* @returns A Promise resolving to a transaction object. If the market is already open, returns undefined.
|
|
12
12
|
* @example
|
|
13
13
|
* import { openMarket } from '@clober/v2-sdk'
|
|
@@ -24,7 +24,9 @@ export declare const openMarket: ({ chainId, userAddress, inputToken, outputToke
|
|
|
24
24
|
userAddress: `0x${string}`;
|
|
25
25
|
inputToken: `0x${string}`;
|
|
26
26
|
outputToken: `0x${string}`;
|
|
27
|
-
options?:
|
|
27
|
+
options?: DefaultWriteContractOptions & {
|
|
28
|
+
useSubgraph?: boolean;
|
|
29
|
+
};
|
|
28
30
|
}) => Promise<Transaction | undefined>;
|
|
29
31
|
/**
|
|
30
32
|
* Places a limit order on the specified chain for trading tokens.
|
|
@@ -35,7 +37,7 @@ export declare const openMarket: ({ chainId, userAddress, inputToken, outputToke
|
|
|
35
37
|
* @param {`0x${string}`} outputToken The address of the token to be received as output.
|
|
36
38
|
* @param {string} amount The amount of input tokens for the order.
|
|
37
39
|
* @param {string} price The price at which the order should be executed.
|
|
38
|
-
* @param options {@link
|
|
40
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
39
41
|
* @param {erc20PermitParam} [options.erc20PermitParam] The permit signature for token approval.
|
|
40
42
|
* @param {boolean} [options.postOnly] A boolean indicating whether the order is only to be made not taken.
|
|
41
43
|
* @param {bigint} [options.makeTick] The tick for the make order.
|
|
@@ -87,7 +89,8 @@ export declare const limitOrder: ({ chainId, userAddress, inputToken, outputToke
|
|
|
87
89
|
roundingDownMakeAsk?: boolean;
|
|
88
90
|
roundingDownTakenBid?: boolean;
|
|
89
91
|
roundingUpTakenAsk?: boolean;
|
|
90
|
-
|
|
92
|
+
useSubgraph?: boolean;
|
|
93
|
+
} & DefaultWriteContractOptions;
|
|
91
94
|
}) => Promise<{
|
|
92
95
|
transaction: Transaction;
|
|
93
96
|
result: {
|
|
@@ -119,7 +122,7 @@ export declare const limitOrder: ({ chainId, userAddress, inputToken, outputToke
|
|
|
119
122
|
* @param {`0x${string}`} outputToken The address of the token to be received as output.
|
|
120
123
|
* @param {string} amountIn The amount of input tokens for the order to spend.
|
|
121
124
|
* @param {string} amountOut The amount of output tokens for the order to take.
|
|
122
|
-
* @param options {@link
|
|
125
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
123
126
|
* @param {erc20PermitParam} [options.erc20PermitParam] The permit signature for token approval.
|
|
124
127
|
* @param {number} [options.slippage] The maximum slippage percentage allowed for the order.
|
|
125
128
|
* @param {boolean} [options.roundingDownTakenBid] A boolean indicating whether to round down the taken bid.
|
|
@@ -153,7 +156,8 @@ export declare const marketOrder: ({ chainId, userAddress, inputToken, outputTok
|
|
|
153
156
|
slippage?: number;
|
|
154
157
|
roundingDownTakenBid?: boolean;
|
|
155
158
|
roundingUpTakenAsk?: boolean;
|
|
156
|
-
|
|
159
|
+
useSubgraph?: boolean;
|
|
160
|
+
} & DefaultWriteContractOptions;
|
|
157
161
|
}) => Promise<{
|
|
158
162
|
transaction: Transaction;
|
|
159
163
|
result: {
|
|
@@ -178,7 +182,7 @@ export declare const marketOrder: ({ chainId, userAddress, inputToken, outputTok
|
|
|
178
182
|
* @param {CHAIN_IDS} chainId The chain ID.
|
|
179
183
|
* @param {`0x${string}`} userAddress The Ethereum address of the user.
|
|
180
184
|
* @param {string} id An ID representing the open order to be claimed.
|
|
181
|
-
* @param options {@link
|
|
185
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
182
186
|
* @returns {Promise<{ transaction: Transaction, result: CurrencyFlow }>}
|
|
183
187
|
* Promise resolving to the transaction object representing the claim action with the result of the order.
|
|
184
188
|
* @throws {Error} Throws an error if no open orders are found for the specified user.
|
|
@@ -199,7 +203,9 @@ export declare const claimOrder: ({ chainId, userAddress, id, options, }: {
|
|
|
199
203
|
chainId: CHAIN_IDS;
|
|
200
204
|
userAddress: `0x${string}`;
|
|
201
205
|
id: string;
|
|
202
|
-
options?:
|
|
206
|
+
options?: DefaultWriteContractOptions & {
|
|
207
|
+
useSubgraph?: boolean;
|
|
208
|
+
};
|
|
203
209
|
}) => Promise<{
|
|
204
210
|
transaction: Transaction;
|
|
205
211
|
result: CurrencyFlow;
|
|
@@ -211,7 +217,7 @@ export declare const claimOrder: ({ chainId, userAddress, id, options, }: {
|
|
|
211
217
|
* @param {CHAIN_IDS} chainId The chain ID.
|
|
212
218
|
* @param {`0x${string}`} userAddress The Ethereum address of the user.
|
|
213
219
|
* @param {string[]} ids An array of IDs representing the open orders to be claimed.
|
|
214
|
-
* @param options {@link
|
|
220
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
215
221
|
* @returns {Promise<{ transaction: Transaction, result: CurrencyFlow[] }>}
|
|
216
222
|
* Promise resolving to the transaction object representing the claim action with the result of the orders.
|
|
217
223
|
* @throws {Error} Throws an error if no open orders are found for the specified user.
|
|
@@ -232,7 +238,9 @@ export declare const claimOrders: ({ chainId, userAddress, ids, options, }: {
|
|
|
232
238
|
chainId: CHAIN_IDS;
|
|
233
239
|
userAddress: `0x${string}`;
|
|
234
240
|
ids: string[];
|
|
235
|
-
options?:
|
|
241
|
+
options?: DefaultWriteContractOptions & {
|
|
242
|
+
useSubgraph?: boolean;
|
|
243
|
+
};
|
|
236
244
|
}) => Promise<{
|
|
237
245
|
transaction: Transaction;
|
|
238
246
|
result: CurrencyFlow[];
|
|
@@ -244,7 +252,7 @@ export declare const claimOrders: ({ chainId, userAddress, ids, options, }: {
|
|
|
244
252
|
* @param {CHAIN_IDS} chainId The chain ID.
|
|
245
253
|
* @param {`0x${string}`} userAddress The Ethereum address of the user.
|
|
246
254
|
* @param {string} id An ID representing the open order to be canceled
|
|
247
|
-
* @param options {@link
|
|
255
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
248
256
|
* @returns {Promise<{ transaction: Transaction, result: CurrencyFlow }>}
|
|
249
257
|
* Promise resolving to the transaction object representing the cancel action with the result of the order.
|
|
250
258
|
* @throws {Error} Throws an error if no open orders are found for the specified user.
|
|
@@ -265,7 +273,9 @@ export declare const cancelOrder: ({ chainId, userAddress, id, options, }: {
|
|
|
265
273
|
chainId: CHAIN_IDS;
|
|
266
274
|
userAddress: `0x${string}`;
|
|
267
275
|
id: string;
|
|
268
|
-
options?:
|
|
276
|
+
options?: DefaultWriteContractOptions & {
|
|
277
|
+
useSubgraph?: boolean;
|
|
278
|
+
};
|
|
269
279
|
}) => Promise<{
|
|
270
280
|
transaction: Transaction;
|
|
271
281
|
result: CurrencyFlow;
|
|
@@ -277,7 +287,7 @@ export declare const cancelOrder: ({ chainId, userAddress, id, options, }: {
|
|
|
277
287
|
* @param {CHAIN_IDS} chainId The chain ID.
|
|
278
288
|
* @param {`0x${string}`} userAddress The Ethereum address of the user.
|
|
279
289
|
* @param {string[]} ids An array of IDs representing the open orders to be canceled.
|
|
280
|
-
* @param options {@link
|
|
290
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
281
291
|
* @returns {Promise<{ transaction: Transaction, result: CurrencyFlow[] }>
|
|
282
292
|
* Promise resolving to the transaction object representing the cancel action with the result of the orders.
|
|
283
293
|
* @throws {Error} Throws an error if no open orders are found for the specified user.
|
|
@@ -298,7 +308,9 @@ export declare const cancelOrders: ({ chainId, userAddress, ids, options, }: {
|
|
|
298
308
|
chainId: CHAIN_IDS;
|
|
299
309
|
userAddress: `0x${string}`;
|
|
300
310
|
ids: string[];
|
|
301
|
-
options?:
|
|
311
|
+
options?: DefaultWriteContractOptions & {
|
|
312
|
+
useSubgraph?: boolean;
|
|
313
|
+
};
|
|
302
314
|
}) => Promise<{
|
|
303
315
|
transaction: Transaction;
|
|
304
316
|
result: CurrencyFlow[];
|
|
@@ -310,7 +322,7 @@ export declare const cancelOrders: ({ chainId, userAddress, ids, options, }: {
|
|
|
310
322
|
* @param userAddress The address of the user.
|
|
311
323
|
* @param inputToken The address of the input token.
|
|
312
324
|
* @param outputToken The address of the output token.
|
|
313
|
-
* @param options {@link
|
|
325
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
314
326
|
* @returns A Promise resolving to a transaction object. If the market is already open, returns undefined.
|
|
315
327
|
* @example
|
|
316
328
|
* import { openPool } from '@clober/v2-sdk'
|
|
@@ -319,7 +331,8 @@ export declare const cancelOrders: ({ chainId, userAddress, ids, options, }: {
|
|
|
319
331
|
* chainId: 421614,
|
|
320
332
|
* userAddress: '0xF8c1869Ecd4df136693C45EcE1b67f85B6bDaE69',
|
|
321
333
|
* inputToken: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
|
|
322
|
-
* outputToken: '0x0000000000000000000000000000000000000000'
|
|
334
|
+
* outputToken: '0x0000000000000000000000000000000000000000',
|
|
335
|
+
* salt: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
|
323
336
|
* })
|
|
324
337
|
*/
|
|
325
338
|
export declare const openPool: ({ chainId, userAddress, tokenA, tokenB, salt, options, }: {
|
|
@@ -328,7 +341,9 @@ export declare const openPool: ({ chainId, userAddress, tokenA, tokenB, salt, op
|
|
|
328
341
|
tokenA: `0x${string}`;
|
|
329
342
|
tokenB: `0x${string}`;
|
|
330
343
|
salt: `0x${string}`;
|
|
331
|
-
options?:
|
|
344
|
+
options?: DefaultWriteContractOptions & {
|
|
345
|
+
useSubgraph?: boolean;
|
|
346
|
+
};
|
|
332
347
|
}) => Promise<Transaction | undefined>;
|
|
333
348
|
export declare const addLiquidity: ({ chainId, userAddress, token0, token1, salt, amount0, amount1, options, }: {
|
|
334
349
|
chainId: CHAIN_IDS;
|
|
@@ -341,10 +356,11 @@ export declare const addLiquidity: ({ chainId, userAddress, token0, token1, salt
|
|
|
341
356
|
options?: {
|
|
342
357
|
slippage?: number;
|
|
343
358
|
disableSwap?: boolean;
|
|
344
|
-
testnetPrice?: string;
|
|
345
359
|
token0PermitParams?: ERC20PermitParam;
|
|
346
360
|
token1PermitParams?: ERC20PermitParam;
|
|
347
|
-
|
|
361
|
+
testnetPrice?: number;
|
|
362
|
+
useSubgraph?: boolean;
|
|
363
|
+
} & DefaultWriteContractOptions;
|
|
348
364
|
}) => Promise<{
|
|
349
365
|
transaction: Transaction | undefined;
|
|
350
366
|
result: {
|
|
@@ -362,7 +378,8 @@ export declare const removeLiquidity: ({ chainId, userAddress, token0, token1, s
|
|
|
362
378
|
amount: string;
|
|
363
379
|
options?: {
|
|
364
380
|
slippage?: number;
|
|
365
|
-
|
|
381
|
+
useSubgraph?: boolean;
|
|
382
|
+
} & DefaultWriteContractOptions;
|
|
366
383
|
}) => Promise<{
|
|
367
384
|
transaction: Transaction | undefined;
|
|
368
385
|
result: {
|
|
@@ -377,9 +394,11 @@ export declare const rebalance: ({ chainId, userAddress, token0, token1, salt, o
|
|
|
377
394
|
token0: `0x${string}`;
|
|
378
395
|
token1: `0x${string}`;
|
|
379
396
|
salt: `0x${string}`;
|
|
380
|
-
options?:
|
|
397
|
+
options?: DefaultWriteContractOptions & {
|
|
398
|
+
useSubgraph?: boolean;
|
|
399
|
+
};
|
|
381
400
|
}) => Promise<Transaction>;
|
|
382
|
-
export declare const updateStrategyPrice: ({ chainId, userAddress, token0, token1, salt, oraclePrice, priceA, priceB, options, }: {
|
|
401
|
+
export declare const updateStrategyPrice: ({ chainId, userAddress, token0, token1, salt, oraclePrice, priceA, priceB, alpha, options, }: {
|
|
383
402
|
chainId: CHAIN_IDS;
|
|
384
403
|
userAddress: `0x${string}`;
|
|
385
404
|
token0: `0x${string}`;
|
|
@@ -388,11 +407,13 @@ export declare const updateStrategyPrice: ({ chainId, userAddress, token0, token
|
|
|
388
407
|
oraclePrice: string;
|
|
389
408
|
priceA: string;
|
|
390
409
|
priceB: string;
|
|
410
|
+
alpha: string;
|
|
391
411
|
options?: {
|
|
392
412
|
tickA?: bigint;
|
|
393
413
|
tickB?: bigint;
|
|
394
414
|
roundingUpPriceA?: boolean;
|
|
395
415
|
roundingUpPriceB?: boolean;
|
|
396
|
-
|
|
416
|
+
useSubgraph?: boolean;
|
|
417
|
+
} & DefaultWriteContractOptions;
|
|
397
418
|
}) => Promise<Transaction>;
|
|
398
419
|
//# sourceMappingURL=call.d.ts.map
|
package/dist/types/call.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../src/call.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,
|
|
1
|
+
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../src/call.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,2BAA2B,EAC3B,gBAAgB,EAChB,WAAW,EACZ,MAAM,QAAQ,CAAA;AA6Bf;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU,gEAMpB;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,WAAW,EAAE,KAAK,MAAM,EAAE,CAAA;IAC1B,UAAU,EAAE,KAAK,MAAM,EAAE,CAAA;IACzB,WAAW,EAAE,KAAK,MAAM,EAAE,CAAA;IAC1B,OAAO,CAAC,EAAE,2BAA2B,GAAG;QACtC,WAAW,CAAC,EAAE,OAAO,CAAA;KACtB,CAAA;CACF,KAAG,QAAQ,WAAW,GAAG,SAAS,CAkDlC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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KACtB,GAAG,2BAA2B,CAAA;CAChC,KAAG,QAAQ,WAAW,CA2EtB,CAAA"}
|
|
@@ -3,8 +3,8 @@ export declare const emptyERC20PermitParams: {
|
|
|
3
3
|
signature: {
|
|
4
4
|
deadline: bigint;
|
|
5
5
|
v: number;
|
|
6
|
-
r:
|
|
7
|
-
s:
|
|
6
|
+
r: "0x0000000000000000000000000000000000000000000000000000000000000000";
|
|
7
|
+
s: "0x0000000000000000000000000000000000000000000000000000000000000000";
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=permit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permit.d.ts","sourceRoot":"","sources":["../../../src/constants/permit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"permit.d.ts","sourceRoot":"","sources":["../../../src/constants/permit.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB;;;;;;;;CAQlC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subgraph.d.ts","sourceRoot":"","sources":["../../../src/constants/subgraph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subgraph.d.ts","sourceRoot":"","sources":["../../../src/constants/subgraph.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAiBnC,qBAAa,QAAQ;WACC,GAAG,CAAC,CAAC,EACvB,OAAO,EAAE,SAAS,EAClB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,EAAE,GACZ,OAAO,CAAC,CAAC,CAAC;CAsBd"}
|
|
@@ -27,34 +27,36 @@ export type OpenOrderDto = {
|
|
|
27
27
|
unitClaimableAmount: string;
|
|
28
28
|
orderIndex: string;
|
|
29
29
|
};
|
|
30
|
-
export type
|
|
30
|
+
export type OnChainOpenOrder = {
|
|
31
31
|
id: string;
|
|
32
32
|
user: `0x${string}`;
|
|
33
33
|
isBid: boolean;
|
|
34
34
|
inputCurrency: Currency;
|
|
35
35
|
outputCurrency: Currency;
|
|
36
|
-
txHash: `0x${string}`;
|
|
37
|
-
createdAt: number;
|
|
38
36
|
price: string;
|
|
39
37
|
tick: number;
|
|
40
38
|
orderIndex: string;
|
|
41
|
-
|
|
39
|
+
claimable: {
|
|
42
40
|
currency: Currency;
|
|
43
41
|
value: string;
|
|
44
42
|
};
|
|
45
|
-
|
|
43
|
+
cancelable: {
|
|
46
44
|
currency: Currency;
|
|
47
45
|
value: string;
|
|
48
46
|
};
|
|
49
|
-
|
|
47
|
+
};
|
|
48
|
+
export type OpenOrder = OnChainOpenOrder & {
|
|
49
|
+
txHash: `0x${string}`;
|
|
50
|
+
createdAt: number;
|
|
51
|
+
amount: {
|
|
50
52
|
currency: Currency;
|
|
51
53
|
value: string;
|
|
52
54
|
};
|
|
53
|
-
|
|
55
|
+
filled: {
|
|
54
56
|
currency: Currency;
|
|
55
57
|
value: string;
|
|
56
58
|
};
|
|
57
|
-
|
|
59
|
+
claimed: {
|
|
58
60
|
currency: Currency;
|
|
59
61
|
value: string;
|
|
60
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-order.d.ts","sourceRoot":"","sources":["../../../src/model/open-order.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAE1C,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,IAAI,EAAE;YACJ,EAAE,EAAE,MAAM,CAAA;YACV,IAAI,EAAE,MAAM,CAAA;YACZ,MAAM,EAAE,MAAM,CAAA;YACd,QAAQ,EAAE,MAAM,CAAA;SACjB,CAAA;QACD,KAAK,EAAE;YACL,EAAE,EAAE,MAAM,CAAA;YACV,IAAI,EAAE,MAAM,CAAA;YACZ,MAAM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,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,KAAK,MAAM,EAAE,CAAA;IACnB,KAAK,EAAE,OAAO,CAAA;IACd,aAAa,EAAE,QAAQ,CAAA;IACvB,cAAc,EAAE,QAAQ,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAChD,UAAU,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CAClD,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG;IACzC,MAAM,EAAE,KAAK,MAAM,EAAE,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC7C,MAAM,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC7C,OAAO,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CAC/C,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CHAIN_IDS, Currency
|
|
1
|
+
import { CHAIN_IDS, Currency } from '../type';
|
|
2
2
|
import { Market } from './market';
|
|
3
3
|
import { Currency6909 } from './currency';
|
|
4
|
+
import { OnChainOpenOrder } from './open-order';
|
|
4
5
|
export declare class Pool {
|
|
5
6
|
key: `0x${string}`;
|
|
6
7
|
market: Market;
|
|
@@ -15,9 +16,13 @@ export declare class Pool {
|
|
|
15
16
|
reserveB: string;
|
|
16
17
|
liquidityA: bigint;
|
|
17
18
|
liquidityB: bigint;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
cancelableA: bigint;
|
|
20
|
+
cancelableB: bigint;
|
|
21
|
+
claimableA: bigint;
|
|
22
|
+
claimableB: bigint;
|
|
23
|
+
orderListA: OnChainOpenOrder[];
|
|
24
|
+
orderListB: OnChainOpenOrder[];
|
|
25
|
+
constructor({ chainId, market, isOpened, bookIdA, bookIdB, salt, poolKey, totalSupply, decimals, reserveA, reserveB, liquidityA, liquidityB, cancelableA, cancelableB, claimableA, claimableB, orderListA, orderListB, }: {
|
|
21
26
|
chainId: CHAIN_IDS;
|
|
22
27
|
market: Market;
|
|
23
28
|
isOpened: boolean;
|
|
@@ -31,8 +36,12 @@ export declare class Pool {
|
|
|
31
36
|
reserveB: bigint;
|
|
32
37
|
liquidityA: bigint;
|
|
33
38
|
liquidityB: bigint;
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
cancelableA: bigint;
|
|
40
|
+
cancelableB: bigint;
|
|
41
|
+
claimableA: bigint;
|
|
42
|
+
claimableB: bigint;
|
|
43
|
+
orderListA: OnChainOpenOrder[];
|
|
44
|
+
orderListB: OnChainOpenOrder[];
|
|
36
45
|
});
|
|
37
46
|
}
|
|
38
47
|
//# sourceMappingURL=pool.d.ts.map
|