timelock-sdk 0.0.110 → 0.0.111

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.
@@ -31824,6 +31824,53 @@ declare const getTimelockLens: (client: Client | PublicClient) => {
31824
31824
  declare const timelockLenses: Record<number, Address>;
31825
31825
  declare const uniswapMathLenses: Record<number, Address>;
31826
31826
  //#endregion
31827
+ //#region src/lib/perpsOperator.d.ts
31828
+ type MintPerpBody = {
31829
+ marketAddr: Address;
31830
+ optionType: 'CALL' | 'PUT';
31831
+ amount: bigint;
31832
+ duration: number;
31833
+ strikeTick: number;
31834
+ };
31835
+ type ExercisePerpBody = {
31836
+ marketAddr: Address;
31837
+ optionId: bigint;
31838
+ liquidities: bigint[];
31839
+ };
31840
+ declare class PerpsOperator {
31841
+ #private;
31842
+ auth?: {
31843
+ message: string;
31844
+ signature: Hex;
31845
+ };
31846
+ constructor(baseUrl: string);
31847
+ getOperatorAddr: () => Promise<Address>;
31848
+ genAuthMessage: (userAddr: Address) => Promise<string>;
31849
+ validateAuthMessage: (message: string, signature: Hex) => Promise<{
31850
+ address: `0x${string}`;
31851
+ createdAt: number;
31852
+ validUntil: number;
31853
+ }>;
31854
+ setAuth: (message: string, signature: Hex) => void;
31855
+ getUserPerps: (userAddr: Address, marketAddr?: Address, type?: "active" | "closed", offset?: number, limit?: number) => Promise<{
31856
+ optionId: bigint;
31857
+ id: string;
31858
+ ownerAddr: Address;
31859
+ marketAddr: Address;
31860
+ perpDuration: number;
31861
+ expiresAt: number;
31862
+ closed: boolean;
31863
+ }[]>;
31864
+ mintPerp: (body: MintPerpBody) => Promise<{
31865
+ txHash: string;
31866
+ optionId: bigint;
31867
+ }>;
31868
+ exercisePerp: (body: ExercisePerpBody) => Promise<{
31869
+ txHash: string;
31870
+ optionId: bigint;
31871
+ }>;
31872
+ }
31873
+ //#endregion
31827
31874
  //#region src/providers/TimelockProvider.d.ts
31828
31875
  type TimelockContextValue = {
31829
31876
  marketData: Partial<TimelockMarketData>;
@@ -31831,6 +31878,7 @@ type TimelockContextValue = {
31831
31878
  uniswapMathLensAddr?: Address;
31832
31879
  envioGraphqlUrl?: string;
31833
31880
  graphqlClient?: ReturnType<typeof getSdk>;
31881
+ perpsOperator?: PerpsOperator;
31834
31882
  perpsOperatorUrl?: string;
31835
31883
  };
31836
31884
  declare const TimelockProvider: ({
@@ -34904,53 +34952,6 @@ declare const useMintPerp: (marketAddr?: Address) => _tanstack_react_query0.UseM
34904
34952
  strikeTick?: number;
34905
34953
  }, unknown>;
34906
34954
  //#endregion
34907
- //#region src/lib/perpsOperator.d.ts
34908
- type MintPerpBody = {
34909
- marketAddr: Address;
34910
- optionType: 'CALL' | 'PUT';
34911
- amount: bigint;
34912
- duration: number;
34913
- strikeTick: number;
34914
- };
34915
- type ExercisePerpBody = {
34916
- marketAddr: Address;
34917
- optionId: bigint;
34918
- liquidities: bigint[];
34919
- };
34920
- declare class PerpsOperator {
34921
- #private;
34922
- auth?: {
34923
- message: string;
34924
- signature: Hex;
34925
- };
34926
- constructor(baseUrl: string);
34927
- getOperatorAddr: () => Promise<Address>;
34928
- genAuthMessage: (userAddr: Address) => Promise<string>;
34929
- validateAuthMessage: (message: string, signature: Hex) => Promise<{
34930
- address: `0x${string}`;
34931
- createdAt: number;
34932
- validUntil: number;
34933
- }>;
34934
- setAuth: (message: string, signature: Hex) => void;
34935
- getUserPerps: (userAddr: Address, marketAddr?: Address, type?: "active" | "closed", offset?: number, limit?: number) => Promise<{
34936
- optionId: bigint;
34937
- id: string;
34938
- ownerAddr: Address;
34939
- marketAddr: Address;
34940
- perpDuration: number;
34941
- expiresAt: number;
34942
- closed: boolean;
34943
- }[]>;
34944
- mintPerp: (body: MintPerpBody) => Promise<{
34945
- txHash: string;
34946
- optionId: bigint;
34947
- }>;
34948
- exercisePerp: (body: ExercisePerpBody) => Promise<{
34949
- txHash: string;
34950
- optionId: bigint;
34951
- }>;
34952
- }
34953
- //#endregion
34954
34955
  //#region src/hooks/perps/useClosePerp.d.ts
34955
34956
  declare const useClosePerp: () => _tanstack_react_query0.UseMutationResult<void, Error, ExercisePerpBody, unknown>;
34956
34957
  //#endregion
@@ -62851,4 +62852,4 @@ declare const useApproval: () => {
62851
62852
  };
62852
62853
  //#endregion
62853
62854
  export { formatCondensed as $, PriceDataPoint as A, usePerpsOperator as B, liquiditiesToAmount1 as C, getErc20 as Ct, token0ToToken1 as D, timelockLenses as Dt, roundTickUp as E, getUniswapMathLens as Et, useUserOperators as F, useExtendOption as G, useMintPerp as H, useOperatorPerms as I, useMintOption as J, useOptionPremium as K, useActiveUserPerps as L, getCurrentPrice as M, getPriceHistory as N, token1ToToken0 as O, uniswapMathLenses as Ot, useSetOperatorPerms as P, formatAmount as Q, useClosedUserPerps as R, liquiditiesToAmount0 as S, UniswapMathLens as St, roundTickDown as T, getTimelockMarket as Tt, OptionTimelineData as U, useClosePerp as V, useOptionTimeline as W, Amount as X, useMaxPositionSize as Y, EMPTY_ARRAY as Z, PRICE_PRECISION as _, useCurrentMarket as _t, batchGetAmountsFromLiquidity as a, unscalePrice as at, getPriceAtTick as b, TimelockMarket as bt, useLiquidityBlocks as c, wrapPrice as ct, usePriceAtTick as d, useMarketData as dt, formatUSD as et, UniswapPoolData as f, useExerciseOption as ft, getPayoutAtTick as g, TimelockProvider as gt, useCurrentPrice as h, useClosedUserOptions as ht, useVaultData as i, unscaleAmount as it, PriceResolution as j, PriceData as k, useBurnLiquidity as l, wrapPriceUnscaled as lt, useCurrentTick as m, useActiveUserOptions as mt, useLens as n, scaleAmount as nt, useMintLiquidity as o, wrapAmount as ot, usePoolData as p, OptionData as pt, useOptionPnl as q, useVaultTVL as r, scalePrice as rt, LiquidityBlockData as s, wrapAmountUnscaled as st, useApproval as t, formatVagueAmount as tt, usePriceHistory as u, zero as ut, getAmountsFromLiquidity as v, useTimelockConfig as vt, liquiditiesToAmounts as w, getTimelockLens as wt, getTickAtPrice as x, TimelockMarketData as xt, getNearestValidStrikeTick as y, TimelockLens as yt, useUserPerps as z };
62854
- //# sourceMappingURL=client-61tvmrlq.d.cts.map
62855
+ //# sourceMappingURL=client-BioBT1mO.d.cts.map