@tokemak/queries 0.0.21 → 0.1.2
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/constants/tokenOrders.d.ts +3 -0
- package/dist/constants/tokenOrders.d.ts.map +1 -0
- package/dist/functions/getAddressFromSystemRegistry.d.ts +8 -0
- package/dist/functions/getAddressFromSystemRegistry.d.ts.map +1 -0
- package/dist/functions/getAllowance.d.ts +8 -0
- package/dist/functions/getAllowance.d.ts.map +1 -0
- package/dist/functions/getAmountDeposited.d.ts +3 -0
- package/dist/functions/getAmountDeposited.d.ts.map +1 -0
- package/dist/functions/getAmountWithdrawn.d.ts +28 -0
- package/dist/functions/getAmountWithdrawn.d.ts.map +1 -0
- package/dist/functions/getAutopilotRouter.d.ts +5 -0
- package/dist/functions/getAutopilotRouter.d.ts.map +1 -0
- package/dist/functions/getAutopoolDayData.d.ts +25 -0
- package/dist/functions/getAutopoolDayData.d.ts.map +1 -0
- package/dist/functions/getAutopoolRebalances.d.ts +8 -0
- package/dist/functions/getAutopoolRebalances.d.ts.map +1 -0
- package/dist/functions/getAutopools.d.ts +329 -0
- package/dist/functions/getAutopools.d.ts.map +1 -0
- package/dist/functions/getAutopoolsDayData.d.ts +13 -0
- package/dist/functions/getAutopoolsDayData.d.ts.map +1 -0
- package/dist/functions/getAutopoolsHistory.d.ts +21 -0
- package/dist/functions/getAutopoolsHistory.d.ts.map +1 -0
- package/dist/functions/getAutopoolsRebalances.d.ts +53 -0
- package/dist/functions/getAutopoolsRebalances.d.ts.map +1 -0
- package/dist/functions/getBackupApr.d.ts +2 -0
- package/dist/functions/getBackupApr.d.ts.map +1 -0
- package/dist/functions/getBackupTokenPrices.d.ts +6 -0
- package/dist/functions/getBackupTokenPrices.d.ts.map +1 -0
- package/dist/functions/getBlobData.d.ts +2 -0
- package/dist/functions/getBlobData.d.ts.map +1 -0
- package/dist/functions/getBridgeFee.d.ts +18 -0
- package/dist/functions/getBridgeFee.d.ts.map +1 -0
- package/dist/functions/getChainAutopools.d.ts +336 -0
- package/dist/functions/getChainAutopools.d.ts.map +1 -0
- package/dist/functions/getChainAutopoolsApr.d.ts +30 -0
- package/dist/functions/getChainAutopoolsApr.d.ts.map +1 -0
- package/dist/functions/getChainCycleRolloverBlockNumber.d.ts +7 -0
- package/dist/functions/getChainCycleRolloverBlockNumber.d.ts.map +1 -0
- package/dist/functions/getChainSToke.d.ts +15 -0
- package/dist/functions/getChainSToke.d.ts.map +1 -0
- package/dist/functions/getChainSTokeRewards.d.ts +16 -0
- package/dist/functions/getChainSTokeRewards.d.ts.map +1 -0
- package/dist/functions/getChainSubgraphStatus.d.ts +17 -0
- package/dist/functions/getChainSubgraphStatus.d.ts.map +1 -0
- package/dist/functions/getChainUserActivity.d.ts +24 -0
- package/dist/functions/getChainUserActivity.d.ts.map +1 -0
- package/dist/functions/getChainUserAutopools.d.ts +14 -0
- package/dist/functions/getChainUserAutopools.d.ts.map +1 -0
- package/dist/functions/getChainUserAutopoolsHistory.d.ts +14 -0
- package/dist/functions/getChainUserAutopoolsHistory.d.ts.map +1 -0
- package/dist/functions/getChainUserAutopoolsRewards.d.ts +12 -0
- package/dist/functions/getChainUserAutopoolsRewards.d.ts.map +1 -0
- package/dist/functions/getChainUserSToke.d.ts +33 -0
- package/dist/functions/getChainUserSToke.d.ts.map +1 -0
- package/dist/functions/getChainUserSTokeRewards.d.ts +30 -0
- package/dist/functions/getChainUserSTokeRewards.d.ts.map +1 -0
- package/dist/functions/getCombinedRewards.d.ts +11 -0
- package/dist/functions/getCombinedRewards.d.ts.map +1 -0
- package/dist/functions/getCurrentCycleId.d.ts +7 -0
- package/dist/functions/getCurrentCycleId.d.ts.map +1 -0
- package/dist/functions/getCurveLP.d.ts +3 -0
- package/dist/functions/getCurveLP.d.ts.map +1 -0
- package/dist/functions/getCycleV1.d.ts +10 -0
- package/dist/functions/getCycleV1.d.ts.map +1 -0
- package/dist/functions/getDefillamaPoolApr.d.ts +32 -0
- package/dist/functions/getDefillamaPoolApr.d.ts.map +1 -0
- package/dist/functions/getDefillamaPrice.d.ts +2 -0
- package/dist/functions/getDefillamaPrice.d.ts.map +1 -0
- package/dist/functions/getDynamicSwap.d.ts +19 -0
- package/dist/functions/getDynamicSwap.d.ts.map +1 -0
- package/dist/functions/getEthAutoLP.d.ts +15 -0
- package/dist/functions/getEthAutoLP.d.ts.map +1 -0
- package/dist/functions/getEthPrice.d.ts +2 -0
- package/dist/functions/getEthPrice.d.ts.map +1 -0
- package/dist/functions/getEthPriceAtBlock.d.ts +4 -0
- package/dist/functions/getEthPriceAtBlock.d.ts.map +1 -0
- package/dist/functions/getGenStratAprs.d.ts +12 -0
- package/dist/functions/getGenStratAprs.d.ts.map +1 -0
- package/dist/functions/getHistoricalTokenPrices.d.ts +20 -0
- package/dist/functions/getHistoricalTokenPrices.d.ts.map +1 -0
- package/dist/functions/getLayerzeroStatus.d.ts +24 -0
- package/dist/functions/getLayerzeroStatus.d.ts.map +1 -0
- package/dist/functions/getMerklCreatorApr.d.ts +25 -0
- package/dist/functions/getMerklCreatorApr.d.ts.map +1 -0
- package/dist/functions/getMerklPoolApr.d.ts +22 -0
- package/dist/functions/getMerklPoolApr.d.ts.map +1 -0
- package/dist/functions/getMultipleAutopoolRebalances.d.ts +54 -0
- package/dist/functions/getMultipleAutopoolRebalances.d.ts.map +1 -0
- package/dist/functions/getPoolsAndDestinations.d.ts +71 -0
- package/dist/functions/getPoolsAndDestinations.d.ts.map +1 -0
- package/dist/functions/getPoolsAndDestinationsBackup.d.ts +67 -0
- package/dist/functions/getPoolsAndDestinationsBackup.d.ts.map +1 -0
- package/dist/functions/getProtocolStats.d.ts +41 -0
- package/dist/functions/getProtocolStats.d.ts.map +1 -0
- package/dist/functions/getRebalanceStats.d.ts +40 -0
- package/dist/functions/getRebalanceStats.d.ts.map +1 -0
- package/dist/functions/getRewardsPayloadV1.d.ts +23 -0
- package/dist/functions/getRewardsPayloadV1.d.ts.map +1 -0
- package/dist/functions/getSAuto.d.ts +13 -0
- package/dist/functions/getSAuto.d.ts.map +1 -0
- package/dist/functions/getSAutoApr.d.ts +8 -0
- package/dist/functions/getSAutoApr.d.ts.map +1 -0
- package/dist/functions/getSAutoRewards.d.ts +15 -0
- package/dist/functions/getSAutoRewards.d.ts.map +1 -0
- package/dist/functions/getSToke.d.ts +23 -0
- package/dist/functions/getSToke.d.ts.map +1 -0
- package/dist/functions/getSTokeRewards.d.ts +22 -0
- package/dist/functions/getSTokeRewards.d.ts.map +1 -0
- package/dist/functions/getSubgraphStatus.d.ts +5 -0
- package/dist/functions/getSubgraphStatus.d.ts.map +1 -0
- package/dist/functions/getSushiLP.d.ts +14 -0
- package/dist/functions/getSushiLP.d.ts.map +1 -0
- package/dist/functions/getSwapQuote.d.ts +16 -0
- package/dist/functions/getSwapQuote.d.ts.map +1 -0
- package/dist/functions/getSystemConfig.d.ts +12 -0
- package/dist/functions/getSystemConfig.d.ts.map +1 -0
- package/dist/functions/getTokePrice.d.ts +2 -0
- package/dist/functions/getTokePrice.d.ts.map +1 -0
- package/dist/functions/getTokenList.d.ts +3 -0
- package/dist/functions/getTokenList.d.ts.map +1 -0
- package/dist/functions/getTokenPrice.d.ts +11 -0
- package/dist/functions/getTokenPrice.d.ts.map +1 -0
- package/dist/functions/getTokenPriceFallback.d.ts +6 -0
- package/dist/functions/getTokenPriceFallback.d.ts.map +1 -0
- package/dist/functions/getTokenPrices.d.ts +461 -0
- package/dist/functions/getTokenPrices.d.ts.map +1 -0
- package/dist/functions/getTokenValueDayDatas.d.ts +7 -0
- package/dist/functions/getTokenValueDayDatas.d.ts.map +1 -0
- package/dist/functions/getTopAutopoolHolders.d.ts +11 -0
- package/dist/functions/getTopAutopoolHolders.d.ts.map +1 -0
- package/dist/functions/getUniV4Pool.d.ts +90 -0
- package/dist/functions/getUniV4Pool.d.ts.map +1 -0
- package/dist/functions/getUserActivity.d.ts +18 -0
- package/dist/functions/getUserActivity.d.ts.map +1 -0
- package/dist/functions/getUserAutoEthRewards.d.ts +9 -0
- package/dist/functions/getUserAutoEthRewards.d.ts.map +1 -0
- package/dist/functions/getUserAutopool.d.ts +73 -0
- package/dist/functions/getUserAutopool.d.ts.map +1 -0
- package/dist/functions/getUserAutopoolBalanceChanges.d.ts +17 -0
- package/dist/functions/getUserAutopoolBalanceChanges.d.ts.map +1 -0
- package/dist/functions/getUserAutopools.d.ts +425 -0
- package/dist/functions/getUserAutopools.d.ts.map +1 -0
- package/dist/functions/getUserAutopoolsHistory.d.ts +39 -0
- package/dist/functions/getUserAutopoolsHistory.d.ts.map +1 -0
- package/dist/functions/getUserAutopoolsRewards.d.ts +82 -0
- package/dist/functions/getUserAutopoolsRewards.d.ts.map +1 -0
- package/dist/functions/getUserCurveLP.d.ts +16 -0
- package/dist/functions/getUserCurveLP.d.ts.map +1 -0
- package/dist/functions/getUserEthAutoLP.d.ts +21 -0
- package/dist/functions/getUserEthAutoLP.d.ts.map +1 -0
- package/dist/functions/getUserEthAutoLPRewards.d.ts +12 -0
- package/dist/functions/getUserEthAutoLPRewards.d.ts.map +1 -0
- package/dist/functions/getUserMerklRewards.d.ts +36 -0
- package/dist/functions/getUserMerklRewards.d.ts.map +1 -0
- package/dist/functions/getUserRewardsV1.d.ts +20 -0
- package/dist/functions/getUserRewardsV1.d.ts.map +1 -0
- package/dist/functions/getUserSAuto.d.ts +33 -0
- package/dist/functions/getUserSAuto.d.ts.map +1 -0
- package/dist/functions/getUserSAutoRewards.d.ts +29 -0
- package/dist/functions/getUserSAutoRewards.d.ts.map +1 -0
- package/dist/functions/getUserSToke.d.ts +40 -0
- package/dist/functions/getUserSToke.d.ts.map +1 -0
- package/dist/functions/getUserSTokeRewards.d.ts +38 -0
- package/dist/functions/getUserSTokeRewards.d.ts.map +1 -0
- package/dist/functions/getUserSushiLP.d.ts +23 -0
- package/dist/functions/getUserSushiLP.d.ts.map +1 -0
- package/dist/functions/getUserTokenBalances.d.ts +9 -0
- package/dist/functions/getUserTokenBalances.d.ts.map +1 -0
- package/dist/functions/getUserUniV4Positions.d.ts +72 -0
- package/dist/functions/getUserUniV4Positions.d.ts.map +1 -0
- package/dist/functions/getUserV1.d.ts +18 -0
- package/dist/functions/getUserV1.d.ts.map +1 -0
- package/dist/functions/index.d.ts +78 -0
- package/dist/functions/index.d.ts.map +1 -0
- package/dist/functions/updateRebalanceStats.d.ts +11 -0
- package/dist/functions/updateRebalanceStats.d.ts.map +1 -0
- package/dist/index.d.ts +4 -3347
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2353 -5250
- package/dist/index.mjs +6112 -0
- package/dist/types/0x.d.ts +75 -0
- package/dist/types/0x.d.ts.map +1 -0
- package/dist/types/autopools.d.ts +4 -0
- package/dist/types/autopools.d.ts.map +1 -0
- package/dist/types/curve.d.ts +11 -0
- package/dist/types/curve.d.ts.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/layerzero.d.ts +10 -0
- package/dist/types/layerzero.d.ts.map +1 -0
- package/dist/types/minAmountFuncs.d.ts +31 -0
- package/dist/types/minAmountFuncs.d.ts.map +1 -0
- package/dist/types/swapper.d.ts +164 -0
- package/dist/types/swapper.d.ts.map +1 -0
- package/dist/types/user.d.ts +5 -0
- package/dist/types/user.d.ts.map +1 -0
- package/dist/utils/aggregateSTokeRewardsDayData.d.ts +29 -0
- package/dist/utils/aggregateSTokeRewardsDayData.d.ts.map +1 -0
- package/dist/utils/arraysToObject.d.ts +2 -0
- package/dist/utils/arraysToObject.d.ts.map +1 -0
- package/dist/utils/convertBaseAssetToTokenPrices.d.ts +4 -0
- package/dist/utils/convertBaseAssetToTokenPrices.d.ts.map +1 -0
- package/dist/utils/convertBaseAssetToTokenPricesAndDenom.d.ts +22 -0
- package/dist/utils/convertBaseAssetToTokenPricesAndDenom.d.ts.map +1 -0
- package/dist/utils/fetchChainDataMap.d.ts +9 -0
- package/dist/utils/fetchChainDataMap.d.ts.map +1 -0
- package/dist/utils/fillMissingDates.d.ts +6 -0
- package/dist/utils/fillMissingDates.d.ts.map +1 -0
- package/dist/utils/findClosestEntry.d.ts +31 -0
- package/dist/utils/findClosestEntry.d.ts.map +1 -0
- package/dist/utils/formatDateRange.d.ts +14 -0
- package/dist/utils/formatDateRange.d.ts.map +1 -0
- package/dist/utils/getAutopoolCategory.d.ts +11 -0
- package/dist/utils/getAutopoolCategory.d.ts.map +1 -0
- package/dist/utils/getAutopoolInfo.d.ts +2 -0
- package/dist/utils/getAutopoolInfo.d.ts.map +1 -0
- package/dist/utils/getChainsForEnv.d.ts +11 -0
- package/dist/utils/getChainsForEnv.d.ts.map +1 -0
- package/dist/utils/getExchangeNames.d.ts +7 -0
- package/dist/utils/getExchangeNames.d.ts.map +1 -0
- package/dist/utils/getPoolStats.d.ts +4 -0
- package/dist/utils/getPoolStats.d.ts.map +1 -0
- package/dist/utils/getSTokeChainsForEnv.d.ts +11 -0
- package/dist/utils/getSTokeChainsForEnv.d.ts.map +1 -0
- package/dist/utils/getTimestampDaysFromStart.d.ts +2 -0
- package/dist/utils/getTimestampDaysFromStart.d.ts.map +1 -0
- package/dist/utils/index.d.ts +22 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/mergeArrays.d.ts +2 -0
- package/dist/utils/mergeArrays.d.ts.map +1 -0
- package/dist/utils/mergeArraysWithKey.d.ts +2 -0
- package/dist/utils/mergeArraysWithKey.d.ts.map +1 -0
- package/dist/utils/mergeStringArrays.d.ts +4 -0
- package/dist/utils/mergeStringArrays.d.ts.map +1 -0
- package/dist/utils/modifyAutopoolName.d.ts +2 -0
- package/dist/utils/modifyAutopoolName.d.ts.map +1 -0
- package/dist/utils/nestedArrayToObject.d.ts +3 -0
- package/dist/utils/nestedArrayToObject.d.ts.map +1 -0
- package/dist/utils/paginateQuery.d.ts +17 -0
- package/dist/utils/paginateQuery.d.ts.map +1 -0
- package/package.json +30 -19
- package/dist/index.cjs +0 -9079
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Address } from "viem";
|
|
2
|
+
export interface DefillamaPoolAprResult {
|
|
3
|
+
apr: number;
|
|
4
|
+
apr7d: number;
|
|
5
|
+
tvlUsd: number;
|
|
6
|
+
volumeUsd24h: number;
|
|
7
|
+
volumeUsd7d: number;
|
|
8
|
+
chain: string;
|
|
9
|
+
project: string;
|
|
10
|
+
symbol: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get pool APR from DefiLlama Yields API
|
|
14
|
+
*
|
|
15
|
+
* DefiLlama returns APY (Annual Percentage Yield), which we convert to APR.
|
|
16
|
+
* Note: For pools with low TVL or volume, APR data may not be available.
|
|
17
|
+
*
|
|
18
|
+
* @param poolAddress - The pool contract address
|
|
19
|
+
* @param chainId - Chain ID (default: 1 for mainnet)
|
|
20
|
+
* @param project - The DeFi project identifier (default: "uniswap-v3")
|
|
21
|
+
*/
|
|
22
|
+
export declare function getDefillamaPoolApr({ poolAddress, chainId, project, }: {
|
|
23
|
+
poolAddress: Address;
|
|
24
|
+
chainId?: number;
|
|
25
|
+
project?: "uniswap-v3" | "uniswap-v4";
|
|
26
|
+
}): Promise<DefillamaPoolAprResult | undefined>;
|
|
27
|
+
/**
|
|
28
|
+
* Clear the DefiLlama pools cache
|
|
29
|
+
* Useful for testing or forcing a fresh fetch
|
|
30
|
+
*/
|
|
31
|
+
export declare function clearDefillamaCache(): void;
|
|
32
|
+
//# sourceMappingURL=getDefillamaPoolApr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDefillamaPoolApr.d.ts","sourceRoot":"","sources":["../../functions/getDefillamaPoolApr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAsB/B,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAkCD;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,WAAW,EACX,OAAW,EACX,OAAsB,GACvB,EAAE;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,GAAG,YAAY,CAAC;CACvC,GAAG,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAsC9C;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDefillamaPrice.d.ts","sourceRoot":"","sources":["../../functions/getDefillamaPrice.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,GAAU,cAAc,MAAM,oBAM3D,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Address } from "viem";
|
|
2
|
+
export declare const getDynamicSwap: ({ address, amount, chainId, config, slippage, user, }: {
|
|
3
|
+
address: Address;
|
|
4
|
+
amount: bigint;
|
|
5
|
+
chainId: number;
|
|
6
|
+
config: any;
|
|
7
|
+
slippage: number;
|
|
8
|
+
user: Address | undefined;
|
|
9
|
+
}) => Promise<{
|
|
10
|
+
standardPreviewRedeem: boolean;
|
|
11
|
+
dynamicSwapsResults: {
|
|
12
|
+
fromToken: Address;
|
|
13
|
+
toToken: Address;
|
|
14
|
+
target: Address;
|
|
15
|
+
data: Address;
|
|
16
|
+
}[] | undefined;
|
|
17
|
+
previewRedeem: bigint;
|
|
18
|
+
}>;
|
|
19
|
+
//# sourceMappingURL=getDynamicSwap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDynamicSwap.d.ts","sourceRoot":"","sources":["../../functions/getDynamicSwap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAe/B,eAAO,MAAM,cAAc,GAAU,uDAOlC;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;CAC3B;;;mBASoB,OAAO;iBACT,OAAO;gBACR,OAAO;cACT,OAAO;;;EA+GtB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Config } from "@wagmi/core";
|
|
2
|
+
import { UniV4PoolData } from "./getUniV4Pool";
|
|
3
|
+
export interface EthAutoLPData extends UniV4PoolData {
|
|
4
|
+
apr: number | undefined;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Query the ETH/AUTO Uniswap V4 LP pool data including APR
|
|
8
|
+
*
|
|
9
|
+
* Uses the known Pool ID to query directly from the PoolManager.
|
|
10
|
+
* APR is fetched from Merkl API.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getEthAutoLP(wagmiConfig: Config, { prices, }?: {
|
|
13
|
+
prices?: Record<string, number>;
|
|
14
|
+
}): Promise<EthAutoLPData | undefined>;
|
|
15
|
+
//# sourceMappingURL=getEthAutoLP.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getEthAutoLP.d.ts","sourceRoot":"","sources":["../../functions/getEthAutoLP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAoB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAYjE,MAAM,WAAW,aAAc,SAAQ,aAAa;IAClD,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,EACnB,EACE,MAAM,GACP,GAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5B,GACL,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CA+CpC"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SupportedChainIds } from "@tokemak/config";
|
|
2
|
+
import { Config } from "@wagmi/core";
|
|
3
|
+
export declare const getEthPriceAtBlock: (wagmiConfig: Config, blockNumber: bigint, chainId: SupportedChainIds) => Promise<bigint>;
|
|
4
|
+
//# sourceMappingURL=getEthPriceAtBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getEthPriceAtBlock.d.ts","sourceRoot":"","sources":["../../functions/getEthPriceAtBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAgB,MAAM,aAAa,CAAC;AAInD,eAAO,MAAM,kBAAkB,GAC7B,aAAa,MAAM,EACnB,aAAa,MAAM,EACnB,SAAS,iBAAiB,oBAoB3B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface GetTokenPriceConfig {
|
|
2
|
+
chainId?: number;
|
|
3
|
+
}
|
|
4
|
+
type AutopoolAddress = string;
|
|
5
|
+
type DestinationAddress = string;
|
|
6
|
+
type GenStratAprs = Record<AutopoolAddress, Record<DestinationAddress, {
|
|
7
|
+
name: string;
|
|
8
|
+
apr: number;
|
|
9
|
+
}>>;
|
|
10
|
+
export declare const getGenStratAprs: ({ chainId, }: GetTokenPriceConfig) => Promise<GenStratAprs | undefined>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=getGenStratAprs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getGenStratAprs.d.ts","sourceRoot":"","sources":["../../functions/getGenStratAprs.ts"],"names":[],"mappings":"AAKA,UAAU,mBAAmB;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAeD,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,kBAAkB,GAAG,MAAM,CAAC;AAEjC,KAAK,YAAY,GAAG,MAAM,CACxB,eAAe,EACf,MAAM,CACJ,kBAAkB,EAClB;IACE,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb,CACF,CACF,CAAC;AACF,eAAO,MAAM,eAAe,GAAU,cAEnC,mBAAmB,KAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CA6BxD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseAsset } from "./getTokenPrices";
|
|
2
|
+
export type BaseAssetWithUsd = BaseAsset | "USD";
|
|
3
|
+
type HistoricalPriceEntry = {
|
|
4
|
+
timestamp: number;
|
|
5
|
+
date: Date;
|
|
6
|
+
price: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const getBlobHistoricalTokenPrices: (tokenSymbol: string) => Promise<HistoricalPriceEntry[]>;
|
|
9
|
+
export declare const getHistoricalTokenPrices: () => Promise<HistoricalTokenPrices[]>;
|
|
10
|
+
export type HistoricalTokenPrices = {
|
|
11
|
+
timestamp: number;
|
|
12
|
+
date: Date;
|
|
13
|
+
prices: {
|
|
14
|
+
[key in BaseAssetWithUsd]: {
|
|
15
|
+
[key in BaseAssetWithUsd]: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=getHistoricalTokenPrices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getHistoricalTokenPrices.d.ts","sourceRoot":"","sources":["../../functions/getHistoricalTokenPrices.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK1D,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,KAAK,CAAC;AAEjD,KAAK,oBAAoB,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAOF,eAAO,MAAM,4BAA4B,GACvC,aAAa,MAAM,KAClB,OAAO,CAAC,oBAAoB,EAAE,CAWhC,CAAC;AAEF,eAAO,MAAM,wBAAwB,QAAa,OAAO,CACvD,qBAAqB,EAAE,CAqFxB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE;SAEL,GAAG,IAAI,gBAAgB,GAAG;aACxB,GAAG,IAAI,gBAAgB,GAAG,MAAM;SAClC;KACF,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Address } from "viem";
|
|
2
|
+
export interface MerklCreatorAprResult {
|
|
3
|
+
totalApr: number;
|
|
4
|
+
liveOpportunityCount: number;
|
|
5
|
+
opportunities: Array<{
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
apr: number;
|
|
9
|
+
tvl: number;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get the combined APR from all LIVE opportunities for a specific creator
|
|
14
|
+
*
|
|
15
|
+
* Fetches all opportunities for a creator address from the Merkl API,
|
|
16
|
+
* filters for LIVE status, and sums up their APRs.
|
|
17
|
+
*
|
|
18
|
+
* @param creatorAddress - The creator's wallet address
|
|
19
|
+
* @returns Combined APR data for all LIVE opportunities
|
|
20
|
+
*/
|
|
21
|
+
export declare function getMerklCreatorApr({ creatorAddress, identifier, }: {
|
|
22
|
+
creatorAddress: Address;
|
|
23
|
+
identifier?: string;
|
|
24
|
+
}): Promise<MerklCreatorAprResult | undefined>;
|
|
25
|
+
//# sourceMappingURL=getMerklCreatorApr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMerklCreatorApr.d.ts","sourceRoot":"","sources":["../../functions/getMerklCreatorApr.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,KAAK,CAAC;QACnB,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACb,CAAC,CAAC;CACJ;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,cAAc,EACd,UAAU,GACX,EAAE;IACD,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CA2C7C"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface MerklPoolAprResult {
|
|
2
|
+
apr: number;
|
|
3
|
+
tvl: number;
|
|
4
|
+
dailyRewards: number;
|
|
5
|
+
status: "LIVE" | "SOON" | "PAST" | "NONE";
|
|
6
|
+
opportunityId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
protocol: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Get the Merkl APR for a specific opportunity
|
|
12
|
+
*
|
|
13
|
+
* Fetches opportunity data from the Merkl API by opportunity ID
|
|
14
|
+
* and returns APR information.
|
|
15
|
+
*
|
|
16
|
+
* @param opportunityId - The Merkl opportunity ID
|
|
17
|
+
* @returns Pool APR data or undefined if not found
|
|
18
|
+
*/
|
|
19
|
+
export declare function getMerklPoolApr({ opportunityId, }: {
|
|
20
|
+
opportunityId: string;
|
|
21
|
+
}): Promise<MerklPoolAprResult | undefined>;
|
|
22
|
+
//# sourceMappingURL=getMerklPoolApr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMerklPoolApr.d.ts","sourceRoot":"","sources":["../../functions/getMerklPoolApr.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,EACpC,aAAa,GACd,EAAE;IACD,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAyB1C"}
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;;;;;;;;;kBASir8jD,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;;;IADt/+jD,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { SupportedChainIds } from "@tokemak/config";
|
|
2
|
+
import { Config } from "@wagmi/core";
|
|
3
|
+
export declare const getPoolsAndDestinations: (wagmiConfig: Config, { chainId }: {
|
|
4
|
+
chainId: SupportedChainIds;
|
|
5
|
+
}) => Promise<({
|
|
6
|
+
poolAddress: `0x${string}`;
|
|
7
|
+
name: string;
|
|
8
|
+
symbol: string;
|
|
9
|
+
vaultType: `0x${string}`;
|
|
10
|
+
baseAsset: `0x${string}`;
|
|
11
|
+
streamingFeeBps: bigint;
|
|
12
|
+
periodicFeeBps: bigint;
|
|
13
|
+
feeHighMarkEnabled: boolean;
|
|
14
|
+
feeSettingsIncomplete: boolean;
|
|
15
|
+
isShutdown: boolean;
|
|
16
|
+
shutdownStatus: number;
|
|
17
|
+
rewarder: `0x${string}`;
|
|
18
|
+
strategy: `0x${string}`;
|
|
19
|
+
totalSupply: bigint;
|
|
20
|
+
totalAssets: bigint;
|
|
21
|
+
totalIdle: bigint;
|
|
22
|
+
totalDebt: bigint;
|
|
23
|
+
navPerShare: bigint;
|
|
24
|
+
} & Record<string, {
|
|
25
|
+
vaultAddress: `0x${string}`;
|
|
26
|
+
exchangeName: string;
|
|
27
|
+
totalSupply: bigint;
|
|
28
|
+
lastSnapshotTimestamp: bigint;
|
|
29
|
+
feeApr: bigint;
|
|
30
|
+
lastDebtReportTime: bigint;
|
|
31
|
+
minDebtValue: bigint;
|
|
32
|
+
maxDebtValue: bigint;
|
|
33
|
+
debtValueHeldByVault: bigint;
|
|
34
|
+
queuedForRemoval: boolean;
|
|
35
|
+
statsIncomplete: boolean;
|
|
36
|
+
isShutdown: boolean;
|
|
37
|
+
shutdownStatus: number;
|
|
38
|
+
autoPoolOwnsShares: bigint;
|
|
39
|
+
actualLPTotalSupply: bigint;
|
|
40
|
+
dexPool: `0x${string}`;
|
|
41
|
+
lpTokenAddress: `0x${string}`;
|
|
42
|
+
lpTokenSymbol: string;
|
|
43
|
+
lpTokenName: string;
|
|
44
|
+
statsSafeLPTotalSupply: bigint;
|
|
45
|
+
statsIncentiveCredits: number;
|
|
46
|
+
compositeReturn: bigint;
|
|
47
|
+
rewardsTokens: readonly {
|
|
48
|
+
tokenAddress: `0x${string}`;
|
|
49
|
+
}[];
|
|
50
|
+
underlyingTokens: readonly {
|
|
51
|
+
tokenAddress: `0x${string}`;
|
|
52
|
+
}[];
|
|
53
|
+
underlyingTokenSymbols: readonly {
|
|
54
|
+
symbol: string;
|
|
55
|
+
}[];
|
|
56
|
+
lstStatsData: readonly {
|
|
57
|
+
lastSnapshotTimestamp: bigint;
|
|
58
|
+
baseApr: bigint;
|
|
59
|
+
discount: bigint;
|
|
60
|
+
discountHistory: readonly [number, number, number, number, number, number, number, number, number, number];
|
|
61
|
+
discountTimestampByPercent: number;
|
|
62
|
+
}[];
|
|
63
|
+
underlyingTokenValueHeld: readonly {
|
|
64
|
+
valueHeldInEth: bigint;
|
|
65
|
+
}[];
|
|
66
|
+
reservesInEth: readonly bigint[];
|
|
67
|
+
statsPeriodFinishForRewards: readonly number[];
|
|
68
|
+
statsAnnualizedRewardAmounts: readonly bigint[];
|
|
69
|
+
}[]>)[] | undefined>;
|
|
70
|
+
export type getPoolsAndDestinationsReturnType = Awaited<ReturnType<typeof getPoolsAndDestinations>>;
|
|
71
|
+
//# sourceMappingURL=getPoolsAndDestinations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPoolsAndDestinations.d.ts","sourceRoot":"","sources":["../../functions/getPoolsAndDestinations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAgB,MAAM,aAAa,CAAC;AAInD,eAAO,MAAM,uBAAuB,GAClC,aAAa,MAAM,EACnB,aAAa;IAAE,OAAO,EAAE,iBAAiB,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAsB5C,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG,OAAO,CACrD,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAC3C,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { SupportedChainIds } from "@tokemak/config";
|
|
2
|
+
export declare const getPoolsAndDestinationsBackup: (chainId: SupportedChainIds) => Promise<({
|
|
3
|
+
poolAddress: `0x${string}`;
|
|
4
|
+
name: string;
|
|
5
|
+
symbol: string;
|
|
6
|
+
vaultType: `0x${string}`;
|
|
7
|
+
baseAsset: `0x${string}`;
|
|
8
|
+
streamingFeeBps: bigint;
|
|
9
|
+
periodicFeeBps: bigint;
|
|
10
|
+
feeHighMarkEnabled: boolean;
|
|
11
|
+
feeSettingsIncomplete: boolean;
|
|
12
|
+
isShutdown: boolean;
|
|
13
|
+
shutdownStatus: number;
|
|
14
|
+
rewarder: `0x${string}`;
|
|
15
|
+
strategy: `0x${string}`;
|
|
16
|
+
totalSupply: bigint;
|
|
17
|
+
totalAssets: bigint;
|
|
18
|
+
totalIdle: bigint;
|
|
19
|
+
totalDebt: bigint;
|
|
20
|
+
navPerShare: bigint;
|
|
21
|
+
} & Record<string, {
|
|
22
|
+
vaultAddress: `0x${string}`;
|
|
23
|
+
exchangeName: string;
|
|
24
|
+
totalSupply: bigint;
|
|
25
|
+
lastSnapshotTimestamp: bigint;
|
|
26
|
+
feeApr: bigint;
|
|
27
|
+
lastDebtReportTime: bigint;
|
|
28
|
+
minDebtValue: bigint;
|
|
29
|
+
maxDebtValue: bigint;
|
|
30
|
+
debtValueHeldByVault: bigint;
|
|
31
|
+
queuedForRemoval: boolean;
|
|
32
|
+
statsIncomplete: boolean;
|
|
33
|
+
isShutdown: boolean;
|
|
34
|
+
shutdownStatus: number;
|
|
35
|
+
autoPoolOwnsShares: bigint;
|
|
36
|
+
actualLPTotalSupply: bigint;
|
|
37
|
+
dexPool: `0x${string}`;
|
|
38
|
+
lpTokenAddress: `0x${string}`;
|
|
39
|
+
lpTokenSymbol: string;
|
|
40
|
+
lpTokenName: string;
|
|
41
|
+
statsSafeLPTotalSupply: bigint;
|
|
42
|
+
statsIncentiveCredits: number;
|
|
43
|
+
compositeReturn: bigint;
|
|
44
|
+
rewardsTokens: readonly {
|
|
45
|
+
tokenAddress: `0x${string}`;
|
|
46
|
+
}[];
|
|
47
|
+
underlyingTokens: readonly {
|
|
48
|
+
tokenAddress: `0x${string}`;
|
|
49
|
+
}[];
|
|
50
|
+
underlyingTokenSymbols: readonly {
|
|
51
|
+
symbol: string;
|
|
52
|
+
}[];
|
|
53
|
+
lstStatsData: readonly {
|
|
54
|
+
lastSnapshotTimestamp: bigint;
|
|
55
|
+
baseApr: bigint;
|
|
56
|
+
discount: bigint;
|
|
57
|
+
discountHistory: readonly [number, number, number, number, number, number, number, number, number, number];
|
|
58
|
+
discountTimestampByPercent: number;
|
|
59
|
+
}[];
|
|
60
|
+
underlyingTokenValueHeld: readonly {
|
|
61
|
+
valueHeldInEth: bigint;
|
|
62
|
+
}[];
|
|
63
|
+
reservesInEth: readonly bigint[];
|
|
64
|
+
statsPeriodFinishForRewards: readonly number[];
|
|
65
|
+
statsAnnualizedRewardAmounts: readonly bigint[];
|
|
66
|
+
}[]>)[] | undefined>;
|
|
67
|
+
//# sourceMappingURL=getPoolsAndDestinationsBackup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPoolsAndDestinationsBackup.d.ts","sourceRoot":"","sources":["../../functions/getPoolsAndDestinationsBackup.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,6BAA6B,GACxC,SAAS,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAW3B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Config } from "wagmi";
|
|
2
|
+
import { Address } from "viem";
|
|
3
|
+
export declare const BATCH_SIZE = 500;
|
|
4
|
+
export type IRebalance = {
|
|
5
|
+
timestamp: number;
|
|
6
|
+
blockNumber: number;
|
|
7
|
+
chainId: number;
|
|
8
|
+
valueInUsd: number;
|
|
9
|
+
valueInAsset: number;
|
|
10
|
+
autopool: string;
|
|
11
|
+
};
|
|
12
|
+
export type RawRebalance = {
|
|
13
|
+
timestamp: number;
|
|
14
|
+
blockNumber: number;
|
|
15
|
+
tokenOut: {
|
|
16
|
+
id: Address;
|
|
17
|
+
symbol: string;
|
|
18
|
+
decimals: number;
|
|
19
|
+
};
|
|
20
|
+
tokenOutValueInEth: string;
|
|
21
|
+
tokenOutValueBaseAsset: string;
|
|
22
|
+
autopool: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const fetchChainRebalances: (chainId: number) => Promise<RawRebalance[]>;
|
|
25
|
+
export declare const getRebalanceValueUsd: (rebalance: RawRebalance, chainId: number, wagmiConfig: Config) => Promise<number | null>;
|
|
26
|
+
export declare const processRebalance: (rebalance: RawRebalance, chainId: number, wagmiConfig: Config) => Promise<IRebalance>;
|
|
27
|
+
export declare const processRebalancesInBatches: (rebalances: RawRebalance[], chainId: number, wagmiConfig: Config) => Promise<IRebalance[]>;
|
|
28
|
+
export declare const calculateRebalanceStats: (rebalances: IRebalance[]) => {
|
|
29
|
+
totalRebalances: number;
|
|
30
|
+
totalRebalanceVolume: number;
|
|
31
|
+
rebalances: IRebalance[];
|
|
32
|
+
};
|
|
33
|
+
export declare const getRebalanceStats: (wagmiConfig: Config, { includeTestnet, }: {
|
|
34
|
+
includeTestnet?: boolean;
|
|
35
|
+
}) => Promise<{
|
|
36
|
+
totalRebalances: number;
|
|
37
|
+
totalRebalanceVolume: number;
|
|
38
|
+
rebalances: IRebalance[];
|
|
39
|
+
}>;
|
|
40
|
+
//# sourceMappingURL=getRebalanceStats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRebalanceStats.d.ts","sourceRoot":"","sources":["../../functions/getRebalanceStats.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAG/B,eAAO,MAAM,UAAU,MAAM,CAAC;AAE9B,MAAM,MAAM,UAAU,GAAG;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE;QACR,EAAE,EAAE,OAAO,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,kBAAkB,EAAE,MAAM,CAAC;IAC3B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,SAAS,MAAM,KACd,OAAO,CAAC,YAAY,EAAE,CAaxB,CAAC;AAuBF,eAAO,MAAM,oBAAoB,GAC/B,WAAW,YAAY,EACvB,SAAS,MAAM,EACf,aAAa,MAAM,KAClB,OAAO,CAAC,MAAM,GAAG,IAAI,CAoBvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,WAAW,YAAY,EACvB,SAAS,MAAM,EACf,aAAa,MAAM,KAClB,OAAO,CAAC,UAAU,CAoCpB,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,YAAY,YAAY,EAAE,EAC1B,SAAS,MAAM,EACf,aAAa,MAAM,KAClB,OAAO,CAAC,UAAU,EAAE,CAwBtB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,YAAY,UAAU,EAAE;;;;CAY/D,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,aAAa,MAAM,EACnB,qBAEG;IACD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;;;;EAiBF,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Address } from "viem";
|
|
2
|
+
export type IUserReward = {
|
|
3
|
+
payload: {
|
|
4
|
+
wallet: Address;
|
|
5
|
+
cycle: bigint;
|
|
6
|
+
amount: bigint;
|
|
7
|
+
chainId: bigint;
|
|
8
|
+
};
|
|
9
|
+
signature: {
|
|
10
|
+
v: number;
|
|
11
|
+
r: `0x${string}`;
|
|
12
|
+
s: `0x${string}`;
|
|
13
|
+
msg: string;
|
|
14
|
+
};
|
|
15
|
+
summary?: {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
breakdown?: {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare const getRewardsPayloadV1: (cycleHash: string, account: Address, rewardsV1Url: string) => Promise<IUserReward | null>;
|
|
23
|
+
//# sourceMappingURL=getRewardsPayloadV1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRewardsPayloadV1.d.ts","sourceRoot":"","sources":["../../functions/getRewardsPayloadV1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE;QACP,MAAM,EAAE,OAAO,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,SAAS,EAAE;QACT,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;QACjB,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;QACjB,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,SAAS,CAAC,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,WAAW,MAAM,EACjB,SAAS,OAAO,EAChB,cAAc,MAAM,KACnB,OAAO,CAAC,WAAW,GAAG,IAAI,CAgB5B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Config } from "@wagmi/core";
|
|
2
|
+
export declare const getSAuto: (wagmiConfig: Config, { autoPrice, }: {
|
|
3
|
+
autoPrice: number;
|
|
4
|
+
}) => Promise<{
|
|
5
|
+
rawTotalSupply: bigint | undefined;
|
|
6
|
+
totalSupply: string;
|
|
7
|
+
tvl: string;
|
|
8
|
+
rawTVL: number;
|
|
9
|
+
currentCycle: bigint | undefined;
|
|
10
|
+
timeBeforeNextCycle: string;
|
|
11
|
+
} | undefined>;
|
|
12
|
+
export type ISAuto = Awaited<ReturnType<typeof getSAuto>>;
|
|
13
|
+
//# sourceMappingURL=getSAuto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSAuto.d.ts","sourceRoot":"","sources":["../../functions/getSAuto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAC;AAWpD,eAAO,MAAM,QAAQ,GACnB,aAAa,MAAM,EACnB,gBAEG;IACD,SAAS,EAAE,MAAM,CAAC;CACnB;;;;;;;cA8CF,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSAutoApr.d.ts","sourceRoot":"","sources":["../../functions/getSAutoApr.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW;;;;;;EAsCvB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type SAutoRewardsType = Awaited<ReturnType<typeof getSAutoRewards>>;
|
|
2
|
+
export declare const getSAutoRewards: () => Promise<{
|
|
3
|
+
totalEarnings: number;
|
|
4
|
+
totalEarningsUsd: number;
|
|
5
|
+
historicalRewards: {
|
|
6
|
+
timestamp: string;
|
|
7
|
+
balance: number;
|
|
8
|
+
balanceUSD: number;
|
|
9
|
+
earned: number;
|
|
10
|
+
earnedUSD: number;
|
|
11
|
+
dayAprPerCredit: number;
|
|
12
|
+
formattedDate: string;
|
|
13
|
+
}[];
|
|
14
|
+
} | null>;
|
|
15
|
+
//# sourceMappingURL=getSAutoRewards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSAutoRewards.d.ts","sourceRoot":"","sources":["../../functions/getSAutoRewards.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC;AAE3E,eAAO,MAAM,eAAe;;;;;;;;;;;;SA0C3B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|