timelock-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/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.cjs +4 -5
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +121 -122
- package/dist/client.d.ts +243 -244
- package/dist/client.js +4 -5
- package/dist/client.js.map +1 -1
- package/dist/{index-DmUTOkWh.d.cts → index-B3zG2vl9.d.ts} +120 -119
- package/dist/{index-WjU9H0Tc.d.ts → index-lyv29QjP.d.cts} +211 -210
- package/dist/{numberUtils-BVUp0GfC.js → numberUtils-BdDZHOYj.js} +9 -4
- package/dist/{numberUtils-BVUp0GfC.js.map → numberUtils-BdDZHOYj.js.map} +1 -1
- package/dist/{numberUtils-BxQ4RnW9.cjs → numberUtils-ByjL6x6B.cjs} +14 -3
- package/dist/{numberUtils-BxQ4RnW9.cjs.map → numberUtils-ByjL6x6B.cjs.map} +1 -1
- package/dist/{optionsMarket-GbBWALCn.js → optionsMarket-6PlyceXp.js} +9 -9
- package/dist/{optionsMarket-GbBWALCn.js.map → optionsMarket-6PlyceXp.js.map} +1 -1
- package/dist/{optionsMarket-BpL6x4be.cjs → optionsMarket-DxGdV3HF.cjs} +9 -9
- package/dist/{optionsMarket-BpL6x4be.cjs.map → optionsMarket-DxGdV3HF.cjs.map} +1 -1
- 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-i1P7D19j.d.ts → uniswapMathLens-C54iWXpi.d.ts} +9 -9
- package/dist/{uniswapMathLens-BF5k8KFu.d.cts → uniswapMathLens-CK8C7WOt.d.cts} +9 -9
- package/package.json +1 -1
package/dist/abis.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_optionsMarket = require('./optionsMarket-
|
|
1
|
+
const require_optionsMarket = require('./optionsMarket-DxGdV3HF.cjs');
|
|
2
2
|
const require_singleOwnerVault = require('./singleOwnerVault-gf2zNZVk.cjs');
|
|
3
3
|
|
|
4
4
|
exports.erc20Abi = require_optionsMarket.erc20Abi;
|
package/dist/abis.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as optionsMarketAbi, r as lensAbi, t as uniswapMathLensAbi } from "./uniswapMathLens-
|
|
1
|
+
import { n as optionsMarketAbi, r as lensAbi, t as uniswapMathLensAbi } from "./uniswapMathLens-CK8C7WOt.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/abis/erc20.d.ts
|
|
4
4
|
declare const erc20Abi: readonly [{
|
package/dist/abis.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as optionsMarketAbi, r as lensAbi, t as uniswapMathLensAbi } from "./uniswapMathLens-
|
|
1
|
+
import { n as optionsMarketAbi, r as lensAbi, t as uniswapMathLensAbi } from "./uniswapMathLens-C54iWXpi.js";
|
|
2
2
|
|
|
3
3
|
//#region src/abis/erc20.d.ts
|
|
4
4
|
declare const erc20Abi: readonly [{
|
package/dist/abis.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as erc20Abi, n as uniswapMathLensAbi, r as lensAbi, t as optionsMarketAbi } from "./optionsMarket-
|
|
1
|
+
import { i as erc20Abi, n as uniswapMathLensAbi, r as lensAbi, t as optionsMarketAbi } from "./optionsMarket-6PlyceXp.js";
|
|
2
2
|
import { n as uniswapV3PoolAbi, t as singleOwnerVaultAbi } from "./singleOwnerVault-BeJChjfJ.js";
|
|
3
3
|
|
|
4
4
|
export { erc20Abi, lensAbi, optionsMarketAbi, singleOwnerVaultAbi, uniswapMathLensAbi, uniswapV3PoolAbi };
|
package/dist/client.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
const require_numberUtils = require('./numberUtils-
|
|
5
|
-
const require_optionsMarket = require('./optionsMarket-
|
|
4
|
+
const require_numberUtils = require('./numberUtils-ByjL6x6B.cjs');
|
|
5
|
+
const require_optionsMarket = require('./optionsMarket-DxGdV3HF.cjs');
|
|
6
6
|
const require_singleOwnerVault = require('./singleOwnerVault-gf2zNZVk.cjs');
|
|
7
7
|
let viem = require("viem");
|
|
8
8
|
viem = require_numberUtils.__toESM(viem);
|
|
@@ -435,10 +435,9 @@ const useMintOption = (marketAddr) => {
|
|
|
435
435
|
if (!client || !address) throw new Error("Wallet not connected");
|
|
436
436
|
if (!marketAddr) throw new Error("Market address not available");
|
|
437
437
|
if (!timelockLens) throw new Error("Timelock lens not available");
|
|
438
|
-
if (!vault || !payoutAsset) throw new Error("
|
|
438
|
+
if (!vault || !payoutAsset || optionAssetIsToken0 === void 0) throw new Error("Market data not available");
|
|
439
439
|
if (currentTick === void 0 || !tickSpacing) throw new Error("Pool data not available");
|
|
440
|
-
strikeTick = require_numberUtils.
|
|
441
|
-
if (optionType === "CALL" && optionAssetIsToken0 || optionType === "PUT" && !optionAssetIsToken0) strikeTick += tickSpacing;
|
|
440
|
+
strikeTick = require_numberUtils.getNearestValidStrikeTick(optionType, optionAssetIsToken0, tickSpacing, currentTick, strikeTick);
|
|
442
441
|
const [premium, protocolFee] = await require_numberUtils.getTimelockMarket(marketAddr, client).read.calculatePremium([
|
|
443
442
|
optionType === "CALL" ? 0 : 1,
|
|
444
443
|
amount,
|