timelock-sdk 0.0.129 → 0.0.131
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-DrMMUpE7.d.ts → client-BzO_GBnM.d.ts} +9 -9
- package/dist/{client-Dxww1phu.d.cts → client-Cs5UA8KQ.d.cts} +9 -9
- package/dist/client.cjs +3 -3
- 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 +3 -3
- package/dist/client.js.map +1 -1
- package/dist/package.d.cts +1 -1
- package/dist/package.d.ts +1 -1
- package/package.json +1 -1
|
@@ -407,7 +407,7 @@ declare const getErc20: (address: Address, client: Client) => {
|
|
|
407
407
|
}];
|
|
408
408
|
readonly stateMutability: "nonpayable";
|
|
409
409
|
}], "symbol", readonly []>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<string>;
|
|
410
|
-
|
|
410
|
+
allowance: (args: readonly [`0x${string}`, `0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
411
411
|
readonly type: "constructor";
|
|
412
412
|
readonly inputs: readonly [{
|
|
413
413
|
readonly name: "name_";
|
|
@@ -585,8 +585,8 @@ declare const getErc20: (address: Address, client: Client) => {
|
|
|
585
585
|
readonly internalType: "bool";
|
|
586
586
|
}];
|
|
587
587
|
readonly stateMutability: "nonpayable";
|
|
588
|
-
}], "
|
|
589
|
-
|
|
588
|
+
}], "allowance", readonly [`0x${string}`, `0x${string}`]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
589
|
+
balanceOf: (args: readonly [`0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
590
590
|
readonly type: "constructor";
|
|
591
591
|
readonly inputs: readonly [{
|
|
592
592
|
readonly name: "name_";
|
|
@@ -764,8 +764,8 @@ declare const getErc20: (address: Address, client: Client) => {
|
|
|
764
764
|
readonly internalType: "bool";
|
|
765
765
|
}];
|
|
766
766
|
readonly stateMutability: "nonpayable";
|
|
767
|
-
}], "
|
|
768
|
-
|
|
767
|
+
}], "balanceOf", readonly [`0x${string}`]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
768
|
+
decimals: (options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
769
769
|
readonly type: "constructor";
|
|
770
770
|
readonly inputs: readonly [{
|
|
771
771
|
readonly name: "name_";
|
|
@@ -943,8 +943,8 @@ declare const getErc20: (address: Address, client: Client) => {
|
|
|
943
943
|
readonly internalType: "bool";
|
|
944
944
|
}];
|
|
945
945
|
readonly stateMutability: "nonpayable";
|
|
946
|
-
}], "
|
|
947
|
-
|
|
946
|
+
}], "decimals", readonly []>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<number>;
|
|
947
|
+
name: (options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
948
948
|
readonly type: "constructor";
|
|
949
949
|
readonly inputs: readonly [{
|
|
950
950
|
readonly name: "name_";
|
|
@@ -1122,7 +1122,7 @@ declare const getErc20: (address: Address, client: Client) => {
|
|
|
1122
1122
|
readonly internalType: "bool";
|
|
1123
1123
|
}];
|
|
1124
1124
|
readonly stateMutability: "nonpayable";
|
|
1125
|
-
}], "
|
|
1125
|
+
}], "name", readonly []>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<string>;
|
|
1126
1126
|
totalSupply: (options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
1127
1127
|
readonly type: "constructor";
|
|
1128
1128
|
readonly inputs: readonly [{
|
|
@@ -62709,4 +62709,4 @@ declare const useApproval: () => {
|
|
|
62709
62709
|
};
|
|
62710
62710
|
//#endregion
|
|
62711
62711
|
export { OptionEvent as $, roundTickDown as A, TimelockMarket as At, getPriceHistory as B, getPriceAtSqrtPriceX96 as C, OptionData as Ct, liquiditiesToAmount0 as D, useCurrentMarket as Dt, getTickAtPrice as E, TimelockProvider as Et, token1ToToken0AtTick as F, getTimelockMarket as Ft, useClosedUserPerps as G, useUserOperators as H, PriceData as I, getUniswapMathLens as It, useClosePerp as J, useUserPerps as K, PriceDataPoint as L, swappers as Lt, token0ToToken1 as M, UniswapMathLens as Mt, token0ToToken1AtTick as N, getErc20 as Nt, liquiditiesToAmount1 as O, useTimelockConfig as Ot, token1ToToken0 as P, getTimelockLens as Pt, MintOptionEvent as Q, PriceResolution as R, timelockLenses as Rt, getNearestValidStrikeTick as S, useExerciseOption as St, getSqrtPriceX96AtPrice as T, useClosedUserOptions as Tt, useOperatorPerms as U, useSetOperatorPerms as V, useActiveUserPerps as W, ExerciseOptionEvent as X, useMintPerp as Y, ExtendEvent as Z, useCurrentPrice as _, wrapAmountUnscaled as _t, batchGetAmountsFromLiquidity as a, useMaxPositionSize as at, PRICE_PRECISION as b, zero as bt, useLiquidityBlocks as c, formatAmount as ct, usePriceHistory as d, formatVagueAmount as dt, useOptionTimeline as et, usePriceAtTick as f, scaleAmount as ft, useCurrentTick as g, wrapAmount as gt, usePoolData as h, unscalePrice as ht, useVaultData as i, useMintOption as it, roundTickUp as j, TimelockMarketData as jt, liquiditiesToAmounts as k, TimelockLens as kt, useBurnLiquidity as l, formatCondensed as lt, UniswapPoolData as m, unscaleAmount as mt, useLens as n, useOptionPremium as nt, useMintLiquidity as o, Amount as ot, usePriceSqrtPriceX96 as p, scalePrice as pt, usePerpsOperator as q, useVaultTVL as r, useOptionPnl as rt, LiquidityBlockData as s, EMPTY_ARRAY as st, useApproval as t, useExtendOption as tt, useMarketPriceHistory as u, formatUSD as ut, getPayoutAtPrice as v, wrapPrice as vt, getPriceAtTick as w, useActiveUserOptions as wt, getAmountsFromLiquidity as x, useMarketData as xt, getPayoutAtTick as y, wrapPriceUnscaled as yt, getCurrentPrice as z, uniswapMathLenses as zt };
|
|
62712
|
-
//# sourceMappingURL=client-
|
|
62712
|
+
//# sourceMappingURL=client-BzO_GBnM.d.ts.map
|
|
@@ -407,7 +407,7 @@ declare const getErc20: (address: Address, client: Client) => {
|
|
|
407
407
|
}];
|
|
408
408
|
readonly stateMutability: "nonpayable";
|
|
409
409
|
}], "symbol", readonly []>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<string>;
|
|
410
|
-
|
|
410
|
+
allowance: (args: readonly [`0x${string}`, `0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
411
411
|
readonly type: "constructor";
|
|
412
412
|
readonly inputs: readonly [{
|
|
413
413
|
readonly name: "name_";
|
|
@@ -585,8 +585,8 @@ declare const getErc20: (address: Address, client: Client) => {
|
|
|
585
585
|
readonly internalType: "bool";
|
|
586
586
|
}];
|
|
587
587
|
readonly stateMutability: "nonpayable";
|
|
588
|
-
}], "
|
|
589
|
-
|
|
588
|
+
}], "allowance", readonly [`0x${string}`, `0x${string}`]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
589
|
+
balanceOf: (args: readonly [`0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
590
590
|
readonly type: "constructor";
|
|
591
591
|
readonly inputs: readonly [{
|
|
592
592
|
readonly name: "name_";
|
|
@@ -764,8 +764,8 @@ declare const getErc20: (address: Address, client: Client) => {
|
|
|
764
764
|
readonly internalType: "bool";
|
|
765
765
|
}];
|
|
766
766
|
readonly stateMutability: "nonpayable";
|
|
767
|
-
}], "
|
|
768
|
-
|
|
767
|
+
}], "balanceOf", readonly [`0x${string}`]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
768
|
+
decimals: (options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
769
769
|
readonly type: "constructor";
|
|
770
770
|
readonly inputs: readonly [{
|
|
771
771
|
readonly name: "name_";
|
|
@@ -943,8 +943,8 @@ declare const getErc20: (address: Address, client: Client) => {
|
|
|
943
943
|
readonly internalType: "bool";
|
|
944
944
|
}];
|
|
945
945
|
readonly stateMutability: "nonpayable";
|
|
946
|
-
}], "
|
|
947
|
-
|
|
946
|
+
}], "decimals", readonly []>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<number>;
|
|
947
|
+
name: (options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
948
948
|
readonly type: "constructor";
|
|
949
949
|
readonly inputs: readonly [{
|
|
950
950
|
readonly name: "name_";
|
|
@@ -1122,7 +1122,7 @@ declare const getErc20: (address: Address, client: Client) => {
|
|
|
1122
1122
|
readonly internalType: "bool";
|
|
1123
1123
|
}];
|
|
1124
1124
|
readonly stateMutability: "nonpayable";
|
|
1125
|
-
}], "
|
|
1125
|
+
}], "name", readonly []>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<string>;
|
|
1126
1126
|
totalSupply: (options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
1127
1127
|
readonly type: "constructor";
|
|
1128
1128
|
readonly inputs: readonly [{
|
|
@@ -62709,4 +62709,4 @@ declare const useApproval: () => {
|
|
|
62709
62709
|
};
|
|
62710
62710
|
//#endregion
|
|
62711
62711
|
export { OptionEvent as $, roundTickDown as A, TimelockMarket as At, getPriceHistory as B, getPriceAtSqrtPriceX96 as C, OptionData as Ct, liquiditiesToAmount0 as D, useCurrentMarket as Dt, getTickAtPrice as E, TimelockProvider as Et, token1ToToken0AtTick as F, getTimelockMarket as Ft, useClosedUserPerps as G, useUserOperators as H, PriceData as I, getUniswapMathLens as It, useClosePerp as J, useUserPerps as K, PriceDataPoint as L, swappers as Lt, token0ToToken1 as M, UniswapMathLens as Mt, token0ToToken1AtTick as N, getErc20 as Nt, liquiditiesToAmount1 as O, useTimelockConfig as Ot, token1ToToken0 as P, getTimelockLens as Pt, MintOptionEvent as Q, PriceResolution as R, timelockLenses as Rt, getNearestValidStrikeTick as S, useExerciseOption as St, getSqrtPriceX96AtPrice as T, useClosedUserOptions as Tt, useOperatorPerms as U, useSetOperatorPerms as V, useActiveUserPerps as W, ExerciseOptionEvent as X, useMintPerp as Y, ExtendEvent as Z, useCurrentPrice as _, wrapAmountUnscaled as _t, batchGetAmountsFromLiquidity as a, useMaxPositionSize as at, PRICE_PRECISION as b, zero as bt, useLiquidityBlocks as c, formatAmount as ct, usePriceHistory as d, formatVagueAmount as dt, useOptionTimeline as et, usePriceAtTick as f, scaleAmount as ft, useCurrentTick as g, wrapAmount as gt, usePoolData as h, unscalePrice as ht, useVaultData as i, useMintOption as it, roundTickUp as j, TimelockMarketData as jt, liquiditiesToAmounts as k, TimelockLens as kt, useBurnLiquidity as l, formatCondensed as lt, UniswapPoolData as m, unscaleAmount as mt, useLens as n, useOptionPremium as nt, useMintLiquidity as o, Amount as ot, usePriceSqrtPriceX96 as p, scalePrice as pt, usePerpsOperator as q, useVaultTVL as r, useOptionPnl as rt, LiquidityBlockData as s, EMPTY_ARRAY as st, useApproval as t, useExtendOption as tt, useMarketPriceHistory as u, formatUSD as ut, getPayoutAtPrice as v, wrapPrice as vt, getPriceAtTick as w, useActiveUserOptions as wt, getAmountsFromLiquidity as x, useMarketData as xt, getPayoutAtTick as y, wrapPriceUnscaled as yt, getCurrentPrice as z, uniswapMathLenses as zt };
|
|
62712
|
-
//# sourceMappingURL=client-
|
|
62712
|
+
//# sourceMappingURL=client-Cs5UA8KQ.d.cts.map
|
package/dist/client.cjs
CHANGED
|
@@ -1309,19 +1309,19 @@ const useBurnLiquidity = (vaultAddr) => {
|
|
|
1309
1309
|
if (!timelockLens || !vaultAddr) throw new Error("Vault/lens not available");
|
|
1310
1310
|
if (positions.length === 1) await burn(positions[0].tickLower, positions[0].tickUpper, positions[0].liquidity);
|
|
1311
1311
|
else {
|
|
1312
|
-
const
|
|
1312
|
+
const refTick = await timelockLens.read.getRefTick([vaultAddr, Math.min(...positions.map((p) => p.tickLower))]);
|
|
1313
1313
|
await (0, viem_actions.waitForTransactionReceipt)(client, { hash: await writeContractAsync({
|
|
1314
1314
|
address: vaultAddr,
|
|
1315
1315
|
abi: require_singleOwnerVault.singleOwnerVaultAbi,
|
|
1316
1316
|
functionName: "multicall",
|
|
1317
|
-
args: [positions.map((p
|
|
1317
|
+
args: [positions.map((p) => (0, viem.encodeFunctionData)({
|
|
1318
1318
|
abi: require_singleOwnerVault.singleOwnerVaultAbi,
|
|
1319
1319
|
functionName: "burn",
|
|
1320
1320
|
args: [
|
|
1321
1321
|
p.tickLower,
|
|
1322
1322
|
p.tickUpper,
|
|
1323
1323
|
p.liquidity,
|
|
1324
|
-
|
|
1324
|
+
refTick
|
|
1325
1325
|
]
|
|
1326
1326
|
}))]
|
|
1327
1327
|
}) });
|