timelock-sdk 0.0.100 → 0.0.102
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-DMye-xtb.d.ts → client-8mlk0SCU.d.cts} +254 -254
- package/dist/{client-uwDDNqle.d.cts → client-DfYiZw0g.d.ts} +4 -4
- 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 +4 -4
- 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
|
@@ -1,13 +1,13 @@
|
|
|
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-ChJFZ6hc.js";
|
|
2
2
|
import * as viem0 from "viem";
|
|
3
3
|
import { Address, Client, GetContractReturnType, Hex, PublicClient } from "viem";
|
|
4
|
+
import Big from "big.js";
|
|
4
5
|
import React, { ReactNode } from "react";
|
|
5
|
-
import "graphql";
|
|
6
6
|
import { GraphQLClient, RequestOptions } from "graphql-request";
|
|
7
7
|
import * as _tanstack_react_query0 from "@tanstack/react-query";
|
|
8
8
|
import { NonUndefinedGuard } from "@tanstack/react-query";
|
|
9
|
+
import "graphql";
|
|
9
10
|
import * as _tanstack_query_core0 from "@tanstack/query-core";
|
|
10
|
-
import Big from "big.js";
|
|
11
11
|
import * as _wagmi_core0 from "@wagmi/core";
|
|
12
12
|
|
|
13
13
|
//#region src/generated/graphql.d.ts
|
|
@@ -61933,4 +61933,4 @@ declare const useApproval: () => {
|
|
|
61933
61933
|
};
|
|
61934
61934
|
//#endregion
|
|
61935
61935
|
export { scaleAmount as $, PriceDataPoint as A, OptionTimelineData as B, liquiditiesToAmount1 as C, getUniswapMathLens as Ct, token0ToToken1 as D, roundTickUp as E, useUserOperators as F, useMintOption as G, useExtendOption as H, useOperatorPerms as I, EMPTY_ARRAY as J, useMaxPositionSize as K, usePerpsOperator as L, getCurrentPrice as M, getPriceHistory as N, token1ToToken0 as O, useSetOperatorPerms as P, formatVagueAmount as Q, useClosePerp as R, liquiditiesToAmount0 as S, getTimelockMarket as St, roundTickDown as T, uniswapMathLenses as Tt, useOptionPremium as U, useOptionTimeline as V, useOptionPnl as W, formatCondensed as X, formatAmount as Y, formatUSD as Z, PRICE_PRECISION as _, TimelockMarket as _t, batchGetAmountsFromLiquidity as a, wrapPrice as at, getPriceAtTick as b, getErc20 as bt, useLiquidityBlocks as c, useMarketData as ct, usePriceAtTick as d, useActiveUserOptions as dt, scalePrice as et, UniswapPoolData as f, useClosedUserOptions as ft, getPayoutAtTick as g, TimelockLens as gt, useCurrentPrice as h, useTimelockConfig as ht, useVaultData as i, wrapAmountUnscaled as it, PriceResolution as j, PriceData as k, useBurnLiquidity as l, useExerciseOption as lt, useCurrentTick as m, useCurrentMarket as mt, useLens as n, unscalePrice as nt, useMintLiquidity as o, wrapPriceUnscaled as ot, usePoolData as p, TimelockProvider as pt, Amount as q, useVaultTVL as r, wrapAmount as rt, LiquidityBlockData as s, zero as st, useApproval as t, unscaleAmount as tt, usePriceHistory as u, OptionData as ut, getAmountsFromLiquidity as v, TimelockMarketData as vt, liquiditiesToAmounts as w, timelockLenses as wt, getTickAtPrice as x, getTimelockLens as xt, getNearestValidStrikeTick as y, UniswapMathLens as yt, useMintPerp as z };
|
|
61936
|
-
//# sourceMappingURL=client-
|
|
61936
|
+
//# sourceMappingURL=client-DfYiZw0g.d.ts.map
|
package/dist/client.cjs
CHANGED
|
@@ -943,7 +943,7 @@ const usePerpsOperator = () => {
|
|
|
943
943
|
const { address: address$1, validUntil } = await operator.validateAuthMessage(message, signature);
|
|
944
944
|
if (validUntil < Date.now()) throw new Error("Signature expired");
|
|
945
945
|
if (address$1 !== userAddr) throw new Error("Valid signature but different user address");
|
|
946
|
-
operator.setAuth(
|
|
946
|
+
operator.setAuth(message, signature);
|
|
947
947
|
} catch (error) {
|
|
948
948
|
clearSignature(userAddr);
|
|
949
949
|
console.error(error);
|
|
@@ -958,14 +958,14 @@ const usePerpsOperator = () => {
|
|
|
958
958
|
return {
|
|
959
959
|
operator,
|
|
960
960
|
address,
|
|
961
|
-
signMessage: (0, __tanstack_react_query.useMutation)({ mutationFn: async () => {
|
|
961
|
+
signMessage: (0, __tanstack_react_query.useMutation)({ mutationFn: (0, react.useCallback)(async () => {
|
|
962
962
|
if (!operator) throw new Error("Operator not initialized");
|
|
963
963
|
if (!userAddr) throw new Error("Wallet not connected");
|
|
964
964
|
const message = await operator.genAuthMessage(userAddr);
|
|
965
965
|
const signature = await signMessageAsync({ message });
|
|
966
966
|
saveSignature(userAddr, message, signature);
|
|
967
967
|
operator.setAuth(message, signature);
|
|
968
|
-
} })
|
|
968
|
+
}, [operator, userAddr]) })
|
|
969
969
|
};
|
|
970
970
|
};
|
|
971
971
|
|