timelock-sdk 0.0.47 → 0.0.49

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.
Files changed (29) hide show
  1. package/dist/abis.cjs +1 -1
  2. package/dist/abis.d.cts +1 -1
  3. package/dist/abis.d.ts +1 -1
  4. package/dist/abis.js +2 -2
  5. package/dist/client.cjs +15 -7
  6. package/dist/client.cjs.map +1 -1
  7. package/dist/client.d.cts +69 -61
  8. package/dist/client.d.ts +14 -6
  9. package/dist/client.js +16 -8
  10. package/dist/client.js.map +1 -1
  11. package/dist/{index-B20z73_3.d.ts → index-Bg4UAy7Y.d.cts} +3 -3
  12. package/dist/{index-CA5kB-yT.d.cts → index-DiDvh-kv.d.ts} +94 -94
  13. package/dist/{numberUtils-DKGWDsOu.cjs → numberUtils-BKQtAolx.cjs} +2 -2
  14. package/dist/{numberUtils-DKGWDsOu.cjs.map → numberUtils-BKQtAolx.cjs.map} +1 -1
  15. package/dist/{numberUtils-Dk_yqgfN.js → numberUtils-Dk0TuHnT.js} +3 -3
  16. package/dist/{numberUtils-Dk_yqgfN.js.map → numberUtils-Dk0TuHnT.js.map} +1 -1
  17. package/dist/{optionsMarket-DyBxHplR.js → optionsMarket-CvArD6d_.js} +432 -116
  18. package/dist/{optionsMarket-DyBxHplR.js.map → optionsMarket-CvArD6d_.js.map} +1 -1
  19. package/dist/{optionsMarket-Br-bjuSA.cjs → optionsMarket-PBduSBXF.cjs} +431 -115
  20. package/dist/{optionsMarket-Br-bjuSA.cjs.map → optionsMarket-PBduSBXF.cjs.map} +1 -1
  21. package/dist/package.cjs +2 -2
  22. package/dist/package.d.cts +2 -2
  23. package/dist/package.d.ts +2 -2
  24. package/dist/package.js +2 -2
  25. package/dist/{singleOwnerVault-DMu9pqN1.js → singleOwnerVault-BeJChjfJ.js} +2 -2
  26. package/dist/{singleOwnerVault-DMu9pqN1.js.map → singleOwnerVault-BeJChjfJ.js.map} +1 -1
  27. package/dist/{uniswapMathLens-MrB_VfJB.d.ts → uniswapMathLens-BiaRFVeY.d.cts} +354 -97
  28. package/dist/{uniswapMathLens-B1MIL2yT.d.cts → uniswapMathLens-uDGUc-kg.d.ts} +354 -97
  29. package/package.json +6 -6
package/dist/client.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import "./uniswapMathLens-B1MIL2yT.cjs";
2
- import { Amount, TimelockMarketData, UniswapMathLens } from "./index-CA5kB-yT.cjs";
3
- import * as viem249 from "viem";
1
+ import "./uniswapMathLens-BiaRFVeY.cjs";
2
+ import { D as TimelockMarketData, O as UniswapMathLens, d as Amount } from "./index-Bg4UAy7Y.cjs";
3
+ import * as viem116 from "viem";
4
4
  import { Address } from "viem";
5
5
  import React, { ReactNode } from "react";
6
6
  import "graphql";
@@ -11,9 +11,9 @@ import * as _tanstack_react_query0 from "@tanstack/react-query";
11
11
  import { NonUndefinedGuard } from "@tanstack/react-query";
12
12
 
13
13
  //#region src/generated/graphql.d.ts
14
- type Exact<T extends {
14
+ type Exact<T$1 extends {
15
15
  [key: string]: unknown;
16
- }> = { [K in keyof T]: T[K] };
16
+ }> = { [K in keyof T$1]: T$1[K] };
17
17
  type GraphQLClientRequestHeaders = RequestOptions['requestHeaders'];
18
18
  /** All built-in and custom scalars, mapped to their actual values */
19
19
  type Scalars = {
@@ -2291,7 +2291,15 @@ declare const useOptionPnl: (option: OptionData) => {
2291
2291
  };
2292
2292
  //#endregion
2293
2293
  //#region src/hooks/market/useOptionPremium.d.ts
2294
- declare const useOptionPremium: (marketAddr: Address | undefined, optionType: "CALL" | "PUT", optionAmount: bigint, duration: number, strikeTick?: number) => Amount | undefined;
2294
+ declare const useOptionPremium: (marketAddr: Address | undefined, optionType: "CALL" | "PUT", optionAmount: bigint, duration: number, strikeTick?: number) => {
2295
+ premium?: undefined;
2296
+ protocolFee?: undefined;
2297
+ totalPremium?: undefined;
2298
+ } | {
2299
+ premium: Amount;
2300
+ protocolFee: Amount;
2301
+ totalPremium: Amount;
2302
+ };
2295
2303
  //#endregion
2296
2304
  //#region src/hooks/pool/useCurrentPrice.d.ts
2297
2305
  declare const useCurrentPrice: (poolAddr?: Address) => {
@@ -2310,7 +2318,7 @@ declare const useCurrentTick: (poolAddr?: Address) => {
2310
2318
  //#endregion
2311
2319
  //#region src/hooks/pool/usePoolData.d.ts
2312
2320
  type UniswapPoolData = ReturnType<typeof usePoolData>;
2313
- type NonUndefined<T> = T extends undefined ? never : T;
2321
+ type NonUndefined<T$1> = T$1 extends undefined ? never : T$1;
2314
2322
  declare const usePoolData: (poolAddr?: Address) => Partial<NonUndefined<{
2315
2323
  token0: `0x${string}`;
2316
2324
  token1: `0x${string}`;
@@ -2357,7 +2365,7 @@ declare const useBurnLiquidity: (vaultAddr?: Address) => {
2357
2365
  //#region src/hooks/vault/useLiquidityBlocks.d.ts
2358
2366
  type LiquidityBlockData = ReturnType<typeof useLiquidityBlocks>['data'][0];
2359
2367
  declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2360
- error: viem249.ReadContractErrorType;
2368
+ error: viem116.ReadContractErrorType;
2361
2369
  isError: true;
2362
2370
  isPending: false;
2363
2371
  isLoading: false;
@@ -2369,7 +2377,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2369
2377
  dataUpdatedAt: number;
2370
2378
  errorUpdatedAt: number;
2371
2379
  failureCount: number;
2372
- failureReason: viem249.ReadContractErrorType | null;
2380
+ failureReason: viem116.ReadContractErrorType | null;
2373
2381
  errorUpdateCount: number;
2374
2382
  isFetched: boolean;
2375
2383
  isFetchedAfterMount: boolean;
@@ -2389,7 +2397,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2389
2397
  totalAmount1: bigint;
2390
2398
  borrowedAmount0: bigint;
2391
2399
  borrowedAmount1: bigint;
2392
- }[], viem249.ReadContractErrorType>>;
2400
+ }[], viem116.ReadContractErrorType>>;
2393
2401
  fetchStatus: _tanstack_query_core0.FetchStatus;
2394
2402
  promise: Promise<readonly {
2395
2403
  tickLower: number;
@@ -2427,7 +2435,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2427
2435
  dataUpdatedAt: number;
2428
2436
  errorUpdatedAt: number;
2429
2437
  failureCount: number;
2430
- failureReason: viem249.ReadContractErrorType | null;
2438
+ failureReason: viem116.ReadContractErrorType | null;
2431
2439
  errorUpdateCount: number;
2432
2440
  isFetched: boolean;
2433
2441
  isFetchedAfterMount: boolean;
@@ -2447,7 +2455,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2447
2455
  totalAmount1: bigint;
2448
2456
  borrowedAmount0: bigint;
2449
2457
  borrowedAmount1: bigint;
2450
- }[], viem249.ReadContractErrorType>>;
2458
+ }[], viem116.ReadContractErrorType>>;
2451
2459
  fetchStatus: _tanstack_query_core0.FetchStatus;
2452
2460
  promise: Promise<readonly {
2453
2461
  tickLower: number;
@@ -2473,7 +2481,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2473
2481
  borrowedAmount1: bigint;
2474
2482
  }[];
2475
2483
  } | {
2476
- error: viem249.ReadContractErrorType;
2484
+ error: viem116.ReadContractErrorType;
2477
2485
  isError: true;
2478
2486
  isPending: false;
2479
2487
  isLoading: false;
@@ -2485,7 +2493,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2485
2493
  dataUpdatedAt: number;
2486
2494
  errorUpdatedAt: number;
2487
2495
  failureCount: number;
2488
- failureReason: viem249.ReadContractErrorType | null;
2496
+ failureReason: viem116.ReadContractErrorType | null;
2489
2497
  errorUpdateCount: number;
2490
2498
  isFetched: boolean;
2491
2499
  isFetchedAfterMount: boolean;
@@ -2505,7 +2513,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2505
2513
  totalAmount1: bigint;
2506
2514
  borrowedAmount0: bigint;
2507
2515
  borrowedAmount1: bigint;
2508
- }[], viem249.ReadContractErrorType>>;
2516
+ }[], viem116.ReadContractErrorType>>;
2509
2517
  fetchStatus: _tanstack_query_core0.FetchStatus;
2510
2518
  promise: Promise<readonly {
2511
2519
  tickLower: number;
@@ -2543,7 +2551,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2543
2551
  dataUpdatedAt: number;
2544
2552
  errorUpdatedAt: number;
2545
2553
  failureCount: number;
2546
- failureReason: viem249.ReadContractErrorType | null;
2554
+ failureReason: viem116.ReadContractErrorType | null;
2547
2555
  errorUpdateCount: number;
2548
2556
  isFetched: boolean;
2549
2557
  isFetchedAfterMount: boolean;
@@ -2563,7 +2571,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2563
2571
  totalAmount1: bigint;
2564
2572
  borrowedAmount0: bigint;
2565
2573
  borrowedAmount1: bigint;
2566
- }[], viem249.ReadContractErrorType>>;
2574
+ }[], viem116.ReadContractErrorType>>;
2567
2575
  fetchStatus: _tanstack_query_core0.FetchStatus;
2568
2576
  promise: Promise<readonly {
2569
2577
  tickLower: number;
@@ -2600,7 +2608,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2600
2608
  dataUpdatedAt: number;
2601
2609
  errorUpdatedAt: number;
2602
2610
  failureCount: number;
2603
- failureReason: viem249.ReadContractErrorType | null;
2611
+ failureReason: viem116.ReadContractErrorType | null;
2604
2612
  errorUpdateCount: number;
2605
2613
  isFetched: boolean;
2606
2614
  isFetchedAfterMount: boolean;
@@ -2621,7 +2629,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2621
2629
  totalAmount1: bigint;
2622
2630
  borrowedAmount0: bigint;
2623
2631
  borrowedAmount1: bigint;
2624
- }[], viem249.ReadContractErrorType>>;
2632
+ }[], viem116.ReadContractErrorType>>;
2625
2633
  fetchStatus: _tanstack_query_core0.FetchStatus;
2626
2634
  promise: Promise<readonly {
2627
2635
  tickLower: number;
@@ -2659,7 +2667,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2659
2667
  dataUpdatedAt: number;
2660
2668
  errorUpdatedAt: number;
2661
2669
  failureCount: number;
2662
- failureReason: viem249.ReadContractErrorType | null;
2670
+ failureReason: viem116.ReadContractErrorType | null;
2663
2671
  errorUpdateCount: number;
2664
2672
  isFetched: boolean;
2665
2673
  isFetchedAfterMount: boolean;
@@ -2679,7 +2687,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
2679
2687
  totalAmount1: bigint;
2680
2688
  borrowedAmount0: bigint;
2681
2689
  borrowedAmount1: bigint;
2682
- }[], viem249.ReadContractErrorType>>;
2690
+ }[], viem116.ReadContractErrorType>>;
2683
2691
  fetchStatus: _tanstack_query_core0.FetchStatus;
2684
2692
  promise: Promise<readonly {
2685
2693
  tickLower: number;
@@ -2752,14 +2760,14 @@ declare const useVaultTVL: (vaultAddr?: Address) => {
2752
2760
  borrowedAmount0: Amount;
2753
2761
  borrowedAmount1: Amount;
2754
2762
  blocksCount: bigint;
2755
- refetch: (options?: _tanstack_query_core0.RefetchOptions) => Promise<_tanstack_query_core0.QueryObserverResult<readonly [bigint, bigint, bigint, bigint, bigint, bigint, bigint], viem249.ReadContractErrorType>>;
2763
+ refetch: (options?: _tanstack_query_core0.RefetchOptions) => Promise<_tanstack_query_core0.QueryObserverResult<readonly [bigint, bigint, bigint, bigint, bigint, bigint, bigint], viem116.ReadContractErrorType>>;
2756
2764
  };
2757
2765
  //#endregion
2758
2766
  //#region src/hooks/useLens.d.ts
2759
2767
  declare const useLens: () => {
2760
2768
  timelockLens: {
2761
2769
  read: {
2762
- batchGetRefTick: (args: readonly [`0x${string}`, readonly number[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
2770
+ batchGetRefTick: (args: readonly [`0x${string}`, readonly number[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
2763
2771
  readonly type: "function";
2764
2772
  readonly name: "batchGetRefTick";
2765
2773
  readonly inputs: readonly [{
@@ -3465,7 +3473,7 @@ declare const useLens: () => {
3465
3473
  }];
3466
3474
  readonly stateMutability: "view";
3467
3475
  }], "batchGetRefTick", readonly [`0x${string}`, readonly number[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly number[]>;
3468
- getAllBlocks: (args: readonly [`0x${string}`], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
3476
+ getAllBlocks: (args: readonly [`0x${string}`], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
3469
3477
  readonly type: "function";
3470
3478
  readonly name: "batchGetRefTick";
3471
3479
  readonly inputs: readonly [{
@@ -4181,7 +4189,7 @@ declare const useLens: () => {
4181
4189
  borrowedAmount0: bigint;
4182
4190
  borrowedAmount1: bigint;
4183
4191
  }[]>;
4184
- getExpiredOptions: (args: readonly [`0x${string}`, bigint, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
4192
+ getExpiredOptions: (args: readonly [`0x${string}`, bigint, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
4185
4193
  readonly type: "function";
4186
4194
  readonly name: "batchGetRefTick";
4187
4195
  readonly inputs: readonly [{
@@ -4906,7 +4914,7 @@ declare const useLens: () => {
4906
4914
  createdAt: bigint;
4907
4915
  liquidities: readonly bigint[];
4908
4916
  }[], bigint, boolean]>;
4909
- getLiquidityAtTick: (args: readonly [`0x${string}`, number], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
4917
+ getLiquidityAtTick: (args: readonly [`0x${string}`, number], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
4910
4918
  readonly type: "function";
4911
4919
  readonly name: "batchGetRefTick";
4912
4920
  readonly inputs: readonly [{
@@ -5612,7 +5620,7 @@ declare const useLens: () => {
5612
5620
  }];
5613
5621
  readonly stateMutability: "view";
5614
5622
  }], "getLiquidityAtTick", readonly [`0x${string}`, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
5615
- getMarketData: (args: readonly [`0x${string}`], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
5623
+ getMarketData: (args: readonly [`0x${string}`], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
5616
5624
  readonly type: "function";
5617
5625
  readonly name: "batchGetRefTick";
5618
5626
  readonly inputs: readonly [{
@@ -6331,7 +6339,7 @@ declare const useLens: () => {
6331
6339
  payoutAssetName: string;
6332
6340
  optionsCount: bigint;
6333
6341
  }>;
6334
- getMaxPositionSize: (args: readonly [`0x${string}`, number, number], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
6342
+ getMaxPositionSize: (args: readonly [`0x${string}`, number, number], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
6335
6343
  readonly type: "function";
6336
6344
  readonly name: "batchGetRefTick";
6337
6345
  readonly inputs: readonly [{
@@ -7037,7 +7045,7 @@ declare const useLens: () => {
7037
7045
  }];
7038
7046
  readonly stateMutability: "view";
7039
7047
  }], "getMaxPositionSize", readonly [`0x${string}`, number, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
7040
- getMaxPositionSizeAtCurrentTick: (args: readonly [`0x${string}`, number], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
7048
+ getMaxPositionSizeAtCurrentTick: (args: readonly [`0x${string}`, number], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
7041
7049
  readonly type: "function";
7042
7050
  readonly name: "batchGetRefTick";
7043
7051
  readonly inputs: readonly [{
@@ -7743,7 +7751,7 @@ declare const useLens: () => {
7743
7751
  }];
7744
7752
  readonly stateMutability: "view";
7745
7753
  }], "getMaxPositionSizeAtCurrentTick", readonly [`0x${string}`, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
7746
- getOptionData: (args: readonly [`0x${string}`, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
7754
+ getOptionData: (args: readonly [`0x${string}`, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
7747
7755
  readonly type: "function";
7748
7756
  readonly name: "batchGetRefTick";
7749
7757
  readonly inputs: readonly [{
@@ -8468,7 +8476,7 @@ declare const useLens: () => {
8468
8476
  createdAt: bigint;
8469
8477
  liquidities: readonly bigint[];
8470
8478
  }>;
8471
- getOptionsData: (args: readonly [`0x${string}`, readonly bigint[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
8479
+ getOptionsData: (args: readonly [`0x${string}`, readonly bigint[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
8472
8480
  readonly type: "function";
8473
8481
  readonly name: "batchGetRefTick";
8474
8482
  readonly inputs: readonly [{
@@ -9193,7 +9201,7 @@ declare const useLens: () => {
9193
9201
  createdAt: bigint;
9194
9202
  liquidities: readonly bigint[];
9195
9203
  }[]>;
9196
- getPoolData: (args: readonly [`0x${string}`], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
9204
+ getPoolData: (args: readonly [`0x${string}`], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
9197
9205
  readonly type: "function";
9198
9206
  readonly name: "batchGetRefTick";
9199
9207
  readonly inputs: readonly [{
@@ -9910,7 +9918,7 @@ declare const useLens: () => {
9910
9918
  tickSpacing: number;
9911
9919
  fee: number;
9912
9920
  }>;
9913
- getRefTick: (args: readonly [`0x${string}`, number], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
9921
+ getRefTick: (args: readonly [`0x${string}`, number], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
9914
9922
  readonly type: "function";
9915
9923
  readonly name: "batchGetRefTick";
9916
9924
  readonly inputs: readonly [{
@@ -10616,7 +10624,7 @@ declare const useLens: () => {
10616
10624
  }];
10617
10625
  readonly stateMutability: "view";
10618
10626
  }], "getRefTick", readonly [`0x${string}`, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<number>;
10619
- getUserOptions: (args: readonly [`0x${string}`, `0x${string}`, bigint, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
10627
+ getUserOptions: (args: readonly [`0x${string}`, `0x${string}`, bigint, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
10620
10628
  readonly type: "function";
10621
10629
  readonly name: "batchGetRefTick";
10622
10630
  readonly inputs: readonly [{
@@ -11341,7 +11349,7 @@ declare const useLens: () => {
11341
11349
  createdAt: bigint;
11342
11350
  liquidities: readonly bigint[];
11343
11351
  }[], bigint, boolean]>;
11344
- getVaultTVL: (args: readonly [`0x${string}`], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
11352
+ getVaultTVL: (args: readonly [`0x${string}`], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
11345
11353
  readonly type: "function";
11346
11354
  readonly name: "batchGetRefTick";
11347
11355
  readonly inputs: readonly [{
@@ -12758,7 +12766,7 @@ declare const useLens: () => {
12758
12766
  } | undefined;
12759
12767
  uniswapLens: {
12760
12768
  read: {
12761
- batchGetAmount0ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
12769
+ batchGetAmount0ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
12762
12770
  readonly type: "function";
12763
12771
  readonly name: "batchGetAmount0ForLiquidity";
12764
12772
  readonly inputs: readonly [{
@@ -13379,7 +13387,7 @@ declare const useLens: () => {
13379
13387
  }];
13380
13388
  readonly stateMutability: "pure";
13381
13389
  }], "batchGetAmount0ForLiquidity", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
13382
- batchGetAmount0ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
13390
+ batchGetAmount0ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
13383
13391
  readonly type: "function";
13384
13392
  readonly name: "batchGetAmount0ForLiquidity";
13385
13393
  readonly inputs: readonly [{
@@ -14000,7 +14008,7 @@ declare const useLens: () => {
14000
14008
  }];
14001
14009
  readonly stateMutability: "pure";
14002
14010
  }], "batchGetAmount0ForLiquidityTicks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
14003
- batchGetAmount1ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
14011
+ batchGetAmount1ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
14004
14012
  readonly type: "function";
14005
14013
  readonly name: "batchGetAmount0ForLiquidity";
14006
14014
  readonly inputs: readonly [{
@@ -14621,7 +14629,7 @@ declare const useLens: () => {
14621
14629
  }];
14622
14630
  readonly stateMutability: "pure";
14623
14631
  }], "batchGetAmount1ForLiquidity", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
14624
- batchGetAmount1ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
14632
+ batchGetAmount1ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
14625
14633
  readonly type: "function";
14626
14634
  readonly name: "batchGetAmount0ForLiquidity";
14627
14635
  readonly inputs: readonly [{
@@ -15242,7 +15250,7 @@ declare const useLens: () => {
15242
15250
  }];
15243
15251
  readonly stateMutability: "pure";
15244
15252
  }], "batchGetAmount1ForLiquidityTicks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
15245
- batchGetAmountsForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
15253
+ batchGetAmountsForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
15246
15254
  readonly type: "function";
15247
15255
  readonly name: "batchGetAmount0ForLiquidity";
15248
15256
  readonly inputs: readonly [{
@@ -15863,7 +15871,7 @@ declare const useLens: () => {
15863
15871
  }];
15864
15872
  readonly stateMutability: "pure";
15865
15873
  }], "batchGetAmountsForLiquidity", readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [readonly bigint[], readonly bigint[]]>;
15866
- batchGetAmountsForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
15874
+ batchGetAmountsForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
15867
15875
  readonly type: "function";
15868
15876
  readonly name: "batchGetAmount0ForLiquidity";
15869
15877
  readonly inputs: readonly [{
@@ -16484,7 +16492,7 @@ declare const useLens: () => {
16484
16492
  }];
16485
16493
  readonly stateMutability: "pure";
16486
16494
  }], "batchGetAmountsForLiquidityTicks", readonly [readonly number[], readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [readonly bigint[], readonly bigint[]]>;
16487
- batchGetLiquidityForAmount0: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
16495
+ batchGetLiquidityForAmount0: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
16488
16496
  readonly type: "function";
16489
16497
  readonly name: "batchGetAmount0ForLiquidity";
16490
16498
  readonly inputs: readonly [{
@@ -17105,7 +17113,7 @@ declare const useLens: () => {
17105
17113
  }];
17106
17114
  readonly stateMutability: "pure";
17107
17115
  }], "batchGetLiquidityForAmount0", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
17108
- batchGetLiquidityForAmount0Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
17116
+ batchGetLiquidityForAmount0Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
17109
17117
  readonly type: "function";
17110
17118
  readonly name: "batchGetAmount0ForLiquidity";
17111
17119
  readonly inputs: readonly [{
@@ -17726,7 +17734,7 @@ declare const useLens: () => {
17726
17734
  }];
17727
17735
  readonly stateMutability: "pure";
17728
17736
  }], "batchGetLiquidityForAmount0Ticks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
17729
- batchGetLiquidityForAmount1: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
17737
+ batchGetLiquidityForAmount1: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
17730
17738
  readonly type: "function";
17731
17739
  readonly name: "batchGetAmount0ForLiquidity";
17732
17740
  readonly inputs: readonly [{
@@ -18347,7 +18355,7 @@ declare const useLens: () => {
18347
18355
  }];
18348
18356
  readonly stateMutability: "pure";
18349
18357
  }], "batchGetLiquidityForAmount1", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
18350
- batchGetLiquidityForAmount1Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
18358
+ batchGetLiquidityForAmount1Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
18351
18359
  readonly type: "function";
18352
18360
  readonly name: "batchGetAmount0ForLiquidity";
18353
18361
  readonly inputs: readonly [{
@@ -18968,7 +18976,7 @@ declare const useLens: () => {
18968
18976
  }];
18969
18977
  readonly stateMutability: "pure";
18970
18978
  }], "batchGetLiquidityForAmount1Ticks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
18971
- batchGetLiquidityForAmounts: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
18979
+ batchGetLiquidityForAmounts: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
18972
18980
  readonly type: "function";
18973
18981
  readonly name: "batchGetAmount0ForLiquidity";
18974
18982
  readonly inputs: readonly [{
@@ -19589,7 +19597,7 @@ declare const useLens: () => {
19589
19597
  }];
19590
19598
  readonly stateMutability: "pure";
19591
19599
  }], "batchGetLiquidityForAmounts", readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
19592
- batchGetLiquidityForAmountsTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[], readonly bigint[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
19600
+ batchGetLiquidityForAmountsTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[], readonly bigint[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
19593
19601
  readonly type: "function";
19594
19602
  readonly name: "batchGetAmount0ForLiquidity";
19595
19603
  readonly inputs: readonly [{
@@ -20210,7 +20218,7 @@ declare const useLens: () => {
20210
20218
  }];
20211
20219
  readonly stateMutability: "pure";
20212
20220
  }], "batchGetLiquidityForAmountsTicks", readonly [readonly number[], readonly number[], readonly number[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
20213
- batchGetPriceAtTick: (args: readonly [readonly number[]], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
20221
+ batchGetPriceAtTick: (args: readonly [readonly number[]], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
20214
20222
  readonly type: "function";
20215
20223
  readonly name: "batchGetAmount0ForLiquidity";
20216
20224
  readonly inputs: readonly [{
@@ -20831,7 +20839,7 @@ declare const useLens: () => {
20831
20839
  }];
20832
20840
  readonly stateMutability: "pure";
20833
20841
  }], "batchGetPriceAtTick", readonly [readonly number[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
20834
- getAmount0ForLiquidity: (args: readonly [bigint, bigint, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
20842
+ getAmount0ForLiquidity: (args: readonly [bigint, bigint, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
20835
20843
  readonly type: "function";
20836
20844
  readonly name: "batchGetAmount0ForLiquidity";
20837
20845
  readonly inputs: readonly [{
@@ -21452,7 +21460,7 @@ declare const useLens: () => {
21452
21460
  }];
21453
21461
  readonly stateMutability: "pure";
21454
21462
  }], "getAmount0ForLiquidity", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
21455
- getAmount0ForLiquidityTicks: (args: readonly [number, number, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
21463
+ getAmount0ForLiquidityTicks: (args: readonly [number, number, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
21456
21464
  readonly type: "function";
21457
21465
  readonly name: "batchGetAmount0ForLiquidity";
21458
21466
  readonly inputs: readonly [{
@@ -22073,7 +22081,7 @@ declare const useLens: () => {
22073
22081
  }];
22074
22082
  readonly stateMutability: "pure";
22075
22083
  }], "getAmount0ForLiquidityTicks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
22076
- getAmount1ForLiquidity: (args: readonly [bigint, bigint, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
22084
+ getAmount1ForLiquidity: (args: readonly [bigint, bigint, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
22077
22085
  readonly type: "function";
22078
22086
  readonly name: "batchGetAmount0ForLiquidity";
22079
22087
  readonly inputs: readonly [{
@@ -22694,7 +22702,7 @@ declare const useLens: () => {
22694
22702
  }];
22695
22703
  readonly stateMutability: "pure";
22696
22704
  }], "getAmount1ForLiquidity", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
22697
- getAmount1ForLiquidityTicks: (args: readonly [number, number, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
22705
+ getAmount1ForLiquidityTicks: (args: readonly [number, number, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
22698
22706
  readonly type: "function";
22699
22707
  readonly name: "batchGetAmount0ForLiquidity";
22700
22708
  readonly inputs: readonly [{
@@ -23315,7 +23323,7 @@ declare const useLens: () => {
23315
23323
  }];
23316
23324
  readonly stateMutability: "pure";
23317
23325
  }], "getAmount1ForLiquidityTicks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
23318
- getAmountsForLiquidity: (args: readonly [bigint, bigint, bigint, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
23326
+ getAmountsForLiquidity: (args: readonly [bigint, bigint, bigint, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
23319
23327
  readonly type: "function";
23320
23328
  readonly name: "batchGetAmount0ForLiquidity";
23321
23329
  readonly inputs: readonly [{
@@ -23936,7 +23944,7 @@ declare const useLens: () => {
23936
23944
  }];
23937
23945
  readonly stateMutability: "pure";
23938
23946
  }], "getAmountsForLiquidity", readonly [bigint, bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
23939
- getAmountsForLiquidityTicks: (args: readonly [number, number, number, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
23947
+ getAmountsForLiquidityTicks: (args: readonly [number, number, number, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
23940
23948
  readonly type: "function";
23941
23949
  readonly name: "batchGetAmount0ForLiquidity";
23942
23950
  readonly inputs: readonly [{
@@ -24557,7 +24565,7 @@ declare const useLens: () => {
24557
24565
  }];
24558
24566
  readonly stateMutability: "pure";
24559
24567
  }], "getAmountsForLiquidityTicks", readonly [number, number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
24560
- getLiquidityForAmount0: (args: readonly [bigint, bigint, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
24568
+ getLiquidityForAmount0: (args: readonly [bigint, bigint, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
24561
24569
  readonly type: "function";
24562
24570
  readonly name: "batchGetAmount0ForLiquidity";
24563
24571
  readonly inputs: readonly [{
@@ -25178,7 +25186,7 @@ declare const useLens: () => {
25178
25186
  }];
25179
25187
  readonly stateMutability: "pure";
25180
25188
  }], "getLiquidityForAmount0", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
25181
- getLiquidityForAmount0Ticks: (args: readonly [number, number, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
25189
+ getLiquidityForAmount0Ticks: (args: readonly [number, number, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
25182
25190
  readonly type: "function";
25183
25191
  readonly name: "batchGetAmount0ForLiquidity";
25184
25192
  readonly inputs: readonly [{
@@ -25799,7 +25807,7 @@ declare const useLens: () => {
25799
25807
  }];
25800
25808
  readonly stateMutability: "pure";
25801
25809
  }], "getLiquidityForAmount0Ticks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
25802
- getLiquidityForAmount1: (args: readonly [bigint, bigint, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
25810
+ getLiquidityForAmount1: (args: readonly [bigint, bigint, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
25803
25811
  readonly type: "function";
25804
25812
  readonly name: "batchGetAmount0ForLiquidity";
25805
25813
  readonly inputs: readonly [{
@@ -26420,7 +26428,7 @@ declare const useLens: () => {
26420
26428
  }];
26421
26429
  readonly stateMutability: "pure";
26422
26430
  }], "getLiquidityForAmount1", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
26423
- getLiquidityForAmount1Ticks: (args: readonly [number, number, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
26431
+ getLiquidityForAmount1Ticks: (args: readonly [number, number, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
26424
26432
  readonly type: "function";
26425
26433
  readonly name: "batchGetAmount0ForLiquidity";
26426
26434
  readonly inputs: readonly [{
@@ -27041,7 +27049,7 @@ declare const useLens: () => {
27041
27049
  }];
27042
27050
  readonly stateMutability: "pure";
27043
27051
  }], "getLiquidityForAmount1Ticks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
27044
- getLiquidityForAmounts: (args: readonly [bigint, bigint, bigint, bigint, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
27052
+ getLiquidityForAmounts: (args: readonly [bigint, bigint, bigint, bigint, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
27045
27053
  readonly type: "function";
27046
27054
  readonly name: "batchGetAmount0ForLiquidity";
27047
27055
  readonly inputs: readonly [{
@@ -27662,7 +27670,7 @@ declare const useLens: () => {
27662
27670
  }];
27663
27671
  readonly stateMutability: "pure";
27664
27672
  }], "getLiquidityForAmounts", readonly [bigint, bigint, bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
27665
- getLiquidityForAmountsTicks: (args: readonly [number, number, number, bigint, bigint], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
27673
+ getLiquidityForAmountsTicks: (args: readonly [number, number, number, bigint, bigint], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
27666
27674
  readonly type: "function";
27667
27675
  readonly name: "batchGetAmount0ForLiquidity";
27668
27676
  readonly inputs: readonly [{
@@ -28283,7 +28291,7 @@ declare const useLens: () => {
28283
28291
  }];
28284
28292
  readonly stateMutability: "pure";
28285
28293
  }], "getLiquidityForAmountsTicks", readonly [number, number, number, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
28286
- getPriceAtTick: (args: readonly [number], options?: viem249.Prettify<viem249.UnionOmit<viem249.ReadContractParameters<readonly [{
28294
+ getPriceAtTick: (args: readonly [number], options?: viem116.Prettify<viem116.UnionOmit<viem116.ReadContractParameters<readonly [{
28287
28295
  readonly type: "function";
28288
28296
  readonly name: "batchGetAmount0ForLiquidity";
28289
28297
  readonly inputs: readonly [{
package/dist/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import "./uniswapMathLens-MrB_VfJB.js";
2
- import { Amount, TimelockMarketData, UniswapMathLens } from "./index-B20z73_3.js";
1
+ import "./uniswapMathLens-uDGUc-kg.js";
2
+ import { D as TimelockMarketData, O as UniswapMathLens, d as Amount } from "./index-DiDvh-kv.js";
3
3
  import * as viem0 from "viem";
4
4
  import { Address } from "viem";
5
5
  import React, { ReactNode } from "react";
@@ -11,9 +11,9 @@ import * as _wagmi_core0 from "@wagmi/core";
11
11
  import * as _tanstack_query_core0 from "@tanstack/query-core";
12
12
 
13
13
  //#region src/generated/graphql.d.ts
14
- type Exact<T extends {
14
+ type Exact<T$1 extends {
15
15
  [key: string]: unknown;
16
- }> = { [K in keyof T]: T[K] };
16
+ }> = { [K in keyof T$1]: T$1[K] };
17
17
  type GraphQLClientRequestHeaders = RequestOptions['requestHeaders'];
18
18
  /** All built-in and custom scalars, mapped to their actual values */
19
19
  type Scalars = {
@@ -2291,7 +2291,15 @@ declare const useOptionPnl: (option: OptionData) => {
2291
2291
  };
2292
2292
  //#endregion
2293
2293
  //#region src/hooks/market/useOptionPremium.d.ts
2294
- declare const useOptionPremium: (marketAddr: Address | undefined, optionType: "CALL" | "PUT", optionAmount: bigint, duration: number, strikeTick?: number) => Amount | undefined;
2294
+ declare const useOptionPremium: (marketAddr: Address | undefined, optionType: "CALL" | "PUT", optionAmount: bigint, duration: number, strikeTick?: number) => {
2295
+ premium?: undefined;
2296
+ protocolFee?: undefined;
2297
+ totalPremium?: undefined;
2298
+ } | {
2299
+ premium: Amount;
2300
+ protocolFee: Amount;
2301
+ totalPremium: Amount;
2302
+ };
2295
2303
  //#endregion
2296
2304
  //#region src/hooks/pool/useCurrentPrice.d.ts
2297
2305
  declare const useCurrentPrice: (poolAddr?: Address) => {
@@ -2310,7 +2318,7 @@ declare const useCurrentTick: (poolAddr?: Address) => {
2310
2318
  //#endregion
2311
2319
  //#region src/hooks/pool/usePoolData.d.ts
2312
2320
  type UniswapPoolData = ReturnType<typeof usePoolData>;
2313
- type NonUndefined<T> = T extends undefined ? never : T;
2321
+ type NonUndefined<T$1> = T$1 extends undefined ? never : T$1;
2314
2322
  declare const usePoolData: (poolAddr?: Address) => Partial<NonUndefined<{
2315
2323
  token0: `0x${string}`;
2316
2324
  token1: `0x${string}`;
package/dist/client.js CHANGED
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
 
3
3
 
4
- import { lensAbi, optionsMarketAbi } from "./optionsMarket-DyBxHplR.js";
5
- import { PRICE_PRECISION, getErc20, getPriceAtTick, getTimelockLens, getTimelockMarket, getUniswapMathLens, liquiditiesToAmounts, roundTickDown, timelockLenses, token0ToToken1, token1ToToken0, uniswapMathLenses, wrapAmount, wrapPrice } from "./numberUtils-Dk_yqgfN.js";
6
- import { singleOwnerVaultAbi, uniswapV3PoolAbi } from "./singleOwnerVault-DMu9pqN1.js";
4
+ import { r as lensAbi, t as optionsMarketAbi } from "./optionsMarket-CvArD6d_.js";
5
+ import { C as token1ToToken0, D as getUniswapMathLens, E as getTimelockMarket, O as timelockLenses, S as token0ToToken1, T as getTimelockLens, b as roundTickDown, d as wrapPrice, h as getPriceAtTick, k as uniswapMathLenses, l as wrapAmount, m as PRICE_PRECISION, w as getErc20, y as liquiditiesToAmounts } from "./numberUtils-Dk0TuHnT.js";
6
+ import { n as uniswapV3PoolAbi, t as singleOwnerVaultAbi } from "./singleOwnerVault-BeJChjfJ.js";
7
7
  import { encodeFunctionData, erc20Abi, maxUint256, zeroAddress } from "viem";
8
8
  import React, { createContext, useContext, useMemo } from "react";
9
9
  import { useAccount, useChainId, useClient, useReadContract, useWaitForTransactionReceipt, useWriteContract } from "wagmi";
@@ -433,7 +433,7 @@ const useOptionPremium = (marketAddr, optionType, optionAmount, duration, strike
433
433
  optionAssetIsToken0,
434
434
  strikeTick
435
435
  ]);
436
- const { data: premiumData } = useReadContract({
436
+ const { data: [premium, protocolFee] = [] } = useReadContract({
437
437
  address: marketAddr,
438
438
  abi: optionsMarketAbi,
439
439
  functionName: "calculatePremium",
@@ -441,14 +441,22 @@ const useOptionPremium = (marketAddr, optionType, optionAmount, duration, strike
441
441
  optionType === "CALL" ? 0 : 1,
442
442
  optionAmount,
443
443
  strikeTickRounded,
444
- BigInt(duration)
444
+ duration
445
445
  ] : void 0,
446
446
  query: { enabled: strikeTickRounded !== void 0 }
447
447
  });
448
448
  return useMemo(() => {
449
- if (premiumData === void 0 || payoutAssetDecimals === void 0) return;
450
- return wrapAmount(premiumData, payoutAssetDecimals);
451
- }, [premiumData, payoutAssetDecimals]);
449
+ if (premium === void 0 || protocolFee === void 0 || payoutAssetDecimals === void 0) return {};
450
+ return {
451
+ premium: wrapAmount(premium, payoutAssetDecimals),
452
+ protocolFee: wrapAmount(protocolFee, payoutAssetDecimals),
453
+ totalPremium: wrapAmount(premium + protocolFee, payoutAssetDecimals)
454
+ };
455
+ }, [
456
+ premium,
457
+ protocolFee,
458
+ payoutAssetDecimals
459
+ ]);
452
460
  };
453
461
 
454
462
  //#endregion