@tokemak/queries 0.7.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/functions/getAutopools.d.ts +3 -1
  2. package/dist/functions/getAutopools.d.ts.map +1 -1
  3. package/dist/functions/getDeprecatedAutopools.d.ts +347 -0
  4. package/dist/functions/getDeprecatedAutopools.d.ts.map +1 -0
  5. package/dist/functions/getEthAutoLP.d.ts +1 -1
  6. package/dist/functions/getEthAutoLP.d.ts.map +1 -1
  7. package/dist/functions/getUniV4Pool.d.ts +13 -17
  8. package/dist/functions/getUniV4Pool.d.ts.map +1 -1
  9. package/dist/functions/getUserUniV4Positions.d.ts +1 -0
  10. package/dist/functions/getUserUniV4Positions.d.ts.map +1 -1
  11. package/dist/functions/index.d.ts +3 -23
  12. package/dist/functions/index.d.ts.map +1 -1
  13. package/dist/functions/uniV4Subgraph.d.ts +45 -0
  14. package/dist/functions/uniV4Subgraph.d.ts.map +1 -0
  15. package/dist/index.js +419 -1714
  16. package/dist/index.mjs +291 -1589
  17. package/dist/safe.js +12 -8
  18. package/dist/safe.mjs +8 -4
  19. package/dist/utils/getChainsForEnv.d.ts +12 -3
  20. package/dist/utils/getChainsForEnv.d.ts.map +1 -1
  21. package/package.json +7 -7
  22. package/dist/functions/getAllowance.d.ts +0 -8
  23. package/dist/functions/getAllowance.d.ts.map +0 -1
  24. package/dist/functions/getAutopoolsRebalances.d.ts +0 -53
  25. package/dist/functions/getAutopoolsRebalances.d.ts.map +0 -1
  26. package/dist/functions/getChainCycleRolloverBlockNumber.d.ts +0 -7
  27. package/dist/functions/getChainCycleRolloverBlockNumber.d.ts.map +0 -1
  28. package/dist/functions/getChainSToke.d.ts +0 -15
  29. package/dist/functions/getChainSToke.d.ts.map +0 -1
  30. package/dist/functions/getChainSTokeRewards.d.ts +0 -16
  31. package/dist/functions/getChainSTokeRewards.d.ts.map +0 -1
  32. package/dist/functions/getChainUserSToke.d.ts +0 -33
  33. package/dist/functions/getChainUserSToke.d.ts.map +0 -1
  34. package/dist/functions/getChainUserSTokeRewards.d.ts +0 -30
  35. package/dist/functions/getChainUserSTokeRewards.d.ts.map +0 -1
  36. package/dist/functions/getCombinedRewards.d.ts +0 -11
  37. package/dist/functions/getCombinedRewards.d.ts.map +0 -1
  38. package/dist/functions/getCurveLP.d.ts +0 -3
  39. package/dist/functions/getCurveLP.d.ts.map +0 -1
  40. package/dist/functions/getCycleV1.d.ts +0 -10
  41. package/dist/functions/getCycleV1.d.ts.map +0 -1
  42. package/dist/functions/getEthPrice.d.ts +0 -2
  43. package/dist/functions/getEthPrice.d.ts.map +0 -1
  44. package/dist/functions/getLayerzeroStatus.d.ts +0 -24
  45. package/dist/functions/getLayerzeroStatus.d.ts.map +0 -1
  46. package/dist/functions/getMultipleAutopoolRebalances.d.ts +0 -54
  47. package/dist/functions/getMultipleAutopoolRebalances.d.ts.map +0 -1
  48. package/dist/functions/getProtocolStats.d.ts +0 -41
  49. package/dist/functions/getProtocolStats.d.ts.map +0 -1
  50. package/dist/functions/getSToke.d.ts +0 -23
  51. package/dist/functions/getSToke.d.ts.map +0 -1
  52. package/dist/functions/getSTokeRewards.d.ts +0 -22
  53. package/dist/functions/getSTokeRewards.d.ts.map +0 -1
  54. package/dist/functions/getSushiLP.d.ts +0 -14
  55. package/dist/functions/getSushiLP.d.ts.map +0 -1
  56. package/dist/functions/getTokenList.d.ts +0 -3
  57. package/dist/functions/getTokenList.d.ts.map +0 -1
  58. package/dist/functions/getUserCurveLP.d.ts +0 -16
  59. package/dist/functions/getUserCurveLP.d.ts.map +0 -1
  60. package/dist/functions/getUserSToke.d.ts +0 -40
  61. package/dist/functions/getUserSToke.d.ts.map +0 -1
  62. package/dist/functions/getUserSTokeRewards.d.ts +0 -38
  63. package/dist/functions/getUserSTokeRewards.d.ts.map +0 -1
  64. package/dist/functions/getUserSushiLP.d.ts +0 -23
  65. package/dist/functions/getUserSushiLP.d.ts.map +0 -1
  66. package/dist/functions/getUserV1.d.ts +0 -18
  67. package/dist/functions/getUserV1.d.ts.map +0 -1
package/dist/safe.js CHANGED
@@ -57,12 +57,16 @@ function mergeArrays(objectsArray, objectsToMergeArray) {
57
57
 
58
58
  // utils/getChainsForEnv.ts
59
59
  var import_constants = require("@tokemak/constants");
60
+ var import_config = require("@tokemak/config");
60
61
  function getChainsForEnv({
61
- includeTestnet = false
62
+ includeTestnet = false,
63
+ status = "all"
62
64
  }) {
63
- let chains;
64
- chains = includeTestnet ? [...import_constants.SUPPORTED_DEV_CHAINS] : [...import_constants.SUPPORTED_PROD_CHAINS];
65
- return chains;
65
+ const base = includeTestnet ? [...import_constants.SUPPORTED_DEV_CHAINS] : [...import_constants.SUPPORTED_PROD_CHAINS];
66
+ if (status === "all") return base;
67
+ return base.filter(
68
+ (chain) => status === "sunset" ? (0, import_config.isSunsetChain)(chain.chainId) : !(0, import_config.isSunsetChain)(chain.chainId)
69
+ );
66
70
  }
67
71
 
68
72
  // utils/getAutopoolCategory.ts
@@ -291,7 +295,7 @@ var import_graph_cli = require("@tokemak/graph-cli");
291
295
  var import_chains = require("viem/chains");
292
296
 
293
297
  // functions/getPoolsAndDestinations.ts
294
- var import_config = require("@tokemak/config");
298
+ var import_config2 = require("@tokemak/config");
295
299
  var import_abis = require("@tokemak/abis");
296
300
  var getPoolsAndDestinations = async (client, {
297
301
  chainId,
@@ -299,7 +303,7 @@ var getPoolsAndDestinations = async (client, {
299
303
  blockNumber
300
304
  }) => {
301
305
  try {
302
- const { lens } = (0, import_config.getCoreConfig)(chainId);
306
+ const { lens } = (0, import_config2.getCoreConfig)(chainId);
303
307
  const { autoPools, destinations } = await client.readContract({
304
308
  address: lens,
305
309
  abi: import_abis.lensAbi,
@@ -721,11 +725,11 @@ var getChainAutopools = async (client, {
721
725
  };
722
726
 
723
727
  // functions/getEthPriceAtBlock.ts
724
- var import_config2 = require("@tokemak/config");
728
+ var import_config3 = require("@tokemak/config");
725
729
  var import_abis2 = require("@tokemak/abis");
726
730
  var import_tokenlist3 = require("@tokemak/tokenlist");
727
731
  var getEthPriceAtBlock = async (client, blockNumber, chainId, account) => {
728
- const config = (0, import_config2.getCoreConfig)(chainId);
732
+ const config = (0, import_config3.getCoreConfig)(chainId);
729
733
  const rootPriceOracle = config.rootPriceOracle;
730
734
  const weth = config.weth;
731
735
  const usdc = import_tokenlist3.USDC_TOKEN.extensions?.bridgeInfo?.[chainId]?.tokenAddress || import_tokenlist3.USDC_TOKEN.address;
package/dist/safe.mjs CHANGED
@@ -25,12 +25,16 @@ import {
25
25
  SUPPORTED_DEV_CHAINS,
26
26
  SUPPORTED_PROD_CHAINS
27
27
  } from "@tokemak/constants";
28
+ import { isSunsetChain } from "@tokemak/config";
28
29
  function getChainsForEnv({
29
- includeTestnet = false
30
+ includeTestnet = false,
31
+ status = "all"
30
32
  }) {
31
- let chains;
32
- chains = includeTestnet ? [...SUPPORTED_DEV_CHAINS] : [...SUPPORTED_PROD_CHAINS];
33
- return chains;
33
+ const base = includeTestnet ? [...SUPPORTED_DEV_CHAINS] : [...SUPPORTED_PROD_CHAINS];
34
+ if (status === "all") return base;
35
+ return base.filter(
36
+ (chain) => status === "sunset" ? isSunsetChain(chain.chainId) : !isSunsetChain(chain.chainId)
37
+ );
34
38
  }
35
39
 
36
40
  // utils/getAutopoolCategory.ts
@@ -1,11 +1,20 @@
1
1
  import { INetwork } from "@tokemak/tokenlist";
2
+ /**
3
+ * Lifecycle filter for the returned chain set.
4
+ * - "all" (default): every supported chain — back-compat behaviour.
5
+ * - "active": exclude sunset/deprecated chains (used by the main autopool
6
+ * fan-out so it never waits on deprecated chains' live reads).
7
+ * - "sunset": only sunset/deprecated chains (used by getDeprecatedAutopools).
8
+ */
9
+ export type ChainStatusFilter = "active" | "sunset" | "all";
2
10
  interface GetChainsOptions {
3
11
  includeTestnet?: boolean;
12
+ status?: ChainStatusFilter;
4
13
  }
5
14
  /**
6
- * Returns the appropriate array of chains
7
- * based on environment + 'includeTestnet' logic.
15
+ * Returns the appropriate array of chains based on environment
16
+ * (`includeTestnet`) and lifecycle `status`.
8
17
  */
9
- export declare function getChainsForEnv({ includeTestnet, }: GetChainsOptions): INetwork[];
18
+ export declare function getChainsForEnv({ includeTestnet, status, }: GetChainsOptions): INetwork[];
10
19
  export {};
11
20
  //# sourceMappingURL=getChainsForEnv.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getChainsForEnv.d.ts","sourceRoot":"","sources":["../../utils/getChainsForEnv.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,UAAU,gBAAgB;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,cAAsB,GACvB,EAAE,gBAAgB,GAAG,QAAQ,EAAE,CAS/B"}
1
+ {"version":3,"file":"getChainsForEnv.d.ts","sourceRoot":"","sources":["../../utils/getChainsForEnv.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE5D,UAAU,gBAAgB;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,cAAsB,EACtB,MAAc,GACf,EAAE,gBAAgB,GAAG,QAAQ,EAAE,CAY/B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokemak/queries",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -42,12 +42,12 @@
42
42
  "@layerzerolabs/lz-v2-utilities": "3.0.4",
43
43
  "@merkl/api": "1.17.4",
44
44
  "graphql-request": "6.1.0",
45
- "@tokemak/graph-cli": "0.4.0",
46
- "@tokemak/config": "0.4.0",
47
- "@tokemak/constants": "0.3.0",
48
- "@tokemak/utils": "0.2.1",
49
- "@tokemak/abis": "0.2.0",
50
- "@tokemak/tokenlist": "0.4.0"
45
+ "@tokemak/config": "0.6.0",
46
+ "@tokemak/constants": "0.3.2",
47
+ "@tokemak/graph-cli": "0.4.2",
48
+ "@tokemak/tokenlist": "0.4.0",
49
+ "@tokemak/utils": "0.2.3",
50
+ "@tokemak/abis": "0.2.0"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@wagmi/core": ">=2.9.0",
@@ -1,8 +0,0 @@
1
- import { Config } from "@wagmi/core";
2
- import { Address } from "viem";
3
- export declare const getAllowance: (wagmiConfig: Config, { token, address, spender, }: {
4
- token: Address;
5
- address: Address;
6
- spender: Address;
7
- }) => Promise<bigint | undefined>;
8
- //# sourceMappingURL=getAllowance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getAllowance.d.ts","sourceRoot":"","sources":["../../functions/getAllowance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,EAAY,MAAM,MAAM,CAAC;AAEzC,eAAO,MAAM,YAAY,GACvB,aAAa,MAAM,EACnB,8BAIG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,gCAa1D,CAAC"}
@@ -1,53 +0,0 @@
1
- import { SupportedChainIds } from "@tokemak/config";
2
- export declare const getAutopoolsRebalances: (chainId?: SupportedChainIds) => Promise<{
3
- __typename?: "Rebalance";
4
- autopool: any;
5
- blockNumber: any;
6
- hash: string;
7
- id: string;
8
- ix: any;
9
- timestamp: any;
10
- outData?: {
11
- __typename?: "RebalanceInOut";
12
- id: string;
13
- exchangeName: string;
14
- ethValue: any;
15
- destination: any;
16
- underlyer: {
17
- __typename?: "RefToken";
18
- decimals: any;
19
- id: any;
20
- name?: string | null;
21
- symbol?: string | null;
22
- };
23
- tokens: Array<{
24
- __typename?: "RefToken";
25
- decimals: any;
26
- id: any;
27
- name?: string | null;
28
- symbol?: string | null;
29
- }>;
30
- } | null;
31
- inData?: {
32
- __typename?: "RebalanceInOut";
33
- ethValue: any;
34
- exchangeName: string;
35
- id: string;
36
- destination: any;
37
- underlyer: {
38
- __typename?: "RefToken";
39
- decimals: any;
40
- id: any;
41
- name?: string | null;
42
- symbol?: string | null;
43
- };
44
- tokens: Array<{
45
- __typename?: "RefToken";
46
- decimals: any;
47
- id: any;
48
- name?: string | null;
49
- symbol?: string | null;
50
- }>;
51
- } | null;
52
- }[]>;
53
- //# sourceMappingURL=getAutopoolsRebalances.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getAutopoolsRebalances.d.ts","sourceRoot":"","sources":["../../functions/getAutopoolsRebalances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,sBAAsB,GACjC,UAAS,iBAAqB;;;;;;;;;kBAOm8pjD,CAAC;;;;;;sBAAkN,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;sBAAkG,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;;kBAA4G,CAAC;;;;;;sBAAkN,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;sBAAkG,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;IADxwsjD,CAAC"}
@@ -1,7 +0,0 @@
1
- import { Address } from "viem";
2
- import { Config } from "@wagmi/core";
3
- export declare const getChainCycleRolloverBlockNumber: (wagmiConfig: Config, { stoke, chainId, }: {
4
- stoke: Address;
5
- chainId: number;
6
- }) => Promise<bigint | undefined>;
7
- //# sourceMappingURL=getChainCycleRolloverBlockNumber.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getChainCycleRolloverBlockNumber.d.ts","sourceRoot":"","sources":["../../functions/getChainCycleRolloverBlockNumber.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EACL,MAAM,EAIP,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,gCAAgC,GAC3C,aAAa,MAAM,EACnB,qBAGG;IACD,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,gCA4CF,CAAC"}
@@ -1,15 +0,0 @@
1
- import { Config } from "@wagmi/core";
2
- export type ChainSTokeType = Awaited<ReturnType<typeof getChainSToke>>;
3
- export declare const getChainSToke: (wagmiConfig: Config, { tokePrice, chainId, }: {
4
- tokePrice: number;
5
- chainId: number;
6
- }) => Promise<{
7
- rawTotalSupply: bigint | undefined;
8
- totalSupply: string;
9
- tvl: string;
10
- rawTVL: number;
11
- currentCycle: bigint | undefined;
12
- chain: import("@tokemak/tokenlist").INetwork | undefined;
13
- timeBeforeNextCycle: string;
14
- } | undefined>;
15
- //# sourceMappingURL=getChainSToke.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getChainSToke.d.ts","sourceRoot":"","sources":["../../functions/getChainSToke.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAC;AAWpD,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC;AAEvE,eAAO,MAAM,aAAa,GACxB,aAAa,MAAM,EACnB,yBAGG;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;;;;;;;;cA4CF,CAAC"}
@@ -1,16 +0,0 @@
1
- import { SupportedChainIds } from "@tokemak/config";
2
- export type ChainSTokeRewardsType = Awaited<ReturnType<typeof getChainSTokeRewards>>;
3
- export declare const getChainSTokeRewards: ({ chainId, }: {
4
- chainId: SupportedChainIds;
5
- }) => Promise<{
6
- autopools: Record<string, {
7
- balance: number;
8
- balanceUSD: number;
9
- currentAprPerCredit: number;
10
- }>;
11
- totalEarnings: number;
12
- totalEarningsUsd: number;
13
- historicalRewards: import("..").AggregatedDayData[];
14
- aprRange: number[];
15
- } | null>;
16
- //# sourceMappingURL=getChainSTokeRewards.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getChainSTokeRewards.d.ts","sourceRoot":"","sources":["../../functions/getChainSTokeRewards.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAM9E,MAAM,MAAM,qBAAqB,GAAG,OAAO,CACzC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CACxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAU,cAExC;IACD,OAAO,EAAE,iBAAiB,CAAC;CAC5B;;iBAagB,MAAM;oBAAc,MAAM;6BAAuB,MAAM;;;;;;SAyDvE,CAAC"}
@@ -1,33 +0,0 @@
1
- import { Address } from "viem";
2
- import { Config } from "wagmi";
3
- export declare const getChainUserSToke: (wagmiConfig: Config, { address, tokePrice, chainId, }: {
4
- address: Address;
5
- tokePrice: number;
6
- chainId: number;
7
- }) => Promise<{
8
- balance: bigint;
9
- balanceUSD: string;
10
- balanceExcludingWithdrawal: string;
11
- balanceExcludingWithdrawalUsd: string;
12
- hasBalanceExcludingWithdrawal: boolean;
13
- timeLeftBeforeUnlockRequestAvailable: string;
14
- timeLeftBeforeUnlockRequestUnavailable: string;
15
- withdrawalAmount: bigint;
16
- withdrawalAmountUsd: string;
17
- hasUnlockableBalance: boolean;
18
- isUnlockRequestAvailable: boolean;
19
- hasRequestedUnlock: boolean;
20
- hasAddedLockedToke: boolean;
21
- addedLockedToke: bigint;
22
- unlockPeriodDateRange: string;
23
- unlockPeriodStartFullDate: string;
24
- unlockRenewalFullDate: string;
25
- unlockPeriodStartDate: string | undefined;
26
- unlockRenewalDate: string | undefined;
27
- lockDurationInMonths: number;
28
- boost: number;
29
- points: number;
30
- totalActiveCredits: number;
31
- totalCredits: number;
32
- } | undefined>;
33
- //# sourceMappingURL=getChainUserSToke.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getChainUserSToke.d.ts","sourceRoot":"","sources":["../../functions/getChainUserSToke.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,OAAO,EAAe,MAAM,MAAM,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAM/B,eAAO,MAAM,iBAAiB,GAC5B,aAAa,MAAM,EACnB,kCAIG;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;;;;;;;;;;;;;;;;;;;;;;;;;cA0LF,CAAC"}
@@ -1,30 +0,0 @@
1
- import { Config } from "wagmi";
2
- import { Address } from "viem";
3
- export declare const getChainUserSTokeRewards: (wagmiConfig: Config, { address, chainId, tokePrice, }: {
4
- address: Address;
5
- chainId: number;
6
- tokePrice: number;
7
- }) => Promise<{
8
- claimable: bigint;
9
- rewardsPayload: import("./getRewardsPayloadV1").IUserReward | null;
10
- latestClaimablePayload: import("./getRewardsPayloadV1").IUserReward;
11
- claimableUsd: number;
12
- claimableNum: number;
13
- hasClaimable: boolean;
14
- pendingRewards: number;
15
- pendingRewardsUsd: number;
16
- totalRewardsReceived: number;
17
- totalRewardsReceivedUsd: number;
18
- } | {
19
- rewardsPayload: import("./getRewardsPayloadV1").IUserReward | null;
20
- latestClaimablePayload: null;
21
- claimable?: undefined;
22
- claimableUsd: number;
23
- claimableNum: number;
24
- hasClaimable: boolean;
25
- pendingRewards: number;
26
- pendingRewardsUsd: number;
27
- totalRewardsReceived: number;
28
- totalRewardsReceivedUsd: number;
29
- }>;
30
- //# sourceMappingURL=getChainUserSTokeRewards.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getChainUserSTokeRewards.d.ts","sourceRoot":"","sources":["../../functions/getChainUserSTokeRewards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAI/B,eAAO,MAAM,wBAAwB,GACnC,aAAa,MAAM,EACnB,kCAIG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;EA2E5D,CAAC"}
@@ -1,11 +0,0 @@
1
- export type CombinedRewardsType = Awaited<ReturnType<typeof getCombinedRewards>>;
2
- export declare const getCombinedRewards: () => Promise<{
3
- totalEarnings: number;
4
- totalEarningsUsd: number;
5
- historicalRewards: {
6
- balance: number;
7
- balanceUSD: number;
8
- formattedDate: string;
9
- }[];
10
- }>;
11
- //# sourceMappingURL=getCombinedRewards.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getCombinedRewards.d.ts","sourceRoot":"","sources":["../../functions/getCombinedRewards.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,mBAAmB,GAAG,OAAO,CACvC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CACtC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;EAgE9B,CAAC"}
@@ -1,3 +0,0 @@
1
- import { CurveLP } from "../types";
2
- export declare const getCurveLP: () => Promise<CurveLP | undefined>;
3
- //# sourceMappingURL=getCurveLP.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getCurveLP.d.ts","sourceRoot":"","sources":["../../functions/getCurveLP.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGnC,eAAO,MAAM,UAAU,QAAa,OAAO,CAAC,OAAO,GAAG,SAAS,CA6B9D,CAAC"}
@@ -1,10 +0,0 @@
1
- import { Config } from "@wagmi/core";
2
- export declare const getCycleV1: (wagmiConfig: Config, { currentBlockNumber, chainId, }: {
3
- currentBlockNumber: BigInt;
4
- chainId: number;
5
- }) => Promise<{
6
- currentCycleIndex: bigint;
7
- cycleRolloverBlockNumber: bigint | BigInt;
8
- timeBeforeNextCycle: string;
9
- } | undefined>;
10
- //# sourceMappingURL=getCycleV1.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getCycleV1.d.ts","sourceRoot":"","sources":["../../functions/getCycleV1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,aAAa,CAAC;AAenD,eAAO,MAAM,UAAU,GACrB,aAAa,MAAM,EACnB,kCAGG;IAAE,kBAAkB,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE;;;;cAgDnD,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const getEthPrice: () => Promise<number | undefined>;
2
- //# sourceMappingURL=getEthPrice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getEthPrice.d.ts","sourceRoot":"","sources":["../../functions/getEthPrice.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,QAAa,OAAO,CAAC,MAAM,GAAG,SAAS,CAgB9D,CAAC"}
@@ -1,24 +0,0 @@
1
- export declare enum MessageStatus {
2
- INFLIGHT = "INFLIGHT",
3
- DELIVERED = "DELIVERED",
4
- FAILED = "FAILED",
5
- PAYLOAD_STORED = "PAYLOAD_STORED",
6
- BLOCKED = "BLOCKED",
7
- CONFIRMING = "CONFIRMING"
8
- }
9
- export type LayerzeroStatus = {
10
- status: {
11
- name: MessageStatus;
12
- message: string;
13
- };
14
- };
15
- export type GetLayerzeroStatusConfig = {
16
- txHash: string;
17
- };
18
- export declare const getLayerzeroStatus: ({ txHash, }: GetLayerzeroStatusConfig) => Promise<LayerzeroStatus | undefined>;
19
- export declare const waitForMessageReceived: ({ txHash, interval, timeout, }: {
20
- txHash: string;
21
- interval?: number;
22
- timeout?: number;
23
- }) => Promise<LayerzeroStatus>;
24
- //# sourceMappingURL=getLayerzeroStatus.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getLayerzeroStatus.d.ts","sourceRoot":"","sources":["../../functions/getLayerzeroStatus.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,cAAc,mBAAmB;IACjC,OAAO,YAAY;IACnB,UAAU,eAAe;CAC1B;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE;QACN,IAAI,EAAE,aAAa,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAIF,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAU,aAEtC,wBAAwB,KAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAgBhE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAU,gCAI1C;IACD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,KAAG,OAAO,CAAC,eAAe,CA0B1B,CAAC"}
@@ -1,54 +0,0 @@
1
- import { Address } from "viem";
2
- import { SupportedChainIds } from "@tokemak/config";
3
- export declare const getMutlipleAutopoolRebalances: (ids: Address[], chainId?: SupportedChainIds) => Promise<{
4
- __typename?: "Rebalance";
5
- autopool: any;
6
- blockNumber: any;
7
- hash: string;
8
- id: string;
9
- ix: any;
10
- timestamp: any;
11
- outData?: {
12
- __typename?: "RebalanceInOut";
13
- id: string;
14
- exchangeName: string;
15
- ethValue: any;
16
- destination: any;
17
- underlyer: {
18
- __typename?: "RefToken";
19
- decimals: any;
20
- id: any;
21
- name?: string | null;
22
- symbol?: string | null;
23
- };
24
- tokens: Array<{
25
- __typename?: "RefToken";
26
- decimals: any;
27
- id: any;
28
- name?: string | null;
29
- symbol?: string | null;
30
- }>;
31
- } | null;
32
- inData?: {
33
- __typename?: "RebalanceInOut";
34
- ethValue: any;
35
- exchangeName: string;
36
- id: string;
37
- destination: any;
38
- underlyer: {
39
- __typename?: "RefToken";
40
- decimals: any;
41
- id: any;
42
- name?: string | null;
43
- symbol?: string | null;
44
- };
45
- tokens: Array<{
46
- __typename?: "RefToken";
47
- decimals: any;
48
- id: any;
49
- name?: string | null;
50
- symbol?: string | null;
51
- }>;
52
- } | null;
53
- }[]>;
54
- //# sourceMappingURL=getMultipleAutopoolRebalances.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getMultipleAutopoolRebalances.d.ts","sourceRoot":"","sources":["../../functions/getMultipleAutopoolRebalances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,6BAA6B,GACxC,KAAK,OAAO,EAAE,EACd,UAAS,iBAAqB;;;;;;;;;kBASgmujD,CAAC;;;;;;sBAAkN,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;sBAAkG,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;;kBAA4G,CAAC;;;;;;sBAAkN,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;sBAAkG,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;IADr6wjD,CAAC"}
@@ -1,41 +0,0 @@
1
- import { IAutopools } from "./getAutopools";
2
- import { IStoke } from "./getSToke";
3
- import { ISushiLP } from "./getSushiLP";
4
- import { ISAuto } from "./getSAuto";
5
- import { EthAutoLPData } from "./getEthAutoLP";
6
- export declare const getProtocolStats: (autopools: IAutopools | undefined, stoke: IStoke | undefined, sushiLP: ISushiLP | undefined, sauto: ISAuto | undefined, EthAutoLP: EthAutoLPData | undefined) => Promise<{
7
- autopools: {
8
- tvl: string;
9
- tvlNum: number;
10
- categories: {
11
- [k: string]: {
12
- tvl: string;
13
- supply: string;
14
- };
15
- };
16
- };
17
- stoke: {
18
- tvl: string;
19
- tvlNum: number;
20
- totalSupply: string;
21
- };
22
- sushiLP: {
23
- tvl: string;
24
- totalSupply: number | bigint;
25
- };
26
- EthAutoLP: {
27
- tvl: string;
28
- };
29
- sauto: {
30
- tvl: string;
31
- tvlNum: number;
32
- totalSupply: string;
33
- };
34
- stakedTVL: {
35
- totalSupply: string;
36
- tvl: string;
37
- };
38
- tvl: string;
39
- totalDestinations: number;
40
- } | null>;
41
- //# sourceMappingURL=getProtocolStats.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getProtocolStats.d.ts","sourceRoot":"","sources":["../../functions/getProtocolStats.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,eAAO,MAAM,gBAAgB,GAC3B,WAAW,UAAU,GAAG,SAAS,EACjC,OAAO,MAAM,GAAG,SAAS,EACzB,SAAS,QAAQ,GAAG,SAAS,EAC7B,OAAO,MAAM,GAAG,SAAS,EACzB,WAAW,aAAa,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAgGrC,CAAC"}
@@ -1,23 +0,0 @@
1
- import { Config } from "wagmi";
2
- export declare const getSToke: (wagmiConfig: Config, { tokePrice, includeTestnet, }: {
3
- tokePrice: number;
4
- includeTestnet?: boolean;
5
- }) => Promise<{
6
- totalSupply: string;
7
- rawTotalSupply: bigint;
8
- tvl: string;
9
- rawTVL: number;
10
- chains: {
11
- [x: number]: {
12
- rawTotalSupply: bigint | undefined;
13
- totalSupply: string;
14
- tvl: string;
15
- rawTVL: number;
16
- currentCycle: bigint | undefined;
17
- chain: import("@tokemak/tokenlist").INetwork | undefined;
18
- timeBeforeNextCycle: string;
19
- } | undefined;
20
- };
21
- }>;
22
- export type IStoke = Awaited<ReturnType<typeof getSToke>>;
23
- //# sourceMappingURL=getSToke.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getSToke.d.ts","sourceRoot":"","sources":["../../functions/getSToke.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAM/B,eAAO,MAAM,QAAQ,GACnB,aAAa,MAAM,EACnB,gCAGG;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;;;;;;;;;;;;;;;;EAmCF,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC"}
@@ -1,22 +0,0 @@
1
- export declare const getSTokeRewards: ({ includeTestnet, }: {
2
- includeTestnet?: boolean;
3
- }) => Promise<{
4
- chains: {
5
- [x: number]: {
6
- autopools: Record<string, {
7
- balance: number;
8
- balanceUSD: number;
9
- currentAprPerCredit: number;
10
- }>;
11
- totalEarnings: number;
12
- totalEarningsUsd: number;
13
- historicalRewards: import("..").AggregatedDayData[];
14
- aprRange: number[];
15
- } | null;
16
- };
17
- totalEarnings: number;
18
- totalEarningsUsd: number;
19
- historicalRewards: import("..").AggregatedDayData[];
20
- }>;
21
- export type IStokeRewards = Awaited<ReturnType<typeof getSTokeRewards>>;
22
- //# sourceMappingURL=getSTokeRewards.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getSTokeRewards.d.ts","sourceRoot":"","sources":["../../functions/getSTokeRewards.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,GAAU,qBAEnC;IACD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;;;;;;;;;;;;;;;;;EAyCA,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC"}
@@ -1,14 +0,0 @@
1
- import { Config } from "@wagmi/core";
2
- export declare const getSushiLP: (wagmiConfig: Config, { ethPrice }: {
3
- ethPrice: number;
4
- }) => Promise<{
5
- tvl: number;
6
- lpReserve: bigint;
7
- totalSupply: bigint;
8
- reserves: readonly [bigint, bigint, number];
9
- apr: any;
10
- weeklyTokeEmissions: any;
11
- valueOf1LP: number;
12
- } | undefined>;
13
- export type ISushiLP = Awaited<ReturnType<typeof getSushiLP>>;
14
- //# sourceMappingURL=getSushiLP.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getSushiLP.d.ts","sourceRoot":"","sources":["../../functions/getSushiLP.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAC;AAIpD,eAAO,MAAM,UAAU,GACrB,aAAa,MAAM,EACnB,cAAc;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE;;;;;;;;cAmDnC,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- import { IToken } from "@tokemak/tokenlist";
2
- export declare const getTokenList: () => Promise<IToken[]>;
3
- //# sourceMappingURL=getTokenList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getTokenList.d.ts","sourceRoot":"","sources":["../../functions/getTokenList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,oBAAoB,CAAC;AAE/D,eAAO,MAAM,YAAY,QAAa,OAAO,CAAC,MAAM,EAAE,CAWrD,CAAC"}
@@ -1,16 +0,0 @@
1
- import { Address } from "viem";
2
- import { Config } from "wagmi";
3
- import { CurveLP } from "../types";
4
- export declare const getUserCurveLP: (wagmiConfig: Config, { curveLP, address, chainId, }: {
5
- curveLP: CurveLP;
6
- address: Address;
7
- chainId: number;
8
- }) => Promise<{
9
- curveLPBalance: bigint | undefined;
10
- convexLPBalance: bigint | undefined;
11
- shareOfCurve: number;
12
- shareOfConvex: number;
13
- curveLPUsd: number;
14
- convexLPUsd: number;
15
- } | undefined>;
16
- //# sourceMappingURL=getUserCurveLP.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getUserCurveLP.d.ts","sourceRoot":"","sources":["../../functions/getUserCurveLP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAKnC,eAAO,MAAM,cAAc,GACzB,aAAa,MAAM,EACnB,gCAIG;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;;;;;;;cA4CF,CAAC"}