@clober/v2-sdk 1.0.0-beta.19 → 1.0.0-beta.20
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/constants/abis/rebalancer/rebalancer-abi.js +42 -0
- package/dist/cjs/constants/abis/rebalancer/rebalancer-abi.js.map +1 -1
- package/dist/cjs/views/index.js +2 -1
- package/dist/cjs/views/index.js.map +1 -1
- package/dist/cjs/views/pool/index.js +2 -1
- package/dist/cjs/views/pool/index.js.map +1 -1
- package/dist/cjs/views/pool/market-making.js +49 -1
- package/dist/cjs/views/pool/market-making.js.map +1 -1
- package/dist/esm/constants/abis/rebalancer/rebalancer-abi.js +42 -0
- package/dist/esm/constants/abis/rebalancer/rebalancer-abi.js.map +1 -1
- package/dist/esm/views/index.js +1 -1
- package/dist/esm/views/index.js.map +1 -1
- package/dist/esm/views/pool/index.js +1 -1
- package/dist/esm/views/pool/index.js.map +1 -1
- package/dist/esm/views/pool/market-making.js +48 -1
- package/dist/esm/views/pool/market-making.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/constants/abis/rebalancer/rebalancer-abi.d.ts +35 -0
- package/dist/types/constants/abis/rebalancer/rebalancer-abi.d.ts.map +1 -1
- package/dist/types/views/index.d.ts +1 -1
- package/dist/types/views/index.d.ts.map +1 -1
- package/dist/types/views/pool/index.d.ts +1 -1
- package/dist/types/views/pool/index.d.ts.map +1 -1
- package/dist/types/views/pool/market-making.d.ts +19 -1
- package/dist/types/views/pool/market-making.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -342,6 +342,41 @@ export declare const REBALANCER_ABI: readonly [{
|
|
|
342
342
|
readonly internalType: "bytes32";
|
|
343
343
|
readonly name: "key";
|
|
344
344
|
readonly type: "bytes32";
|
|
345
|
+
}, {
|
|
346
|
+
readonly indexed: true;
|
|
347
|
+
readonly internalType: "address";
|
|
348
|
+
readonly name: "caller";
|
|
349
|
+
readonly type: "address";
|
|
350
|
+
}, {
|
|
351
|
+
readonly indexed: false;
|
|
352
|
+
readonly internalType: "uint256[]";
|
|
353
|
+
readonly name: "orderListA";
|
|
354
|
+
readonly type: "uint256[]";
|
|
355
|
+
}, {
|
|
356
|
+
readonly indexed: false;
|
|
357
|
+
readonly internalType: "uint256[]";
|
|
358
|
+
readonly name: "orderListB";
|
|
359
|
+
readonly type: "uint256[]";
|
|
360
|
+
}, {
|
|
361
|
+
readonly indexed: false;
|
|
362
|
+
readonly internalType: "uint256";
|
|
363
|
+
readonly name: "amountA";
|
|
364
|
+
readonly type: "uint256";
|
|
365
|
+
}, {
|
|
366
|
+
readonly indexed: false;
|
|
367
|
+
readonly internalType: "uint256";
|
|
368
|
+
readonly name: "amountB";
|
|
369
|
+
readonly type: "uint256";
|
|
370
|
+
}, {
|
|
371
|
+
readonly indexed: false;
|
|
372
|
+
readonly internalType: "uint256";
|
|
373
|
+
readonly name: "reserveA";
|
|
374
|
+
readonly type: "uint256";
|
|
375
|
+
}, {
|
|
376
|
+
readonly indexed: false;
|
|
377
|
+
readonly internalType: "uint256";
|
|
378
|
+
readonly name: "reserveB";
|
|
379
|
+
readonly type: "uint256";
|
|
345
380
|
}];
|
|
346
381
|
readonly name: "Rebalance";
|
|
347
382
|
readonly type: "event";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rebalancer-abi.d.ts","sourceRoot":"","sources":["../../../../../src/constants/abis/rebalancer/rebalancer-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"rebalancer-abi.d.ts","sourceRoot":"","sources":["../../../../../src/constants/abis/rebalancer/rebalancer-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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, getMarketSnapshot, getQuoteToken, parseMakeOrderIdsFromReceipt, getLatestTakes, } from './market';
|
|
2
|
-
export { getPool, getPoolSnapshot, getPoolSnapshots, getUserPoolPositions, getStrategyPrice, getLastAmounts, getLpWrappedERC20Address, } from './pool';
|
|
2
|
+
export { getPool, getPoolSnapshot, getPoolSnapshots, getUserPoolPositions, getStrategyPrice, getLastAmounts, getLpWrappedERC20Address, watchMarketMakingEvents, } from './pool';
|
|
3
3
|
export { getLatestTrades } from './trade';
|
|
4
4
|
export { getPriceNeighborhood } from './tick';
|
|
5
5
|
export { getOpenOrder, getOpenOrders } from './open-order';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,4BAA4B,EAC5B,cAAc,GACf,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,4BAA4B,EAC5B,cAAc,GACf,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,aAAa,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CHAIN_IDS } from '../../constants/chain-configs/chain';
|
|
2
2
|
import { DefaultReadContractOptions, DefaultWriteContractOptions, Market, Pool } from '../../types';
|
|
3
|
-
export { getStrategyPrice, getLastAmounts } from './market-making';
|
|
3
|
+
export { getStrategyPrice, getLastAmounts, watchMarketMakingEvents, } from './market-making';
|
|
4
4
|
export { getPoolSnapshot, getPoolSnapshots } from './snapshot';
|
|
5
5
|
export { getUserPoolPositions } from './position';
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/pool/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAa,MAAM,qCAAqC,CAAA;AAC1E,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,MAAM,EACN,IAAI,EACL,MAAM,aAAa,CAAA;AAKpB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/pool/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAa,MAAM,qCAAqC,CAAA;AAC1E,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,MAAM,EACN,IAAI,EACL,MAAM,aAAa,CAAA;AAKpB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,uBAAuB,GACxB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEjD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,OAAO,gDAMjB;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,MAAM,EAAE,KAAK,MAAM,EAAE,CAAA;IACrB,MAAM,EAAE,KAAK,MAAM,EAAE,CAAA;IACrB,IAAI,EAAE,KAAK,MAAM,EAAE,CAAA;IACnB,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,CAAC,CAAC,EAAE,MAAM,CAAA;QACV,WAAW,CAAC,EAAE,OAAO,CAAA;KACtB,GAAG,0BAA0B,CAAA;CAC/B,KAAG,QAAQ,IAAI,CAoBf,CAAA;AAED,eAAO,MAAM,wBAAwB,mCAIlC;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;IACtB,OAAO,CAAC,EAAE,2BAA2B,GAAG;QACtC,WAAW,CAAC,EAAE,OAAO,CAAA;KACtB,CAAA;CACF,2BAWA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CHAIN_IDS } from '../../constants/chain-configs/chain';
|
|
2
|
-
import { DefaultReadContractOptions, LastAmounts, StrategyPosition } from '../../types';
|
|
2
|
+
import { DefaultReadContractOptions, LastAmounts, PoolSnapshot, StrategyPosition } from '../../types';
|
|
3
3
|
export declare const getStrategyPrice: ({ chainId, poolKey, options, }: {
|
|
4
4
|
chainId: CHAIN_IDS;
|
|
5
5
|
poolKey: `0x${string}`;
|
|
@@ -10,4 +10,22 @@ export declare const getLastAmounts: ({ chainId, poolKey, options, }: {
|
|
|
10
10
|
poolKey: `0x${string}`;
|
|
11
11
|
options?: DefaultReadContractOptions;
|
|
12
12
|
}) => Promise<LastAmounts>;
|
|
13
|
+
export declare const watchMarketMakingEvents: ({ chainId, poolSnapshot, options, onEvent, onError, }: {
|
|
14
|
+
chainId: CHAIN_IDS;
|
|
15
|
+
poolSnapshot: PoolSnapshot;
|
|
16
|
+
onEvent: (args: {
|
|
17
|
+
bidOrderList: {
|
|
18
|
+
price: string;
|
|
19
|
+
size: string;
|
|
20
|
+
}[];
|
|
21
|
+
askOrderList: {
|
|
22
|
+
price: string;
|
|
23
|
+
size: string;
|
|
24
|
+
}[];
|
|
25
|
+
quoteReserve: string;
|
|
26
|
+
baseReserve: string;
|
|
27
|
+
}) => void;
|
|
28
|
+
onError?: (error: Error) => void;
|
|
29
|
+
options?: DefaultReadContractOptions;
|
|
30
|
+
}) => import("viem").WatchContractEventReturnType;
|
|
13
31
|
//# sourceMappingURL=market-making.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market-making.d.ts","sourceRoot":"","sources":["../../../../src/views/pool/market-making.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"market-making.d.ts","sourceRoot":"","sources":["../../../../src/views/pool/market-making.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAa,MAAM,qCAAqC,CAAA;AAC1E,OAAO,EACL,0BAA0B,EAC1B,WAAW,EACX,YAAY,EACZ,gBAAgB,EACjB,MAAM,aAAa,CAAA;AAUpB,eAAO,MAAM,gBAAgB,mCAI1B;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;IACtB,OAAO,CAAC,EAAE,0BAA0B,CAAA;CACrC,KAAG,QAAQ,gBAAgB,CAM3B,CAAA;AAED,eAAO,MAAM,cAAc,mCAIxB;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;IACtB,OAAO,CAAC,EAAE,0BAA0B,CAAA;CACrC,KAAG,QAAQ,WAAW,CAMtB,CAAA;AAED,eAAO,MAAM,uBAAuB,0DAMjC;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,YAAY,EAAE,YAAY,CAAA;IAC1B,OAAO,EAAE,CAAC,IAAI,EAAE;QACd,YAAY,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;QAC/C,YAAY,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;QAC/C,YAAY,EAAE,MAAM,CAAA;QACpB,WAAW,EAAE,MAAM,CAAA;KACpB,KAAK,IAAI,CAAA;IACV,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,OAAO,CAAC,EAAE,0BAA0B,CAAA;CACrC,gDA6DA,CAAA"}
|