timelock-sdk 0.0.138 → 0.0.140

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.
@@ -1,14 +1,14 @@
1
- import { n as optionsMarketAbi, r as lensAbi, t as uniswapMathLensAbi } from "./uniswapMathLens-X6H7QwrK.cjs";
1
+ import { n as optionsMarketAbi, r as lensAbi, t as uniswapMathLensAbi } from "./uniswapMathLens-29cU_Tnv.js";
2
2
  import * as viem0 from "viem";
3
3
  import { Address, Client, GetContractReturnType, Hex, PublicClient } from "viem";
4
+ import Big from "big.js";
5
+ import JSBI from "jsbi";
4
6
  import React, { ReactNode } from "react";
5
- import "graphql";
6
7
  import { GraphQLClient, RequestOptions } from "graphql-request";
7
8
  import * as _tanstack_react_query0 from "@tanstack/react-query";
8
9
  import { NonUndefinedGuard } from "@tanstack/react-query";
10
+ import "graphql";
9
11
  import * as _tanstack_query_core23 from "@tanstack/query-core";
10
- import Big from "big.js";
11
- import JSBI from "jsbi";
12
12
  import * as _wagmi_core0 from "@wagmi/core";
13
13
 
14
14
  //#region src/generated/graphql.d.ts
@@ -131,7 +131,6 @@ type GetMarketDataQuery = {
131
131
  id: string;
132
132
  address: string;
133
133
  vault: string;
134
- pool: string;
135
134
  tickSpacing: number;
136
135
  optionAssetIsToken0: boolean;
137
136
  optionAsset: string;
@@ -142,6 +141,11 @@ type GetMarketDataQuery = {
142
141
  payoutAssetSymbol: string;
143
142
  optionAssetName: string;
144
143
  payoutAssetName: string;
144
+ poolManager: string;
145
+ currency0: string;
146
+ currency1: string;
147
+ fee: number;
148
+ hooks: string;
145
149
  }>;
146
150
  };
147
151
  type GetMarketVolumeQueryVariables = Exact<{
@@ -420,7 +424,7 @@ declare const getErc20: (address: Address, client: Client) => {
420
424
  }];
421
425
  readonly stateMutability: "nonpayable";
422
426
  }], "symbol", readonly []>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<string>;
423
- allowance: (args: readonly [`0x${string}`, `0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
427
+ decimals: (options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
424
428
  readonly type: "constructor";
425
429
  readonly inputs: readonly [{
426
430
  readonly name: "name_";
@@ -598,8 +602,8 @@ declare const getErc20: (address: Address, client: Client) => {
598
602
  readonly internalType: "bool";
599
603
  }];
600
604
  readonly stateMutability: "nonpayable";
601
- }], "allowance", readonly [`0x${string}`, `0x${string}`]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
602
- balanceOf: (args: readonly [`0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
605
+ }], "decimals", readonly []>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<number>;
606
+ name: (options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
603
607
  readonly type: "constructor";
604
608
  readonly inputs: readonly [{
605
609
  readonly name: "name_";
@@ -777,8 +781,8 @@ declare const getErc20: (address: Address, client: Client) => {
777
781
  readonly internalType: "bool";
778
782
  }];
779
783
  readonly stateMutability: "nonpayable";
780
- }], "balanceOf", readonly [`0x${string}`]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
781
- decimals: (options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
784
+ }], "name", readonly []>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<string>;
785
+ allowance: (args: readonly [`0x${string}`, `0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
782
786
  readonly type: "constructor";
783
787
  readonly inputs: readonly [{
784
788
  readonly name: "name_";
@@ -956,8 +960,8 @@ declare const getErc20: (address: Address, client: Client) => {
956
960
  readonly internalType: "bool";
957
961
  }];
958
962
  readonly stateMutability: "nonpayable";
959
- }], "decimals", readonly []>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<number>;
960
- name: (options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
963
+ }], "allowance", readonly [`0x${string}`, `0x${string}`]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
964
+ balanceOf: (args: readonly [`0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
961
965
  readonly type: "constructor";
962
966
  readonly inputs: readonly [{
963
967
  readonly name: "name_";
@@ -1135,7 +1139,7 @@ declare const getErc20: (address: Address, client: Client) => {
1135
1139
  readonly internalType: "bool";
1136
1140
  }];
1137
1141
  readonly stateMutability: "nonpayable";
1138
- }], "name", readonly []>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<string>;
1142
+ }], "balanceOf", readonly [`0x${string}`]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
1139
1143
  totalSupply: (options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
1140
1144
  readonly type: "constructor";
1141
1145
  readonly inputs: readonly [{
@@ -37448,6 +37452,7 @@ declare const getTimelockLens: (client: Client | PublicClient) => {
37448
37452
  };
37449
37453
  declare const swappers: Record<number, Address>;
37450
37454
  declare const timelockLenses: Record<number, Address>;
37455
+ declare const swapRouters: Record<number, Address>;
37451
37456
  declare const stateViews: Record<number, Address>;
37452
37457
  //#endregion
37453
37458
  //#region src/lib/perpsOperator.d.ts
@@ -39588,7 +39593,14 @@ declare const useExerciseOption: (marketAddr?: Address) => _tanstack_react_query
39588
39593
  //#region src/hooks/options/useMarketData.d.ts
39589
39594
  declare const useMarketData: (marketAddr?: Address) => Partial<NonUndefinedGuard<{
39590
39595
  address: Address;
39591
- pool: Address;
39596
+ poolManager: Address;
39597
+ poolKey: {
39598
+ currency0: Address;
39599
+ currency1: Address;
39600
+ fee: number;
39601
+ tickSpacing: number;
39602
+ hooks: Address;
39603
+ };
39592
39604
  vault: Address;
39593
39605
  optionAsset: Address;
39594
39606
  payoutAsset: Address;
@@ -39602,6 +39614,10 @@ declare const useMarketData: (marketAddr?: Address) => Partial<NonUndefinedGuard
39602
39614
  payoutAssetSymbol: string;
39603
39615
  optionAssetName: string;
39604
39616
  payoutAssetName: string;
39617
+ currency0: string;
39618
+ currency1: string;
39619
+ fee: number;
39620
+ hooks: string;
39605
39621
  } | undefined>>;
39606
39622
  //#endregion
39607
39623
  //#region src/hooks/options/useMarketVolume.d.ts
@@ -42302,16 +42318,6 @@ declare const liquiditiesToAmounts: (liquidities: bigint[], startTick: number, p
42302
42318
  declare const getPayoutAtTick: (option: OptionData, liquidities: bigint[], tick: number, tickSpacing: number, optionAssetIsToken0: boolean) => bigint;
42303
42319
  declare const getPayoutAtPrice: (option: OptionData, liquidities: bigint[], price: bigint, tickSpacing: number, optionAssetIsToken0: boolean) => bigint;
42304
42320
  //#endregion
42305
- //#region src/hooks/pool/useCurrentPrice.d.ts
42306
- declare const useCurrentPrice: (poolAddr?: Address) => {
42307
- currentPrice: Amount | undefined;
42308
- sqrtPriceX96: bigint | undefined;
42309
- currentTick: {
42310
- exact: number | undefined;
42311
- rounded: number | undefined;
42312
- };
42313
- };
42314
- //#endregion
42315
42321
  //#region src/hooks/pool/usePoolData.d.ts
42316
42322
  type PoolKey = {
42317
42323
  currency0: Address;
@@ -42334,6 +42340,16 @@ declare const usePoolData: (poolManager?: Address, poolKey?: PoolKey) => Partial
42334
42340
  fee: number;
42335
42341
  } | undefined>>;
42336
42342
  //#endregion
42343
+ //#region src/hooks/pool/useCurrentPrice.d.ts
42344
+ declare const useCurrentPrice: (poolManager?: Address, poolKey?: PoolKey) => {
42345
+ currentPrice: Amount | undefined;
42346
+ sqrtPriceX96: bigint | undefined;
42347
+ currentTick: {
42348
+ exact: number | undefined;
42349
+ rounded: number | undefined;
42350
+ };
42351
+ };
42352
+ //#endregion
42337
42353
  //#region src/hooks/pool/useCurrentTick.d.ts
42338
42354
  declare const useCurrentTick: (poolManager?: Address, poolKey?: PoolKey) => {
42339
42355
  error: viem0.ReadContractErrorType;
@@ -42566,8 +42582,8 @@ declare const useCurrentTick: (poolManager?: Address, poolKey?: PoolKey) => {
42566
42582
  };
42567
42583
  //#endregion
42568
42584
  //#region src/hooks/pool/usePriceAtTick.d.ts
42569
- declare const usePriceAtTick: (tick?: number, poolAddr?: Address) => Amount | undefined;
42570
- declare const usePriceSqrtPriceX96: (sqrtPriceX96?: bigint, poolAddr?: Address) => Amount | undefined;
42585
+ declare const usePriceAtTick: (poolManager?: Address, poolKey?: PoolKey, tick?: number) => Amount | undefined;
42586
+ declare const usePriceAtSqrtPriceX96: (poolManager?: Address, poolKey?: PoolKey, sqrtPriceX96?: bigint) => Amount | undefined;
42571
42587
  //#endregion
42572
42588
  //#region src/hooks/pool/usePriceHistory.d.ts
42573
42589
  declare const usePriceHistory: (pool: Address | undefined, token: 0 | 1, resolution: PriceResolution, startTimestamp: Date, endTimestamp: Date) => _tanstack_react_query0.UseQueryResult<PriceDataPoint[], Error>;
@@ -74652,5 +74668,5 @@ declare const useLens: () => {
74652
74668
  } | undefined;
74653
74669
  };
74654
74670
  //#endregion
74655
- export { ExerciseOptionEvent as $, getTickAtPrice as A, TimelockProvider as At, PriceDataPoint as B, getTimelockMarket as Bt, getPayoutAtTick as C, zero as Ct, getPriceAtSqrtPriceX96 as D, OptionData as Dt, getNearestValidStrikeTick as E, useExerciseOption as Et, token0ToToken1 as F, TimelockMarketData as Ft, useUserOperators as G, getCurrentPrice as H, swappers as Ht, token0ToToken1AtTick as I, UniswapMathLens as It, useClosedUserPerps as J, useOperatorPerms as K, token1ToToken0 as L, getErc20 as Lt, liquiditiesToAmount1 as M, useTimelockConfig as Mt, liquiditiesToAmounts as N, TimelockLens as Nt, getPriceAtTick as O, useActiveUserOptions as Ot, roundTick as P, TimelockMarket as Pt, useMintPerp as Q, token1ToToken0AtTick as R, getStateView as Rt, getPayoutAtPrice as S, wrapPriceUnscaled as St, getAmountsFromLiquidity as T, useMarketData as Tt, getPriceHistory as U, timelockLenses as Ut, PriceResolution as V, stateViews as Vt, useSetOperatorPerms as W, usePerpsOperator as X, useUserPerps as Y, useClosePerp as Z, useCurrentTick as _, unscaleAmount as _t, useTokenData as a, useOptionPremium as at, usePoolData as b, wrapAmountUnscaled as bt, batchGetAmountsFromLiquidity as c, useMaxPositionSize as ct, useLiquidityBlocks as d, formatAmount as dt, ExtendEvent as et, useBurnLiquidity as f, formatCondensed as ft, usePriceSqrtPriceX96 as g, scalePrice as gt, usePriceAtTick as h, scaleAmount as ht, TokenData as i, useExtendOption as it, liquiditiesToAmount0 as j, useCurrentMarket as jt, getSqrtPriceX96AtPrice as k, useClosedUserOptions as kt, useMintLiquidity as l, Amount as lt, usePriceHistory as m, formatVagueAmount as mt, useApproval as n, OptionEvent as nt, useVaultTVL as o, useOptionPnl as ot, useMarketPriceHistory as p, formatUSD as pt, useActiveUserPerps as q, useTokenBalance as r, useOptionTimeline as rt, useVaultData as s, useMintOption as st, useLens as t, MintOptionEvent as tt, LiquidityBlockData as u, EMPTY_ARRAY as ut, PoolKey as v, unscalePrice as vt, PRICE_PRECISION as w, useMarketVolume as wt, useCurrentPrice as x, wrapPrice as xt, UniswapPoolData as y, wrapAmount as yt, PriceData as z, getTimelockLens as zt };
74656
- //# sourceMappingURL=client-CP_QHL05.d.cts.map
74671
+ export { ExerciseOptionEvent as $, getTickAtPrice as A, TimelockProvider as At, PriceDataPoint as B, getTimelockMarket as Bt, getPayoutAtTick as C, zero as Ct, getPriceAtSqrtPriceX96 as D, OptionData as Dt, getNearestValidStrikeTick as E, useExerciseOption as Et, token0ToToken1 as F, TimelockMarketData as Ft, useUserOperators as G, getCurrentPrice as H, swapRouters as Ht, token0ToToken1AtTick as I, UniswapMathLens as It, useClosedUserPerps as J, useOperatorPerms as K, token1ToToken0 as L, getErc20 as Lt, liquiditiesToAmount1 as M, useTimelockConfig as Mt, liquiditiesToAmounts as N, TimelockLens as Nt, getPriceAtTick as O, useActiveUserOptions as Ot, roundTick as P, TimelockMarket as Pt, useMintPerp as Q, token1ToToken0AtTick as R, getStateView as Rt, getPayoutAtPrice as S, wrapPriceUnscaled as St, getAmountsFromLiquidity as T, useMarketData as Tt, getPriceHistory as U, swappers as Ut, PriceResolution as V, stateViews as Vt, useSetOperatorPerms as W, timelockLenses as Wt, usePerpsOperator as X, useUserPerps as Y, useClosePerp as Z, useCurrentTick as _, unscaleAmount as _t, useTokenData as a, useOptionPremium as at, UniswapPoolData as b, wrapAmountUnscaled as bt, batchGetAmountsFromLiquidity as c, useMaxPositionSize as ct, useLiquidityBlocks as d, formatAmount as dt, ExtendEvent as et, useBurnLiquidity as f, formatCondensed as ft, usePriceAtTick as g, scalePrice as gt, usePriceAtSqrtPriceX96 as h, scaleAmount as ht, TokenData as i, useExtendOption as it, liquiditiesToAmount0 as j, useCurrentMarket as jt, getSqrtPriceX96AtPrice as k, useClosedUserOptions as kt, useMintLiquidity as l, Amount as lt, usePriceHistory as m, formatVagueAmount as mt, useApproval as n, OptionEvent as nt, useVaultTVL as o, useOptionPnl as ot, useMarketPriceHistory as p, formatUSD as pt, useActiveUserPerps as q, useTokenBalance as r, useOptionTimeline as rt, useVaultData as s, useMintOption as st, useLens as t, MintOptionEvent as tt, LiquidityBlockData as u, EMPTY_ARRAY as ut, useCurrentPrice as v, unscalePrice as vt, PRICE_PRECISION as w, useMarketVolume as wt, usePoolData as x, wrapPrice as xt, PoolKey as y, wrapAmount as yt, PriceData as z, getTimelockLens as zt };
74672
+ //# sourceMappingURL=client-BLQCtXFi.d.ts.map