timelock-sdk 0.0.99 → 0.0.101

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.d.cts CHANGED
@@ -1,3 +1,3 @@
1
1
  import "./uniswapMathLens-B_cHjOOB.cjs";
2
- import { B as OptionTimelineData, F as useUserOperators, G as useMintOption, H as useExtendOption, I as useOperatorPerms, K as useMaxPositionSize, L as usePerpsOperator, P as useSetOperatorPerms, R as useClosePerp, U as useOptionPremium, V as useOptionTimeline, W as useOptionPnl, a as batchGetAmountsFromLiquidity, c as useLiquidityBlocks, ct as useMarketData, d as usePriceAtTick, dt as useActiveUserOptions, f as UniswapPoolData, ft as useClosedUserOptions, h as useCurrentPrice, ht as useTimelockConfig, i as useVaultData, l as useBurnLiquidity, lt as useExerciseOption, m as useCurrentTick, mt as useCurrentMarket, n as useLens, o as useMintLiquidity, p as usePoolData, pt as TimelockProvider, r as useVaultTVL, s as LiquidityBlockData, t as useApproval, u as usePriceHistory, ut as OptionData, z as useMintPerp } from "./client-JOGxwcn5.cjs";
2
+ import { B as OptionTimelineData, F as useUserOperators, G as useMintOption, H as useExtendOption, I as useOperatorPerms, K as useMaxPositionSize, L as usePerpsOperator, P as useSetOperatorPerms, R as useClosePerp, U as useOptionPremium, V as useOptionTimeline, W as useOptionPnl, a as batchGetAmountsFromLiquidity, c as useLiquidityBlocks, ct as useMarketData, d as usePriceAtTick, dt as useActiveUserOptions, f as UniswapPoolData, ft as useClosedUserOptions, h as useCurrentPrice, ht as useTimelockConfig, i as useVaultData, l as useBurnLiquidity, lt as useExerciseOption, m as useCurrentTick, mt as useCurrentMarket, n as useLens, o as useMintLiquidity, p as usePoolData, pt as TimelockProvider, r as useVaultTVL, s as LiquidityBlockData, t as useApproval, u as usePriceHistory, ut as OptionData, z as useMintPerp } from "./client-uwDDNqle.cjs";
3
3
  export { LiquidityBlockData, OptionData, OptionTimelineData, TimelockProvider, UniswapPoolData, batchGetAmountsFromLiquidity, useActiveUserOptions, useApproval, useBurnLiquidity, useClosePerp, useClosedUserOptions, useCurrentMarket, useCurrentPrice, useCurrentTick, useExerciseOption, useExtendOption, useLens, useLiquidityBlocks, useMarketData, useMaxPositionSize, useMintLiquidity, useMintOption, useMintPerp, useOperatorPerms, useOptionPnl, useOptionPremium, useOptionTimeline, usePerpsOperator, usePoolData, usePriceAtTick, usePriceHistory, useSetOperatorPerms, useTimelockConfig, useUserOperators, useVaultData, useVaultTVL };
package/dist/client.js CHANGED
@@ -935,7 +935,7 @@ const usePerpsOperator = () => {
935
935
  const { address: address$1, validUntil } = await operator.validateAuthMessage(message, signature);
936
936
  if (validUntil < Date.now()) throw new Error("Signature expired");
937
937
  if (address$1 !== userAddr) throw new Error("Valid signature but different user address");
938
- operator.setAuth(userAddr, signature);
938
+ operator.setAuth(message, signature);
939
939
  } catch (error) {
940
940
  clearSignature(userAddr);
941
941
  console.error(error);
@@ -1047,7 +1047,10 @@ const useMintPerp = (marketAddr) => {
1047
1047
  if (!operator || !operatorAddr) throw new Error("Operator address not found");
1048
1048
  if (!tickSpacing || currentTick === void 0) throw new Error("Pool data not found");
1049
1049
  if (optionAssetIsToken0 === void 0 || !payoutAsset) throw new Error("Market data not found");
1050
- if (!operator.auth) await signMessage();
1050
+ if (!operator.auth) {
1051
+ console.log("here");
1052
+ await signMessage();
1053
+ }
1051
1054
  if (!hasEnoughPerms) await setOperatorPerms({
1052
1055
  operator: operatorAddr,
1053
1056
  canMint: true,