timelock-sdk 0.0.125 → 0.0.126
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-R3EwrHFY.d.ts → client-BaTCKa-Q.d.ts} +13 -12
- package/dist/{client-CdVPqvLC.d.cts → client-zn1D8T6b.d.cts} +147 -146
- package/dist/client.cjs +9 -3
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +9 -4
- package/dist/client.js.map +1 -1
- package/dist/{optionUtils-Cv3pCXVh.cjs → optionUtils-D1cM5YX1.cjs} +3 -3
- package/dist/optionUtils-D1cM5YX1.cjs.map +1 -0
- package/dist/{optionUtils-BuQmVUD4.js → optionUtils-Mlp5ZX6W.js} +3 -3
- package/dist/optionUtils-Mlp5ZX6W.js.map +1 -0
- 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/optionUtils-BuQmVUD4.js.map +0 -1
- package/dist/optionUtils-Cv3pCXVh.cjs.map +0 -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-D1cM5YX1.cjs');
|
|
5
5
|
const require_optionsMarket = require('./optionsMarket-C8-v8IvX.cjs');
|
|
6
6
|
const require_singleOwnerVault = require('./singleOwnerVault-gf2zNZVk.cjs');
|
|
7
7
|
let viem = require("viem");
|
|
@@ -1229,23 +1229,28 @@ const useOperatorPerms = (marketAddr, userAddr, operatorAddr) => {
|
|
|
1229
1229
|
|
|
1230
1230
|
//#endregion
|
|
1231
1231
|
//#region src/hooks/pool/usePriceHistory.ts
|
|
1232
|
-
const usePriceHistory = (pool, resolution, startTimestamp, endTimestamp) => {
|
|
1232
|
+
const usePriceHistory = (pool, token, resolution, startTimestamp, endTimestamp) => {
|
|
1233
1233
|
return (0, __tanstack_react_query.useQuery)({
|
|
1234
1234
|
queryKey: [
|
|
1235
1235
|
"priceHistory",
|
|
1236
1236
|
pool,
|
|
1237
1237
|
(0, wagmi.useChainId)(),
|
|
1238
|
+
token,
|
|
1238
1239
|
resolution,
|
|
1239
1240
|
startTimestamp,
|
|
1240
1241
|
endTimestamp
|
|
1241
1242
|
],
|
|
1242
|
-
queryFn: () => require_optionUtils.getPriceHistory(pool, resolution, startTimestamp, endTimestamp),
|
|
1243
|
+
queryFn: () => require_optionUtils.getPriceHistory(pool, token, resolution, startTimestamp, endTimestamp),
|
|
1243
1244
|
enabled: !!pool && startTimestamp < endTimestamp,
|
|
1244
1245
|
staleTime: 60 * 1e3,
|
|
1245
1246
|
gcTime: 300 * 1e3,
|
|
1246
1247
|
retry: 2
|
|
1247
1248
|
});
|
|
1248
1249
|
};
|
|
1250
|
+
const useMarketPriceHistory = (marketAddr, resolution, startTimestamp, endTimestamp) => {
|
|
1251
|
+
const { pool, optionAssetIsToken0 } = useMarketData(marketAddr);
|
|
1252
|
+
return usePriceHistory(pool, optionAssetIsToken0 ? 0 : 1, resolution, startTimestamp, endTimestamp);
|
|
1253
|
+
};
|
|
1249
1254
|
|
|
1250
1255
|
//#endregion
|
|
1251
1256
|
//#region src/hooks/vault/useVaultData.ts
|
|
@@ -1456,6 +1461,7 @@ exports.useExtendOption = useExtendOption;
|
|
|
1456
1461
|
exports.useLens = useLens;
|
|
1457
1462
|
exports.useLiquidityBlocks = useLiquidityBlocks;
|
|
1458
1463
|
exports.useMarketData = useMarketData;
|
|
1464
|
+
exports.useMarketPriceHistory = useMarketPriceHistory;
|
|
1459
1465
|
exports.useMaxPositionSize = useMaxPositionSize;
|
|
1460
1466
|
exports.useMintLiquidity = useMintLiquidity;
|
|
1461
1467
|
exports.useMintOption = useMintOption;
|