timelock-sdk 0.0.186 → 0.0.187
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-DS3Ll673.d.cts → client-8AJEd9YL.d.ts} +219 -219
- package/dist/{client-d6g1gJhy.d.ts → client-D_0Cm9hR.d.cts} +109 -109
- package/dist/client.cjs +1 -1
- package/dist/client.d.cts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/{optionUtils-pQWykofY.js → optionUtils-BjPxfPAz.js} +14 -7
- package/dist/optionUtils-BjPxfPAz.js.map +1 -0
- package/dist/{optionUtils-vw98cuWU.cjs → optionUtils-Dj9hOtZo.cjs} +13 -6
- package/dist/optionUtils-Dj9hOtZo.cjs.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.d.cts +1 -1
- package/dist/package.d.ts +1 -1
- package/dist/package.js +1 -1
- package/package.json +1 -1
- package/dist/optionUtils-pQWykofY.js.map +0 -1
- package/dist/optionUtils-vw98cuWU.cjs.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { n as lensAbi, t as optionsMarketAbi } from "./optionsMarket-
|
|
1
|
+
import { n as lensAbi, t as optionsMarketAbi } from "./optionsMarket-B0Om62Sk.cjs";
|
|
2
2
|
import * as viem0 from "viem";
|
|
3
3
|
import { Address, Client, GetContractReturnType, Hex, PublicClient } from "viem";
|
|
4
|
-
import Big from "big.js";
|
|
5
|
-
import JSBI from "jsbi";
|
|
6
4
|
import React, { ReactNode } from "react";
|
|
5
|
+
import "graphql";
|
|
7
6
|
import { GraphQLClient, RequestOptions } from "graphql-request";
|
|
8
7
|
import * as _tanstack_react_query0 from "@tanstack/react-query";
|
|
9
8
|
import { NonUndefinedGuard } from "@tanstack/react-query";
|
|
10
9
|
import * as wagmi0 from "wagmi";
|
|
11
|
-
import "graphql";
|
|
12
10
|
import * as _tanstack_query_core0 from "@tanstack/query-core";
|
|
11
|
+
import Big from "big.js";
|
|
12
|
+
import JSBI from "jsbi";
|
|
13
13
|
import * as _wagmi_core0 from "@wagmi/core";
|
|
14
14
|
import * as wagmi_query0 from "wagmi/query";
|
|
15
15
|
import * as abitype0 from "abitype";
|
|
@@ -52453,32 +52453,26 @@ declare const useGuardianGlobalState: (guardianAddr?: Address) => wagmi0.UseRead
|
|
|
52453
52453
|
//#endregion
|
|
52454
52454
|
//#region src/hooks/guardian/usePauseGlobalTrading.d.ts
|
|
52455
52455
|
declare const usePauseGlobalTrading: (marketAddr: Address | undefined) => {
|
|
52456
|
-
error: null;
|
|
52457
52456
|
data: undefined;
|
|
52457
|
+
error: null;
|
|
52458
52458
|
status: "idle";
|
|
52459
|
+
variables: undefined;
|
|
52459
52460
|
isError: false;
|
|
52461
|
+
isIdle: true;
|
|
52460
52462
|
isPending: false;
|
|
52461
52463
|
isSuccess: false;
|
|
52464
|
+
reset: () => void;
|
|
52465
|
+
context: unknown;
|
|
52462
52466
|
failureCount: number;
|
|
52463
52467
|
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
52464
52468
|
isPaused: boolean;
|
|
52465
|
-
variables: undefined;
|
|
52466
|
-
isIdle: true;
|
|
52467
|
-
reset: () => void;
|
|
52468
|
-
context: unknown;
|
|
52469
52469
|
submittedAt: number;
|
|
52470
52470
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
52471
52471
|
pauseGlobalTrading: (paused: boolean) => Promise<`0x${string}`>;
|
|
52472
52472
|
} | {
|
|
52473
|
-
error: null;
|
|
52474
52473
|
data: undefined;
|
|
52474
|
+
error: null;
|
|
52475
52475
|
status: "pending";
|
|
52476
|
-
isError: false;
|
|
52477
|
-
isPending: true;
|
|
52478
|
-
isSuccess: false;
|
|
52479
|
-
failureCount: number;
|
|
52480
|
-
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
52481
|
-
isPaused: boolean;
|
|
52482
52476
|
variables: {
|
|
52483
52477
|
abi: abitype0.Abi;
|
|
52484
52478
|
functionName: string;
|
|
@@ -52624,22 +52618,22 @@ declare const usePauseGlobalTrading: (marketAddr: Address | undefined) => {
|
|
|
52624
52618
|
chainId?: number | undefined;
|
|
52625
52619
|
connector?: wagmi0.Connector | undefined;
|
|
52626
52620
|
};
|
|
52621
|
+
isError: false;
|
|
52627
52622
|
isIdle: false;
|
|
52623
|
+
isPending: true;
|
|
52624
|
+
isSuccess: false;
|
|
52628
52625
|
reset: () => void;
|
|
52629
52626
|
context: unknown;
|
|
52627
|
+
failureCount: number;
|
|
52628
|
+
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
52629
|
+
isPaused: boolean;
|
|
52630
52630
|
submittedAt: number;
|
|
52631
52631
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
52632
52632
|
pauseGlobalTrading: (paused: boolean) => Promise<`0x${string}`>;
|
|
52633
52633
|
} | {
|
|
52634
|
-
error: _wagmi_core0.WriteContractErrorType;
|
|
52635
52634
|
data: undefined;
|
|
52635
|
+
error: _wagmi_core0.WriteContractErrorType;
|
|
52636
52636
|
status: "error";
|
|
52637
|
-
isError: true;
|
|
52638
|
-
isPending: false;
|
|
52639
|
-
isSuccess: false;
|
|
52640
|
-
failureCount: number;
|
|
52641
|
-
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
52642
|
-
isPaused: boolean;
|
|
52643
52637
|
variables: {
|
|
52644
52638
|
abi: abitype0.Abi;
|
|
52645
52639
|
functionName: string;
|
|
@@ -52785,22 +52779,22 @@ declare const usePauseGlobalTrading: (marketAddr: Address | undefined) => {
|
|
|
52785
52779
|
chainId?: number | undefined;
|
|
52786
52780
|
connector?: wagmi0.Connector | undefined;
|
|
52787
52781
|
};
|
|
52782
|
+
isError: true;
|
|
52788
52783
|
isIdle: false;
|
|
52784
|
+
isPending: false;
|
|
52785
|
+
isSuccess: false;
|
|
52789
52786
|
reset: () => void;
|
|
52790
52787
|
context: unknown;
|
|
52788
|
+
failureCount: number;
|
|
52789
|
+
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
52790
|
+
isPaused: boolean;
|
|
52791
52791
|
submittedAt: number;
|
|
52792
52792
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
52793
52793
|
pauseGlobalTrading: (paused: boolean) => Promise<`0x${string}`>;
|
|
52794
52794
|
} | {
|
|
52795
|
-
error: null;
|
|
52796
52795
|
data: `0x${string}`;
|
|
52796
|
+
error: null;
|
|
52797
52797
|
status: "success";
|
|
52798
|
-
isError: false;
|
|
52799
|
-
isPending: false;
|
|
52800
|
-
isSuccess: true;
|
|
52801
|
-
failureCount: number;
|
|
52802
|
-
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
52803
|
-
isPaused: boolean;
|
|
52804
52798
|
variables: {
|
|
52805
52799
|
abi: abitype0.Abi;
|
|
52806
52800
|
functionName: string;
|
|
@@ -52946,9 +52940,15 @@ declare const usePauseGlobalTrading: (marketAddr: Address | undefined) => {
|
|
|
52946
52940
|
chainId?: number | undefined;
|
|
52947
52941
|
connector?: wagmi0.Connector | undefined;
|
|
52948
52942
|
};
|
|
52943
|
+
isError: false;
|
|
52949
52944
|
isIdle: false;
|
|
52945
|
+
isPending: false;
|
|
52946
|
+
isSuccess: true;
|
|
52950
52947
|
reset: () => void;
|
|
52951
52948
|
context: unknown;
|
|
52949
|
+
failureCount: number;
|
|
52950
|
+
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
52951
|
+
isPaused: boolean;
|
|
52952
52952
|
submittedAt: number;
|
|
52953
52953
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
52954
52954
|
pauseGlobalTrading: (paused: boolean) => Promise<`0x${string}`>;
|
|
@@ -52956,32 +52956,26 @@ declare const usePauseGlobalTrading: (marketAddr: Address | undefined) => {
|
|
|
52956
52956
|
//#endregion
|
|
52957
52957
|
//#region src/hooks/guardian/usePauseMarketTrading.d.ts
|
|
52958
52958
|
declare const usePauseMarketTrading: (marketAddr: Address | undefined) => {
|
|
52959
|
-
error: null;
|
|
52960
52959
|
data: undefined;
|
|
52960
|
+
error: null;
|
|
52961
52961
|
status: "idle";
|
|
52962
|
+
variables: undefined;
|
|
52962
52963
|
isError: false;
|
|
52964
|
+
isIdle: true;
|
|
52963
52965
|
isPending: false;
|
|
52964
52966
|
isSuccess: false;
|
|
52967
|
+
reset: () => void;
|
|
52968
|
+
context: unknown;
|
|
52965
52969
|
failureCount: number;
|
|
52966
52970
|
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
52967
52971
|
isPaused: boolean;
|
|
52968
|
-
variables: undefined;
|
|
52969
|
-
isIdle: true;
|
|
52970
|
-
reset: () => void;
|
|
52971
|
-
context: unknown;
|
|
52972
52972
|
submittedAt: number;
|
|
52973
52973
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
52974
52974
|
pauseMarketTrading: (paused: boolean) => Promise<`0x${string}`>;
|
|
52975
52975
|
} | {
|
|
52976
|
-
error: null;
|
|
52977
52976
|
data: undefined;
|
|
52977
|
+
error: null;
|
|
52978
52978
|
status: "pending";
|
|
52979
|
-
isError: false;
|
|
52980
|
-
isPending: true;
|
|
52981
|
-
isSuccess: false;
|
|
52982
|
-
failureCount: number;
|
|
52983
|
-
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
52984
|
-
isPaused: boolean;
|
|
52985
52979
|
variables: {
|
|
52986
52980
|
abi: abitype0.Abi;
|
|
52987
52981
|
functionName: string;
|
|
@@ -53127,22 +53121,22 @@ declare const usePauseMarketTrading: (marketAddr: Address | undefined) => {
|
|
|
53127
53121
|
chainId?: number | undefined;
|
|
53128
53122
|
connector?: wagmi0.Connector | undefined;
|
|
53129
53123
|
};
|
|
53124
|
+
isError: false;
|
|
53130
53125
|
isIdle: false;
|
|
53126
|
+
isPending: true;
|
|
53127
|
+
isSuccess: false;
|
|
53131
53128
|
reset: () => void;
|
|
53132
53129
|
context: unknown;
|
|
53130
|
+
failureCount: number;
|
|
53131
|
+
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
53132
|
+
isPaused: boolean;
|
|
53133
53133
|
submittedAt: number;
|
|
53134
53134
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
53135
53135
|
pauseMarketTrading: (paused: boolean) => Promise<`0x${string}`>;
|
|
53136
53136
|
} | {
|
|
53137
|
-
error: _wagmi_core0.WriteContractErrorType;
|
|
53138
53137
|
data: undefined;
|
|
53138
|
+
error: _wagmi_core0.WriteContractErrorType;
|
|
53139
53139
|
status: "error";
|
|
53140
|
-
isError: true;
|
|
53141
|
-
isPending: false;
|
|
53142
|
-
isSuccess: false;
|
|
53143
|
-
failureCount: number;
|
|
53144
|
-
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
53145
|
-
isPaused: boolean;
|
|
53146
53140
|
variables: {
|
|
53147
53141
|
abi: abitype0.Abi;
|
|
53148
53142
|
functionName: string;
|
|
@@ -53288,22 +53282,22 @@ declare const usePauseMarketTrading: (marketAddr: Address | undefined) => {
|
|
|
53288
53282
|
chainId?: number | undefined;
|
|
53289
53283
|
connector?: wagmi0.Connector | undefined;
|
|
53290
53284
|
};
|
|
53285
|
+
isError: true;
|
|
53291
53286
|
isIdle: false;
|
|
53287
|
+
isPending: false;
|
|
53288
|
+
isSuccess: false;
|
|
53292
53289
|
reset: () => void;
|
|
53293
53290
|
context: unknown;
|
|
53291
|
+
failureCount: number;
|
|
53292
|
+
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
53293
|
+
isPaused: boolean;
|
|
53294
53294
|
submittedAt: number;
|
|
53295
53295
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
53296
53296
|
pauseMarketTrading: (paused: boolean) => Promise<`0x${string}`>;
|
|
53297
53297
|
} | {
|
|
53298
|
-
error: null;
|
|
53299
53298
|
data: `0x${string}`;
|
|
53299
|
+
error: null;
|
|
53300
53300
|
status: "success";
|
|
53301
|
-
isError: false;
|
|
53302
|
-
isPending: false;
|
|
53303
|
-
isSuccess: true;
|
|
53304
|
-
failureCount: number;
|
|
53305
|
-
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
53306
|
-
isPaused: boolean;
|
|
53307
53301
|
variables: {
|
|
53308
53302
|
abi: abitype0.Abi;
|
|
53309
53303
|
functionName: string;
|
|
@@ -53449,9 +53443,15 @@ declare const usePauseMarketTrading: (marketAddr: Address | undefined) => {
|
|
|
53449
53443
|
chainId?: number | undefined;
|
|
53450
53444
|
connector?: wagmi0.Connector | undefined;
|
|
53451
53445
|
};
|
|
53446
|
+
isError: false;
|
|
53452
53447
|
isIdle: false;
|
|
53448
|
+
isPending: false;
|
|
53449
|
+
isSuccess: true;
|
|
53453
53450
|
reset: () => void;
|
|
53454
53451
|
context: unknown;
|
|
53452
|
+
failureCount: number;
|
|
53453
|
+
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
53454
|
+
isPaused: boolean;
|
|
53455
53455
|
submittedAt: number;
|
|
53456
53456
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
53457
53457
|
pauseMarketTrading: (paused: boolean) => Promise<`0x${string}`>;
|
|
@@ -53468,19 +53468,19 @@ declare const useFeeRates: (feeStrategy?: Address) => Partial<NonUndefinedGuard<
|
|
|
53468
53468
|
//#endregion
|
|
53469
53469
|
//#region src/hooks/fees/useUpdateMarketFees.d.ts
|
|
53470
53470
|
declare const useUpdateMarketFees: (marketAddr: Address) => {
|
|
53471
|
-
error: null;
|
|
53472
53471
|
data: undefined;
|
|
53472
|
+
error: null;
|
|
53473
53473
|
status: "idle";
|
|
53474
|
+
variables: undefined;
|
|
53474
53475
|
isError: false;
|
|
53476
|
+
isIdle: true;
|
|
53475
53477
|
isPending: false;
|
|
53476
53478
|
isSuccess: false;
|
|
53479
|
+
reset: () => void;
|
|
53480
|
+
context: unknown;
|
|
53477
53481
|
failureCount: number;
|
|
53478
53482
|
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
53479
53483
|
isPaused: boolean;
|
|
53480
|
-
variables: undefined;
|
|
53481
|
-
isIdle: true;
|
|
53482
|
-
reset: () => void;
|
|
53483
|
-
context: unknown;
|
|
53484
53484
|
submittedAt: number;
|
|
53485
53485
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
53486
53486
|
updateMarketFees: (rates: {
|
|
@@ -53495,15 +53495,9 @@ declare const useUpdateMarketFees: (marketAddr: Address) => {
|
|
|
53495
53495
|
newFeeStrategy: `0x${string}`;
|
|
53496
53496
|
}>;
|
|
53497
53497
|
} | {
|
|
53498
|
-
error: null;
|
|
53499
53498
|
data: undefined;
|
|
53499
|
+
error: null;
|
|
53500
53500
|
status: "pending";
|
|
53501
|
-
isError: false;
|
|
53502
|
-
isPending: true;
|
|
53503
|
-
isSuccess: false;
|
|
53504
|
-
failureCount: number;
|
|
53505
|
-
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
53506
|
-
isPaused: boolean;
|
|
53507
53501
|
variables: {
|
|
53508
53502
|
abi: abitype0.Abi;
|
|
53509
53503
|
functionName: string;
|
|
@@ -53649,9 +53643,15 @@ declare const useUpdateMarketFees: (marketAddr: Address) => {
|
|
|
53649
53643
|
chainId?: number | undefined;
|
|
53650
53644
|
connector?: wagmi0.Connector | undefined;
|
|
53651
53645
|
};
|
|
53646
|
+
isError: false;
|
|
53652
53647
|
isIdle: false;
|
|
53648
|
+
isPending: true;
|
|
53649
|
+
isSuccess: false;
|
|
53653
53650
|
reset: () => void;
|
|
53654
53651
|
context: unknown;
|
|
53652
|
+
failureCount: number;
|
|
53653
|
+
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
53654
|
+
isPaused: boolean;
|
|
53655
53655
|
submittedAt: number;
|
|
53656
53656
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
53657
53657
|
updateMarketFees: (rates: {
|
|
@@ -53666,15 +53666,9 @@ declare const useUpdateMarketFees: (marketAddr: Address) => {
|
|
|
53666
53666
|
newFeeStrategy: `0x${string}`;
|
|
53667
53667
|
}>;
|
|
53668
53668
|
} | {
|
|
53669
|
-
error: _wagmi_core0.WriteContractErrorType;
|
|
53670
53669
|
data: undefined;
|
|
53670
|
+
error: _wagmi_core0.WriteContractErrorType;
|
|
53671
53671
|
status: "error";
|
|
53672
|
-
isError: true;
|
|
53673
|
-
isPending: false;
|
|
53674
|
-
isSuccess: false;
|
|
53675
|
-
failureCount: number;
|
|
53676
|
-
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
53677
|
-
isPaused: boolean;
|
|
53678
53672
|
variables: {
|
|
53679
53673
|
abi: abitype0.Abi;
|
|
53680
53674
|
functionName: string;
|
|
@@ -53820,9 +53814,15 @@ declare const useUpdateMarketFees: (marketAddr: Address) => {
|
|
|
53820
53814
|
chainId?: number | undefined;
|
|
53821
53815
|
connector?: wagmi0.Connector | undefined;
|
|
53822
53816
|
};
|
|
53817
|
+
isError: true;
|
|
53823
53818
|
isIdle: false;
|
|
53819
|
+
isPending: false;
|
|
53820
|
+
isSuccess: false;
|
|
53824
53821
|
reset: () => void;
|
|
53825
53822
|
context: unknown;
|
|
53823
|
+
failureCount: number;
|
|
53824
|
+
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
53825
|
+
isPaused: boolean;
|
|
53826
53826
|
submittedAt: number;
|
|
53827
53827
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
53828
53828
|
updateMarketFees: (rates: {
|
|
@@ -53837,15 +53837,9 @@ declare const useUpdateMarketFees: (marketAddr: Address) => {
|
|
|
53837
53837
|
newFeeStrategy: `0x${string}`;
|
|
53838
53838
|
}>;
|
|
53839
53839
|
} | {
|
|
53840
|
-
error: null;
|
|
53841
53840
|
data: `0x${string}`;
|
|
53841
|
+
error: null;
|
|
53842
53842
|
status: "success";
|
|
53843
|
-
isError: false;
|
|
53844
|
-
isPending: false;
|
|
53845
|
-
isSuccess: true;
|
|
53846
|
-
failureCount: number;
|
|
53847
|
-
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
53848
|
-
isPaused: boolean;
|
|
53849
53843
|
variables: {
|
|
53850
53844
|
abi: abitype0.Abi;
|
|
53851
53845
|
functionName: string;
|
|
@@ -53991,9 +53985,15 @@ declare const useUpdateMarketFees: (marketAddr: Address) => {
|
|
|
53991
53985
|
chainId?: number | undefined;
|
|
53992
53986
|
connector?: wagmi0.Connector | undefined;
|
|
53993
53987
|
};
|
|
53988
|
+
isError: false;
|
|
53994
53989
|
isIdle: false;
|
|
53990
|
+
isPending: false;
|
|
53991
|
+
isSuccess: true;
|
|
53995
53992
|
reset: () => void;
|
|
53996
53993
|
context: unknown;
|
|
53994
|
+
failureCount: number;
|
|
53995
|
+
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
53996
|
+
isPaused: boolean;
|
|
53997
53997
|
submittedAt: number;
|
|
53998
53998
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
53999
53999
|
updateMarketFees: (rates: {
|
|
@@ -54985,19 +54985,19 @@ declare const useStaticPricingParams: (pricingAddr: Address | undefined) => Part
|
|
|
54985
54985
|
//#endregion
|
|
54986
54986
|
//#region src/hooks/pricing/useUpdateMarketPricing.d.ts
|
|
54987
54987
|
declare const useUpdateMarketPricing: (marketAddr: Address | undefined) => {
|
|
54988
|
-
error: null;
|
|
54989
54988
|
data: undefined;
|
|
54989
|
+
error: null;
|
|
54990
54990
|
status: "idle";
|
|
54991
|
+
variables: undefined;
|
|
54991
54992
|
isError: false;
|
|
54993
|
+
isIdle: true;
|
|
54992
54994
|
isPending: false;
|
|
54993
54995
|
isSuccess: false;
|
|
54996
|
+
reset: () => void;
|
|
54997
|
+
context: unknown;
|
|
54994
54998
|
failureCount: number;
|
|
54995
54999
|
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
54996
55000
|
isPaused: boolean;
|
|
54997
|
-
variables: undefined;
|
|
54998
|
-
isIdle: true;
|
|
54999
|
-
reset: () => void;
|
|
55000
|
-
context: unknown;
|
|
55001
55001
|
submittedAt: number;
|
|
55002
55002
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
55003
55003
|
updateMarketPricing: <T$1 extends "static" | "bsm">(data: T$1 extends "static" ? Partial<StaticPricingParams> & {
|
|
@@ -55010,15 +55010,9 @@ declare const useUpdateMarketPricing: (marketAddr: Address | undefined) => {
|
|
|
55010
55010
|
newPricingAddr: `0x${string}`;
|
|
55011
55011
|
}>;
|
|
55012
55012
|
} | {
|
|
55013
|
-
error: null;
|
|
55014
55013
|
data: undefined;
|
|
55014
|
+
error: null;
|
|
55015
55015
|
status: "pending";
|
|
55016
|
-
isError: false;
|
|
55017
|
-
isPending: true;
|
|
55018
|
-
isSuccess: false;
|
|
55019
|
-
failureCount: number;
|
|
55020
|
-
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
55021
|
-
isPaused: boolean;
|
|
55022
55016
|
variables: {
|
|
55023
55017
|
abi: abitype0.Abi;
|
|
55024
55018
|
functionName: string;
|
|
@@ -55164,9 +55158,15 @@ declare const useUpdateMarketPricing: (marketAddr: Address | undefined) => {
|
|
|
55164
55158
|
chainId?: number | undefined;
|
|
55165
55159
|
connector?: wagmi0.Connector | undefined;
|
|
55166
55160
|
};
|
|
55161
|
+
isError: false;
|
|
55167
55162
|
isIdle: false;
|
|
55163
|
+
isPending: true;
|
|
55164
|
+
isSuccess: false;
|
|
55168
55165
|
reset: () => void;
|
|
55169
55166
|
context: unknown;
|
|
55167
|
+
failureCount: number;
|
|
55168
|
+
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
55169
|
+
isPaused: boolean;
|
|
55170
55170
|
submittedAt: number;
|
|
55171
55171
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
55172
55172
|
updateMarketPricing: <T$1 extends "static" | "bsm">(data: T$1 extends "static" ? Partial<StaticPricingParams> & {
|
|
@@ -55179,15 +55179,9 @@ declare const useUpdateMarketPricing: (marketAddr: Address | undefined) => {
|
|
|
55179
55179
|
newPricingAddr: `0x${string}`;
|
|
55180
55180
|
}>;
|
|
55181
55181
|
} | {
|
|
55182
|
-
error: _wagmi_core0.WriteContractErrorType;
|
|
55183
55182
|
data: undefined;
|
|
55183
|
+
error: _wagmi_core0.WriteContractErrorType;
|
|
55184
55184
|
status: "error";
|
|
55185
|
-
isError: true;
|
|
55186
|
-
isPending: false;
|
|
55187
|
-
isSuccess: false;
|
|
55188
|
-
failureCount: number;
|
|
55189
|
-
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
55190
|
-
isPaused: boolean;
|
|
55191
55185
|
variables: {
|
|
55192
55186
|
abi: abitype0.Abi;
|
|
55193
55187
|
functionName: string;
|
|
@@ -55333,9 +55327,15 @@ declare const useUpdateMarketPricing: (marketAddr: Address | undefined) => {
|
|
|
55333
55327
|
chainId?: number | undefined;
|
|
55334
55328
|
connector?: wagmi0.Connector | undefined;
|
|
55335
55329
|
};
|
|
55330
|
+
isError: true;
|
|
55336
55331
|
isIdle: false;
|
|
55332
|
+
isPending: false;
|
|
55333
|
+
isSuccess: false;
|
|
55337
55334
|
reset: () => void;
|
|
55338
55335
|
context: unknown;
|
|
55336
|
+
failureCount: number;
|
|
55337
|
+
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
55338
|
+
isPaused: boolean;
|
|
55339
55339
|
submittedAt: number;
|
|
55340
55340
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
55341
55341
|
updateMarketPricing: <T$1 extends "static" | "bsm">(data: T$1 extends "static" ? Partial<StaticPricingParams> & {
|
|
@@ -55348,15 +55348,9 @@ declare const useUpdateMarketPricing: (marketAddr: Address | undefined) => {
|
|
|
55348
55348
|
newPricingAddr: `0x${string}`;
|
|
55349
55349
|
}>;
|
|
55350
55350
|
} | {
|
|
55351
|
-
error: null;
|
|
55352
55351
|
data: `0x${string}`;
|
|
55352
|
+
error: null;
|
|
55353
55353
|
status: "success";
|
|
55354
|
-
isError: false;
|
|
55355
|
-
isPending: false;
|
|
55356
|
-
isSuccess: true;
|
|
55357
|
-
failureCount: number;
|
|
55358
|
-
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
55359
|
-
isPaused: boolean;
|
|
55360
55354
|
variables: {
|
|
55361
55355
|
abi: abitype0.Abi;
|
|
55362
55356
|
functionName: string;
|
|
@@ -55502,9 +55496,15 @@ declare const useUpdateMarketPricing: (marketAddr: Address | undefined) => {
|
|
|
55502
55496
|
chainId?: number | undefined;
|
|
55503
55497
|
connector?: wagmi0.Connector | undefined;
|
|
55504
55498
|
};
|
|
55499
|
+
isError: false;
|
|
55505
55500
|
isIdle: false;
|
|
55501
|
+
isPending: false;
|
|
55502
|
+
isSuccess: true;
|
|
55506
55503
|
reset: () => void;
|
|
55507
55504
|
context: unknown;
|
|
55505
|
+
failureCount: number;
|
|
55506
|
+
failureReason: _wagmi_core0.WriteContractErrorType | null;
|
|
55507
|
+
isPaused: boolean;
|
|
55508
55508
|
submittedAt: number;
|
|
55509
55509
|
writeContract: wagmi_query0.WriteContractMutate<wagmi0.Config, unknown>;
|
|
55510
55510
|
updateMarketPricing: <T$1 extends "static" | "bsm">(data: T$1 extends "static" ? Partial<StaticPricingParams> & {
|
|
@@ -97744,4 +97744,4 @@ declare const useLens: () => {
|
|
|
97744
97744
|
};
|
|
97745
97745
|
//#endregion
|
|
97746
97746
|
export { PriceResolution as $, swapRouters as $t, useCurrentPrice as A, scaleAmount as At, getPriceAtTick as B, useMarketState as Bt, useLiquidityBlocks as C, useMintOption as Ct, usePriceAtSqrtPriceX96 as D, formatCondensed as Dt, usePriceHistory as E, formatAmount as Et, getPayoutAtTick as F, wrapAmountUnscaled as Ft, liquiditiesToAmounts as G, TimelockLens as Gt, getTickAtPrice as H, TimelockProvider as Ht, PRICE_PRECISION as I, wrapPrice as It, token0ToToken1AtTick as J, getErc20 as Jt, roundTick as K, TimelockMarket as Kt, getAmountsFromLiquidity as L, wrapPriceUnscaled as Lt, UniswapPoolData as M, unscaleAmount as Mt, usePoolData as N, unscalePrice as Nt, usePriceAtTick as O, formatUSD as Ot, getPayoutAtPrice as P, wrapAmount as Pt, PriceDataPoint as Q, stateViews as Qt, getNearestValidStrikeTick as R, zero as Rt, LiquidityBlockData as S, useClosedUserOptions as St, useMarketPriceHistory as T, Amount as Tt, liquiditiesToAmount0 as U, useCurrentMarket as Ut, getSqrtPriceX96AtPrice as V, useMarketData as Vt, liquiditiesToAmount1 as W, useTimelockConfig as Wt, token1ToToken0AtTick as X, getTimelockLens as Xt, token1ToToken0 as Y, getStateView as Yt, PriceData as Z, getTimelockMarket as Zt, useTokenData as _, useOptionPremium as _t, OptionPricingParams as a, useActiveUserPerps as at, batchGetAmountsFromLiquidity as b, OptionData as bt, usePricingParams as c, usePerpsOperator as ct, usePauseMarketTrading as d, ExerciseOptionEvent as dt, swappers as en, getCurrentPrice as et, usePauseGlobalTrading as f, ExtendEvent as ft, TokenData as g, useExtendOption as gt, useTokenBalance as h, useOptionTimeline as ht, useOptionPricingParams as i, useOperatorPerms as it, PoolKey as j, scalePrice as jt, useCurrentTick as k, formatVagueAmount as kt, useUpdateMarketFees as l, useClosePerp as lt, useApproval as m, OptionEvent as mt, useUpdateMarketPricing as n, timelockLenses as nn, useSetOperatorPerms as nt, PricingParams as o, useClosedUserPerps as ot, useGuardianGlobalState as p, MintOptionEvent as pt, token0ToToken1 as q, TimelockMarketData as qt, useStaticPricingParams as r, useUserOperators as rt, StaticPricingParams as s, useUserPerps as st, useLens as t, timelockFactories as tn, getPriceHistory as tt, useFeeRates as u, useMintPerp as ut, useVaultTVL as v, useOptionPnl as vt, useBurnLiquidity as w, useMaxPositionSize as wt, useMintLiquidity as x, useActiveUserOptions as xt, useVaultData as y, useExerciseOption as yt, getPriceAtSqrtPriceX96 as z, useMarketVolume as zt };
|
|
97747
|
-
//# sourceMappingURL=client-
|
|
97747
|
+
//# sourceMappingURL=client-D_0Cm9hR.d.cts.map
|
package/dist/client.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
const require_optionUtils = require('./optionUtils-
|
|
3
|
+
const require_optionUtils = require('./optionUtils-Dj9hOtZo.cjs');
|
|
4
4
|
const require_statelessStateView = require('./statelessStateView-Dl3QIl1g.cjs');
|
|
5
5
|
const require_factory = require('./factory-DitVXzjQ.cjs');
|
|
6
6
|
let viem = require("viem");
|
package/dist/client.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "./optionsMarket-B0Om62Sk.cjs";
|
|
2
|
-
import { A as useCurrentPrice, Bt as useMarketState, C as useLiquidityBlocks, Ct as useMintOption, D as usePriceAtSqrtPriceX96, E as usePriceHistory, Ht as TimelockProvider, M as UniswapPoolData, N as usePoolData, O as usePriceAtTick, S as LiquidityBlockData, St as useClosedUserOptions, T as useMarketPriceHistory, Ut as useCurrentMarket, Vt as useMarketData, Wt as useTimelockConfig, _ as useTokenData, _t as useOptionPremium, a as OptionPricingParams, at as useActiveUserPerps, b as batchGetAmountsFromLiquidity, bt as OptionData, c as usePricingParams, ct as usePerpsOperator, d as usePauseMarketTrading, dt as ExerciseOptionEvent, f as usePauseGlobalTrading, ft as ExtendEvent, g as TokenData, gt as useExtendOption, h as useTokenBalance, ht as useOptionTimeline, i as useOptionPricingParams, it as useOperatorPerms, j as PoolKey, k as useCurrentTick, l as useUpdateMarketFees, lt as useClosePerp, m as useApproval, mt as OptionEvent, n as useUpdateMarketPricing, nt as useSetOperatorPerms, o as PricingParams, ot as useClosedUserPerps, p as useGuardianGlobalState, pt as MintOptionEvent, r as useStaticPricingParams, rt as useUserOperators, s as StaticPricingParams, st as useUserPerps, t as useLens, u as useFeeRates, ut as useMintPerp, v as useVaultTVL, vt as useOptionPnl, w as useBurnLiquidity, wt as useMaxPositionSize, x as useMintLiquidity, xt as useActiveUserOptions, y as useVaultData, yt as useExerciseOption, zt as useMarketVolume } from "./client-
|
|
2
|
+
import { A as useCurrentPrice, Bt as useMarketState, C as useLiquidityBlocks, Ct as useMintOption, D as usePriceAtSqrtPriceX96, E as usePriceHistory, Ht as TimelockProvider, M as UniswapPoolData, N as usePoolData, O as usePriceAtTick, S as LiquidityBlockData, St as useClosedUserOptions, T as useMarketPriceHistory, Ut as useCurrentMarket, Vt as useMarketData, Wt as useTimelockConfig, _ as useTokenData, _t as useOptionPremium, a as OptionPricingParams, at as useActiveUserPerps, b as batchGetAmountsFromLiquidity, bt as OptionData, c as usePricingParams, ct as usePerpsOperator, d as usePauseMarketTrading, dt as ExerciseOptionEvent, f as usePauseGlobalTrading, ft as ExtendEvent, g as TokenData, gt as useExtendOption, h as useTokenBalance, ht as useOptionTimeline, i as useOptionPricingParams, it as useOperatorPerms, j as PoolKey, k as useCurrentTick, l as useUpdateMarketFees, lt as useClosePerp, m as useApproval, mt as OptionEvent, n as useUpdateMarketPricing, nt as useSetOperatorPerms, o as PricingParams, ot as useClosedUserPerps, p as useGuardianGlobalState, pt as MintOptionEvent, r as useStaticPricingParams, rt as useUserOperators, s as StaticPricingParams, st as useUserPerps, t as useLens, u as useFeeRates, ut as useMintPerp, v as useVaultTVL, vt as useOptionPnl, w as useBurnLiquidity, wt as useMaxPositionSize, x as useMintLiquidity, xt as useActiveUserOptions, y as useVaultData, yt as useExerciseOption, zt as useMarketVolume } from "./client-D_0Cm9hR.cjs";
|
|
3
3
|
export { ExerciseOptionEvent, ExtendEvent, LiquidityBlockData, MintOptionEvent, OptionData, OptionEvent, OptionPricingParams, PoolKey, PricingParams, StaticPricingParams, TimelockProvider, TokenData, UniswapPoolData, batchGetAmountsFromLiquidity, useActiveUserOptions, useActiveUserPerps, useApproval, useBurnLiquidity, useClosePerp, useClosedUserOptions, useClosedUserPerps, useCurrentMarket, useCurrentPrice, useCurrentTick, useExerciseOption, useExtendOption, useFeeRates, useGuardianGlobalState, useLens, useLiquidityBlocks, useMarketData, useMarketPriceHistory, useMarketState, useMarketVolume, useMaxPositionSize, useMintLiquidity, useMintOption, useMintPerp, useOperatorPerms, useOptionPnl, useOptionPremium, useOptionPricingParams, useOptionTimeline, usePauseGlobalTrading, usePauseMarketTrading, usePerpsOperator, usePoolData, usePriceAtSqrtPriceX96, usePriceAtTick, usePriceHistory, usePricingParams, useSetOperatorPerms, useStaticPricingParams, useTimelockConfig, useTokenBalance, useTokenData, useUpdateMarketFees, useUpdateMarketPricing, useUserOperators, useUserPerps, useVaultData, useVaultTVL };
|
package/dist/client.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "./optionsMarket-B_dYiAnm.js";
|
|
2
|
-
import { A as useCurrentPrice, Bt as useMarketState, C as useLiquidityBlocks, Ct as useMintOption, D as usePriceAtSqrtPriceX96, E as usePriceHistory, Ht as TimelockProvider, M as UniswapPoolData, N as usePoolData, O as usePriceAtTick, S as LiquidityBlockData, St as useClosedUserOptions, T as useMarketPriceHistory, Ut as useCurrentMarket, Vt as useMarketData, Wt as useTimelockConfig, _ as useTokenData, _t as useOptionPremium, a as OptionPricingParams, at as useActiveUserPerps, b as batchGetAmountsFromLiquidity, bt as OptionData, c as usePricingParams, ct as usePerpsOperator, d as usePauseMarketTrading, dt as ExerciseOptionEvent, f as usePauseGlobalTrading, ft as ExtendEvent, g as TokenData, gt as useExtendOption, h as useTokenBalance, ht as useOptionTimeline, i as useOptionPricingParams, it as useOperatorPerms, j as PoolKey, k as useCurrentTick, l as useUpdateMarketFees, lt as useClosePerp, m as useApproval, mt as OptionEvent, n as useUpdateMarketPricing, nt as useSetOperatorPerms, o as PricingParams, ot as useClosedUserPerps, p as useGuardianGlobalState, pt as MintOptionEvent, r as useStaticPricingParams, rt as useUserOperators, s as StaticPricingParams, st as useUserPerps, t as useLens, u as useFeeRates, ut as useMintPerp, v as useVaultTVL, vt as useOptionPnl, w as useBurnLiquidity, wt as useMaxPositionSize, x as useMintLiquidity, xt as useActiveUserOptions, y as useVaultData, yt as useExerciseOption, zt as useMarketVolume } from "./client-
|
|
2
|
+
import { A as useCurrentPrice, Bt as useMarketState, C as useLiquidityBlocks, Ct as useMintOption, D as usePriceAtSqrtPriceX96, E as usePriceHistory, Ht as TimelockProvider, M as UniswapPoolData, N as usePoolData, O as usePriceAtTick, S as LiquidityBlockData, St as useClosedUserOptions, T as useMarketPriceHistory, Ut as useCurrentMarket, Vt as useMarketData, Wt as useTimelockConfig, _ as useTokenData, _t as useOptionPremium, a as OptionPricingParams, at as useActiveUserPerps, b as batchGetAmountsFromLiquidity, bt as OptionData, c as usePricingParams, ct as usePerpsOperator, d as usePauseMarketTrading, dt as ExerciseOptionEvent, f as usePauseGlobalTrading, ft as ExtendEvent, g as TokenData, gt as useExtendOption, h as useTokenBalance, ht as useOptionTimeline, i as useOptionPricingParams, it as useOperatorPerms, j as PoolKey, k as useCurrentTick, l as useUpdateMarketFees, lt as useClosePerp, m as useApproval, mt as OptionEvent, n as useUpdateMarketPricing, nt as useSetOperatorPerms, o as PricingParams, ot as useClosedUserPerps, p as useGuardianGlobalState, pt as MintOptionEvent, r as useStaticPricingParams, rt as useUserOperators, s as StaticPricingParams, st as useUserPerps, t as useLens, u as useFeeRates, ut as useMintPerp, v as useVaultTVL, vt as useOptionPnl, w as useBurnLiquidity, wt as useMaxPositionSize, x as useMintLiquidity, xt as useActiveUserOptions, y as useVaultData, yt as useExerciseOption, zt as useMarketVolume } from "./client-8AJEd9YL.js";
|
|
3
3
|
export { ExerciseOptionEvent, ExtendEvent, LiquidityBlockData, MintOptionEvent, OptionData, OptionEvent, OptionPricingParams, PoolKey, PricingParams, StaticPricingParams, TimelockProvider, TokenData, UniswapPoolData, batchGetAmountsFromLiquidity, useActiveUserOptions, useActiveUserPerps, useApproval, useBurnLiquidity, useClosePerp, useClosedUserOptions, useClosedUserPerps, useCurrentMarket, useCurrentPrice, useCurrentTick, useExerciseOption, useExtendOption, useFeeRates, useGuardianGlobalState, useLens, useLiquidityBlocks, useMarketData, useMarketPriceHistory, useMarketState, useMarketVolume, useMaxPositionSize, useMintLiquidity, useMintOption, useMintPerp, useOperatorPerms, useOptionPnl, useOptionPremium, useOptionPricingParams, useOptionTimeline, usePauseGlobalTrading, usePauseMarketTrading, usePerpsOperator, usePoolData, usePriceAtSqrtPriceX96, usePriceAtTick, usePriceHistory, usePricingParams, useSetOperatorPerms, useStaticPricingParams, useTimelockConfig, useTokenBalance, useTokenData, useUpdateMarketFees, useUpdateMarketPricing, useUserOperators, useUserPerps, useVaultData, useVaultTVL };
|
package/dist/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { i as erc20Abi$1, n as optionsMarketAbi, r as lensAbi, t as statelessStateViewAbi } from "./statelessStateView-Cp4eOQME.js";
|
|
4
|
-
import { A as token1ToToken0AtTick, B as timelockFactories, D as token0ToToken1, E as roundTick, F as getTimelockLens, I as getTimelockMarket, M as getPriceHistory, N as getErc20, O as token0ToToken1AtTick, P as getStateView, _ as getAmountsFromLiquidity, b as getPriceAtTick, d as wrapAmount, k as token1ToToken0, p as wrapPrice, t as getPayoutAtPrice, v as getNearestValidStrikeTick, y as getPriceAtSqrtPriceX96, z as swappers } from "./optionUtils-
|
|
4
|
+
import { A as token1ToToken0AtTick, B as timelockFactories, D as token0ToToken1, E as roundTick, F as getTimelockLens, I as getTimelockMarket, M as getPriceHistory, N as getErc20, O as token0ToToken1AtTick, P as getStateView, _ as getAmountsFromLiquidity, b as getPriceAtTick, d as wrapAmount, k as token1ToToken0, p as wrapPrice, t as getPayoutAtPrice, v as getNearestValidStrikeTick, y as getPriceAtSqrtPriceX96, z as swappers } from "./optionUtils-BjPxfPAz.js";
|
|
5
5
|
import { n as guardianAbi, r as singleOwnerVaultAbi, t as factoryAbi } from "./factory-y-iVl_er.js";
|
|
6
6
|
import { decodeAbiParameters, decodeEventLog, encodeAbiParameters, encodeFunctionData, erc20Abi, maxUint256, zeroAddress } from "viem";
|
|
7
7
|
import React, { createContext, useContext, useEffect, useMemo } from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as erc20Abi$1, n as optionsMarketAbi, r as lensAbi, t as statelessStateViewAbi } from "./statelessStateView-Cp4eOQME.js";
|
|
2
2
|
import { getContract } from "viem";
|
|
3
|
-
import { monadTestnet, unichainSepolia } from "viem/chains";
|
|
3
|
+
import { baseSepolia, monadTestnet, unichainSepolia } from "viem/chains";
|
|
4
4
|
import { SqrtPriceMath, TickMath } from "@uniswap/v3-sdk";
|
|
5
5
|
import Big from "big.js";
|
|
6
6
|
import JSBI from "jsbi";
|
|
@@ -44,20 +44,27 @@ const getTimelockLens = async (client, address) => {
|
|
|
44
44
|
};
|
|
45
45
|
const swappers = {
|
|
46
46
|
[monadTestnet.id]: "0x877309663591ad974bE2c0C7fB453844c8D613D8",
|
|
47
|
-
[unichainSepolia.id]: "0xa145eb0CAdB5F3c5e42931e60ee609DE74FDEA0b"
|
|
47
|
+
[unichainSepolia.id]: "0xa145eb0CAdB5F3c5e42931e60ee609DE74FDEA0b",
|
|
48
|
+
[baseSepolia.id]: "0xd7716e4Aa6534d4BA3636Cf3fE8D95CfEE29eE53"
|
|
48
49
|
};
|
|
49
50
|
const timelockLenses = {
|
|
50
51
|
[monadTestnet.id]: "0x22745deD5F51A2F33D98c5682048f5d10baE3b92",
|
|
51
|
-
[unichainSepolia.id]: "0xDA3e5Fc02E885D73271B500403C2DC02E7A394E7"
|
|
52
|
+
[unichainSepolia.id]: "0xDA3e5Fc02E885D73271B500403C2DC02E7A394E7",
|
|
53
|
+
[baseSepolia.id]: "0xB5ABc500f54a798E20ae8f91e21DBa29B1CE3F5a"
|
|
54
|
+
};
|
|
55
|
+
const timelockFactories = {
|
|
56
|
+
[unichainSepolia.id]: "0x8790e55d165591C082D3CBb811b36c9C893530DF",
|
|
57
|
+
[baseSepolia.id]: "0x7C9fBd739cb0e09657B7c6aB4eFc37bEe80820B0"
|
|
52
58
|
};
|
|
53
|
-
const timelockFactories = { [unichainSepolia.id]: "0x8790e55d165591C082D3CBb811b36c9C893530DF" };
|
|
54
59
|
const swapRouters = {
|
|
55
60
|
[monadTestnet.id]: "0xEd8a7Ca09c6Db6F4b9FAcB8De7e9A5449B1D21a4",
|
|
56
|
-
[unichainSepolia.id]: "0x7C9fBd739cb0e09657B7c6aB4eFc37bEe80820B0"
|
|
61
|
+
[unichainSepolia.id]: "0x7C9fBd739cb0e09657B7c6aB4eFc37bEe80820B0",
|
|
62
|
+
[baseSepolia.id]: "0x62408e89d44b70AbB65A01253fB879e28Ca81051"
|
|
57
63
|
};
|
|
58
64
|
const stateViews = {
|
|
59
65
|
[monadTestnet.id]: "0xB85e32Ff9b08Be61cD888e5D997E51951BCA1A69",
|
|
60
|
-
[unichainSepolia.id]: "0x1B69d7338F027deB8Cc78a4085BC7087B251C049"
|
|
66
|
+
[unichainSepolia.id]: "0x1B69d7338F027deB8Cc78a4085BC7087B251C049",
|
|
67
|
+
[baseSepolia.id]: "0xB368014D394015F90a1F27D522F6a5d56BE9255c"
|
|
61
68
|
};
|
|
62
69
|
|
|
63
70
|
//#endregion
|
|
@@ -389,4 +396,4 @@ const getPayoutAtPrice = (option, liquidities, price, tickSpacing, optionAssetIs
|
|
|
389
396
|
|
|
390
397
|
//#endregion
|
|
391
398
|
export { token1ToToken0AtTick as A, timelockFactories as B, liquiditiesToAmount0 as C, token0ToToken1 as D, roundTick as E, getTimelockLens as F, getTimelockMarket as I, stateViews as L, getPriceHistory as M, getErc20 as N, token0ToToken1AtTick as O, getStateView as P, swapRouters as R, getTickAtPrice as S, liquiditiesToAmounts as T, timelockLenses as V, getAmountsFromLiquidity as _, formatUSD as a, getPriceAtTick as b, scalePrice as c, wrapAmount as d, wrapAmountUnscaled as f, PRICE_PRECISION as g, zero as h, formatCondensed as i, getCurrentPrice as j, token1ToToken0 as k, unscaleAmount as l, wrapPriceUnscaled as m, getPayoutAtTick as n, formatVagueAmount as o, wrapPrice as p, formatAmount as r, scaleAmount as s, getPayoutAtPrice as t, unscalePrice as u, getNearestValidStrikeTick as v, liquiditiesToAmount1 as w, getSqrtPriceX96AtPrice as x, getPriceAtSqrtPriceX96 as y, swappers as z };
|
|
392
|
-
//# sourceMappingURL=optionUtils-
|
|
399
|
+
//# sourceMappingURL=optionUtils-BjPxfPAz.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optionUtils-BjPxfPAz.js","names":["erc20Abi","swappers: Record<number, Address>","timelockLenses: Record<number, Address>","timelockFactories: Record<number, Address>","swapRouters: Record<number, Address>","stateViews: Record<number, Address>","filled: PriceDataPoint[]","lastKnownPrice: PriceDataPoint | null","zero: Amount"],"sources":["../src/lib/contracts.ts","../src/lib/price.ts","../src/lib/liquidityUtils.ts","../src/lib/numberUtils.ts","../src/lib/optionUtils.ts"],"sourcesContent":["import type {Address, Client, PublicClient, GetContractReturnType} from 'viem';\nimport {getContract} from 'viem';\nimport {baseSepolia, monadTestnet, unichainSepolia} from 'viem/chains';\n\nimport {erc20Abi} from '~/abis/erc20';\nimport {lensAbi} from '~/abis/lens';\nimport {optionsMarketAbi} from '~/abis/optionsMarket';\nimport {statelessStateViewAbi} from '~/abis/statelessStateView';\n\nexport type TimelockMarket = GetContractReturnType<\n typeof optionsMarketAbi,\n Client,\n Address\n>;\nexport type TimelockLens = GetContractReturnType<\n typeof lensAbi,\n Client,\n Address\n>;\n\nexport type TimelockMarketData = Awaited<\n ReturnType<TimelockLens['read']['getMarketData']>\n> & {address: Address};\n\nexport const getErc20 = (address: Address, client: Client) =>\n getContract({abi: erc20Abi, address, client});\n\nexport const getTimelockMarket = (\n address: Address,\n client: Client,\n): TimelockMarket => {\n return getContract({abi: optionsMarketAbi, address, client});\n};\n\nexport const getStateView = async (client: PublicClient, address?: Address) => {\n if (!address) {\n const chainId = await client.getChainId();\n address = stateViews[chainId];\n if (!address) throw new Error(`No state view found for ${chainId}`);\n }\n return getContract({abi: statelessStateViewAbi, address, client});\n};\n\nexport const getTimelockLens = async (\n client: PublicClient,\n address?: Address,\n) => {\n if (!address) {\n const chainId = await client.getChainId();\n address = timelockLenses[chainId];\n if (!address) throw new Error(`No timelock lens found for ${chainId}`);\n }\n return getContract({abi: lensAbi, address, client});\n};\n\nexport const swappers: Record<number, Address> = {\n [monadTestnet.id]: '0x877309663591ad974bE2c0C7fB453844c8D613D8',\n [unichainSepolia.id]: '0xa145eb0CAdB5F3c5e42931e60ee609DE74FDEA0b',\n [baseSepolia.id]: '0xd7716e4Aa6534d4BA3636Cf3fE8D95CfEE29eE53',\n};\nexport const timelockLenses: Record<number, Address> = {\n [monadTestnet.id]: '0x22745deD5F51A2F33D98c5682048f5d10baE3b92',\n [unichainSepolia.id]: '0xDA3e5Fc02E885D73271B500403C2DC02E7A394E7',\n [baseSepolia.id]: '0xB5ABc500f54a798E20ae8f91e21DBa29B1CE3F5a',\n};\nexport const timelockFactories: Record<number, Address> = {\n [unichainSepolia.id]: '0x8790e55d165591C082D3CBb811b36c9C893530DF',\n [baseSepolia.id]: '0x7C9fBd739cb0e09657B7c6aB4eFc37bEe80820B0',\n};\nexport const swapRouters: Record<number, Address> = {\n [monadTestnet.id]: '0xEd8a7Ca09c6Db6F4b9FAcB8De7e9A5449B1D21a4',\n [unichainSepolia.id]: '0x7C9fBd739cb0e09657B7c6aB4eFc37bEe80820B0',\n [baseSepolia.id]: '0x62408e89d44b70AbB65A01253fB879e28Ca81051',\n};\nexport const stateViews: Record<number, Address> = {\n [monadTestnet.id]: '0xB85e32Ff9b08Be61cD888e5D997E51951BCA1A69',\n [unichainSepolia.id]: '0x1B69d7338F027deB8Cc78a4085BC7087B251C049',\n [baseSepolia.id]: '0xB368014D394015F90a1F27D522F6a5d56BE9255c',\n};\n","import type {Address} from 'viem';\n\nexport interface PriceData {\n currentPrice: number;\n percentChange: number;\n poolAddr: string;\n timestamp: number;\n}\n\nexport interface PriceDataPoint {\n timestamp: Date;\n price: number;\n}\n\nexport type PriceResolution = '1m' | '5m' | '15m' | '1h' | '4h' | '1d';\n\nconst getResolutionConfig = (resolution: PriceResolution) => {\n const resolutionMap = {\n '1m': {timeframe: 'minute', aggregate: '1', seconds: 60},\n '5m': {timeframe: 'minute', aggregate: '5', seconds: 300},\n '15m': {timeframe: 'minute', aggregate: '15', seconds: 900},\n '1h': {timeframe: 'hour', aggregate: '1', seconds: 3600},\n '4h': {timeframe: 'hour', aggregate: '4', seconds: 14400},\n '1d': {timeframe: 'day', aggregate: '1', seconds: 86400},\n };\n return resolutionMap[resolution];\n};\n\nconst fillGaps = (\n prices: PriceDataPoint[],\n start: Date,\n end: Date,\n intervalMs: number,\n): PriceDataPoint[] => {\n if (prices.length === 0) return [];\n\n const priceMap = new Map<number, PriceDataPoint>();\n\n for (const point of prices) {\n const alignedTime =\n Math.floor(point.timestamp.getTime() / intervalMs) * intervalMs;\n priceMap.set(alignedTime, point);\n }\n const filled: PriceDataPoint[] = [];\n\n const actualStart =\n Math.floor(prices[0].timestamp.getTime() / intervalMs) * intervalMs;\n\n let currentTime = actualStart;\n let lastKnownPrice: PriceDataPoint | null = null;\n\n while (currentTime <= end.getTime()) {\n const existing = priceMap.get(currentTime);\n\n if (existing) {\n filled.push(existing);\n lastKnownPrice = existing;\n } else if (lastKnownPrice) {\n filled.push({\n timestamp: new Date(currentTime),\n price: lastKnownPrice.price,\n });\n }\n currentTime += intervalMs;\n }\n return filled;\n};\n\nexport const getPriceHistory = async (\n pool: Address,\n token: 0 | 1,\n resolution: PriceResolution,\n start: Date,\n end: Date,\n): Promise<PriceDataPoint[]> => {\n const network = 'monad-testnet';\n const {timeframe, aggregate, seconds} = getResolutionConfig(resolution);\n\n if (end.getTime() > Date.now()) {\n end = new Date(Date.now());\n }\n const startSecs = Math.floor(start.getTime() / 1000);\n const endSecs = Math.floor(end.getTime() / 1000);\n const diffSeconds = endSecs - startSecs;\n\n const limit = Math.min(Math.ceil(diffSeconds / seconds), 1000);\n\n const url =\n `https://api.geckoterminal.com/api/v2/networks/${network}/pools/${pool}/ohlcv/${timeframe}` +\n `?aggregate=${aggregate}` +\n `&limit=${limit}` +\n `&token=${token === 0 ? 'base' : 'quote'}` +\n '¤cy=usd' +\n `&before_timestamp=${endSecs}`;\n\n const res = await fetch(url, {headers: {Accept: 'application/json'}});\n\n if (!res.ok) {\n throw new Error(`Failed to fetch price history: ${res.statusText}`);\n }\n const data = (await res.json()) as {\n data: {\n attributes: {\n ohlcv_list: [number, number, number, number, number, number][];\n };\n };\n };\n const prices: PriceDataPoint[] = data.data.attributes.ohlcv_list\n .map(([timestamp, , , , close]) => ({\n timestamp: new Date(timestamp * 1000),\n price: close,\n }))\n .sort((a, b) => a.timestamp.getTime() - b.timestamp.getTime());\n\n return fillGaps(prices, start, end, seconds * 1000).filter(\n point =>\n point.timestamp.getTime() / 1000 >= startSecs &&\n point.timestamp.getTime() / 1000 <= endSecs,\n );\n};\n\nexport const getCurrentPrice = async (\n poolAddr: Address,\n tokenAddr: Address,\n): Promise<PriceData> => {\n const network = 'monad-testnet';\n const geckoUrl = `https://api.geckoterminal.com/api/v2/networks/${network}/pools/${poolAddr.toLowerCase()}`;\n\n const response = await fetch(geckoUrl, {\n method: 'GET',\n headers: {Accept: 'application/json', 'User-Agent': 'TimelockTrade/1.0'},\n cache: 'no-store', // Keep no-store for real-time data\n });\n if (!response.ok) {\n throw new Error(`Failed to fetch price data for pool ${poolAddr}`);\n }\n const data = (await response.json()) as {\n data: {\n attributes: {\n base_token_price_quote_token: string;\n quote_token_price_base_token: string;\n price_change_percentage: {h24: string};\n };\n relationships: {\n base_token: {data: {id: string; type: string}};\n quote_token: {data: {id: string; type: string}};\n };\n };\n };\n const pool = data.data.attributes;\n const relationships = data.data.relationships;\n\n const baseTokenAddr = relationships.base_token.data.id\n .split('_')[1]\n .toLowerCase();\n const quoteTokenAddr = relationships.quote_token.data.id\n .split('_')[1]\n .toLowerCase();\n\n const isBaseToken = tokenAddr.toLowerCase() === baseTokenAddr.toLowerCase();\n const isQuoteToken = tokenAddr.toLowerCase() === quoteTokenAddr.toLowerCase();\n\n if (!isBaseToken && !isQuoteToken) {\n throw new Error(`Token ${tokenAddr} is not part of pool ${poolAddr}`);\n }\n const price = isBaseToken\n ? pool.base_token_price_quote_token\n : pool.quote_token_price_base_token;\n const priceChange = pool.price_change_percentage?.h24;\n\n return {\n currentPrice: parseFloat(price || '0'),\n percentChange: parseFloat(priceChange || '0'),\n poolAddr: poolAddr,\n timestamp: Date.now(),\n };\n};\n","import {SqrtPriceMath, TickMath} from '@uniswap/v3-sdk';\nimport Big from 'big.js';\nimport JSBI from 'jsbi';\nimport type {Amount} from './numberUtils';\n\nexport const PRICE_PRECISION = BigInt(1e18);\n\nexport const getPriceAtSqrtPriceX96 = (sqrtPriceX96: bigint) => {\n const priceX192 = sqrtPriceX96 * sqrtPriceX96;\n const price = (priceX192 * PRICE_PRECISION) / BigInt(2 ** 192);\n\n return price;\n};\n\nexport const getSqrtPriceX96AtPrice = (price: bigint) => {\n const priceX192 = (price * BigInt(2 ** 192)) / PRICE_PRECISION;\n\n const sqrtPriceX96 = JSBI.BigInt(\n new Big(priceX192.toString()).sqrt().toFixed(0),\n );\n return sqrtPriceX96;\n};\n\nexport const getPriceAtTick = (tick: number) => {\n const sqrtRatioX96 = BigInt(TickMath.getSqrtRatioAtTick(tick).toString());\n\n const priceX192 = sqrtRatioX96 * sqrtRatioX96;\n const price = (priceX192 * PRICE_PRECISION) / BigInt(2 ** 192);\n\n return price;\n};\n\nexport const getTickAtPrice = (price: bigint) => {\n const priceX192 = (price * BigInt(2 ** 192)) / PRICE_PRECISION;\n const sqrtPriceX96 = JSBI.BigInt(\n new Big(priceX192.toString()).sqrt().toFixed(0),\n );\n return TickMath.getTickAtSqrtRatio(sqrtPriceX96);\n};\n\nexport const getNearestValidStrikeTick = (\n optionType: 'CALL' | 'PUT',\n optionAssetIsToken0: boolean,\n tickSpacing: number,\n currentTick: number,\n strikeTick?: number,\n) => {\n strikeTick = roundTick(strikeTick ?? currentTick, tickSpacing);\n\n if (\n (optionType === 'CALL' && optionAssetIsToken0) ||\n (optionType === 'PUT' && !optionAssetIsToken0)\n ) {\n strikeTick += tickSpacing;\n }\n return strikeTick;\n};\n\nexport const roundTick = (tick: number, spacing: number) => {\n const rem = tick % spacing;\n if (rem >= 0) return tick - rem;\n return tick - rem - spacing;\n};\n\nexport const token0ToToken1 = (amount0: bigint, price: bigint | Amount) => {\n price = typeof price === 'bigint' ? price : price.scaled;\n return (amount0 * price) / PRICE_PRECISION;\n};\nexport const token1ToToken0 = (amount1: bigint, price: bigint | Amount) => {\n price = typeof price === 'bigint' ? price : price.scaled;\n return (amount1 * PRICE_PRECISION) / price;\n};\n\nexport const token0ToToken1AtTick = (amount0: bigint, tick: number) => {\n const price = getPriceAtTick(tick);\n return (amount0 * price) / PRICE_PRECISION;\n};\nexport const token1ToToken0AtTick = (amount1: bigint, tick: number) => {\n const price = getPriceAtTick(tick);\n return (amount1 * PRICE_PRECISION) / price;\n};\n\nexport const getAmountsFromLiquidity = (\n tickLower: number,\n tickUpper: number,\n liquidity: bigint,\n currentTick: number,\n): [bigint, bigint] => {\n const sqrtRatioX96 = TickMath.getSqrtRatioAtTick(currentTick);\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n let delta0 = JSBI.BigInt(0);\n let delta1 = JSBI.BigInt(0);\n\n if (currentTick < tickLower) {\n delta0 = SqrtPriceMath.getAmount0Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n } else if (currentTick >= tickUpper) {\n delta1 = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n } else {\n delta0 = SqrtPriceMath.getAmount0Delta(\n sqrtRatioX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n delta1 = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioX96,\n liquidityJSBI,\n false,\n );\n }\n return [BigInt(delta0.toString()), BigInt(delta1.toString())];\n};\n\nexport const liquiditiesToAmount0 = (\n liquidities: bigint[],\n startTick: number,\n tickSpacing: number,\n) => {\n let amount0 = BigInt(0);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n const amount0Delta = SqrtPriceMath.getAmount0Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(amount0Delta.toString());\n }\n return amount0;\n};\n\nexport const liquiditiesToAmount1 = (\n liquidities: bigint[],\n startTick: number,\n tickSpacing: number,\n) => {\n let amount1 = BigInt(0);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n const amount1Delta = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount1 += BigInt(amount1Delta.toString());\n }\n return amount1;\n};\n\nexport const liquiditiesToAmounts = (\n liquidities: bigint[],\n startTick: number,\n price: bigint,\n tickSpacing: number,\n) => {\n let amount0 = 0n;\n let amount1 = 0n;\n\n const sqrtRatioX96 = getSqrtPriceX96AtPrice(price);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n if (JSBI.lessThanOrEqual(sqrtRatioX96, sqrtRatioAX96)) {\n const delta0 = SqrtPriceMath.getAmount0Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(delta0.toString());\n } else if (JSBI.lessThan(sqrtRatioX96, sqrtRatioBX96)) {\n const delta0 = SqrtPriceMath.getAmount0Delta(\n sqrtRatioX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n const delta1 = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(delta0.toString());\n amount1 += BigInt(delta1.toString());\n } else {\n const delta1 = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount1 += BigInt(delta1.toString());\n }\n }\n return [amount0, amount1];\n};\n","import Big from 'big.js';\n\nexport type Amount = {\n scaled: bigint;\n unscaled: Big;\n decimals: number;\n formatted: string;\n};\n\nexport const zero: Amount = {\n scaled: 0n,\n unscaled: Big(0),\n decimals: 18,\n formatted: '0',\n};\n\nexport const wrapAmount = (scaled: bigint, decimals: number): Amount => {\n const unscaled = unscaleAmount(scaled, decimals);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals, formatted};\n};\n\nexport const wrapAmountUnscaled = (\n unscaled: Big | number | string,\n decimals: number,\n): Amount => {\n unscaled = Big(unscaled);\n const scaled = scaleAmount(unscaled, decimals);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals, formatted};\n};\n\nexport const wrapPrice = (\n scaled: bigint,\n decimals0: number,\n decimals1: number,\n): Amount => {\n const unscaled = unscalePrice(scaled, decimals0, decimals1);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals: 36 + decimals1 - decimals0, formatted};\n};\n\nexport const wrapPriceUnscaled = (\n unscaled: Big | number | string,\n decimals0: number,\n decimals1: number,\n): Amount => {\n unscaled = Big(unscaled);\n const scaled = scalePrice(unscaled, decimals0, decimals1);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals: 36 + decimals1 - decimals0, formatted};\n};\n\nexport const unscaleAmount = (scaled: bigint, decimals: number) => {\n return new Big(scaled.toString()).div(new Big(10).pow(decimals));\n};\n\nexport const scaleAmount = (\n unscaled: Big | number | string,\n decimals: number,\n) => {\n return BigInt(\n Big(unscaled).mul(new Big(10).pow(decimals)).round().toFixed(0),\n );\n};\n\nexport const unscalePrice = (\n scaled: bigint,\n decimals0: number,\n decimals1: number,\n precision = 18,\n) => {\n return new Big(scaled.toString())\n .mul(new Big(10).pow(decimals0))\n .div(new Big(10).pow(decimals1))\n .div(new Big(10).pow(precision));\n};\n\nexport const scalePrice = (\n unscaled: Big | number | string,\n decimals0: number,\n decimals1: number,\n precision = 18,\n) => {\n return BigInt(\n Big(unscaled)\n .mul(new Big(10).pow(precision))\n .mul(new Big(10).pow(decimals1))\n .div(new Big(10).pow(decimals0))\n .round()\n .toFixed(0),\n );\n};\n\nexport const formatAmount = (value?: Big | number | string) => {\n if (!value) return '-';\n value = new Big(value);\n\n if (value.gte(1e8)) return formatVagueAmount(value, 2);\n return formatCondensed(Big(value).toFixed(100));\n};\n\nexport const formatVagueAmount = (\n value: Big | number | bigint | string,\n fractionDigits = 2,\n) => {\n value = Number(value);\n if (value === 0) return '0';\n\n const formatted = value.toExponential(fractionDigits);\n return formatted.replace(/\\.?0+e/, 'e').replace(/e\\+/, 'e');\n};\n\nexport const formatCondensed = (\n input: string | number,\n decimals = 2,\n): string => {\n const str = (typeof input === 'number' ? input.toFixed(20) : input)\n .replace(/(\\.\\d*?)0+$/, '$1')\n .replace(/\\.$/, '');\n\n const [whole, decimal] = str.split('.');\n\n const formattedWhole = whole.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n if (!decimal) return formattedWhole;\n\n const leadingZeroMatch = decimal.match(/^(0{3,})/);\n\n if (leadingZeroMatch) {\n const zeroCount = leadingZeroMatch[1].length;\n const subscript = toSubscript(zeroCount.toString());\n const remaining = decimal.slice(zeroCount);\n\n const twoDigits = remaining.slice(0, decimals);\n return `${formattedWhole}.0${subscript}${twoDigits}`;\n } else {\n // No subscript needed, find first 2 significant digits\n const nonZeroStart = decimal.search(/[1-9]/); // Find first non-zero digit\n\n if (nonZeroStart === -1) {\n return formattedWhole; // All zeros\n }\n const significantPart = decimal.slice(nonZeroStart);\n const twoDigits = significantPart.slice(0, decimals);\n const leadingZeros = decimal.slice(0, nonZeroStart);\n\n return `${formattedWhole}.${leadingZeros}${twoDigits}`;\n }\n};\n\nconst toSubscript = (input: string) => {\n return input.replace(/[0-9]/g, m => '₀₁₂₃₄₅₆₇₈₉'[+m]);\n};\n\nexport const formatUSD = (value: Big | string | number): string => {\n return '$' + formatAmount(value);\n};\n","import type {OptionData} from '~/package/client';\nimport {\n getPriceAtTick,\n liquiditiesToAmounts,\n token0ToToken1,\n token1ToToken0,\n} from './liquidityUtils';\n\nexport const getPayoutAtTick = (\n option: OptionData,\n liquidities: bigint[],\n tick: number,\n tickSpacing: number,\n optionAssetIsToken0: boolean,\n) => {\n return getPayoutAtPrice(\n option,\n liquidities,\n getPriceAtTick(tick),\n tickSpacing,\n optionAssetIsToken0,\n );\n};\n\nexport const getPayoutAtPrice = (\n option: OptionData,\n liquidities: bigint[],\n price: bigint,\n tickSpacing: number,\n optionAssetIsToken0: boolean,\n) => {\n const [borrowedAmount0, borrowedAmount1] = liquiditiesToAmounts(\n liquidities,\n option.startTick,\n option.entryPrice,\n tickSpacing,\n );\n const [repayAmount0, repayAmount1] = liquiditiesToAmounts(\n liquidities,\n option.startTick,\n price,\n tickSpacing,\n );\n const totalAmount = optionAssetIsToken0\n ? borrowedAmount1 + token0ToToken1(borrowedAmount0, price)\n : borrowedAmount0 + token1ToToken0(borrowedAmount1, price);\n\n const repayAmount = optionAssetIsToken0\n ? repayAmount1 + token0ToToken1(repayAmount0, price)\n : repayAmount0 + token1ToToken0(repayAmount1, price);\n\n const delta = totalAmount - repayAmount;\n const payout = delta < 0n ? 0n : delta;\n\n return payout;\n};\n"],"mappings":";;;;;;;;AAwBA,MAAa,YAAY,SAAkB,WACzC,YAAY;CAAC,KAAKA;CAAU;CAAS;CAAO,CAAC;AAE/C,MAAa,qBACX,SACA,WACmB;AACnB,QAAO,YAAY;EAAC,KAAK;EAAkB;EAAS;EAAO,CAAC;;AAG9D,MAAa,eAAe,OAAO,QAAsB,YAAsB;AAC7E,KAAI,CAAC,SAAS;EACZ,MAAM,UAAU,MAAM,OAAO,YAAY;AACzC,YAAU,WAAW;AACrB,MAAI,CAAC,QAAS,OAAM,IAAI,MAAM,2BAA2B,UAAU;;AAErE,QAAO,YAAY;EAAC,KAAK;EAAuB;EAAS;EAAO,CAAC;;AAGnE,MAAa,kBAAkB,OAC7B,QACA,YACG;AACH,KAAI,CAAC,SAAS;EACZ,MAAM,UAAU,MAAM,OAAO,YAAY;AACzC,YAAU,eAAe;AACzB,MAAI,CAAC,QAAS,OAAM,IAAI,MAAM,8BAA8B,UAAU;;AAExE,QAAO,YAAY;EAAC,KAAK;EAAS;EAAS;EAAO,CAAC;;AAGrD,MAAaC,WAAoC;EAC9C,aAAa,KAAK;EAClB,gBAAgB,KAAK;EACrB,YAAY,KAAK;CACnB;AACD,MAAaC,iBAA0C;EACpD,aAAa,KAAK;EAClB,gBAAgB,KAAK;EACrB,YAAY,KAAK;CACnB;AACD,MAAaC,oBAA6C;EACvD,gBAAgB,KAAK;EACrB,YAAY,KAAK;CACnB;AACD,MAAaC,cAAuC;EACjD,aAAa,KAAK;EAClB,gBAAgB,KAAK;EACrB,YAAY,KAAK;CACnB;AAC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