timelock-sdk 0.0.27 → 0.0.29

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.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./uniswapMathLens-MrB_VfJB.js";
2
- import { Amount, TimelockMarketData, UniswapMathLens } from "./index-CRhFaRiq.js";
3
- import * as viem367 from "viem";
2
+ import { Amount, TimelockMarketData, UniswapMathLens } from "./index-DW-OoI-q.js";
3
+ import * as viem0 from "viem";
4
4
  import { Address } from "viem";
5
5
  import React, { ReactNode } from "react";
6
6
  import { GraphQLClient } from "graphql-request";
@@ -2237,7 +2237,7 @@ declare const useBurnLiquidity: (vaultAddr?: Address) => {
2237
2237
  //#region src/hooks/vault/useLiquidityBlocks.d.ts
2238
2238
  type LiquidityBlockData = ReturnType<typeof useLiquidityBlocks>['data'][0];
2239
2239
  declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2240
- error: viem367.ReadContractErrorType;
2240
+ error: viem0.ReadContractErrorType;
2241
2241
  isError: true;
2242
2242
  isPending: false;
2243
2243
  isLoading: false;
@@ -2249,7 +2249,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2249
2249
  dataUpdatedAt: number;
2250
2250
  errorUpdatedAt: number;
2251
2251
  failureCount: number;
2252
- failureReason: viem367.ReadContractErrorType | null;
2252
+ failureReason: viem0.ReadContractErrorType | null;
2253
2253
  errorUpdateCount: number;
2254
2254
  isFetched: boolean;
2255
2255
  isFetchedAfterMount: boolean;
@@ -2269,7 +2269,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2269
2269
  totalAmount1: bigint;
2270
2270
  borrowedAmount0: bigint;
2271
2271
  borrowedAmount1: bigint;
2272
- }[], viem367.ReadContractErrorType>>;
2272
+ }[], viem0.ReadContractErrorType>>;
2273
2273
  fetchStatus: _tanstack_query_core0.FetchStatus;
2274
2274
  promise: Promise<readonly {
2275
2275
  tickLower: number;
@@ -2307,7 +2307,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2307
2307
  dataUpdatedAt: number;
2308
2308
  errorUpdatedAt: number;
2309
2309
  failureCount: number;
2310
- failureReason: viem367.ReadContractErrorType | null;
2310
+ failureReason: viem0.ReadContractErrorType | null;
2311
2311
  errorUpdateCount: number;
2312
2312
  isFetched: boolean;
2313
2313
  isFetchedAfterMount: boolean;
@@ -2327,7 +2327,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2327
2327
  totalAmount1: bigint;
2328
2328
  borrowedAmount0: bigint;
2329
2329
  borrowedAmount1: bigint;
2330
- }[], viem367.ReadContractErrorType>>;
2330
+ }[], viem0.ReadContractErrorType>>;
2331
2331
  fetchStatus: _tanstack_query_core0.FetchStatus;
2332
2332
  promise: Promise<readonly {
2333
2333
  tickLower: number;
@@ -2353,7 +2353,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2353
2353
  borrowedAmount1: bigint;
2354
2354
  }[];
2355
2355
  } | {
2356
- error: viem367.ReadContractErrorType;
2356
+ error: viem0.ReadContractErrorType;
2357
2357
  isError: true;
2358
2358
  isPending: false;
2359
2359
  isLoading: false;
@@ -2365,7 +2365,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2365
2365
  dataUpdatedAt: number;
2366
2366
  errorUpdatedAt: number;
2367
2367
  failureCount: number;
2368
- failureReason: viem367.ReadContractErrorType | null;
2368
+ failureReason: viem0.ReadContractErrorType | null;
2369
2369
  errorUpdateCount: number;
2370
2370
  isFetched: boolean;
2371
2371
  isFetchedAfterMount: boolean;
@@ -2385,7 +2385,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2385
2385
  totalAmount1: bigint;
2386
2386
  borrowedAmount0: bigint;
2387
2387
  borrowedAmount1: bigint;
2388
- }[], viem367.ReadContractErrorType>>;
2388
+ }[], viem0.ReadContractErrorType>>;
2389
2389
  fetchStatus: _tanstack_query_core0.FetchStatus;
2390
2390
  promise: Promise<readonly {
2391
2391
  tickLower: number;
@@ -2423,7 +2423,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2423
2423
  dataUpdatedAt: number;
2424
2424
  errorUpdatedAt: number;
2425
2425
  failureCount: number;
2426
- failureReason: viem367.ReadContractErrorType | null;
2426
+ failureReason: viem0.ReadContractErrorType | null;
2427
2427
  errorUpdateCount: number;
2428
2428
  isFetched: boolean;
2429
2429
  isFetchedAfterMount: boolean;
@@ -2443,7 +2443,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2443
2443
  totalAmount1: bigint;
2444
2444
  borrowedAmount0: bigint;
2445
2445
  borrowedAmount1: bigint;
2446
- }[], viem367.ReadContractErrorType>>;
2446
+ }[], viem0.ReadContractErrorType>>;
2447
2447
  fetchStatus: _tanstack_query_core0.FetchStatus;
2448
2448
  promise: Promise<readonly {
2449
2449
  tickLower: number;
@@ -2480,7 +2480,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2480
2480
  dataUpdatedAt: number;
2481
2481
  errorUpdatedAt: number;
2482
2482
  failureCount: number;
2483
- failureReason: viem367.ReadContractErrorType | null;
2483
+ failureReason: viem0.ReadContractErrorType | null;
2484
2484
  errorUpdateCount: number;
2485
2485
  isFetched: boolean;
2486
2486
  isFetchedAfterMount: boolean;
@@ -2501,7 +2501,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2501
2501
  totalAmount1: bigint;
2502
2502
  borrowedAmount0: bigint;
2503
2503
  borrowedAmount1: bigint;
2504
- }[], viem367.ReadContractErrorType>>;
2504
+ }[], viem0.ReadContractErrorType>>;
2505
2505
  fetchStatus: _tanstack_query_core0.FetchStatus;
2506
2506
  promise: Promise<readonly {
2507
2507
  tickLower: number;
@@ -2539,7 +2539,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2539
2539
  dataUpdatedAt: number;
2540
2540
  errorUpdatedAt: number;
2541
2541
  failureCount: number;
2542
- failureReason: viem367.ReadContractErrorType | null;
2542
+ failureReason: viem0.ReadContractErrorType | null;
2543
2543
  errorUpdateCount: number;
2544
2544
  isFetched: boolean;
2545
2545
  isFetchedAfterMount: boolean;
@@ -2559,7 +2559,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2559
2559
  totalAmount1: bigint;
2560
2560
  borrowedAmount0: bigint;
2561
2561
  borrowedAmount1: bigint;
2562
- }[], viem367.ReadContractErrorType>>;
2562
+ }[], viem0.ReadContractErrorType>>;
2563
2563
  fetchStatus: _tanstack_query_core0.FetchStatus;
2564
2564
  promise: Promise<readonly {
2565
2565
  tickLower: number;
@@ -2632,14 +2632,14 @@ declare const useVaultTVL: (vaultAddr?: Address) => {
2632
2632
  borrowedAmount0: Amount;
2633
2633
  borrowedAmount1: Amount;
2634
2634
  blocksCount: bigint;
2635
- refetch: (options?: _tanstack_query_core0.RefetchOptions) => Promise<_tanstack_query_core0.QueryObserverResult<readonly [bigint, bigint, bigint, bigint, bigint, bigint, bigint], viem367.ReadContractErrorType>>;
2635
+ refetch: (options?: _tanstack_query_core0.RefetchOptions) => Promise<_tanstack_query_core0.QueryObserverResult<readonly [bigint, bigint, bigint, bigint, bigint, bigint, bigint], viem0.ReadContractErrorType>>;
2636
2636
  };
2637
2637
  //#endregion
2638
2638
  //#region src/hooks/useLens.d.ts
2639
2639
  declare const useLens: () => {
2640
2640
  timelockLens: {
2641
2641
  read: {
2642
- batchGetRefTick: (args: readonly [`0x${string}`, readonly number[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
2642
+ batchGetRefTick: (args: readonly [`0x${string}`, readonly number[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
2643
2643
  readonly type: "function";
2644
2644
  readonly name: "batchGetRefTick";
2645
2645
  readonly inputs: readonly [{
@@ -3345,7 +3345,7 @@ declare const useLens: () => {
3345
3345
  }];
3346
3346
  readonly stateMutability: "view";
3347
3347
  }], "batchGetRefTick", readonly [`0x${string}`, readonly number[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly number[]>;
3348
- getAllBlocks: (args: readonly [`0x${string}`], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
3348
+ getAllBlocks: (args: readonly [`0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
3349
3349
  readonly type: "function";
3350
3350
  readonly name: "batchGetRefTick";
3351
3351
  readonly inputs: readonly [{
@@ -4061,7 +4061,7 @@ declare const useLens: () => {
4061
4061
  borrowedAmount0: bigint;
4062
4062
  borrowedAmount1: bigint;
4063
4063
  }[]>;
4064
- getExpiredOptions: (args: readonly [`0x${string}`, bigint, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
4064
+ getExpiredOptions: (args: readonly [`0x${string}`, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
4065
4065
  readonly type: "function";
4066
4066
  readonly name: "batchGetRefTick";
4067
4067
  readonly inputs: readonly [{
@@ -4786,7 +4786,7 @@ declare const useLens: () => {
4786
4786
  createdAt: bigint;
4787
4787
  liquidities: readonly bigint[];
4788
4788
  }[], bigint, boolean]>;
4789
- getLiquidityAtTick: (args: readonly [`0x${string}`, number], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
4789
+ getLiquidityAtTick: (args: readonly [`0x${string}`, number], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
4790
4790
  readonly type: "function";
4791
4791
  readonly name: "batchGetRefTick";
4792
4792
  readonly inputs: readonly [{
@@ -5492,7 +5492,7 @@ declare const useLens: () => {
5492
5492
  }];
5493
5493
  readonly stateMutability: "view";
5494
5494
  }], "getLiquidityAtTick", readonly [`0x${string}`, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
5495
- getMarketData: (args: readonly [`0x${string}`], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
5495
+ getMarketData: (args: readonly [`0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
5496
5496
  readonly type: "function";
5497
5497
  readonly name: "batchGetRefTick";
5498
5498
  readonly inputs: readonly [{
@@ -6211,7 +6211,7 @@ declare const useLens: () => {
6211
6211
  payoutAssetName: string;
6212
6212
  optionsCount: bigint;
6213
6213
  }>;
6214
- getMaxPositionSize: (args: readonly [`0x${string}`, number, number], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
6214
+ getMaxPositionSize: (args: readonly [`0x${string}`, number, number], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
6215
6215
  readonly type: "function";
6216
6216
  readonly name: "batchGetRefTick";
6217
6217
  readonly inputs: readonly [{
@@ -6917,7 +6917,7 @@ declare const useLens: () => {
6917
6917
  }];
6918
6918
  readonly stateMutability: "view";
6919
6919
  }], "getMaxPositionSize", readonly [`0x${string}`, number, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
6920
- getMaxPositionSizeAtCurrentTick: (args: readonly [`0x${string}`, number], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
6920
+ getMaxPositionSizeAtCurrentTick: (args: readonly [`0x${string}`, number], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
6921
6921
  readonly type: "function";
6922
6922
  readonly name: "batchGetRefTick";
6923
6923
  readonly inputs: readonly [{
@@ -7623,7 +7623,7 @@ declare const useLens: () => {
7623
7623
  }];
7624
7624
  readonly stateMutability: "view";
7625
7625
  }], "getMaxPositionSizeAtCurrentTick", readonly [`0x${string}`, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
7626
- getOptionData: (args: readonly [`0x${string}`, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
7626
+ getOptionData: (args: readonly [`0x${string}`, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
7627
7627
  readonly type: "function";
7628
7628
  readonly name: "batchGetRefTick";
7629
7629
  readonly inputs: readonly [{
@@ -8348,7 +8348,7 @@ declare const useLens: () => {
8348
8348
  createdAt: bigint;
8349
8349
  liquidities: readonly bigint[];
8350
8350
  }>;
8351
- getOptionsData: (args: readonly [`0x${string}`, readonly bigint[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
8351
+ getOptionsData: (args: readonly [`0x${string}`, readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
8352
8352
  readonly type: "function";
8353
8353
  readonly name: "batchGetRefTick";
8354
8354
  readonly inputs: readonly [{
@@ -9073,7 +9073,7 @@ declare const useLens: () => {
9073
9073
  createdAt: bigint;
9074
9074
  liquidities: readonly bigint[];
9075
9075
  }[]>;
9076
- getPoolData: (args: readonly [`0x${string}`], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
9076
+ getPoolData: (args: readonly [`0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
9077
9077
  readonly type: "function";
9078
9078
  readonly name: "batchGetRefTick";
9079
9079
  readonly inputs: readonly [{
@@ -9790,7 +9790,7 @@ declare const useLens: () => {
9790
9790
  tickSpacing: number;
9791
9791
  fee: number;
9792
9792
  }>;
9793
- getRefTick: (args: readonly [`0x${string}`, number], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
9793
+ getRefTick: (args: readonly [`0x${string}`, number], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
9794
9794
  readonly type: "function";
9795
9795
  readonly name: "batchGetRefTick";
9796
9796
  readonly inputs: readonly [{
@@ -10496,7 +10496,7 @@ declare const useLens: () => {
10496
10496
  }];
10497
10497
  readonly stateMutability: "view";
10498
10498
  }], "getRefTick", readonly [`0x${string}`, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<number>;
10499
- getUserOptions: (args: readonly [`0x${string}`, `0x${string}`, bigint, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
10499
+ getUserOptions: (args: readonly [`0x${string}`, `0x${string}`, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
10500
10500
  readonly type: "function";
10501
10501
  readonly name: "batchGetRefTick";
10502
10502
  readonly inputs: readonly [{
@@ -11221,7 +11221,7 @@ declare const useLens: () => {
11221
11221
  createdAt: bigint;
11222
11222
  liquidities: readonly bigint[];
11223
11223
  }[], bigint, boolean]>;
11224
- getVaultTVL: (args: readonly [`0x${string}`], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
11224
+ getVaultTVL: (args: readonly [`0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
11225
11225
  readonly type: "function";
11226
11226
  readonly name: "batchGetRefTick";
11227
11227
  readonly inputs: readonly [{
@@ -12638,7 +12638,7 @@ declare const useLens: () => {
12638
12638
  } | undefined;
12639
12639
  uniswapLens: {
12640
12640
  read: {
12641
- batchGetAmount0ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
12641
+ batchGetAmount0ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
12642
12642
  readonly type: "function";
12643
12643
  readonly name: "batchGetAmount0ForLiquidity";
12644
12644
  readonly inputs: readonly [{
@@ -13259,7 +13259,7 @@ declare const useLens: () => {
13259
13259
  }];
13260
13260
  readonly stateMutability: "pure";
13261
13261
  }], "batchGetAmount0ForLiquidity", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
13262
- batchGetAmount0ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
13262
+ batchGetAmount0ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
13263
13263
  readonly type: "function";
13264
13264
  readonly name: "batchGetAmount0ForLiquidity";
13265
13265
  readonly inputs: readonly [{
@@ -13880,7 +13880,7 @@ declare const useLens: () => {
13880
13880
  }];
13881
13881
  readonly stateMutability: "pure";
13882
13882
  }], "batchGetAmount0ForLiquidityTicks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
13883
- batchGetAmount1ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
13883
+ batchGetAmount1ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
13884
13884
  readonly type: "function";
13885
13885
  readonly name: "batchGetAmount0ForLiquidity";
13886
13886
  readonly inputs: readonly [{
@@ -14501,7 +14501,7 @@ declare const useLens: () => {
14501
14501
  }];
14502
14502
  readonly stateMutability: "pure";
14503
14503
  }], "batchGetAmount1ForLiquidity", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
14504
- batchGetAmount1ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
14504
+ batchGetAmount1ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
14505
14505
  readonly type: "function";
14506
14506
  readonly name: "batchGetAmount0ForLiquidity";
14507
14507
  readonly inputs: readonly [{
@@ -15122,7 +15122,7 @@ declare const useLens: () => {
15122
15122
  }];
15123
15123
  readonly stateMutability: "pure";
15124
15124
  }], "batchGetAmount1ForLiquidityTicks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
15125
- batchGetAmountsForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
15125
+ batchGetAmountsForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
15126
15126
  readonly type: "function";
15127
15127
  readonly name: "batchGetAmount0ForLiquidity";
15128
15128
  readonly inputs: readonly [{
@@ -15743,7 +15743,7 @@ declare const useLens: () => {
15743
15743
  }];
15744
15744
  readonly stateMutability: "pure";
15745
15745
  }], "batchGetAmountsForLiquidity", readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [readonly bigint[], readonly bigint[]]>;
15746
- batchGetAmountsForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
15746
+ batchGetAmountsForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
15747
15747
  readonly type: "function";
15748
15748
  readonly name: "batchGetAmount0ForLiquidity";
15749
15749
  readonly inputs: readonly [{
@@ -16364,7 +16364,7 @@ declare const useLens: () => {
16364
16364
  }];
16365
16365
  readonly stateMutability: "pure";
16366
16366
  }], "batchGetAmountsForLiquidityTicks", readonly [readonly number[], readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [readonly bigint[], readonly bigint[]]>;
16367
- batchGetLiquidityForAmount0: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
16367
+ batchGetLiquidityForAmount0: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
16368
16368
  readonly type: "function";
16369
16369
  readonly name: "batchGetAmount0ForLiquidity";
16370
16370
  readonly inputs: readonly [{
@@ -16985,7 +16985,7 @@ declare const useLens: () => {
16985
16985
  }];
16986
16986
  readonly stateMutability: "pure";
16987
16987
  }], "batchGetLiquidityForAmount0", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
16988
- batchGetLiquidityForAmount0Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
16988
+ batchGetLiquidityForAmount0Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
16989
16989
  readonly type: "function";
16990
16990
  readonly name: "batchGetAmount0ForLiquidity";
16991
16991
  readonly inputs: readonly [{
@@ -17606,7 +17606,7 @@ declare const useLens: () => {
17606
17606
  }];
17607
17607
  readonly stateMutability: "pure";
17608
17608
  }], "batchGetLiquidityForAmount0Ticks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
17609
- batchGetLiquidityForAmount1: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
17609
+ batchGetLiquidityForAmount1: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
17610
17610
  readonly type: "function";
17611
17611
  readonly name: "batchGetAmount0ForLiquidity";
17612
17612
  readonly inputs: readonly [{
@@ -18227,7 +18227,7 @@ declare const useLens: () => {
18227
18227
  }];
18228
18228
  readonly stateMutability: "pure";
18229
18229
  }], "batchGetLiquidityForAmount1", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
18230
- batchGetLiquidityForAmount1Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
18230
+ batchGetLiquidityForAmount1Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
18231
18231
  readonly type: "function";
18232
18232
  readonly name: "batchGetAmount0ForLiquidity";
18233
18233
  readonly inputs: readonly [{
@@ -18848,7 +18848,7 @@ declare const useLens: () => {
18848
18848
  }];
18849
18849
  readonly stateMutability: "pure";
18850
18850
  }], "batchGetLiquidityForAmount1Ticks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
18851
- batchGetLiquidityForAmounts: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
18851
+ batchGetLiquidityForAmounts: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
18852
18852
  readonly type: "function";
18853
18853
  readonly name: "batchGetAmount0ForLiquidity";
18854
18854
  readonly inputs: readonly [{
@@ -19469,7 +19469,7 @@ declare const useLens: () => {
19469
19469
  }];
19470
19470
  readonly stateMutability: "pure";
19471
19471
  }], "batchGetLiquidityForAmounts", readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
19472
- batchGetLiquidityForAmountsTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[], readonly bigint[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
19472
+ batchGetLiquidityForAmountsTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
19473
19473
  readonly type: "function";
19474
19474
  readonly name: "batchGetAmount0ForLiquidity";
19475
19475
  readonly inputs: readonly [{
@@ -20090,7 +20090,7 @@ declare const useLens: () => {
20090
20090
  }];
20091
20091
  readonly stateMutability: "pure";
20092
20092
  }], "batchGetLiquidityForAmountsTicks", readonly [readonly number[], readonly number[], readonly number[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
20093
- batchGetPriceAtTick: (args: readonly [readonly number[]], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
20093
+ batchGetPriceAtTick: (args: readonly [readonly number[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
20094
20094
  readonly type: "function";
20095
20095
  readonly name: "batchGetAmount0ForLiquidity";
20096
20096
  readonly inputs: readonly [{
@@ -20711,7 +20711,7 @@ declare const useLens: () => {
20711
20711
  }];
20712
20712
  readonly stateMutability: "pure";
20713
20713
  }], "batchGetPriceAtTick", readonly [readonly number[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
20714
- getAmount0ForLiquidity: (args: readonly [bigint, bigint, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
20714
+ getAmount0ForLiquidity: (args: readonly [bigint, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
20715
20715
  readonly type: "function";
20716
20716
  readonly name: "batchGetAmount0ForLiquidity";
20717
20717
  readonly inputs: readonly [{
@@ -21332,7 +21332,7 @@ declare const useLens: () => {
21332
21332
  }];
21333
21333
  readonly stateMutability: "pure";
21334
21334
  }], "getAmount0ForLiquidity", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
21335
- getAmount0ForLiquidityTicks: (args: readonly [number, number, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
21335
+ getAmount0ForLiquidityTicks: (args: readonly [number, number, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
21336
21336
  readonly type: "function";
21337
21337
  readonly name: "batchGetAmount0ForLiquidity";
21338
21338
  readonly inputs: readonly [{
@@ -21953,7 +21953,7 @@ declare const useLens: () => {
21953
21953
  }];
21954
21954
  readonly stateMutability: "pure";
21955
21955
  }], "getAmount0ForLiquidityTicks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
21956
- getAmount1ForLiquidity: (args: readonly [bigint, bigint, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
21956
+ getAmount1ForLiquidity: (args: readonly [bigint, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
21957
21957
  readonly type: "function";
21958
21958
  readonly name: "batchGetAmount0ForLiquidity";
21959
21959
  readonly inputs: readonly [{
@@ -22574,7 +22574,7 @@ declare const useLens: () => {
22574
22574
  }];
22575
22575
  readonly stateMutability: "pure";
22576
22576
  }], "getAmount1ForLiquidity", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
22577
- getAmount1ForLiquidityTicks: (args: readonly [number, number, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
22577
+ getAmount1ForLiquidityTicks: (args: readonly [number, number, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
22578
22578
  readonly type: "function";
22579
22579
  readonly name: "batchGetAmount0ForLiquidity";
22580
22580
  readonly inputs: readonly [{
@@ -23195,7 +23195,7 @@ declare const useLens: () => {
23195
23195
  }];
23196
23196
  readonly stateMutability: "pure";
23197
23197
  }], "getAmount1ForLiquidityTicks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
23198
- getAmountsForLiquidity: (args: readonly [bigint, bigint, bigint, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
23198
+ getAmountsForLiquidity: (args: readonly [bigint, bigint, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
23199
23199
  readonly type: "function";
23200
23200
  readonly name: "batchGetAmount0ForLiquidity";
23201
23201
  readonly inputs: readonly [{
@@ -23816,7 +23816,7 @@ declare const useLens: () => {
23816
23816
  }];
23817
23817
  readonly stateMutability: "pure";
23818
23818
  }], "getAmountsForLiquidity", readonly [bigint, bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
23819
- getAmountsForLiquidityTicks: (args: readonly [number, number, number, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
23819
+ getAmountsForLiquidityTicks: (args: readonly [number, number, number, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
23820
23820
  readonly type: "function";
23821
23821
  readonly name: "batchGetAmount0ForLiquidity";
23822
23822
  readonly inputs: readonly [{
@@ -24437,7 +24437,7 @@ declare const useLens: () => {
24437
24437
  }];
24438
24438
  readonly stateMutability: "pure";
24439
24439
  }], "getAmountsForLiquidityTicks", readonly [number, number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
24440
- getLiquidityForAmount0: (args: readonly [bigint, bigint, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
24440
+ getLiquidityForAmount0: (args: readonly [bigint, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
24441
24441
  readonly type: "function";
24442
24442
  readonly name: "batchGetAmount0ForLiquidity";
24443
24443
  readonly inputs: readonly [{
@@ -25058,7 +25058,7 @@ declare const useLens: () => {
25058
25058
  }];
25059
25059
  readonly stateMutability: "pure";
25060
25060
  }], "getLiquidityForAmount0", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
25061
- getLiquidityForAmount0Ticks: (args: readonly [number, number, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
25061
+ getLiquidityForAmount0Ticks: (args: readonly [number, number, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
25062
25062
  readonly type: "function";
25063
25063
  readonly name: "batchGetAmount0ForLiquidity";
25064
25064
  readonly inputs: readonly [{
@@ -25679,7 +25679,7 @@ declare const useLens: () => {
25679
25679
  }];
25680
25680
  readonly stateMutability: "pure";
25681
25681
  }], "getLiquidityForAmount0Ticks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
25682
- getLiquidityForAmount1: (args: readonly [bigint, bigint, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
25682
+ getLiquidityForAmount1: (args: readonly [bigint, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
25683
25683
  readonly type: "function";
25684
25684
  readonly name: "batchGetAmount0ForLiquidity";
25685
25685
  readonly inputs: readonly [{
@@ -26300,7 +26300,7 @@ declare const useLens: () => {
26300
26300
  }];
26301
26301
  readonly stateMutability: "pure";
26302
26302
  }], "getLiquidityForAmount1", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
26303
- getLiquidityForAmount1Ticks: (args: readonly [number, number, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
26303
+ getLiquidityForAmount1Ticks: (args: readonly [number, number, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
26304
26304
  readonly type: "function";
26305
26305
  readonly name: "batchGetAmount0ForLiquidity";
26306
26306
  readonly inputs: readonly [{
@@ -26921,7 +26921,7 @@ declare const useLens: () => {
26921
26921
  }];
26922
26922
  readonly stateMutability: "pure";
26923
26923
  }], "getLiquidityForAmount1Ticks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
26924
- getLiquidityForAmounts: (args: readonly [bigint, bigint, bigint, bigint, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
26924
+ getLiquidityForAmounts: (args: readonly [bigint, bigint, bigint, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
26925
26925
  readonly type: "function";
26926
26926
  readonly name: "batchGetAmount0ForLiquidity";
26927
26927
  readonly inputs: readonly [{
@@ -27542,7 +27542,7 @@ declare const useLens: () => {
27542
27542
  }];
27543
27543
  readonly stateMutability: "pure";
27544
27544
  }], "getLiquidityForAmounts", readonly [bigint, bigint, bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
27545
- getLiquidityForAmountsTicks: (args: readonly [number, number, number, bigint, bigint], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
27545
+ getLiquidityForAmountsTicks: (args: readonly [number, number, number, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
27546
27546
  readonly type: "function";
27547
27547
  readonly name: "batchGetAmount0ForLiquidity";
27548
27548
  readonly inputs: readonly [{
@@ -28163,7 +28163,7 @@ declare const useLens: () => {
28163
28163
  }];
28164
28164
  readonly stateMutability: "pure";
28165
28165
  }], "getLiquidityForAmountsTicks", readonly [number, number, number, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
28166
- getPriceAtTick: (args: readonly [number], options?: viem367.Prettify<viem367.UnionOmit<viem367.ReadContractParameters<readonly [{
28166
+ getPriceAtTick: (args: readonly [number], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
28167
28167
  readonly type: "function";
28168
28168
  readonly name: "batchGetAmount0ForLiquidity";
28169
28169
  readonly inputs: readonly [{
package/dist/client.js CHANGED
@@ -144,12 +144,18 @@ const TimelockMarketProvider = ({ children, marketData, envioGraphqlUrl }) => {
144
144
  const chainId = useChainId();
145
145
  const lensAddr = timelockLenses[chainId];
146
146
  const uniswapMathLensAddr = uniswapMathLenses[chainId];
147
- return /* @__PURE__ */ React.createElement(TimelockMarketContext.Provider, { value: {
147
+ const contextValue = useMemo(() => ({
148
148
  marketData: marketData || {},
149
149
  lensAddr,
150
150
  uniswapMathLensAddr,
151
151
  envioGraphqlUrl
152
- } }, children);
152
+ }), [
153
+ marketData,
154
+ lensAddr,
155
+ uniswapMathLensAddr,
156
+ envioGraphqlUrl
157
+ ]);
158
+ return /* @__PURE__ */ React.createElement(TimelockMarketContext.Provider, { value: contextValue }, children);
153
159
  };
154
160
  const useCurrentMarket = () => {
155
161
  const context = useContext(TimelockMarketContext);
@@ -172,21 +178,22 @@ const useTimelockConfig = () => {
172
178
 
173
179
  //#endregion
174
180
  //#region src/hooks/market/useMarketData.ts
175
- const selectMarket = (data) => ({
176
- ...data.TimelockMarket[0],
177
- pool: data.TimelockMarket[0].pool,
178
- vault: data.TimelockMarket[0].vault,
179
- optionAsset: data.TimelockMarket[0].optionAsset,
180
- payoutAsset: data.TimelockMarket[0].payoutAsset,
181
- optionsCount: BigInt(data.TimelockMarket[0].optionsCount),
182
- tradersCount: BigInt(data.TimelockMarket[0].tradersCount)
183
- });
184
181
  const useMarketData = (marketAddr) => {
185
182
  const { graphqlClient } = useTimelockConfig();
186
183
  const { data } = useQuery({
187
184
  queryKey: ["marketData", marketAddr || "--"],
188
- queryFn: () => graphqlClient.GetMarketData({ marketAddr: marketAddr.toLowerCase() }),
189
- select: selectMarket,
185
+ queryFn: async () => {
186
+ const result = await graphqlClient.GetMarketData({ marketAddr: marketAddr.toLowerCase() });
187
+ return {
188
+ ...result.TimelockMarket[0],
189
+ pool: result.TimelockMarket[0].pool,
190
+ vault: result.TimelockMarket[0].vault,
191
+ optionAsset: result.TimelockMarket[0].optionAsset,
192
+ payoutAsset: result.TimelockMarket[0].payoutAsset,
193
+ optionsCount: BigInt(result.TimelockMarket[0].optionsCount),
194
+ tradersCount: BigInt(result.TimelockMarket[0].tradersCount)
195
+ };
196
+ },
190
197
  enabled: !!marketAddr && !!graphqlClient
191
198
  });
192
199
  return data || {};
@@ -435,25 +442,6 @@ const useOptionPremium = (marketAddr, optionType, optionAmount, duration) => {
435
442
 
436
443
  //#endregion
437
444
  //#region src/hooks/market/useUserOptions.ts
438
- const selectOptions = (data) => {
439
- if (!(data === null || data === void 0 ? void 0 : data.UserOption)) return [];
440
- return data.UserOption.map((option) => ({
441
- ...option,
442
- id: BigInt(option.id),
443
- marketAddr: option.marketAddr,
444
- optionType: option.optionType,
445
- createdAt: /* @__PURE__ */ new Date(Number(option.createdAt) * 1e3),
446
- expiresAt: /* @__PURE__ */ new Date(Number(option.expiresAt) * 1e3),
447
- premiumPaid: BigInt(option.premiumPaid),
448
- realizedPayout: BigInt(option.realizedPayout),
449
- liquiditiesAtOpen: option.liquiditiesAtOpen.map((liquidity) => BigInt(liquidity)),
450
- liquiditiesCurrent: option.liquiditiesCurrent.map((liquidity) => BigInt(liquidity)),
451
- positionSizeAtOpen: BigInt(option.positionSizeAtOpen),
452
- positionSizeCurrent: BigInt(option.positionSizeCurrent),
453
- strikePrice: BigInt(option.strikePrice),
454
- entryPrice: BigInt(option.entryPrice)
455
- })).sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
456
- };
457
445
  const useUserOptions = (user, active = false) => {
458
446
  const { graphqlClient } = useTimelockConfig();
459
447
  const { data,...rest } = useQuery({
@@ -462,8 +450,25 @@ const useUserOptions = (user, active = false) => {
462
450
  user || "--",
463
451
  active
464
452
  ],
465
- queryFn: () => active ? graphqlClient === null || graphqlClient === void 0 ? void 0 : graphqlClient.GetActiveUserOptions({ user: user.toLowerCase() }) : graphqlClient === null || graphqlClient === void 0 ? void 0 : graphqlClient.GetClosedUserOptions({ user: user.toLowerCase() }),
466
- select: selectOptions,
453
+ queryFn: async () => {
454
+ if (!graphqlClient) return [];
455
+ return (active ? await graphqlClient.GetActiveUserOptions({ user: user.toLowerCase() }) : await graphqlClient.GetClosedUserOptions({ user: user.toLowerCase() })).UserOption.map((option) => ({
456
+ ...option,
457
+ id: BigInt(option.id),
458
+ marketAddr: option.marketAddr,
459
+ optionType: option.optionType,
460
+ createdAt: /* @__PURE__ */ new Date(Number(option.createdAt) * 1e3),
461
+ expiresAt: /* @__PURE__ */ new Date(Number(option.expiresAt) * 1e3),
462
+ premiumPaid: BigInt(option.premiumPaid),
463
+ realizedPayout: BigInt(option.realizedPayout),
464
+ liquiditiesAtOpen: option.liquiditiesAtOpen.map((liquidity) => BigInt(liquidity)),
465
+ liquiditiesCurrent: option.liquiditiesCurrent.map((liquidity) => BigInt(liquidity)),
466
+ positionSizeAtOpen: BigInt(option.positionSizeAtOpen),
467
+ positionSizeCurrent: BigInt(option.positionSizeCurrent),
468
+ strikePrice: BigInt(option.strikePrice),
469
+ entryPrice: BigInt(option.entryPrice)
470
+ })).sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
471
+ },
467
472
  enabled: !!user && !!graphqlClient
468
473
  });
469
474
  return {