timelock-sdk 0.0.119 → 0.0.120
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/abis.cjs +1 -1
- package/dist/abis.d.cts +1 -1
- package/dist/abis.d.ts +1 -1
- package/dist/abis.js +1 -1
- package/dist/{client-CxAAahmW.d.ts → client-CTL-mr5n.d.ts} +2297 -2634
- package/dist/{client-Cgi8okgz.d.cts → client-r3O6AK_5.d.cts} +2336 -2673
- package/dist/client.cjs +4 -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 +4 -3
- package/dist/client.js.map +1 -1
- package/dist/{optionUtils-ZSFOJxaV.cjs → optionUtils-BHL27KMw.cjs} +10 -3
- package/dist/optionUtils-BHL27KMw.cjs.map +1 -0
- package/dist/{optionUtils-D8zF6lcX.js → optionUtils-CtGcjfvf.js} +5 -4
- package/dist/optionUtils-CtGcjfvf.js.map +1 -0
- package/dist/{optionsMarket-D6zrIXc3.cjs → optionsMarket-C8-v8IvX.cjs} +65 -155
- package/dist/optionsMarket-C8-v8IvX.cjs.map +1 -0
- package/dist/{optionsMarket-DBuVI-kl.js → optionsMarket-Dkwpa2uO.js} +65 -155
- package/dist/optionsMarket-Dkwpa2uO.js.map +1 -0
- package/dist/package.cjs +3 -2
- package/dist/package.d.cts +3 -3
- package/dist/package.d.ts +3 -3
- package/dist/package.js +3 -3
- package/dist/{uniswapMathLens-ChJFZ6hc.d.ts → uniswapMathLens-DtacRMPz.d.cts} +55 -124
- package/dist/{uniswapMathLens-B_cHjOOB.d.cts → uniswapMathLens-JKcBN1v_.d.ts} +55 -124
- package/package.json +1 -1
- package/dist/optionUtils-D8zF6lcX.js.map +0 -1
- package/dist/optionUtils-ZSFOJxaV.cjs.map +0 -1
- package/dist/optionsMarket-D6zrIXc3.cjs.map +0 -1
- package/dist/optionsMarket-DBuVI-kl.js.map +0 -1
package/dist/client.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
const require_optionUtils = require('./optionUtils-
|
|
5
|
-
const require_optionsMarket = require('./optionsMarket-
|
|
4
|
+
const require_optionUtils = require('./optionUtils-BHL27KMw.cjs');
|
|
5
|
+
const require_optionsMarket = require('./optionsMarket-C8-v8IvX.cjs');
|
|
6
6
|
const require_singleOwnerVault = require('./singleOwnerVault-gf2zNZVk.cjs');
|
|
7
7
|
let viem = require("viem");
|
|
8
8
|
let react = require("react");
|
|
@@ -487,7 +487,6 @@ const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
|
487
487
|
|
|
488
488
|
//#endregion
|
|
489
489
|
//#region src/hooks/options/useExerciseOption.ts
|
|
490
|
-
const swapper = "0x877309663591ad974bE2c0C7fB453844c8D613D8";
|
|
491
490
|
const useExerciseOption = (marketAddr) => {
|
|
492
491
|
const { vault, pool } = useMarketData(marketAddr);
|
|
493
492
|
const { fee } = usePoolData(pool);
|
|
@@ -502,6 +501,8 @@ const useExerciseOption = (marketAddr) => {
|
|
|
502
501
|
if (!timelockLens) throw new Error("Timelock lens not available");
|
|
503
502
|
if (!vault) throw new Error("Vault not available");
|
|
504
503
|
if (!fee) throw new Error("Pool data not available");
|
|
504
|
+
const swapper = require_optionUtils.swappers[client.chain.id];
|
|
505
|
+
if (!swapper) throw new Error("Swapper not available");
|
|
505
506
|
const refTick = await timelockLens.read.getRefTick([vault, option.startTick]);
|
|
506
507
|
const hash = await writeContractAsync({
|
|
507
508
|
address: marketAddr,
|