timelock-sdk 0.0.79 → 0.0.81

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.
@@ -10,6 +10,215 @@ import * as _tanstack_query_core17 from "@tanstack/query-core";
10
10
  import Big from "big.js";
11
11
  import * as _wagmi_core1 from "@wagmi/core";
12
12
 
13
+ //#region src/generated/graphql.d.ts
14
+ type Exact<T$1 extends {
15
+ [key: string]: unknown;
16
+ }> = { [K in keyof T$1]: T$1[K] };
17
+ type GraphQLClientRequestHeaders = RequestOptions['requestHeaders'];
18
+ /** All built-in and custom scalars, mapped to their actual values */
19
+ type Scalars = {
20
+ ID: {
21
+ input: string;
22
+ output: string;
23
+ };
24
+ String: {
25
+ input: string;
26
+ output: string;
27
+ };
28
+ Boolean: {
29
+ input: boolean;
30
+ output: boolean;
31
+ };
32
+ Int: {
33
+ input: number;
34
+ output: number;
35
+ };
36
+ Float: {
37
+ input: number;
38
+ output: number;
39
+ };
40
+ jsonb: {
41
+ input: any;
42
+ output: any;
43
+ };
44
+ numeric: {
45
+ input: any;
46
+ output: any;
47
+ };
48
+ optiontype: {
49
+ input: any;
50
+ output: any;
51
+ };
52
+ timestamptz: {
53
+ input: any;
54
+ output: any;
55
+ };
56
+ };
57
+ type UserOptionFieldsFragment = {
58
+ __typename: 'UserOption';
59
+ id: string;
60
+ optionId: any;
61
+ optionType: any;
62
+ strikeTick: number;
63
+ entryTick: number;
64
+ startTick: number;
65
+ strikePrice: any;
66
+ entryPrice: any;
67
+ expiresAt: any;
68
+ createdAt: any;
69
+ premium: any;
70
+ protocolFee: any;
71
+ realizedPayout: any;
72
+ liquiditiesAtOpen: Array<string>;
73
+ liquiditiesCurrent: Array<string>;
74
+ positionSizeAtOpen: any;
75
+ positionSizeCurrent: any;
76
+ fullyExercised: boolean;
77
+ owner?: {
78
+ __typename: 'TimelockMarketUser';
79
+ address: string;
80
+ } | null;
81
+ market?: {
82
+ __typename: 'TimelockMarket';
83
+ address: string;
84
+ } | null;
85
+ };
86
+ type GetActiveUserOptionsQueryVariables = Exact<{
87
+ userAddr: Scalars['String']['input'];
88
+ }>;
89
+ type GetActiveUserOptionsQuery = {
90
+ __typename: 'query_root';
91
+ UserOption: Array<{
92
+ __typename: 'UserOption';
93
+ } & UserOptionFieldsFragment>;
94
+ };
95
+ type GetActiveUserOptionsByMarketQueryVariables = Exact<{
96
+ userAddr: Scalars['String']['input'];
97
+ marketAddr: Scalars['String']['input'];
98
+ }>;
99
+ type GetActiveUserOptionsByMarketQuery = {
100
+ __typename: 'query_root';
101
+ UserOption: Array<{
102
+ __typename: 'UserOption';
103
+ } & UserOptionFieldsFragment>;
104
+ };
105
+ type GetClosedUserOptionsQueryVariables = Exact<{
106
+ userAddr: Scalars['String']['input'];
107
+ }>;
108
+ type GetClosedUserOptionsQuery = {
109
+ __typename: 'query_root';
110
+ UserOption: Array<{
111
+ __typename: 'UserOption';
112
+ } & UserOptionFieldsFragment>;
113
+ };
114
+ type GetClosedUserOptionsByMarketQueryVariables = Exact<{
115
+ userAddr: Scalars['String']['input'];
116
+ marketAddr: Scalars['String']['input'];
117
+ }>;
118
+ type GetClosedUserOptionsByMarketQuery = {
119
+ __typename: 'query_root';
120
+ UserOption: Array<{
121
+ __typename: 'UserOption';
122
+ } & UserOptionFieldsFragment>;
123
+ };
124
+ type GetMarketDataQueryVariables = Exact<{
125
+ marketAddr: Scalars['String']['input'];
126
+ }>;
127
+ type GetMarketDataQuery = {
128
+ __typename: 'query_root';
129
+ TimelockMarket: Array<{
130
+ __typename: 'TimelockMarket';
131
+ id: string;
132
+ address: string;
133
+ optionsCount: any;
134
+ tradersCount: any;
135
+ vault: string;
136
+ pool: string;
137
+ tickSpacing: number;
138
+ optionAssetIsToken0: boolean;
139
+ optionAsset: string;
140
+ payoutAsset: string;
141
+ optionAssetDecimals: number;
142
+ payoutAssetDecimals: number;
143
+ optionAssetSymbol: string;
144
+ payoutAssetSymbol: string;
145
+ optionAssetName: string;
146
+ payoutAssetName: string;
147
+ }>;
148
+ };
149
+ type GetUserMarketOperatorsQueryVariables = Exact<{
150
+ userAddr: Scalars['String']['input'];
151
+ marketAddr: Scalars['String']['input'];
152
+ }>;
153
+ type GetUserMarketOperatorsQuery = {
154
+ __typename: 'query_root';
155
+ UserMarketOperator: Array<{
156
+ __typename: 'UserMarketOperator';
157
+ id: string;
158
+ canExtend: boolean;
159
+ canExercise: boolean;
160
+ canTransfer: boolean;
161
+ canMint: boolean;
162
+ spendingApproval: any;
163
+ operator?: {
164
+ __typename: 'MarketOperator';
165
+ address: string;
166
+ } | null;
167
+ }>;
168
+ };
169
+ type GetOptionEventsQueryVariables = Exact<{
170
+ marketAddr: Scalars['String']['input'];
171
+ optionId: Scalars['numeric']['input'];
172
+ }>;
173
+ type GetOptionEventsQuery = {
174
+ __typename: 'query_root';
175
+ MintOptionEvent: Array<{
176
+ __typename: 'MintOptionEvent';
177
+ id: string;
178
+ optionType: number;
179
+ strikeTick: number;
180
+ currentTick: number;
181
+ expiresAt: any;
182
+ premium: any;
183
+ protocolFee: any;
184
+ liquidities: Array<string>;
185
+ timestamp: any;
186
+ blockNumber: any;
187
+ transactionHash: string;
188
+ }>;
189
+ ExerciseOptionEvent: Array<{
190
+ __typename: 'ExerciseOptionEvent';
191
+ id: string;
192
+ liquidities: Array<string>;
193
+ currentTick: number;
194
+ payout: any;
195
+ timestamp: any;
196
+ blockNumber: any;
197
+ transactionHash: string;
198
+ }>;
199
+ ExtendOptionEvent: Array<{
200
+ __typename: 'ExtendOptionEvent';
201
+ id: string;
202
+ premium: any;
203
+ protocolFee: any;
204
+ currentTick: number;
205
+ addedDuration: any;
206
+ timestamp: any;
207
+ blockNumber: any;
208
+ transactionHash: string;
209
+ }>;
210
+ };
211
+ type SdkFunctionWrapper = <T$1>(action: (requestHeaders?: Record<string, string>) => Promise<T$1>, operationName: string, operationType?: string, variables?: any) => Promise<T$1>;
212
+ declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionWrapper): {
213
+ GetActiveUserOptions(variables: GetActiveUserOptionsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetActiveUserOptionsQuery>;
214
+ GetActiveUserOptionsByMarket(variables: GetActiveUserOptionsByMarketQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetActiveUserOptionsByMarketQuery>;
215
+ GetClosedUserOptions(variables: GetClosedUserOptionsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetClosedUserOptionsQuery>;
216
+ GetClosedUserOptionsByMarket(variables: GetClosedUserOptionsByMarketQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetClosedUserOptionsByMarketQuery>;
217
+ GetMarketData(variables: GetMarketDataQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetMarketDataQuery>;
218
+ GetUserMarketOperators(variables: GetUserMarketOperatorsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetUserMarketOperatorsQuery>;
219
+ GetOptionEvents(variables: GetOptionEventsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetOptionEventsQuery>;
220
+ };
221
+ //#endregion
13
222
  //#region src/lib/contracts.d.ts
14
223
  type TimelockMarket = GetContractReturnType<typeof optionsMarketAbi, Client, Address>;
15
224
  type TimelockLens = GetContractReturnType<typeof lensAbi, Client, Address>;
@@ -32071,236 +32280,30 @@ declare const getTimelockLens: (client: Client | PublicClient) => {
32071
32280
  declare const timelockLenses: Record<number, Address>;
32072
32281
  declare const uniswapMathLenses: Record<number, Address>;
32073
32282
  //#endregion
32074
- //#region src/generated/graphql.d.ts
32075
- type Exact<T$1 extends {
32076
- [key: string]: unknown;
32077
- }> = { [K in keyof T$1]: T$1[K] };
32078
- type GraphQLClientRequestHeaders = RequestOptions['requestHeaders'];
32079
- /** All built-in and custom scalars, mapped to their actual values */
32080
- type Scalars = {
32081
- ID: {
32082
- input: string;
32083
- output: string;
32084
- };
32085
- String: {
32086
- input: string;
32087
- output: string;
32088
- };
32089
- Boolean: {
32090
- input: boolean;
32091
- output: boolean;
32092
- };
32093
- Int: {
32094
- input: number;
32095
- output: number;
32096
- };
32097
- Float: {
32098
- input: number;
32099
- output: number;
32100
- };
32101
- jsonb: {
32102
- input: any;
32103
- output: any;
32104
- };
32105
- numeric: {
32106
- input: any;
32107
- output: any;
32108
- };
32109
- optiontype: {
32110
- input: any;
32111
- output: any;
32112
- };
32113
- timestamptz: {
32114
- input: any;
32115
- output: any;
32116
- };
32117
- };
32118
- type UserOptionFieldsFragment = {
32119
- __typename: 'UserOption';
32120
- id: string;
32121
- optionId: any;
32122
- optionType: any;
32123
- strikeTick: number;
32124
- entryTick: number;
32125
- startTick: number;
32126
- strikePrice: any;
32127
- entryPrice: any;
32128
- expiresAt: any;
32129
- createdAt: any;
32130
- premium: any;
32131
- protocolFee: any;
32132
- realizedPayout: any;
32133
- liquiditiesAtOpen: Array<string>;
32134
- liquiditiesCurrent: Array<string>;
32135
- positionSizeAtOpen: any;
32136
- positionSizeCurrent: any;
32137
- fullyExercised: boolean;
32138
- owner?: {
32139
- __typename: 'TimelockMarketUser';
32140
- address: string;
32141
- } | null;
32142
- market?: {
32143
- __typename: 'TimelockMarket';
32144
- address: string;
32145
- } | null;
32146
- };
32147
- type GetActiveUserOptionsQueryVariables = Exact<{
32148
- userAddr: Scalars['String']['input'];
32149
- }>;
32150
- type GetActiveUserOptionsQuery = {
32151
- __typename: 'query_root';
32152
- UserOption: Array<{
32153
- __typename: 'UserOption';
32154
- } & UserOptionFieldsFragment>;
32155
- };
32156
- type GetActiveUserOptionsByMarketQueryVariables = Exact<{
32157
- userAddr: Scalars['String']['input'];
32158
- marketAddr: Scalars['String']['input'];
32159
- }>;
32160
- type GetActiveUserOptionsByMarketQuery = {
32161
- __typename: 'query_root';
32162
- UserOption: Array<{
32163
- __typename: 'UserOption';
32164
- } & UserOptionFieldsFragment>;
32165
- };
32166
- type GetClosedUserOptionsQueryVariables = Exact<{
32167
- userAddr: Scalars['String']['input'];
32168
- }>;
32169
- type GetClosedUserOptionsQuery = {
32170
- __typename: 'query_root';
32171
- UserOption: Array<{
32172
- __typename: 'UserOption';
32173
- } & UserOptionFieldsFragment>;
32174
- };
32175
- type GetClosedUserOptionsByMarketQueryVariables = Exact<{
32176
- userAddr: Scalars['String']['input'];
32177
- marketAddr: Scalars['String']['input'];
32178
- }>;
32179
- type GetClosedUserOptionsByMarketQuery = {
32180
- __typename: 'query_root';
32181
- UserOption: Array<{
32182
- __typename: 'UserOption';
32183
- } & UserOptionFieldsFragment>;
32184
- };
32185
- type GetMarketDataQueryVariables = Exact<{
32186
- marketAddr: Scalars['String']['input'];
32187
- }>;
32188
- type GetMarketDataQuery = {
32189
- __typename: 'query_root';
32190
- TimelockMarket: Array<{
32191
- __typename: 'TimelockMarket';
32192
- id: string;
32193
- address: string;
32194
- optionsCount: any;
32195
- tradersCount: any;
32196
- vault: string;
32197
- pool: string;
32198
- tickSpacing: number;
32199
- optionAssetIsToken0: boolean;
32200
- optionAsset: string;
32201
- payoutAsset: string;
32202
- optionAssetDecimals: number;
32203
- payoutAssetDecimals: number;
32204
- optionAssetSymbol: string;
32205
- payoutAssetSymbol: string;
32206
- optionAssetName: string;
32207
- payoutAssetName: string;
32208
- }>;
32209
- };
32210
- type GetUserMarketOperatorsQueryVariables = Exact<{
32211
- userAddr: Scalars['String']['input'];
32212
- marketAddr: Scalars['String']['input'];
32213
- }>;
32214
- type GetUserMarketOperatorsQuery = {
32215
- __typename: 'query_root';
32216
- UserMarketOperator: Array<{
32217
- __typename: 'UserMarketOperator';
32218
- id: string;
32219
- canExtend: boolean;
32220
- canExercise: boolean;
32221
- canTransfer: boolean;
32222
- canMint: boolean;
32223
- spendingApproval: any;
32224
- operator?: {
32225
- __typename: 'MarketOperator';
32226
- address: string;
32227
- } | null;
32228
- }>;
32229
- };
32230
- type GetOptionEventsQueryVariables = Exact<{
32231
- marketAddr: Scalars['String']['input'];
32232
- optionId: Scalars['numeric']['input'];
32233
- }>;
32234
- type GetOptionEventsQuery = {
32235
- __typename: 'query_root';
32236
- MintOptionEvent: Array<{
32237
- __typename: 'MintOptionEvent';
32238
- id: string;
32239
- optionType: number;
32240
- strikeTick: number;
32241
- currentTick: number;
32242
- expiresAt: any;
32243
- premium: any;
32244
- protocolFee: any;
32245
- liquidities: Array<string>;
32246
- timestamp: any;
32247
- blockNumber: any;
32248
- transactionHash: string;
32249
- }>;
32250
- ExerciseOptionEvent: Array<{
32251
- __typename: 'ExerciseOptionEvent';
32252
- id: string;
32253
- liquidities: Array<string>;
32254
- currentTick: number;
32255
- payout: any;
32256
- timestamp: any;
32257
- blockNumber: any;
32258
- transactionHash: string;
32259
- }>;
32260
- ExtendOptionEvent: Array<{
32261
- __typename: 'ExtendOptionEvent';
32262
- id: string;
32263
- premium: any;
32264
- protocolFee: any;
32265
- currentTick: number;
32266
- addedDuration: any;
32267
- timestamp: any;
32268
- blockNumber: any;
32269
- transactionHash: string;
32270
- }>;
32271
- };
32272
- type SdkFunctionWrapper = <T$1>(action: (requestHeaders?: Record<string, string>) => Promise<T$1>, operationName: string, operationType?: string, variables?: any) => Promise<T$1>;
32273
- declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionWrapper): {
32274
- GetActiveUserOptions(variables: GetActiveUserOptionsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetActiveUserOptionsQuery>;
32275
- GetActiveUserOptionsByMarket(variables: GetActiveUserOptionsByMarketQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetActiveUserOptionsByMarketQuery>;
32276
- GetClosedUserOptions(variables: GetClosedUserOptionsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetClosedUserOptionsQuery>;
32277
- GetClosedUserOptionsByMarket(variables: GetClosedUserOptionsByMarketQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetClosedUserOptionsByMarketQuery>;
32278
- GetMarketData(variables: GetMarketDataQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetMarketDataQuery>;
32279
- GetUserMarketOperators(variables: GetUserMarketOperatorsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetUserMarketOperatorsQuery>;
32280
- GetOptionEvents(variables: GetOptionEventsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetOptionEventsQuery>;
32281
- };
32282
- //#endregion
32283
- //#region src/providers/TimelockMarketProvider.d.ts
32284
- type TimelockMarketContextValue = {
32283
+ //#region src/providers/TimelockProvider.d.ts
32284
+ type TimelockContextValue = {
32285
32285
  marketData: Partial<TimelockMarketData>;
32286
32286
  lensAddr?: Address;
32287
32287
  uniswapMathLensAddr?: Address;
32288
32288
  envioGraphqlUrl?: string;
32289
32289
  graphqlClient?: ReturnType<typeof getSdk>;
32290
+ perpsOperatorUrl?: string;
32290
32291
  };
32291
- declare const TimelockMarketProvider: ({
32292
+ declare const TimelockProvider: ({
32292
32293
  children,
32293
32294
  marketData,
32294
- envioGraphqlUrl
32295
+ envioGraphqlUrl,
32296
+ perpsOperatorUrl
32295
32297
  }: {
32296
32298
  children: ReactNode;
32297
32299
  marketData?: Partial<TimelockMarketData>;
32298
32300
  envioGraphqlUrl?: string;
32301
+ perpsOperatorUrl?: string;
32299
32302
  }) => React.JSX.Element;
32300
32303
  declare const useCurrentMarket: () => Partial<TimelockMarketData>;
32301
- declare const useTimelockConfig: () => TimelockMarketContextValue;
32304
+ declare const useTimelockConfig: () => TimelockContextValue;
32302
32305
  //#endregion
32303
- //#region src/hooks/market/useUserOptions.d.ts
32306
+ //#region src/hooks/options/useUserOptions.d.ts
32304
32307
  type OptionData = ReturnType<typeof useUserOptions>['data'][0];
32305
32308
  declare const useUserOptions: (userAddr?: Address, marketAddr?: Address | "*", active?: boolean) => {
32306
32309
  error: Error;
@@ -34412,13 +34415,13 @@ declare const useClosedUserOptions: (userAddr?: Address, marketAddr?: Address |
34412
34415
  }[];
34413
34416
  };
34414
34417
  //#endregion
34415
- //#region src/hooks/market/useExerciseOption.d.ts
34418
+ //#region src/hooks/options/useExerciseOption.d.ts
34416
34419
  declare const useExerciseOption: (marketAddr?: Address) => _tanstack_react_query0.UseMutationResult<`0x${string}`, Error, {
34417
34420
  option: OptionData;
34418
34421
  liquidities: readonly bigint[];
34419
34422
  }, unknown>;
34420
34423
  //#endregion
34421
- //#region src/hooks/market/useMarketData.d.ts
34424
+ //#region src/hooks/options/useMarketData.d.ts
34422
34425
  declare const useMarketData: (marketAddr?: Address) => Partial<NonUndefinedGuard<{
34423
34426
  pool: Address;
34424
34427
  vault: Address;
@@ -34461,14 +34464,14 @@ declare const formatVagueAmount: (value: number | bigint) => string;
34461
34464
  declare const formatCondensed: (input: string | number, decimals?: number) => string;
34462
34465
  declare const formatUSD: (value: Big | string | number) => string;
34463
34466
  //#endregion
34464
- //#region src/hooks/market/useMaxPositionSize.d.ts
34467
+ //#region src/hooks/options/useMaxPositionSize.d.ts
34465
34468
  declare const useMaxPositionSize: (marketAddr: Address | undefined, strikeTick?: number, maxBorrowableRange?: number) => {
34466
34469
  maxCallSize: Amount | undefined;
34467
34470
  maxPutSize: Amount | undefined;
34468
34471
  refetch: () => void;
34469
34472
  };
34470
34473
  //#endregion
34471
- //#region src/hooks/market/useMintOption.d.ts
34474
+ //#region src/hooks/options/useMintOption.d.ts
34472
34475
  declare const useMintOption: (marketAddr?: Address) => _tanstack_react_query0.UseMutationResult<`0x${string}`, Error, {
34473
34476
  optionType: "CALL" | "PUT";
34474
34477
  amount: bigint;
@@ -34476,13 +34479,13 @@ declare const useMintOption: (marketAddr?: Address) => _tanstack_react_query0.Us
34476
34479
  strikeTick?: number;
34477
34480
  }, unknown>;
34478
34481
  //#endregion
34479
- //#region src/hooks/market/useOptionPnl.d.ts
34482
+ //#region src/hooks/options/useOptionPnl.d.ts
34480
34483
  declare const useOptionPnl: (option: OptionData) => {
34481
34484
  unrealizedPayout: Amount | undefined;
34482
34485
  displayPnl: Amount | undefined;
34483
34486
  };
34484
34487
  //#endregion
34485
- //#region src/hooks/market/useOptionPremium.d.ts
34488
+ //#region src/hooks/options/useOptionPremium.d.ts
34486
34489
  declare const useOptionPremium: (marketAddr: Address | undefined, optionType: "CALL" | "PUT", optionAmount: bigint, addedDuration: number, remainingDuration?: number, strikeTick?: number) => {
34487
34490
  premium?: undefined;
34488
34491
  protocolFee?: undefined;
@@ -34493,422 +34496,13 @@ declare const useOptionPremium: (marketAddr: Address | undefined, optionType: "C
34493
34496
  totalPremium: Amount;
34494
34497
  };
34495
34498
  //#endregion
34496
- //#region src/hooks/market/useExtendOption.d.ts
34499
+ //#region src/hooks/options/useExtendOption.d.ts
34497
34500
  declare const useExtendOption: (marketAddr?: Address) => _tanstack_react_query0.UseMutationResult<`0x${string}`, Error, {
34498
34501
  option: OptionData;
34499
34502
  duration: number;
34500
34503
  }, unknown>;
34501
34504
  //#endregion
34502
- //#region src/hooks/market/useUserOperators.d.ts
34503
- declare const useUserOperators: (userAddr?: Address, marketAddr?: Address) => {
34504
- data: {
34505
- spendingApproval: bigint;
34506
- operatorAddr: string;
34507
- __typename: "UserMarketOperator";
34508
- id: string;
34509
- canExtend: boolean;
34510
- canExercise: boolean;
34511
- canTransfer: boolean;
34512
- canMint: boolean;
34513
- operator?: {
34514
- __typename: "MarketOperator";
34515
- address: string;
34516
- } | null;
34517
- }[];
34518
- error: Error;
34519
- isError: true;
34520
- isPending: false;
34521
- isLoading: false;
34522
- isLoadingError: false;
34523
- isRefetchError: true;
34524
- isSuccess: false;
34525
- isPlaceholderData: false;
34526
- status: "error";
34527
- dataUpdatedAt: number;
34528
- errorUpdatedAt: number;
34529
- failureCount: number;
34530
- failureReason: Error | null;
34531
- errorUpdateCount: number;
34532
- isFetched: boolean;
34533
- isFetchedAfterMount: boolean;
34534
- isFetching: boolean;
34535
- isInitialLoading: boolean;
34536
- isPaused: boolean;
34537
- isRefetching: boolean;
34538
- isStale: boolean;
34539
- isEnabled: boolean;
34540
- refetch: (options?: _tanstack_query_core17.RefetchOptions) => Promise<_tanstack_query_core17.QueryObserverResult<{
34541
- spendingApproval: bigint;
34542
- operatorAddr: string;
34543
- __typename: "UserMarketOperator";
34544
- id: string;
34545
- canExtend: boolean;
34546
- canExercise: boolean;
34547
- canTransfer: boolean;
34548
- canMint: boolean;
34549
- operator?: {
34550
- __typename: "MarketOperator";
34551
- address: string;
34552
- } | null;
34553
- }[] | undefined, Error>>;
34554
- fetchStatus: _tanstack_query_core17.FetchStatus;
34555
- promise: Promise<{
34556
- spendingApproval: bigint;
34557
- operatorAddr: string;
34558
- __typename: "UserMarketOperator";
34559
- id: string;
34560
- canExtend: boolean;
34561
- canExercise: boolean;
34562
- canTransfer: boolean;
34563
- canMint: boolean;
34564
- operator?: {
34565
- __typename: "MarketOperator";
34566
- address: string;
34567
- } | null;
34568
- }[] | undefined>;
34569
- } | {
34570
- data: {
34571
- spendingApproval: bigint;
34572
- operatorAddr: string;
34573
- __typename: "UserMarketOperator";
34574
- id: string;
34575
- canExtend: boolean;
34576
- canExercise: boolean;
34577
- canTransfer: boolean;
34578
- canMint: boolean;
34579
- operator?: {
34580
- __typename: "MarketOperator";
34581
- address: string;
34582
- } | null;
34583
- }[];
34584
- error: null;
34585
- isError: false;
34586
- isPending: false;
34587
- isLoading: false;
34588
- isLoadingError: false;
34589
- isRefetchError: false;
34590
- isSuccess: true;
34591
- isPlaceholderData: false;
34592
- status: "success";
34593
- dataUpdatedAt: number;
34594
- errorUpdatedAt: number;
34595
- failureCount: number;
34596
- failureReason: Error | null;
34597
- errorUpdateCount: number;
34598
- isFetched: boolean;
34599
- isFetchedAfterMount: boolean;
34600
- isFetching: boolean;
34601
- isInitialLoading: boolean;
34602
- isPaused: boolean;
34603
- isRefetching: boolean;
34604
- isStale: boolean;
34605
- isEnabled: boolean;
34606
- refetch: (options?: _tanstack_query_core17.RefetchOptions) => Promise<_tanstack_query_core17.QueryObserverResult<{
34607
- spendingApproval: bigint;
34608
- operatorAddr: string;
34609
- __typename: "UserMarketOperator";
34610
- id: string;
34611
- canExtend: boolean;
34612
- canExercise: boolean;
34613
- canTransfer: boolean;
34614
- canMint: boolean;
34615
- operator?: {
34616
- __typename: "MarketOperator";
34617
- address: string;
34618
- } | null;
34619
- }[] | undefined, Error>>;
34620
- fetchStatus: _tanstack_query_core17.FetchStatus;
34621
- promise: Promise<{
34622
- spendingApproval: bigint;
34623
- operatorAddr: string;
34624
- __typename: "UserMarketOperator";
34625
- id: string;
34626
- canExtend: boolean;
34627
- canExercise: boolean;
34628
- canTransfer: boolean;
34629
- canMint: boolean;
34630
- operator?: {
34631
- __typename: "MarketOperator";
34632
- address: string;
34633
- } | null;
34634
- }[] | undefined>;
34635
- } | {
34636
- data: {
34637
- spendingApproval: bigint;
34638
- operatorAddr: string;
34639
- __typename: "UserMarketOperator";
34640
- id: string;
34641
- canExtend: boolean;
34642
- canExercise: boolean;
34643
- canTransfer: boolean;
34644
- canMint: boolean;
34645
- operator?: {
34646
- __typename: "MarketOperator";
34647
- address: string;
34648
- } | null;
34649
- }[];
34650
- error: Error;
34651
- isError: true;
34652
- isPending: false;
34653
- isLoading: false;
34654
- isLoadingError: true;
34655
- isRefetchError: false;
34656
- isSuccess: false;
34657
- isPlaceholderData: false;
34658
- status: "error";
34659
- dataUpdatedAt: number;
34660
- errorUpdatedAt: number;
34661
- failureCount: number;
34662
- failureReason: Error | null;
34663
- errorUpdateCount: number;
34664
- isFetched: boolean;
34665
- isFetchedAfterMount: boolean;
34666
- isFetching: boolean;
34667
- isInitialLoading: boolean;
34668
- isPaused: boolean;
34669
- isRefetching: boolean;
34670
- isStale: boolean;
34671
- isEnabled: boolean;
34672
- refetch: (options?: _tanstack_query_core17.RefetchOptions) => Promise<_tanstack_query_core17.QueryObserverResult<{
34673
- spendingApproval: bigint;
34674
- operatorAddr: string;
34675
- __typename: "UserMarketOperator";
34676
- id: string;
34677
- canExtend: boolean;
34678
- canExercise: boolean;
34679
- canTransfer: boolean;
34680
- canMint: boolean;
34681
- operator?: {
34682
- __typename: "MarketOperator";
34683
- address: string;
34684
- } | null;
34685
- }[] | undefined, Error>>;
34686
- fetchStatus: _tanstack_query_core17.FetchStatus;
34687
- promise: Promise<{
34688
- spendingApproval: bigint;
34689
- operatorAddr: string;
34690
- __typename: "UserMarketOperator";
34691
- id: string;
34692
- canExtend: boolean;
34693
- canExercise: boolean;
34694
- canTransfer: boolean;
34695
- canMint: boolean;
34696
- operator?: {
34697
- __typename: "MarketOperator";
34698
- address: string;
34699
- } | null;
34700
- }[] | undefined>;
34701
- } | {
34702
- data: {
34703
- spendingApproval: bigint;
34704
- operatorAddr: string;
34705
- __typename: "UserMarketOperator";
34706
- id: string;
34707
- canExtend: boolean;
34708
- canExercise: boolean;
34709
- canTransfer: boolean;
34710
- canMint: boolean;
34711
- operator?: {
34712
- __typename: "MarketOperator";
34713
- address: string;
34714
- } | null;
34715
- }[];
34716
- error: null;
34717
- isError: false;
34718
- isPending: true;
34719
- isLoading: true;
34720
- isLoadingError: false;
34721
- isRefetchError: false;
34722
- isSuccess: false;
34723
- isPlaceholderData: false;
34724
- status: "pending";
34725
- dataUpdatedAt: number;
34726
- errorUpdatedAt: number;
34727
- failureCount: number;
34728
- failureReason: Error | null;
34729
- errorUpdateCount: number;
34730
- isFetched: boolean;
34731
- isFetchedAfterMount: boolean;
34732
- isFetching: boolean;
34733
- isInitialLoading: boolean;
34734
- isPaused: boolean;
34735
- isRefetching: boolean;
34736
- isStale: boolean;
34737
- isEnabled: boolean;
34738
- refetch: (options?: _tanstack_query_core17.RefetchOptions) => Promise<_tanstack_query_core17.QueryObserverResult<{
34739
- spendingApproval: bigint;
34740
- operatorAddr: string;
34741
- __typename: "UserMarketOperator";
34742
- id: string;
34743
- canExtend: boolean;
34744
- canExercise: boolean;
34745
- canTransfer: boolean;
34746
- canMint: boolean;
34747
- operator?: {
34748
- __typename: "MarketOperator";
34749
- address: string;
34750
- } | null;
34751
- }[] | undefined, Error>>;
34752
- fetchStatus: _tanstack_query_core17.FetchStatus;
34753
- promise: Promise<{
34754
- spendingApproval: bigint;
34755
- operatorAddr: string;
34756
- __typename: "UserMarketOperator";
34757
- id: string;
34758
- canExtend: boolean;
34759
- canExercise: boolean;
34760
- canTransfer: boolean;
34761
- canMint: boolean;
34762
- operator?: {
34763
- __typename: "MarketOperator";
34764
- address: string;
34765
- } | null;
34766
- }[] | undefined>;
34767
- } | {
34768
- data: {
34769
- spendingApproval: bigint;
34770
- operatorAddr: string;
34771
- __typename: "UserMarketOperator";
34772
- id: string;
34773
- canExtend: boolean;
34774
- canExercise: boolean;
34775
- canTransfer: boolean;
34776
- canMint: boolean;
34777
- operator?: {
34778
- __typename: "MarketOperator";
34779
- address: string;
34780
- } | null;
34781
- }[];
34782
- error: null;
34783
- isError: false;
34784
- isPending: true;
34785
- isLoadingError: false;
34786
- isRefetchError: false;
34787
- isSuccess: false;
34788
- isPlaceholderData: false;
34789
- status: "pending";
34790
- dataUpdatedAt: number;
34791
- errorUpdatedAt: number;
34792
- failureCount: number;
34793
- failureReason: Error | null;
34794
- errorUpdateCount: number;
34795
- isFetched: boolean;
34796
- isFetchedAfterMount: boolean;
34797
- isFetching: boolean;
34798
- isLoading: boolean;
34799
- isInitialLoading: boolean;
34800
- isPaused: boolean;
34801
- isRefetching: boolean;
34802
- isStale: boolean;
34803
- isEnabled: boolean;
34804
- refetch: (options?: _tanstack_query_core17.RefetchOptions) => Promise<_tanstack_query_core17.QueryObserverResult<{
34805
- spendingApproval: bigint;
34806
- operatorAddr: string;
34807
- __typename: "UserMarketOperator";
34808
- id: string;
34809
- canExtend: boolean;
34810
- canExercise: boolean;
34811
- canTransfer: boolean;
34812
- canMint: boolean;
34813
- operator?: {
34814
- __typename: "MarketOperator";
34815
- address: string;
34816
- } | null;
34817
- }[] | undefined, Error>>;
34818
- fetchStatus: _tanstack_query_core17.FetchStatus;
34819
- promise: Promise<{
34820
- spendingApproval: bigint;
34821
- operatorAddr: string;
34822
- __typename: "UserMarketOperator";
34823
- id: string;
34824
- canExtend: boolean;
34825
- canExercise: boolean;
34826
- canTransfer: boolean;
34827
- canMint: boolean;
34828
- operator?: {
34829
- __typename: "MarketOperator";
34830
- address: string;
34831
- } | null;
34832
- }[] | undefined>;
34833
- } | {
34834
- data: {
34835
- spendingApproval: bigint;
34836
- operatorAddr: string;
34837
- __typename: "UserMarketOperator";
34838
- id: string;
34839
- canExtend: boolean;
34840
- canExercise: boolean;
34841
- canTransfer: boolean;
34842
- canMint: boolean;
34843
- operator?: {
34844
- __typename: "MarketOperator";
34845
- address: string;
34846
- } | null;
34847
- }[];
34848
- isError: false;
34849
- error: null;
34850
- isPending: false;
34851
- isLoading: false;
34852
- isLoadingError: false;
34853
- isRefetchError: false;
34854
- isSuccess: true;
34855
- isPlaceholderData: true;
34856
- status: "success";
34857
- dataUpdatedAt: number;
34858
- errorUpdatedAt: number;
34859
- failureCount: number;
34860
- failureReason: Error | null;
34861
- errorUpdateCount: number;
34862
- isFetched: boolean;
34863
- isFetchedAfterMount: boolean;
34864
- isFetching: boolean;
34865
- isInitialLoading: boolean;
34866
- isPaused: boolean;
34867
- isRefetching: boolean;
34868
- isStale: boolean;
34869
- isEnabled: boolean;
34870
- refetch: (options?: _tanstack_query_core17.RefetchOptions) => Promise<_tanstack_query_core17.QueryObserverResult<{
34871
- spendingApproval: bigint;
34872
- operatorAddr: string;
34873
- __typename: "UserMarketOperator";
34874
- id: string;
34875
- canExtend: boolean;
34876
- canExercise: boolean;
34877
- canTransfer: boolean;
34878
- canMint: boolean;
34879
- operator?: {
34880
- __typename: "MarketOperator";
34881
- address: string;
34882
- } | null;
34883
- }[] | undefined, Error>>;
34884
- fetchStatus: _tanstack_query_core17.FetchStatus;
34885
- promise: Promise<{
34886
- spendingApproval: bigint;
34887
- operatorAddr: string;
34888
- __typename: "UserMarketOperator";
34889
- id: string;
34890
- canExtend: boolean;
34891
- canExercise: boolean;
34892
- canTransfer: boolean;
34893
- canMint: boolean;
34894
- operator?: {
34895
- __typename: "MarketOperator";
34896
- address: string;
34897
- } | null;
34898
- }[] | undefined>;
34899
- };
34900
- //#endregion
34901
- //#region src/hooks/market/useSetOperatorPerms.d.ts
34902
- declare const useSetOperatorPerms: (marketAddr?: Address) => _tanstack_react_query0.UseMutationResult<`0x${string}`, Error, {
34903
- operator: Address;
34904
- canExtend: boolean;
34905
- canExercise: boolean;
34906
- canTransfer: boolean;
34907
- canMint: boolean;
34908
- spendingApproval: bigint;
34909
- }, unknown>;
34910
- //#endregion
34911
- //#region src/hooks/market/useOptionTimeline.d.ts
34505
+ //#region src/hooks/options/useOptionTimeline.d.ts
34912
34506
  type OptionTimelineData = ReturnType<typeof useOptionTimeline>['data'];
34913
34507
  declare const useOptionTimeline: (marketAddr?: Address, optionId?: bigint) => {
34914
34508
  error: Error;
@@ -35758,6 +35352,489 @@ declare const useOptionTimeline: (marketAddr?: Address, optionId?: bigint) => {
35758
35352
  })[];
35759
35353
  };
35760
35354
  //#endregion
35355
+ //#region src/hooks/perps/useMintPerp.d.ts
35356
+ declare const useMintPerp: (marketAddr?: Address) => _tanstack_react_query0.UseMutationResult<void, Error, {
35357
+ optionType: "CALL" | "PUT";
35358
+ amount: bigint;
35359
+ duration: number;
35360
+ strikeTick?: number;
35361
+ }, unknown>;
35362
+ //#endregion
35363
+ //#region src/lib/perpsOperator.d.ts
35364
+ type MintPerpBody = {
35365
+ marketAddr: Address;
35366
+ userAddr: Address;
35367
+ optionType: 'CALL' | 'PUT';
35368
+ amount: bigint;
35369
+ duration: number;
35370
+ strikeTick: number;
35371
+ };
35372
+ type ExercisePerpBody = {
35373
+ userAddr: Address;
35374
+ marketAddr: Address;
35375
+ optionId: bigint;
35376
+ liquidities: bigint[];
35377
+ };
35378
+ declare class PerpsOperator {
35379
+ #private;
35380
+ private baseUrl;
35381
+ constructor(baseUrl: string);
35382
+ getOperatorAddr(): Promise<Address>;
35383
+ getUserPerps(userAddr: Address, marketAddr?: Address, type?: 'active' | 'closed', offset?: number, limit?: number): Promise<{
35384
+ optionId: bigint;
35385
+ id: string;
35386
+ ownerAddr: Address;
35387
+ marketAddr: Address;
35388
+ perpDuration: number;
35389
+ expiresAt: number;
35390
+ closed: boolean;
35391
+ }[]>;
35392
+ mintPerp(body: MintPerpBody): Promise<{
35393
+ txHash: string;
35394
+ optionId: bigint;
35395
+ }>;
35396
+ exercisePerp(body: ExercisePerpBody): Promise<{
35397
+ txHash: string;
35398
+ optionId: bigint;
35399
+ }>;
35400
+ }
35401
+ //#endregion
35402
+ //#region src/hooks/perps/useClosePerp.d.ts
35403
+ declare const useClosePerp: () => _tanstack_react_query0.UseMutationResult<{
35404
+ txHash: string;
35405
+ optionId: bigint;
35406
+ }, Error, ExercisePerpBody, unknown>;
35407
+ //#endregion
35408
+ //#region src/hooks/perps/usePerpsOperator.d.ts
35409
+ declare const usePerpsOperator: () => {
35410
+ operator: PerpsOperator | undefined;
35411
+ address: `0x${string}` | undefined;
35412
+ };
35413
+ //#endregion
35414
+ //#region src/hooks/operators/useUserOperators.d.ts
35415
+ declare const useUserOperators: (userAddr?: Address, marketAddr?: Address) => {
35416
+ data: {
35417
+ spendingApproval: bigint;
35418
+ operatorAddr: string;
35419
+ __typename: "UserMarketOperator";
35420
+ id: string;
35421
+ canExtend: boolean;
35422
+ canExercise: boolean;
35423
+ canTransfer: boolean;
35424
+ canMint: boolean;
35425
+ operator?: {
35426
+ __typename: "MarketOperator";
35427
+ address: string;
35428
+ } | null;
35429
+ }[];
35430
+ error: Error;
35431
+ isError: true;
35432
+ isPending: false;
35433
+ isLoading: false;
35434
+ isLoadingError: false;
35435
+ isRefetchError: true;
35436
+ isSuccess: false;
35437
+ isPlaceholderData: false;
35438
+ status: "error";
35439
+ dataUpdatedAt: number;
35440
+ errorUpdatedAt: number;
35441
+ failureCount: number;
35442
+ failureReason: Error | null;
35443
+ errorUpdateCount: number;
35444
+ isFetched: boolean;
35445
+ isFetchedAfterMount: boolean;
35446
+ isFetching: boolean;
35447
+ isInitialLoading: boolean;
35448
+ isPaused: boolean;
35449
+ isRefetching: boolean;
35450
+ isStale: boolean;
35451
+ isEnabled: boolean;
35452
+ refetch: (options?: _tanstack_query_core17.RefetchOptions) => Promise<_tanstack_query_core17.QueryObserverResult<{
35453
+ spendingApproval: bigint;
35454
+ operatorAddr: string;
35455
+ __typename: "UserMarketOperator";
35456
+ id: string;
35457
+ canExtend: boolean;
35458
+ canExercise: boolean;
35459
+ canTransfer: boolean;
35460
+ canMint: boolean;
35461
+ operator?: {
35462
+ __typename: "MarketOperator";
35463
+ address: string;
35464
+ } | null;
35465
+ }[] | undefined, Error>>;
35466
+ fetchStatus: _tanstack_query_core17.FetchStatus;
35467
+ promise: Promise<{
35468
+ spendingApproval: bigint;
35469
+ operatorAddr: string;
35470
+ __typename: "UserMarketOperator";
35471
+ id: string;
35472
+ canExtend: boolean;
35473
+ canExercise: boolean;
35474
+ canTransfer: boolean;
35475
+ canMint: boolean;
35476
+ operator?: {
35477
+ __typename: "MarketOperator";
35478
+ address: string;
35479
+ } | null;
35480
+ }[] | undefined>;
35481
+ } | {
35482
+ data: {
35483
+ spendingApproval: bigint;
35484
+ operatorAddr: string;
35485
+ __typename: "UserMarketOperator";
35486
+ id: string;
35487
+ canExtend: boolean;
35488
+ canExercise: boolean;
35489
+ canTransfer: boolean;
35490
+ canMint: boolean;
35491
+ operator?: {
35492
+ __typename: "MarketOperator";
35493
+ address: string;
35494
+ } | null;
35495
+ }[];
35496
+ error: null;
35497
+ isError: false;
35498
+ isPending: false;
35499
+ isLoading: false;
35500
+ isLoadingError: false;
35501
+ isRefetchError: false;
35502
+ isSuccess: true;
35503
+ isPlaceholderData: false;
35504
+ status: "success";
35505
+ dataUpdatedAt: number;
35506
+ errorUpdatedAt: number;
35507
+ failureCount: number;
35508
+ failureReason: Error | null;
35509
+ errorUpdateCount: number;
35510
+ isFetched: boolean;
35511
+ isFetchedAfterMount: boolean;
35512
+ isFetching: boolean;
35513
+ isInitialLoading: boolean;
35514
+ isPaused: boolean;
35515
+ isRefetching: boolean;
35516
+ isStale: boolean;
35517
+ isEnabled: boolean;
35518
+ refetch: (options?: _tanstack_query_core17.RefetchOptions) => Promise<_tanstack_query_core17.QueryObserverResult<{
35519
+ spendingApproval: bigint;
35520
+ operatorAddr: string;
35521
+ __typename: "UserMarketOperator";
35522
+ id: string;
35523
+ canExtend: boolean;
35524
+ canExercise: boolean;
35525
+ canTransfer: boolean;
35526
+ canMint: boolean;
35527
+ operator?: {
35528
+ __typename: "MarketOperator";
35529
+ address: string;
35530
+ } | null;
35531
+ }[] | undefined, Error>>;
35532
+ fetchStatus: _tanstack_query_core17.FetchStatus;
35533
+ promise: Promise<{
35534
+ spendingApproval: bigint;
35535
+ operatorAddr: string;
35536
+ __typename: "UserMarketOperator";
35537
+ id: string;
35538
+ canExtend: boolean;
35539
+ canExercise: boolean;
35540
+ canTransfer: boolean;
35541
+ canMint: boolean;
35542
+ operator?: {
35543
+ __typename: "MarketOperator";
35544
+ address: string;
35545
+ } | null;
35546
+ }[] | undefined>;
35547
+ } | {
35548
+ data: {
35549
+ spendingApproval: bigint;
35550
+ operatorAddr: string;
35551
+ __typename: "UserMarketOperator";
35552
+ id: string;
35553
+ canExtend: boolean;
35554
+ canExercise: boolean;
35555
+ canTransfer: boolean;
35556
+ canMint: boolean;
35557
+ operator?: {
35558
+ __typename: "MarketOperator";
35559
+ address: string;
35560
+ } | null;
35561
+ }[];
35562
+ error: Error;
35563
+ isError: true;
35564
+ isPending: false;
35565
+ isLoading: false;
35566
+ isLoadingError: true;
35567
+ isRefetchError: false;
35568
+ isSuccess: false;
35569
+ isPlaceholderData: false;
35570
+ status: "error";
35571
+ dataUpdatedAt: number;
35572
+ errorUpdatedAt: number;
35573
+ failureCount: number;
35574
+ failureReason: Error | null;
35575
+ errorUpdateCount: number;
35576
+ isFetched: boolean;
35577
+ isFetchedAfterMount: boolean;
35578
+ isFetching: boolean;
35579
+ isInitialLoading: boolean;
35580
+ isPaused: boolean;
35581
+ isRefetching: boolean;
35582
+ isStale: boolean;
35583
+ isEnabled: boolean;
35584
+ refetch: (options?: _tanstack_query_core17.RefetchOptions) => Promise<_tanstack_query_core17.QueryObserverResult<{
35585
+ spendingApproval: bigint;
35586
+ operatorAddr: string;
35587
+ __typename: "UserMarketOperator";
35588
+ id: string;
35589
+ canExtend: boolean;
35590
+ canExercise: boolean;
35591
+ canTransfer: boolean;
35592
+ canMint: boolean;
35593
+ operator?: {
35594
+ __typename: "MarketOperator";
35595
+ address: string;
35596
+ } | null;
35597
+ }[] | undefined, Error>>;
35598
+ fetchStatus: _tanstack_query_core17.FetchStatus;
35599
+ promise: Promise<{
35600
+ spendingApproval: bigint;
35601
+ operatorAddr: string;
35602
+ __typename: "UserMarketOperator";
35603
+ id: string;
35604
+ canExtend: boolean;
35605
+ canExercise: boolean;
35606
+ canTransfer: boolean;
35607
+ canMint: boolean;
35608
+ operator?: {
35609
+ __typename: "MarketOperator";
35610
+ address: string;
35611
+ } | null;
35612
+ }[] | undefined>;
35613
+ } | {
35614
+ data: {
35615
+ spendingApproval: bigint;
35616
+ operatorAddr: string;
35617
+ __typename: "UserMarketOperator";
35618
+ id: string;
35619
+ canExtend: boolean;
35620
+ canExercise: boolean;
35621
+ canTransfer: boolean;
35622
+ canMint: boolean;
35623
+ operator?: {
35624
+ __typename: "MarketOperator";
35625
+ address: string;
35626
+ } | null;
35627
+ }[];
35628
+ error: null;
35629
+ isError: false;
35630
+ isPending: true;
35631
+ isLoading: true;
35632
+ isLoadingError: false;
35633
+ isRefetchError: false;
35634
+ isSuccess: false;
35635
+ isPlaceholderData: false;
35636
+ status: "pending";
35637
+ dataUpdatedAt: number;
35638
+ errorUpdatedAt: number;
35639
+ failureCount: number;
35640
+ failureReason: Error | null;
35641
+ errorUpdateCount: number;
35642
+ isFetched: boolean;
35643
+ isFetchedAfterMount: boolean;
35644
+ isFetching: boolean;
35645
+ isInitialLoading: boolean;
35646
+ isPaused: boolean;
35647
+ isRefetching: boolean;
35648
+ isStale: boolean;
35649
+ isEnabled: boolean;
35650
+ refetch: (options?: _tanstack_query_core17.RefetchOptions) => Promise<_tanstack_query_core17.QueryObserverResult<{
35651
+ spendingApproval: bigint;
35652
+ operatorAddr: string;
35653
+ __typename: "UserMarketOperator";
35654
+ id: string;
35655
+ canExtend: boolean;
35656
+ canExercise: boolean;
35657
+ canTransfer: boolean;
35658
+ canMint: boolean;
35659
+ operator?: {
35660
+ __typename: "MarketOperator";
35661
+ address: string;
35662
+ } | null;
35663
+ }[] | undefined, Error>>;
35664
+ fetchStatus: _tanstack_query_core17.FetchStatus;
35665
+ promise: Promise<{
35666
+ spendingApproval: bigint;
35667
+ operatorAddr: string;
35668
+ __typename: "UserMarketOperator";
35669
+ id: string;
35670
+ canExtend: boolean;
35671
+ canExercise: boolean;
35672
+ canTransfer: boolean;
35673
+ canMint: boolean;
35674
+ operator?: {
35675
+ __typename: "MarketOperator";
35676
+ address: string;
35677
+ } | null;
35678
+ }[] | undefined>;
35679
+ } | {
35680
+ data: {
35681
+ spendingApproval: bigint;
35682
+ operatorAddr: string;
35683
+ __typename: "UserMarketOperator";
35684
+ id: string;
35685
+ canExtend: boolean;
35686
+ canExercise: boolean;
35687
+ canTransfer: boolean;
35688
+ canMint: boolean;
35689
+ operator?: {
35690
+ __typename: "MarketOperator";
35691
+ address: string;
35692
+ } | null;
35693
+ }[];
35694
+ error: null;
35695
+ isError: false;
35696
+ isPending: true;
35697
+ isLoadingError: false;
35698
+ isRefetchError: false;
35699
+ isSuccess: false;
35700
+ isPlaceholderData: false;
35701
+ status: "pending";
35702
+ dataUpdatedAt: number;
35703
+ errorUpdatedAt: number;
35704
+ failureCount: number;
35705
+ failureReason: Error | null;
35706
+ errorUpdateCount: number;
35707
+ isFetched: boolean;
35708
+ isFetchedAfterMount: boolean;
35709
+ isFetching: boolean;
35710
+ isLoading: boolean;
35711
+ isInitialLoading: boolean;
35712
+ isPaused: boolean;
35713
+ isRefetching: boolean;
35714
+ isStale: boolean;
35715
+ isEnabled: boolean;
35716
+ refetch: (options?: _tanstack_query_core17.RefetchOptions) => Promise<_tanstack_query_core17.QueryObserverResult<{
35717
+ spendingApproval: bigint;
35718
+ operatorAddr: string;
35719
+ __typename: "UserMarketOperator";
35720
+ id: string;
35721
+ canExtend: boolean;
35722
+ canExercise: boolean;
35723
+ canTransfer: boolean;
35724
+ canMint: boolean;
35725
+ operator?: {
35726
+ __typename: "MarketOperator";
35727
+ address: string;
35728
+ } | null;
35729
+ }[] | undefined, Error>>;
35730
+ fetchStatus: _tanstack_query_core17.FetchStatus;
35731
+ promise: Promise<{
35732
+ spendingApproval: bigint;
35733
+ operatorAddr: string;
35734
+ __typename: "UserMarketOperator";
35735
+ id: string;
35736
+ canExtend: boolean;
35737
+ canExercise: boolean;
35738
+ canTransfer: boolean;
35739
+ canMint: boolean;
35740
+ operator?: {
35741
+ __typename: "MarketOperator";
35742
+ address: string;
35743
+ } | null;
35744
+ }[] | undefined>;
35745
+ } | {
35746
+ data: {
35747
+ spendingApproval: bigint;
35748
+ operatorAddr: string;
35749
+ __typename: "UserMarketOperator";
35750
+ id: string;
35751
+ canExtend: boolean;
35752
+ canExercise: boolean;
35753
+ canTransfer: boolean;
35754
+ canMint: boolean;
35755
+ operator?: {
35756
+ __typename: "MarketOperator";
35757
+ address: string;
35758
+ } | null;
35759
+ }[];
35760
+ isError: false;
35761
+ error: null;
35762
+ isPending: false;
35763
+ isLoading: false;
35764
+ isLoadingError: false;
35765
+ isRefetchError: false;
35766
+ isSuccess: true;
35767
+ isPlaceholderData: true;
35768
+ status: "success";
35769
+ dataUpdatedAt: number;
35770
+ errorUpdatedAt: number;
35771
+ failureCount: number;
35772
+ failureReason: Error | null;
35773
+ errorUpdateCount: number;
35774
+ isFetched: boolean;
35775
+ isFetchedAfterMount: boolean;
35776
+ isFetching: boolean;
35777
+ isInitialLoading: boolean;
35778
+ isPaused: boolean;
35779
+ isRefetching: boolean;
35780
+ isStale: boolean;
35781
+ isEnabled: boolean;
35782
+ refetch: (options?: _tanstack_query_core17.RefetchOptions) => Promise<_tanstack_query_core17.QueryObserverResult<{
35783
+ spendingApproval: bigint;
35784
+ operatorAddr: string;
35785
+ __typename: "UserMarketOperator";
35786
+ id: string;
35787
+ canExtend: boolean;
35788
+ canExercise: boolean;
35789
+ canTransfer: boolean;
35790
+ canMint: boolean;
35791
+ operator?: {
35792
+ __typename: "MarketOperator";
35793
+ address: string;
35794
+ } | null;
35795
+ }[] | undefined, Error>>;
35796
+ fetchStatus: _tanstack_query_core17.FetchStatus;
35797
+ promise: Promise<{
35798
+ spendingApproval: bigint;
35799
+ operatorAddr: string;
35800
+ __typename: "UserMarketOperator";
35801
+ id: string;
35802
+ canExtend: boolean;
35803
+ canExercise: boolean;
35804
+ canTransfer: boolean;
35805
+ canMint: boolean;
35806
+ operator?: {
35807
+ __typename: "MarketOperator";
35808
+ address: string;
35809
+ } | null;
35810
+ }[] | undefined>;
35811
+ };
35812
+ //#endregion
35813
+ //#region src/hooks/operators/useSetOperatorPerms.d.ts
35814
+ declare const useSetOperatorPerms: (marketAddr?: Address) => _tanstack_react_query0.UseMutationResult<`0x${string}`, Error, {
35815
+ operator: Address;
35816
+ canExtend: boolean;
35817
+ canExercise: boolean;
35818
+ canTransfer: boolean;
35819
+ canMint: boolean;
35820
+ spendingApproval: bigint;
35821
+ }, unknown>;
35822
+ //#endregion
35823
+ //#region src/lib/price.d.ts
35824
+ interface PriceData {
35825
+ currentPrice: number;
35826
+ percentChange: number;
35827
+ poolAddress: string;
35828
+ timestamp: number;
35829
+ }
35830
+ interface PriceDataPoint {
35831
+ timestamp: Date;
35832
+ price: number;
35833
+ }
35834
+ type PriceResolution = '1m' | '5m' | '15m' | '1h' | '4h' | '1d';
35835
+ declare const getPriceHistory: (poolAddress: string, resolution: PriceResolution, start: Date, end: Date) => Promise<PriceDataPoint[]>;
35836
+ declare const getCurrentPrice: (poolAddress: string) => Promise<PriceData>;
35837
+ //#endregion
35761
35838
  //#region src/lib/liquidityUtils.d.ts
35762
35839
  declare const PRICE_PRECISION: bigint;
35763
35840
  declare const getPriceAtTick: (tick: number) => bigint;
@@ -35809,13 +35886,6 @@ declare const usePoolData: (poolAddr?: Address) => Partial<NonUndefined<{
35809
35886
  //#region src/hooks/pool/usePriceAtTick.d.ts
35810
35887
  declare const usePriceAtTick: (tick?: number, poolAddr?: Address) => Amount | undefined;
35811
35888
  //#endregion
35812
- //#region src/lib/price.d.ts
35813
- interface PriceDataPoint {
35814
- timestamp: Date;
35815
- price: number;
35816
- }
35817
- type PriceResolution = '1m' | '5m' | '15m' | '1h' | '4h' | '1d';
35818
- //#endregion
35819
35889
  //#region src/hooks/pool/usePriceHistory.d.ts
35820
35890
  declare const usePriceHistory: (pool: Address | undefined, resolution: PriceResolution, startTimestamp: Date, endTimestamp: Date) => _tanstack_react_query0.UseQueryResult<PriceDataPoint[], Error>;
35821
35891
  //#endregion
@@ -62565,5 +62635,5 @@ declare const useApproval: () => {
62565
62635
  reset: () => void;
62566
62636
  };
62567
62637
  //#endregion
62568
- export { useMarketData as $, useOptionTimeline as A, formatAmount as B, liquiditiesToAmount1 as C, token0ToToken1 as D, roundTickUp as E, useOptionPnl as F, scalePrice as G, formatUSD as H, useMintOption as I, wrapAmount as J, unscaleAmount as K, useMaxPositionSize as L, useUserOperators as M, useExtendOption as N, token1ToToken0 as O, useOptionPremium as P, zero as Q, Amount as R, liquiditiesToAmount0 as S, roundTickDown as T, formatVagueAmount as U, formatCondensed as V, scaleAmount as W, wrapPrice as X, wrapAmountUnscaled as Y, wrapPriceUnscaled as Z, PRICE_PRECISION as _, batchGetAmountsFromLiquidity as a, useCurrentMarket as at, getPriceAtTick as b, useLiquidityBlocks as c, TimelockMarket as ct, usePriceAtTick as d, getErc20 as dt, useExerciseOption as et, UniswapPoolData as f, getTimelockLens as ft, getPayoutAtTick as g, uniswapMathLenses as gt, useCurrentPrice as h, timelockLenses as ht, useVaultData as i, TimelockMarketProvider as it, useSetOperatorPerms as j, OptionTimelineData as k, useBurnLiquidity as l, TimelockMarketData as lt, useCurrentTick as m, getUniswapMathLens as mt, useLens as n, useActiveUserOptions as nt, useMintLiquidity as o, useTimelockConfig as ot, usePoolData as p, getTimelockMarket as pt, unscalePrice as q, useVaultTVL as r, useClosedUserOptions as rt, LiquidityBlockData as s, TimelockLens as st, useApproval as t, OptionData as tt, usePriceHistory as u, UniswapMathLens as ut, getAmountsFromLiquidity as v, liquiditiesToAmounts as w, getTickAtPrice as x, getNearestValidStrikeTick as y, EMPTY_ARRAY as z };
62569
- //# sourceMappingURL=client-h7lO3ik2.d.cts.map
62638
+ export { scalePrice as $, PriceDataPoint as A, useOptionTimeline as B, liquiditiesToAmount1 as C, timelockLenses as Ct, token0ToToken1 as D, roundTickUp as E, useUserOperators as F, useMaxPositionSize as G, useOptionPremium as H, usePerpsOperator as I, formatAmount as J, Amount as K, useClosePerp as L, getCurrentPrice as M, getPriceHistory as N, token1ToToken0 as O, useSetOperatorPerms as P, scaleAmount as Q, useMintPerp as R, liquiditiesToAmount0 as S, getUniswapMathLens as St, roundTickDown as T, useOptionPnl as U, useExtendOption as V, useMintOption as W, formatUSD as X, formatCondensed as Y, formatVagueAmount as Z, PRICE_PRECISION as _, TimelockMarketData as _t, batchGetAmountsFromLiquidity as a, wrapPriceUnscaled as at, getPriceAtTick as b, getTimelockLens as bt, useLiquidityBlocks as c, useExerciseOption as ct, usePriceAtTick as d, useClosedUserOptions as dt, unscaleAmount as et, UniswapPoolData as f, TimelockProvider as ft, getPayoutAtTick as g, TimelockMarket as gt, useCurrentPrice as h, TimelockLens as ht, useVaultData as i, wrapPrice as it, PriceResolution as j, PriceData as k, useBurnLiquidity as l, OptionData as lt, useCurrentTick as m, useTimelockConfig as mt, useLens as n, wrapAmount as nt, useMintLiquidity as o, zero as ot, usePoolData as p, useCurrentMarket as pt, EMPTY_ARRAY as q, useVaultTVL as r, wrapAmountUnscaled as rt, LiquidityBlockData as s, useMarketData as st, useApproval as t, unscalePrice as tt, usePriceHistory as u, useActiveUserOptions as ut, getAmountsFromLiquidity as v, UniswapMathLens as vt, liquiditiesToAmounts as w, uniswapMathLenses as wt, getTickAtPrice as x, getTimelockMarket as xt, getNearestValidStrikeTick as y, getErc20 as yt, OptionTimelineData as z };
62639
+ //# sourceMappingURL=client-CPNANzx8.d.cts.map