timelock-sdk 0.0.39 → 0.0.40
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.cjs +6 -3
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +57 -57
- package/dist/client.d.ts +57 -57
- package/dist/client.js +6 -3
- package/dist/client.js.map +1 -1
- package/dist/{index-CRhFaRiq.d.ts → index-B20z73_3.d.ts} +92 -92
- package/dist/{index-CA5kB-yT.d.cts → index-B7b3c8cu.d.cts} +92 -92
- package/dist/package.d.cts +1 -1
- package/dist/package.d.ts +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./uniswapMathLens-MrB_VfJB.js";
|
|
2
|
-
import { Amount, TimelockMarketData, UniswapMathLens } from "./index-
|
|
3
|
-
import * as
|
|
2
|
+
import { Amount, TimelockMarketData, UniswapMathLens } from "./index-B20z73_3.js";
|
|
3
|
+
import * as viem117 from "viem";
|
|
4
4
|
import { Address } from "viem";
|
|
5
5
|
import React, { ReactNode } from "react";
|
|
6
6
|
import { GraphQLClient, RequestOptions } from "graphql-request";
|
|
@@ -2337,7 +2337,7 @@ declare const usePriceAtTick: (tick?: number, poolAddr?: Address) => Amount | un
|
|
|
2337
2337
|
//#endregion
|
|
2338
2338
|
//#region src/lib/price.d.ts
|
|
2339
2339
|
interface PriceDataPoint {
|
|
2340
|
-
timestamp:
|
|
2340
|
+
timestamp: Date;
|
|
2341
2341
|
price: number;
|
|
2342
2342
|
}
|
|
2343
2343
|
type PriceResolution = '1m' | '5m' | '15m' | '1h' | '4h' | '1d';
|
|
@@ -2365,7 +2365,7 @@ declare const useBurnLiquidity: (vaultAddr?: Address) => {
|
|
|
2365
2365
|
//#region src/hooks/vault/useLiquidityBlocks.d.ts
|
|
2366
2366
|
type LiquidityBlockData = ReturnType<typeof useLiquidityBlocks>['data'][0];
|
|
2367
2367
|
declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
2368
|
-
error:
|
|
2368
|
+
error: viem117.ReadContractErrorType;
|
|
2369
2369
|
isError: true;
|
|
2370
2370
|
isPending: false;
|
|
2371
2371
|
isLoading: false;
|
|
@@ -2377,7 +2377,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2377
2377
|
dataUpdatedAt: number;
|
|
2378
2378
|
errorUpdatedAt: number;
|
|
2379
2379
|
failureCount: number;
|
|
2380
|
-
failureReason:
|
|
2380
|
+
failureReason: viem117.ReadContractErrorType | null;
|
|
2381
2381
|
errorUpdateCount: number;
|
|
2382
2382
|
isFetched: boolean;
|
|
2383
2383
|
isFetchedAfterMount: boolean;
|
|
@@ -2397,7 +2397,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2397
2397
|
totalAmount1: bigint;
|
|
2398
2398
|
borrowedAmount0: bigint;
|
|
2399
2399
|
borrowedAmount1: bigint;
|
|
2400
|
-
}[],
|
|
2400
|
+
}[], viem117.ReadContractErrorType>>;
|
|
2401
2401
|
fetchStatus: _tanstack_query_core0.FetchStatus;
|
|
2402
2402
|
promise: Promise<readonly {
|
|
2403
2403
|
tickLower: number;
|
|
@@ -2435,7 +2435,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2435
2435
|
dataUpdatedAt: number;
|
|
2436
2436
|
errorUpdatedAt: number;
|
|
2437
2437
|
failureCount: number;
|
|
2438
|
-
failureReason:
|
|
2438
|
+
failureReason: viem117.ReadContractErrorType | null;
|
|
2439
2439
|
errorUpdateCount: number;
|
|
2440
2440
|
isFetched: boolean;
|
|
2441
2441
|
isFetchedAfterMount: boolean;
|
|
@@ -2455,7 +2455,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2455
2455
|
totalAmount1: bigint;
|
|
2456
2456
|
borrowedAmount0: bigint;
|
|
2457
2457
|
borrowedAmount1: bigint;
|
|
2458
|
-
}[],
|
|
2458
|
+
}[], viem117.ReadContractErrorType>>;
|
|
2459
2459
|
fetchStatus: _tanstack_query_core0.FetchStatus;
|
|
2460
2460
|
promise: Promise<readonly {
|
|
2461
2461
|
tickLower: number;
|
|
@@ -2481,7 +2481,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2481
2481
|
borrowedAmount1: bigint;
|
|
2482
2482
|
}[];
|
|
2483
2483
|
} | {
|
|
2484
|
-
error:
|
|
2484
|
+
error: viem117.ReadContractErrorType;
|
|
2485
2485
|
isError: true;
|
|
2486
2486
|
isPending: false;
|
|
2487
2487
|
isLoading: false;
|
|
@@ -2493,7 +2493,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2493
2493
|
dataUpdatedAt: number;
|
|
2494
2494
|
errorUpdatedAt: number;
|
|
2495
2495
|
failureCount: number;
|
|
2496
|
-
failureReason:
|
|
2496
|
+
failureReason: viem117.ReadContractErrorType | null;
|
|
2497
2497
|
errorUpdateCount: number;
|
|
2498
2498
|
isFetched: boolean;
|
|
2499
2499
|
isFetchedAfterMount: boolean;
|
|
@@ -2513,7 +2513,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2513
2513
|
totalAmount1: bigint;
|
|
2514
2514
|
borrowedAmount0: bigint;
|
|
2515
2515
|
borrowedAmount1: bigint;
|
|
2516
|
-
}[],
|
|
2516
|
+
}[], viem117.ReadContractErrorType>>;
|
|
2517
2517
|
fetchStatus: _tanstack_query_core0.FetchStatus;
|
|
2518
2518
|
promise: Promise<readonly {
|
|
2519
2519
|
tickLower: number;
|
|
@@ -2551,7 +2551,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2551
2551
|
dataUpdatedAt: number;
|
|
2552
2552
|
errorUpdatedAt: number;
|
|
2553
2553
|
failureCount: number;
|
|
2554
|
-
failureReason:
|
|
2554
|
+
failureReason: viem117.ReadContractErrorType | null;
|
|
2555
2555
|
errorUpdateCount: number;
|
|
2556
2556
|
isFetched: boolean;
|
|
2557
2557
|
isFetchedAfterMount: boolean;
|
|
@@ -2571,7 +2571,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2571
2571
|
totalAmount1: bigint;
|
|
2572
2572
|
borrowedAmount0: bigint;
|
|
2573
2573
|
borrowedAmount1: bigint;
|
|
2574
|
-
}[],
|
|
2574
|
+
}[], viem117.ReadContractErrorType>>;
|
|
2575
2575
|
fetchStatus: _tanstack_query_core0.FetchStatus;
|
|
2576
2576
|
promise: Promise<readonly {
|
|
2577
2577
|
tickLower: number;
|
|
@@ -2608,7 +2608,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2608
2608
|
dataUpdatedAt: number;
|
|
2609
2609
|
errorUpdatedAt: number;
|
|
2610
2610
|
failureCount: number;
|
|
2611
|
-
failureReason:
|
|
2611
|
+
failureReason: viem117.ReadContractErrorType | null;
|
|
2612
2612
|
errorUpdateCount: number;
|
|
2613
2613
|
isFetched: boolean;
|
|
2614
2614
|
isFetchedAfterMount: boolean;
|
|
@@ -2629,7 +2629,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2629
2629
|
totalAmount1: bigint;
|
|
2630
2630
|
borrowedAmount0: bigint;
|
|
2631
2631
|
borrowedAmount1: bigint;
|
|
2632
|
-
}[],
|
|
2632
|
+
}[], viem117.ReadContractErrorType>>;
|
|
2633
2633
|
fetchStatus: _tanstack_query_core0.FetchStatus;
|
|
2634
2634
|
promise: Promise<readonly {
|
|
2635
2635
|
tickLower: number;
|
|
@@ -2667,7 +2667,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2667
2667
|
dataUpdatedAt: number;
|
|
2668
2668
|
errorUpdatedAt: number;
|
|
2669
2669
|
failureCount: number;
|
|
2670
|
-
failureReason:
|
|
2670
|
+
failureReason: viem117.ReadContractErrorType | null;
|
|
2671
2671
|
errorUpdateCount: number;
|
|
2672
2672
|
isFetched: boolean;
|
|
2673
2673
|
isFetchedAfterMount: boolean;
|
|
@@ -2687,7 +2687,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2687
2687
|
totalAmount1: bigint;
|
|
2688
2688
|
borrowedAmount0: bigint;
|
|
2689
2689
|
borrowedAmount1: bigint;
|
|
2690
|
-
}[],
|
|
2690
|
+
}[], viem117.ReadContractErrorType>>;
|
|
2691
2691
|
fetchStatus: _tanstack_query_core0.FetchStatus;
|
|
2692
2692
|
promise: Promise<readonly {
|
|
2693
2693
|
tickLower: number;
|
|
@@ -2760,14 +2760,14 @@ declare const useVaultTVL: (vaultAddr?: Address) => {
|
|
|
2760
2760
|
borrowedAmount0: Amount;
|
|
2761
2761
|
borrowedAmount1: Amount;
|
|
2762
2762
|
blocksCount: bigint;
|
|
2763
|
-
refetch: (options?: _tanstack_query_core0.RefetchOptions) => Promise<_tanstack_query_core0.QueryObserverResult<readonly [bigint, bigint, bigint, bigint, bigint, bigint, bigint],
|
|
2763
|
+
refetch: (options?: _tanstack_query_core0.RefetchOptions) => Promise<_tanstack_query_core0.QueryObserverResult<readonly [bigint, bigint, bigint, bigint, bigint, bigint, bigint], viem117.ReadContractErrorType>>;
|
|
2764
2764
|
};
|
|
2765
2765
|
//#endregion
|
|
2766
2766
|
//#region src/hooks/useLens.d.ts
|
|
2767
2767
|
declare const useLens: () => {
|
|
2768
2768
|
timelockLens: {
|
|
2769
2769
|
read: {
|
|
2770
|
-
batchGetRefTick: (args: readonly [`0x${string}`, readonly number[]], options?:
|
|
2770
|
+
batchGetRefTick: (args: readonly [`0x${string}`, readonly number[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
2771
2771
|
readonly type: "function";
|
|
2772
2772
|
readonly name: "batchGetRefTick";
|
|
2773
2773
|
readonly inputs: readonly [{
|
|
@@ -3473,7 +3473,7 @@ declare const useLens: () => {
|
|
|
3473
3473
|
}];
|
|
3474
3474
|
readonly stateMutability: "view";
|
|
3475
3475
|
}], "batchGetRefTick", readonly [`0x${string}`, readonly number[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly number[]>;
|
|
3476
|
-
getAllBlocks: (args: readonly [`0x${string}`], options?:
|
|
3476
|
+
getAllBlocks: (args: readonly [`0x${string}`], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
3477
3477
|
readonly type: "function";
|
|
3478
3478
|
readonly name: "batchGetRefTick";
|
|
3479
3479
|
readonly inputs: readonly [{
|
|
@@ -4189,7 +4189,7 @@ declare const useLens: () => {
|
|
|
4189
4189
|
borrowedAmount0: bigint;
|
|
4190
4190
|
borrowedAmount1: bigint;
|
|
4191
4191
|
}[]>;
|
|
4192
|
-
getExpiredOptions: (args: readonly [`0x${string}`, bigint, bigint], options?:
|
|
4192
|
+
getExpiredOptions: (args: readonly [`0x${string}`, bigint, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
4193
4193
|
readonly type: "function";
|
|
4194
4194
|
readonly name: "batchGetRefTick";
|
|
4195
4195
|
readonly inputs: readonly [{
|
|
@@ -4914,7 +4914,7 @@ declare const useLens: () => {
|
|
|
4914
4914
|
createdAt: bigint;
|
|
4915
4915
|
liquidities: readonly bigint[];
|
|
4916
4916
|
}[], bigint, boolean]>;
|
|
4917
|
-
getLiquidityAtTick: (args: readonly [`0x${string}`, number], options?:
|
|
4917
|
+
getLiquidityAtTick: (args: readonly [`0x${string}`, number], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
4918
4918
|
readonly type: "function";
|
|
4919
4919
|
readonly name: "batchGetRefTick";
|
|
4920
4920
|
readonly inputs: readonly [{
|
|
@@ -5620,7 +5620,7 @@ declare const useLens: () => {
|
|
|
5620
5620
|
}];
|
|
5621
5621
|
readonly stateMutability: "view";
|
|
5622
5622
|
}], "getLiquidityAtTick", readonly [`0x${string}`, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
|
|
5623
|
-
getMarketData: (args: readonly [`0x${string}`], options?:
|
|
5623
|
+
getMarketData: (args: readonly [`0x${string}`], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
5624
5624
|
readonly type: "function";
|
|
5625
5625
|
readonly name: "batchGetRefTick";
|
|
5626
5626
|
readonly inputs: readonly [{
|
|
@@ -6339,7 +6339,7 @@ declare const useLens: () => {
|
|
|
6339
6339
|
payoutAssetName: string;
|
|
6340
6340
|
optionsCount: bigint;
|
|
6341
6341
|
}>;
|
|
6342
|
-
getMaxPositionSize: (args: readonly [`0x${string}`, number, number], options?:
|
|
6342
|
+
getMaxPositionSize: (args: readonly [`0x${string}`, number, number], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
6343
6343
|
readonly type: "function";
|
|
6344
6344
|
readonly name: "batchGetRefTick";
|
|
6345
6345
|
readonly inputs: readonly [{
|
|
@@ -7045,7 +7045,7 @@ declare const useLens: () => {
|
|
|
7045
7045
|
}];
|
|
7046
7046
|
readonly stateMutability: "view";
|
|
7047
7047
|
}], "getMaxPositionSize", readonly [`0x${string}`, number, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
|
|
7048
|
-
getMaxPositionSizeAtCurrentTick: (args: readonly [`0x${string}`, number], options?:
|
|
7048
|
+
getMaxPositionSizeAtCurrentTick: (args: readonly [`0x${string}`, number], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
7049
7049
|
readonly type: "function";
|
|
7050
7050
|
readonly name: "batchGetRefTick";
|
|
7051
7051
|
readonly inputs: readonly [{
|
|
@@ -7751,7 +7751,7 @@ declare const useLens: () => {
|
|
|
7751
7751
|
}];
|
|
7752
7752
|
readonly stateMutability: "view";
|
|
7753
7753
|
}], "getMaxPositionSizeAtCurrentTick", readonly [`0x${string}`, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
|
|
7754
|
-
getOptionData: (args: readonly [`0x${string}`, bigint], options?:
|
|
7754
|
+
getOptionData: (args: readonly [`0x${string}`, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
7755
7755
|
readonly type: "function";
|
|
7756
7756
|
readonly name: "batchGetRefTick";
|
|
7757
7757
|
readonly inputs: readonly [{
|
|
@@ -8476,7 +8476,7 @@ declare const useLens: () => {
|
|
|
8476
8476
|
createdAt: bigint;
|
|
8477
8477
|
liquidities: readonly bigint[];
|
|
8478
8478
|
}>;
|
|
8479
|
-
getOptionsData: (args: readonly [`0x${string}`, readonly bigint[]], options?:
|
|
8479
|
+
getOptionsData: (args: readonly [`0x${string}`, readonly bigint[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
8480
8480
|
readonly type: "function";
|
|
8481
8481
|
readonly name: "batchGetRefTick";
|
|
8482
8482
|
readonly inputs: readonly [{
|
|
@@ -9201,7 +9201,7 @@ declare const useLens: () => {
|
|
|
9201
9201
|
createdAt: bigint;
|
|
9202
9202
|
liquidities: readonly bigint[];
|
|
9203
9203
|
}[]>;
|
|
9204
|
-
getPoolData: (args: readonly [`0x${string}`], options?:
|
|
9204
|
+
getPoolData: (args: readonly [`0x${string}`], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
9205
9205
|
readonly type: "function";
|
|
9206
9206
|
readonly name: "batchGetRefTick";
|
|
9207
9207
|
readonly inputs: readonly [{
|
|
@@ -9918,7 +9918,7 @@ declare const useLens: () => {
|
|
|
9918
9918
|
tickSpacing: number;
|
|
9919
9919
|
fee: number;
|
|
9920
9920
|
}>;
|
|
9921
|
-
getRefTick: (args: readonly [`0x${string}`, number], options?:
|
|
9921
|
+
getRefTick: (args: readonly [`0x${string}`, number], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
9922
9922
|
readonly type: "function";
|
|
9923
9923
|
readonly name: "batchGetRefTick";
|
|
9924
9924
|
readonly inputs: readonly [{
|
|
@@ -10624,7 +10624,7 @@ declare const useLens: () => {
|
|
|
10624
10624
|
}];
|
|
10625
10625
|
readonly stateMutability: "view";
|
|
10626
10626
|
}], "getRefTick", readonly [`0x${string}`, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<number>;
|
|
10627
|
-
getUserOptions: (args: readonly [`0x${string}`, `0x${string}`, bigint, bigint], options?:
|
|
10627
|
+
getUserOptions: (args: readonly [`0x${string}`, `0x${string}`, bigint, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
10628
10628
|
readonly type: "function";
|
|
10629
10629
|
readonly name: "batchGetRefTick";
|
|
10630
10630
|
readonly inputs: readonly [{
|
|
@@ -11349,7 +11349,7 @@ declare const useLens: () => {
|
|
|
11349
11349
|
createdAt: bigint;
|
|
11350
11350
|
liquidities: readonly bigint[];
|
|
11351
11351
|
}[], bigint, boolean]>;
|
|
11352
|
-
getVaultTVL: (args: readonly [`0x${string}`], options?:
|
|
11352
|
+
getVaultTVL: (args: readonly [`0x${string}`], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
11353
11353
|
readonly type: "function";
|
|
11354
11354
|
readonly name: "batchGetRefTick";
|
|
11355
11355
|
readonly inputs: readonly [{
|
|
@@ -12766,7 +12766,7 @@ declare const useLens: () => {
|
|
|
12766
12766
|
} | undefined;
|
|
12767
12767
|
uniswapLens: {
|
|
12768
12768
|
read: {
|
|
12769
|
-
batchGetAmount0ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?:
|
|
12769
|
+
batchGetAmount0ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
12770
12770
|
readonly type: "function";
|
|
12771
12771
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
12772
12772
|
readonly inputs: readonly [{
|
|
@@ -13387,7 +13387,7 @@ declare const useLens: () => {
|
|
|
13387
13387
|
}];
|
|
13388
13388
|
readonly stateMutability: "pure";
|
|
13389
13389
|
}], "batchGetAmount0ForLiquidity", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
13390
|
-
batchGetAmount0ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?:
|
|
13390
|
+
batchGetAmount0ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
13391
13391
|
readonly type: "function";
|
|
13392
13392
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
13393
13393
|
readonly inputs: readonly [{
|
|
@@ -14008,7 +14008,7 @@ declare const useLens: () => {
|
|
|
14008
14008
|
}];
|
|
14009
14009
|
readonly stateMutability: "pure";
|
|
14010
14010
|
}], "batchGetAmount0ForLiquidityTicks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
14011
|
-
batchGetAmount1ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?:
|
|
14011
|
+
batchGetAmount1ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
14012
14012
|
readonly type: "function";
|
|
14013
14013
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
14014
14014
|
readonly inputs: readonly [{
|
|
@@ -14629,7 +14629,7 @@ declare const useLens: () => {
|
|
|
14629
14629
|
}];
|
|
14630
14630
|
readonly stateMutability: "pure";
|
|
14631
14631
|
}], "batchGetAmount1ForLiquidity", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
14632
|
-
batchGetAmount1ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?:
|
|
14632
|
+
batchGetAmount1ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
14633
14633
|
readonly type: "function";
|
|
14634
14634
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
14635
14635
|
readonly inputs: readonly [{
|
|
@@ -15250,7 +15250,7 @@ declare const useLens: () => {
|
|
|
15250
15250
|
}];
|
|
15251
15251
|
readonly stateMutability: "pure";
|
|
15252
15252
|
}], "batchGetAmount1ForLiquidityTicks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
15253
|
-
batchGetAmountsForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?:
|
|
15253
|
+
batchGetAmountsForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
15254
15254
|
readonly type: "function";
|
|
15255
15255
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
15256
15256
|
readonly inputs: readonly [{
|
|
@@ -15871,7 +15871,7 @@ declare const useLens: () => {
|
|
|
15871
15871
|
}];
|
|
15872
15872
|
readonly stateMutability: "pure";
|
|
15873
15873
|
}], "batchGetAmountsForLiquidity", readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [readonly bigint[], readonly bigint[]]>;
|
|
15874
|
-
batchGetAmountsForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[]], options?:
|
|
15874
|
+
batchGetAmountsForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
15875
15875
|
readonly type: "function";
|
|
15876
15876
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
15877
15877
|
readonly inputs: readonly [{
|
|
@@ -16492,7 +16492,7 @@ declare const useLens: () => {
|
|
|
16492
16492
|
}];
|
|
16493
16493
|
readonly stateMutability: "pure";
|
|
16494
16494
|
}], "batchGetAmountsForLiquidityTicks", readonly [readonly number[], readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [readonly bigint[], readonly bigint[]]>;
|
|
16495
|
-
batchGetLiquidityForAmount0: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?:
|
|
16495
|
+
batchGetLiquidityForAmount0: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
16496
16496
|
readonly type: "function";
|
|
16497
16497
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
16498
16498
|
readonly inputs: readonly [{
|
|
@@ -17113,7 +17113,7 @@ declare const useLens: () => {
|
|
|
17113
17113
|
}];
|
|
17114
17114
|
readonly stateMutability: "pure";
|
|
17115
17115
|
}], "batchGetLiquidityForAmount0", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
17116
|
-
batchGetLiquidityForAmount0Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?:
|
|
17116
|
+
batchGetLiquidityForAmount0Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
17117
17117
|
readonly type: "function";
|
|
17118
17118
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
17119
17119
|
readonly inputs: readonly [{
|
|
@@ -17734,7 +17734,7 @@ declare const useLens: () => {
|
|
|
17734
17734
|
}];
|
|
17735
17735
|
readonly stateMutability: "pure";
|
|
17736
17736
|
}], "batchGetLiquidityForAmount0Ticks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
17737
|
-
batchGetLiquidityForAmount1: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?:
|
|
17737
|
+
batchGetLiquidityForAmount1: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
17738
17738
|
readonly type: "function";
|
|
17739
17739
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
17740
17740
|
readonly inputs: readonly [{
|
|
@@ -18355,7 +18355,7 @@ declare const useLens: () => {
|
|
|
18355
18355
|
}];
|
|
18356
18356
|
readonly stateMutability: "pure";
|
|
18357
18357
|
}], "batchGetLiquidityForAmount1", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
18358
|
-
batchGetLiquidityForAmount1Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?:
|
|
18358
|
+
batchGetLiquidityForAmount1Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
18359
18359
|
readonly type: "function";
|
|
18360
18360
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
18361
18361
|
readonly inputs: readonly [{
|
|
@@ -18976,7 +18976,7 @@ declare const useLens: () => {
|
|
|
18976
18976
|
}];
|
|
18977
18977
|
readonly stateMutability: "pure";
|
|
18978
18978
|
}], "batchGetLiquidityForAmount1Ticks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
18979
|
-
batchGetLiquidityForAmounts: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?:
|
|
18979
|
+
batchGetLiquidityForAmounts: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
18980
18980
|
readonly type: "function";
|
|
18981
18981
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
18982
18982
|
readonly inputs: readonly [{
|
|
@@ -19597,7 +19597,7 @@ declare const useLens: () => {
|
|
|
19597
19597
|
}];
|
|
19598
19598
|
readonly stateMutability: "pure";
|
|
19599
19599
|
}], "batchGetLiquidityForAmounts", readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
19600
|
-
batchGetLiquidityForAmountsTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[], readonly bigint[]], options?:
|
|
19600
|
+
batchGetLiquidityForAmountsTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[], readonly bigint[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
19601
19601
|
readonly type: "function";
|
|
19602
19602
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
19603
19603
|
readonly inputs: readonly [{
|
|
@@ -20218,7 +20218,7 @@ declare const useLens: () => {
|
|
|
20218
20218
|
}];
|
|
20219
20219
|
readonly stateMutability: "pure";
|
|
20220
20220
|
}], "batchGetLiquidityForAmountsTicks", readonly [readonly number[], readonly number[], readonly number[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
20221
|
-
batchGetPriceAtTick: (args: readonly [readonly number[]], options?:
|
|
20221
|
+
batchGetPriceAtTick: (args: readonly [readonly number[]], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
20222
20222
|
readonly type: "function";
|
|
20223
20223
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
20224
20224
|
readonly inputs: readonly [{
|
|
@@ -20839,7 +20839,7 @@ declare const useLens: () => {
|
|
|
20839
20839
|
}];
|
|
20840
20840
|
readonly stateMutability: "pure";
|
|
20841
20841
|
}], "batchGetPriceAtTick", readonly [readonly number[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
20842
|
-
getAmount0ForLiquidity: (args: readonly [bigint, bigint, bigint], options?:
|
|
20842
|
+
getAmount0ForLiquidity: (args: readonly [bigint, bigint, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
20843
20843
|
readonly type: "function";
|
|
20844
20844
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
20845
20845
|
readonly inputs: readonly [{
|
|
@@ -21460,7 +21460,7 @@ declare const useLens: () => {
|
|
|
21460
21460
|
}];
|
|
21461
21461
|
readonly stateMutability: "pure";
|
|
21462
21462
|
}], "getAmount0ForLiquidity", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
21463
|
-
getAmount0ForLiquidityTicks: (args: readonly [number, number, bigint], options?:
|
|
21463
|
+
getAmount0ForLiquidityTicks: (args: readonly [number, number, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
21464
21464
|
readonly type: "function";
|
|
21465
21465
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
21466
21466
|
readonly inputs: readonly [{
|
|
@@ -22081,7 +22081,7 @@ declare const useLens: () => {
|
|
|
22081
22081
|
}];
|
|
22082
22082
|
readonly stateMutability: "pure";
|
|
22083
22083
|
}], "getAmount0ForLiquidityTicks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
22084
|
-
getAmount1ForLiquidity: (args: readonly [bigint, bigint, bigint], options?:
|
|
22084
|
+
getAmount1ForLiquidity: (args: readonly [bigint, bigint, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
22085
22085
|
readonly type: "function";
|
|
22086
22086
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
22087
22087
|
readonly inputs: readonly [{
|
|
@@ -22702,7 +22702,7 @@ declare const useLens: () => {
|
|
|
22702
22702
|
}];
|
|
22703
22703
|
readonly stateMutability: "pure";
|
|
22704
22704
|
}], "getAmount1ForLiquidity", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
22705
|
-
getAmount1ForLiquidityTicks: (args: readonly [number, number, bigint], options?:
|
|
22705
|
+
getAmount1ForLiquidityTicks: (args: readonly [number, number, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
22706
22706
|
readonly type: "function";
|
|
22707
22707
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
22708
22708
|
readonly inputs: readonly [{
|
|
@@ -23323,7 +23323,7 @@ declare const useLens: () => {
|
|
|
23323
23323
|
}];
|
|
23324
23324
|
readonly stateMutability: "pure";
|
|
23325
23325
|
}], "getAmount1ForLiquidityTicks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
23326
|
-
getAmountsForLiquidity: (args: readonly [bigint, bigint, bigint, bigint], options?:
|
|
23326
|
+
getAmountsForLiquidity: (args: readonly [bigint, bigint, bigint, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
23327
23327
|
readonly type: "function";
|
|
23328
23328
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
23329
23329
|
readonly inputs: readonly [{
|
|
@@ -23944,7 +23944,7 @@ declare const useLens: () => {
|
|
|
23944
23944
|
}];
|
|
23945
23945
|
readonly stateMutability: "pure";
|
|
23946
23946
|
}], "getAmountsForLiquidity", readonly [bigint, bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
|
|
23947
|
-
getAmountsForLiquidityTicks: (args: readonly [number, number, number, bigint], options?:
|
|
23947
|
+
getAmountsForLiquidityTicks: (args: readonly [number, number, number, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
23948
23948
|
readonly type: "function";
|
|
23949
23949
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
23950
23950
|
readonly inputs: readonly [{
|
|
@@ -24565,7 +24565,7 @@ declare const useLens: () => {
|
|
|
24565
24565
|
}];
|
|
24566
24566
|
readonly stateMutability: "pure";
|
|
24567
24567
|
}], "getAmountsForLiquidityTicks", readonly [number, number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
|
|
24568
|
-
getLiquidityForAmount0: (args: readonly [bigint, bigint, bigint], options?:
|
|
24568
|
+
getLiquidityForAmount0: (args: readonly [bigint, bigint, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
24569
24569
|
readonly type: "function";
|
|
24570
24570
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
24571
24571
|
readonly inputs: readonly [{
|
|
@@ -25186,7 +25186,7 @@ declare const useLens: () => {
|
|
|
25186
25186
|
}];
|
|
25187
25187
|
readonly stateMutability: "pure";
|
|
25188
25188
|
}], "getLiquidityForAmount0", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
25189
|
-
getLiquidityForAmount0Ticks: (args: readonly [number, number, bigint], options?:
|
|
25189
|
+
getLiquidityForAmount0Ticks: (args: readonly [number, number, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
25190
25190
|
readonly type: "function";
|
|
25191
25191
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
25192
25192
|
readonly inputs: readonly [{
|
|
@@ -25807,7 +25807,7 @@ declare const useLens: () => {
|
|
|
25807
25807
|
}];
|
|
25808
25808
|
readonly stateMutability: "pure";
|
|
25809
25809
|
}], "getLiquidityForAmount0Ticks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
25810
|
-
getLiquidityForAmount1: (args: readonly [bigint, bigint, bigint], options?:
|
|
25810
|
+
getLiquidityForAmount1: (args: readonly [bigint, bigint, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
25811
25811
|
readonly type: "function";
|
|
25812
25812
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
25813
25813
|
readonly inputs: readonly [{
|
|
@@ -26428,7 +26428,7 @@ declare const useLens: () => {
|
|
|
26428
26428
|
}];
|
|
26429
26429
|
readonly stateMutability: "pure";
|
|
26430
26430
|
}], "getLiquidityForAmount1", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
26431
|
-
getLiquidityForAmount1Ticks: (args: readonly [number, number, bigint], options?:
|
|
26431
|
+
getLiquidityForAmount1Ticks: (args: readonly [number, number, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
26432
26432
|
readonly type: "function";
|
|
26433
26433
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
26434
26434
|
readonly inputs: readonly [{
|
|
@@ -27049,7 +27049,7 @@ declare const useLens: () => {
|
|
|
27049
27049
|
}];
|
|
27050
27050
|
readonly stateMutability: "pure";
|
|
27051
27051
|
}], "getLiquidityForAmount1Ticks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
27052
|
-
getLiquidityForAmounts: (args: readonly [bigint, bigint, bigint, bigint, bigint], options?:
|
|
27052
|
+
getLiquidityForAmounts: (args: readonly [bigint, bigint, bigint, bigint, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
27053
27053
|
readonly type: "function";
|
|
27054
27054
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
27055
27055
|
readonly inputs: readonly [{
|
|
@@ -27670,7 +27670,7 @@ declare const useLens: () => {
|
|
|
27670
27670
|
}];
|
|
27671
27671
|
readonly stateMutability: "pure";
|
|
27672
27672
|
}], "getLiquidityForAmounts", readonly [bigint, bigint, bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
27673
|
-
getLiquidityForAmountsTicks: (args: readonly [number, number, number, bigint, bigint], options?:
|
|
27673
|
+
getLiquidityForAmountsTicks: (args: readonly [number, number, number, bigint, bigint], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
27674
27674
|
readonly type: "function";
|
|
27675
27675
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
27676
27676
|
readonly inputs: readonly [{
|
|
@@ -28291,7 +28291,7 @@ declare const useLens: () => {
|
|
|
28291
28291
|
}];
|
|
28292
28292
|
readonly stateMutability: "pure";
|
|
28293
28293
|
}], "getLiquidityForAmountsTicks", readonly [number, number, number, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
28294
|
-
getPriceAtTick: (args: readonly [number], options?:
|
|
28294
|
+
getPriceAtTick: (args: readonly [number], options?: viem117.Prettify<viem117.UnionOmit<viem117.ReadContractParameters<readonly [{
|
|
28295
28295
|
readonly type: "function";
|
|
28296
28296
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
28297
28297
|
readonly inputs: readonly [{
|
package/dist/client.js
CHANGED
|
@@ -388,8 +388,8 @@ const useOptionPnl = (optionData) => {
|
|
|
388
388
|
const { exact: currentTick } = useCurrentTick(pool);
|
|
389
389
|
return useMemo(() => {
|
|
390
390
|
if (optionAssetIsToken0 === void 0 || currentTick === void 0 || !positionSizeCurrent || !payoutAssetDecimals) return {};
|
|
391
|
-
const
|
|
392
|
-
const delta = (optionAssetIsToken0 ? token0ToToken1(positionSizeCurrent, currentTick) : token1ToToken0(positionSizeCurrent, currentTick)) -
|
|
391
|
+
const strikeSize = positionSizeCurrent * strikePrice / PRICE_PRECISION;
|
|
392
|
+
const delta = (optionAssetIsToken0 ? token0ToToken1(positionSizeCurrent, currentTick) : token1ToToken0(positionSizeCurrent, currentTick)) - strikeSize;
|
|
393
393
|
const displayPnl = wrapAmount(optionType === "CALL" ? delta : -delta, payoutAssetDecimals);
|
|
394
394
|
return {
|
|
395
395
|
unrealizedPayout: wrapAmount(displayPnl.scaled < 0 ? 0n : displayPnl.scaled, payoutAssetDecimals),
|
|
@@ -555,7 +555,10 @@ const getPriceHistory = async (poolAddress, resolution, startTimestamp, endTimes
|
|
|
555
555
|
return (await res.json()).data.attributes.ohlcv_list.map(({ 0: timestamp, 4: price }) => ({
|
|
556
556
|
timestamp,
|
|
557
557
|
price
|
|
558
|
-
})).filter((point) => point.timestamp >= startSecs && point.timestamp <= endSecs).sort((a, b) => a.timestamp - b.timestamp)
|
|
558
|
+
})).filter((point) => point.timestamp >= startSecs && point.timestamp <= endSecs).sort((a, b) => a.timestamp - b.timestamp).map((a) => ({
|
|
559
|
+
timestamp: /* @__PURE__ */ new Date(a.timestamp * 1e3),
|
|
560
|
+
price: a.price
|
|
561
|
+
}));
|
|
559
562
|
};
|
|
560
563
|
|
|
561
564
|
//#endregion
|