timelock-sdk 0.0.174 → 0.0.176
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/{client-yxi2vqQi.d.cts → client-Bs4nrL5u.d.ts} +383 -383
- package/dist/{client-BQywQ047.d.ts → client-DbQo5Dsk.d.cts} +304 -304
- package/dist/client.cjs +19 -9
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +19 -9
- package/dist/client.js.map +1 -1
- package/dist/{optionUtils-C1TXirKy.cjs → optionUtils-BHU2evq2.cjs} +20 -8
- package/dist/{optionUtils-C1TXirKy.cjs.map → optionUtils-BHU2evq2.cjs.map} +1 -1
- package/dist/{optionUtils-D2-zFl18.js → optionUtils-DV3VdMvm.js} +20 -8
- package/dist/{optionUtils-D2-zFl18.js.map → optionUtils-DV3VdMvm.js.map} +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.d.cts +1 -1
- package/dist/package.d.ts +1 -1
- package/dist/package.js +1 -1
- package/package.json +1 -1
package/dist/client.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
const require_optionUtils = require('./optionUtils-
|
|
4
|
+
const require_optionUtils = require('./optionUtils-BHU2evq2.cjs');
|
|
5
5
|
const require_statelessStateView = require('./statelessStateView-CtzW08Yu.cjs');
|
|
6
6
|
const require_factory = require('./factory-DitVXzjQ.cjs');
|
|
7
7
|
let viem = require("viem");
|
|
@@ -10,8 +10,8 @@ react = require_optionUtils.__toESM(react);
|
|
|
10
10
|
let graphql_request = require("graphql-request");
|
|
11
11
|
let graphql_tag = require("graphql-tag");
|
|
12
12
|
graphql_tag = require_optionUtils.__toESM(graphql_tag);
|
|
13
|
-
let wagmi = require("wagmi");
|
|
14
13
|
let __tanstack_react_query = require("@tanstack/react-query");
|
|
14
|
+
let wagmi = require("wagmi");
|
|
15
15
|
let viem_actions = require("viem/actions");
|
|
16
16
|
let zod = require("zod");
|
|
17
17
|
|
|
@@ -441,11 +441,21 @@ const useTimelockConfig = () => {
|
|
|
441
441
|
//#endregion
|
|
442
442
|
//#region src/hooks/useLens.ts
|
|
443
443
|
const useLens = () => {
|
|
444
|
-
const client = (0, wagmi.
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
444
|
+
const client = (0, wagmi.usePublicClient)();
|
|
445
|
+
const { data: timelockLens } = (0, __tanstack_react_query.useQuery)({
|
|
446
|
+
queryKey: ["timelockLens", client === null || client === void 0 ? void 0 : client.uid],
|
|
447
|
+
queryFn: () => client ? require_optionUtils.getTimelockLens(client) : void 0,
|
|
448
|
+
enabled: !!client
|
|
449
|
+
});
|
|
450
|
+
const { data: stateView } = (0, __tanstack_react_query.useQuery)({
|
|
451
|
+
queryKey: ["stateView", client === null || client === void 0 ? void 0 : client.uid],
|
|
452
|
+
queryFn: () => client ? require_optionUtils.getStateView(client) : void 0,
|
|
453
|
+
enabled: !!client
|
|
454
|
+
});
|
|
455
|
+
return {
|
|
456
|
+
timelockLens,
|
|
457
|
+
stateView
|
|
458
|
+
};
|
|
449
459
|
};
|
|
450
460
|
|
|
451
461
|
//#endregion
|
|
@@ -1338,7 +1348,7 @@ const useBurnLiquidity = (vaultAddr) => {
|
|
|
1338
1348
|
const client = (0, wagmi.useClient)();
|
|
1339
1349
|
const { timelockLens } = useLens();
|
|
1340
1350
|
const { poolManager, poolKey } = useVaultData(vaultAddr);
|
|
1341
|
-
const currentTick = useCurrentTick(poolManager, poolKey);
|
|
1351
|
+
const { data: { currentTick } = {} } = useCurrentTick(poolManager, poolKey);
|
|
1342
1352
|
const { writeContractAsync, data: hash, isPending, error } = (0, wagmi.useWriteContract)();
|
|
1343
1353
|
const { isLoading: isConfirming, isSuccess } = (0, wagmi.useWaitForTransactionReceipt)({ hash });
|
|
1344
1354
|
const burn = async (tickLower, tickUpper, liquidity) => {
|
|
@@ -1438,7 +1448,7 @@ const useMintLiquidity = (vaultAddr) => {
|
|
|
1438
1448
|
const client = (0, wagmi.useClient)();
|
|
1439
1449
|
const { poolManager, poolKey } = useVaultData(vaultAddr);
|
|
1440
1450
|
const { timelockLens } = useLens();
|
|
1441
|
-
const {
|
|
1451
|
+
const { data: { currentTick } = {} } = useCurrentTick(poolManager, poolKey);
|
|
1442
1452
|
const { token0, token1 } = usePoolData(poolManager, poolKey);
|
|
1443
1453
|
const { askForApproval } = useApproval();
|
|
1444
1454
|
const { writeContractAsync } = (0, wagmi.useWriteContract)();
|