@merkl/api 0.10.78
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +201 -0
- package/README.md +125 -0
- package/dist/database/api/.generated/default.d.ts +1 -0
- package/dist/database/api/.generated/edge.d.ts +1 -0
- package/dist/database/api/.generated/index.d.ts +36404 -0
- package/dist/database/api/.generated/libquery_engine-debian-openssl-1.1.x.so.node +0 -0
- package/dist/database/api/.generated/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
- package/dist/database/api/.generated/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node +0 -0
- package/dist/database/api/.generated/package.json +84 -0
- package/dist/database/api/.generated/runtime/index-browser.d.ts +365 -0
- package/dist/database/api/.generated/runtime/library.d.ts +3273 -0
- package/dist/database/api/.generated/schema.prisma +366 -0
- package/dist/database/api/.generated/wasm.d.ts +1 -0
- package/dist/database/api/seeder/resources/protocol.d.ts +353 -0
- package/dist/database/engine/.generated/default.d.ts +1 -0
- package/dist/database/engine/.generated/edge.d.ts +1 -0
- package/dist/database/engine/.generated/index.d.ts +16342 -0
- package/dist/database/engine/.generated/libquery_engine-debian-openssl-1.1.x.so.node +0 -0
- package/dist/database/engine/.generated/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
- package/dist/database/engine/.generated/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node +0 -0
- package/dist/database/engine/.generated/package.json +84 -0
- package/dist/database/engine/.generated/runtime/index-browser.d.ts +365 -0
- package/dist/database/engine/.generated/runtime/library.d.ts +3273 -0
- package/dist/database/engine/.generated/schema.prisma +205 -0
- package/dist/database/engine/.generated/wasm.d.ts +1 -0
- package/dist/src/backgroundJobs/index.d.ts +1 -0
- package/dist/src/backgroundJobs/jobs/campaignsCacheUpdater.d.ts +45 -0
- package/dist/src/backgroundJobs/jobs/health.d.ts +40 -0
- package/dist/src/backgroundJobs/jobs/opportunityUpdater.d.ts +37 -0
- package/dist/src/backgroundJobs/jobs/priceUpdater.d.ts +35 -0
- package/dist/src/backgroundJobs/jobs/sync.d.ts +39 -0
- package/dist/src/cache/declaration.d.ts +153 -0
- package/dist/src/cache/index.d.ts +52 -0
- package/dist/src/cache/redis.d.ts +311 -0
- package/dist/src/constants.d.ts +349 -0
- package/dist/src/eden/index.d.ts +4882 -0
- package/dist/src/eden/index.js +4 -0
- package/dist/src/entities/campaign.d.ts +58 -0
- package/dist/src/entities/opportunity.d.ts +17 -0
- package/dist/src/errors/BadRequest.error.d.ts +4 -0
- package/dist/src/errors/Conflict.error.d.ts +4 -0
- package/dist/src/errors/HttpError.d.ts +6 -0
- package/dist/src/errors/NotFound.error.d.ts +4 -0
- package/dist/src/errors/Opportunity.error.d.ts +6 -0
- package/dist/src/errors/Unauthorized.error.d.ts +4 -0
- package/dist/src/errors/index.d.ts +5 -0
- package/dist/src/guards/BackOffice.guard.d.ts +7 -0
- package/dist/src/guards/Engine.guard.d.ts +7 -0
- package/dist/src/guards/TokenAuth.guard.d.ts +7 -0
- package/dist/src/hooks/checkQueryAddressValidity.d.ts +21 -0
- package/dist/src/hooks/checkQueryChainIdValidity.d.ts +21 -0
- package/dist/src/index.d.ts +1889 -0
- package/dist/src/internal/controllers/endingCampaigns.d.ts +42 -0
- package/dist/src/internal/controllers/unclaimed.d.ts +43 -0
- package/dist/src/internal/index.d.ts +1 -0
- package/dist/src/libs/campaigns/campaignTypes/AjnaDynamicData.d.ts +5 -0
- package/dist/src/libs/campaigns/campaignTypes/BadgerDynamicData.d.ts +5 -0
- package/dist/src/libs/campaigns/campaignTypes/CLAMMDynamicData.d.ts +3 -0
- package/dist/src/libs/campaigns/campaignTypes/CompoundDynamicData.d.ts +3 -0
- package/dist/src/libs/campaigns/campaignTypes/DolomiteDynamicData.d.ts +5 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20DynamicData.d.ts +3 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/eulerVaultNames.d.ts +1 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/factoryFinder.d.ts +5 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/getBlacklistedSupply.d.ts +1 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/metamorphoTvl.d.ts +1 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/spliceTVL.d.ts +7 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.d.ts +45 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesPrices.d.ts +4 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound1.d.ts +23 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound2.d.ts +7 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound3.d.ts +6 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound4.d.ts +4 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20_SNAPSHOTDynamicData.d.ts +5 -0
- package/dist/src/libs/campaigns/campaignTypes/EulerDynamicData.d.ts +3 -0
- package/dist/src/libs/campaigns/campaignTypes/JSON_AIRDROPDynamicData.d.ts +5 -0
- package/dist/src/libs/campaigns/campaignTypes/MORPHODynamicData.d.ts +5 -0
- package/dist/src/libs/campaigns/campaignTypes/RadiantDynamicData.d.ts +3 -0
- package/dist/src/libs/campaigns/campaignTypes/SILODynamicData.d.ts +7 -0
- package/dist/src/libs/campaigns/campaignsDynamicData.d.ts +3 -0
- package/dist/src/libs/campaigns/getCampaigns.d.ts +1 -0
- package/dist/src/libs/campaigns/getRewards.d.ts +29 -0
- package/dist/src/libs/campaigns/utils/fetchA51Strategies.d.ts +18 -0
- package/dist/src/libs/campaigns/utils/fetchClamInfo.d.ts +2 -0
- package/dist/src/libs/campaigns/utils/fetchLogs.d.ts +10 -0
- package/dist/src/libs/campaigns/utils/getCompV2ForksVaults.d.ts +19 -0
- package/dist/src/libs/campaigns/utils/getContractCreationBlock.d.ts +2 -0
- package/dist/src/libs/campaigns/utils/getDolomiteMarkets.d.ts +7 -0
- package/dist/src/libs/campaigns/utils/getEulerV2Vaults.d.ts +16 -0
- package/dist/src/libs/campaigns/utils/getLastEligibilityRatio.d.ts +2 -0
- package/dist/src/libs/computeFee.d.ts +4 -0
- package/dist/src/libs/custom/twtParticipants.d.ts +6 -0
- package/dist/src/libs/deprecated-merklv3/index.d.ts +5 -0
- package/dist/src/libs/getTokensList.d.ts +27 -0
- package/dist/src/libs/merklChainData.d.ts +4 -0
- package/dist/src/libs/parse/marketsWithCache.d.ts +4 -0
- package/dist/src/libs/positions/ajna/index.d.ts +41 -0
- package/dist/src/libs/positions/badger/index.d.ts +27 -0
- package/dist/src/libs/positions/clamm/index.d.ts +8 -0
- package/dist/src/libs/positions/clamm/thegraph/fetchAlmPositions.d.ts +5 -0
- package/dist/src/libs/positions/clamm/thegraph/fetchAmmPositions.d.ts +8 -0
- package/dist/src/libs/positions/clamm/thegraph/fetchFarmedPositions.d.ts +11 -0
- package/dist/src/libs/positions/clamm/thegraph/index.d.ts +37 -0
- package/dist/src/libs/positions/compound/index.d.ts +26 -0
- package/dist/src/libs/positions/dolomite/index.d.ts +17 -0
- package/dist/src/libs/positions/erc20/index.d.ts +5 -0
- package/dist/src/libs/positions/euler/index.d.ts +5 -0
- package/dist/src/libs/positions/index.d.ts +3 -0
- package/dist/src/libs/positions/morpho/index.d.ts +40 -0
- package/dist/src/libs/positions/prepareFetch.d.ts +22 -0
- package/dist/src/libs/positions/silo/index.d.ts +5 -0
- package/dist/src/libs/positions/types.d.ts +20 -0
- package/dist/src/libs/reports/campaignReport.d.ts +9 -0
- package/dist/src/libs/reports/mainParameterRewards.d.ts +3 -0
- package/dist/src/libs/rewards/userRewards.d.ts +2 -0
- package/dist/src/libs/staticCampaigns.d.ts +2 -0
- package/dist/src/libs/tokens/balances.d.ts +11 -0
- package/dist/src/libs/tokens/tokenInfo.d.ts +8 -0
- package/dist/src/modules/v4/accounting/accounting.controller.d.ts +206 -0
- package/dist/src/modules/v4/accounting/accounting.model.d.ts +32 -0
- package/dist/src/modules/v4/accounting/accounting.repository.d.ts +99 -0
- package/dist/src/modules/v4/accounting/accounting.service.d.ts +44 -0
- package/dist/src/modules/v4/accounting/index.d.ts +3 -0
- package/dist/src/modules/v4/apr/apr.controller.d.ts +0 -0
- package/dist/src/modules/v4/apr/apr.model.d.ts +15 -0
- package/dist/src/modules/v4/apr/apr.repository.d.ts +0 -0
- package/dist/src/modules/v4/apr/apr.service.d.ts +6 -0
- package/dist/src/modules/v4/apr/index.d.ts +2 -0
- package/dist/src/modules/v4/blacklist/blacklist.controller.d.ts +122 -0
- package/dist/src/modules/v4/blacklist/blacklist.model.d.ts +15 -0
- package/dist/src/modules/v4/blacklist/blacklist.repository.d.ts +24 -0
- package/dist/src/modules/v4/blacklist/blacklist.service.d.ts +24 -0
- package/dist/src/modules/v4/blacklist/index.d.ts +3 -0
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +139 -0
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +85 -0
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +110 -0
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +180 -0
- package/dist/src/modules/v4/campaign/index.d.ts +3 -0
- package/dist/src/modules/v4/chain/chain.controller.d.ts +91 -0
- package/dist/src/modules/v4/chain/chain.model.d.ts +19 -0
- package/dist/src/modules/v4/chain/chain.repository.d.ts +66 -0
- package/dist/src/modules/v4/chain/chain.service.d.ts +42 -0
- package/dist/src/modules/v4/chain/index.d.ts +3 -0
- package/dist/src/modules/v4/enso/enso.model.d.ts +130 -0
- package/dist/src/modules/v4/enso/enso.service.d.ts +47 -0
- package/dist/src/modules/v4/explorer/explorer.repository.d.ts +8 -0
- package/dist/src/modules/v4/explorer/explorer.service.d.ts +8 -0
- package/dist/src/modules/v4/explorer/index.d.ts +1 -0
- package/dist/src/modules/v4/index.d.ts +4 -0
- package/dist/src/modules/v4/merklRoot/index.d.ts +3 -0
- package/dist/src/modules/v4/merklRoot/merklRoot.controller.d.ts +44 -0
- package/dist/src/modules/v4/merklRoot/merklRoot.model.d.ts +6 -0
- package/dist/src/modules/v4/merklRoot/merklRoot.repository.d.ts +21 -0
- package/dist/src/modules/v4/merklRoot/merklRoot.service.d.ts +34 -0
- package/dist/src/modules/v4/opportunity/index.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +349 -0
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +113 -0
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +432 -0
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +413 -0
- package/dist/src/modules/v4/opportunity/subservices/getAjnaMetadata.service.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/subservices/getBadgerMetadata.service.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/subservices/getClammMetadata.service.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/subservices/getCompoundMetadata.service.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/subservices/getDolomiteMetadata.service.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/subservices/getErc20Metadata.service.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/subservices/getErc20SnapshotMetadata.service.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/subservices/getEulerMetadata.service.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/subservices/getJsonAirDropMetadata.service.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/subservices/getMorphoMetadata.service.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/subservices/getRadiantMetadata.service.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/subservices/getSiloMetadata.service.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/transform-id.pipe.d.ts +5 -0
- package/dist/src/modules/v4/opportunity/validate-id.pipe.d.ts +5 -0
- package/dist/src/modules/v4/participate/participate.controller.d.ts +120 -0
- package/dist/src/modules/v4/participate/participate.model.d.ts +51 -0
- package/dist/src/modules/v4/participate/participate.service.d.ts +8 -0
- package/dist/src/modules/v4/price/index.d.ts +3 -0
- package/dist/src/modules/v4/price/price.controller.d.ts +169 -0
- package/dist/src/modules/v4/price/price.model.d.ts +32 -0
- package/dist/src/modules/v4/price/price.repository.d.ts +33 -0
- package/dist/src/modules/v4/price/price.service.d.ts +33 -0
- package/dist/src/modules/v4/prisma/index.d.ts +32 -0
- package/dist/src/modules/v4/protocol/index.d.ts +3 -0
- package/dist/src/modules/v4/protocol/protocol.controller.d.ts +87 -0
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +27 -0
- package/dist/src/modules/v4/protocol/protocol.repository.d.ts +37 -0
- package/dist/src/modules/v4/protocol/protocol.service.d.ts +10 -0
- package/dist/src/modules/v4/reward/index.d.ts +3 -0
- package/dist/src/modules/v4/reward/reward.controller.d.ts +158 -0
- package/dist/src/modules/v4/reward/reward.model.d.ts +158 -0
- package/dist/src/modules/v4/reward/reward.repository.d.ts +158 -0
- package/dist/src/modules/v4/reward/reward.service.d.ts +523 -0
- package/dist/src/modules/v4/reward/rewardConvertor.service.d.ts +14 -0
- package/dist/src/modules/v4/router.d.ts +1865 -0
- package/dist/src/modules/v4/status/index.d.ts +3 -0
- package/dist/src/modules/v4/status/status.controller.d.ts +143 -0
- package/dist/src/modules/v4/status/status.model.d.ts +23 -0
- package/dist/src/modules/v4/status/status.repository.d.ts +68 -0
- package/dist/src/modules/v4/status/status.service.d.ts +38 -0
- package/dist/src/modules/v4/token/index.d.ts +3 -0
- package/dist/src/modules/v4/token/token.controller.d.ts +131 -0
- package/dist/src/modules/v4/token/token.model.d.ts +35 -0
- package/dist/src/modules/v4/token/token.repository.d.ts +59 -0
- package/dist/src/modules/v4/token/token.service.d.ts +165 -0
- package/dist/src/modules/v4/tvl/index.d.ts +2 -0
- package/dist/src/modules/v4/tvl/tvl.controller.d.ts +0 -0
- package/dist/src/modules/v4/tvl/tvl.model.d.ts +15 -0
- package/dist/src/modules/v4/tvl/tvl.repository.d.ts +0 -0
- package/dist/src/modules/v4/tvl/tvl.service.d.ts +6 -0
- package/dist/src/modules/v4/uniswapV4/index.d.ts +4 -0
- package/dist/src/modules/v4/uniswapV4/uniswapV4.controller.d.ts +52 -0
- package/dist/src/modules/v4/uniswapV4/uniswapV4.model.d.ts +15 -0
- package/dist/src/modules/v4/uniswapV4/uniswapV4.repository.d.ts +2 -0
- package/dist/src/modules/v4/uniswapV4/uniswapV4.service.d.ts +20 -0
- package/dist/src/modules/v4/user/index.d.ts +3 -0
- package/dist/src/modules/v4/user/user.controller.d.ts +325 -0
- package/dist/src/modules/v4/user/user.model.d.ts +25 -0
- package/dist/src/modules/v4/user/user.repository.d.ts +19 -0
- package/dist/src/modules/v4/user/user.service.d.ts +19 -0
- package/dist/src/plugins/error-handling.plugin.d.ts +28 -0
- package/dist/src/plugins/logger.plugin.d.ts +21 -0
- package/dist/src/routes/v1/allowances.d.ts +66 -0
- package/dist/src/routes/v1/balances.d.ts +49 -0
- package/dist/src/routes/v1/prices.d.ts +41 -0
- package/dist/src/routes/v1/tokens.d.ts +44 -0
- package/dist/src/routes/v2/merkl.d.ts +54 -0
- package/dist/src/routes/v3/ERC20Campaigns.d.ts +1910 -0
- package/dist/src/routes/v3/app.d.ts +39 -0
- package/dist/src/routes/v3/blacklist.d.ts +1910 -0
- package/dist/src/routes/v3/campaign/delay.d.ts +41 -0
- package/dist/src/routes/v3/campaignClaims.d.ts +43 -0
- package/dist/src/routes/v3/campaignReport.d.ts +42 -0
- package/dist/src/routes/v3/campaignUnclaimed.d.ts +43 -0
- package/dist/src/routes/v3/campaigns.d.ts +1915 -0
- package/dist/src/routes/v3/campaignsForMainParameter.d.ts +42 -0
- package/dist/src/routes/v3/campaignsInfo.d.ts +1902 -0
- package/dist/src/routes/v3/campaignsRewardsReport.d.ts +43 -0
- package/dist/src/routes/v3/claims.d.ts +45 -0
- package/dist/src/routes/v3/compoundV2.d.ts +40 -0
- package/dist/src/routes/v3/createCampaign.d.ts +46 -0
- package/dist/src/routes/v3/dolomite.d.ts +40 -0
- package/dist/src/routes/v3/euler.d.ts +40 -0
- package/dist/src/routes/v3/exports/campaigns.d.ts +42 -0
- package/dist/src/routes/v3/fetch.d.ts +45 -0
- package/dist/src/routes/v3/health.d.ts +39 -0
- package/dist/src/routes/v3/lostyield.d.ts +52 -0
- package/dist/src/routes/v3/merkl.d.ts +87 -0
- package/dist/src/routes/v3/morphoMarkets.d.ts +61 -0
- package/dist/src/routes/v3/morphoVaults.d.ts +51 -0
- package/dist/src/routes/v3/multiChainPositions.d.ts +1909 -0
- package/dist/src/routes/v3/opportunity.d.ts +1946 -0
- package/dist/src/routes/v3/overview.d.ts +60 -0
- package/dist/src/routes/v3/parse.d.ts +46 -0
- package/dist/src/routes/v3/payload.d.ts +57 -0
- package/dist/src/routes/v3/poolInfo.d.ts +42 -0
- package/dist/src/routes/v3/positions.d.ts +1927 -0
- package/dist/src/routes/v3/radiant.d.ts +55 -0
- package/dist/src/routes/v3/recipients.d.ts +38 -0
- package/dist/src/routes/v3/rewards.d.ts +1910 -0
- package/dist/src/routes/v3/rewardsReport.d.ts +48 -0
- package/dist/src/routes/v3/rootForTimestamp.d.ts +52 -0
- package/dist/src/routes/v3/silo.d.ts +52 -0
- package/dist/src/routes/v3/token.d.ts +50 -0
- package/dist/src/routes/v3/tokenUnclaimed.d.ts +43 -0
- package/dist/src/routes/v3/twt/participants.d.ts +40 -0
- package/dist/src/routes/v3/updates.d.ts +1907 -0
- package/dist/src/routes/v3/userRewards.d.ts +1931 -0
- package/dist/src/types/index.d.ts +46 -0
- package/dist/src/types/parameters/Action.d.ts +4 -0
- package/dist/src/types/parameters/Chain.d.ts +4 -0
- package/dist/src/types/parameters/ChainCampaignId.d.ts +4 -0
- package/dist/src/types/parameters/MainParameter.d.ts +4 -0
- package/dist/src/types/parameters/OpportunityId.d.ts +4 -0
- package/dist/src/types/parameters/Timestamp.d.ts +4 -0
- package/dist/src/types/parameters/Type.d.ts +4 -0
- package/dist/src/types/parameters/index.d.ts +36 -0
- package/dist/src/types/returnTypes.d.ts +27 -0
- package/dist/src/types/utils.d.ts +5 -0
- package/dist/src/utils/addString.d.ts +2 -0
- package/dist/src/utils/bigintToString.d.ts +1 -0
- package/dist/src/utils/crypto.d.ts +1 -0
- package/dist/src/utils/error.d.ts +53 -0
- package/dist/src/utils/execute.d.ts +32 -0
- package/dist/src/utils/generic.d.ts +24 -0
- package/dist/src/utils/hashArray.d.ts +1 -0
- package/dist/src/utils/lastBlockBefore.d.ts +3 -0
- package/dist/src/utils/logger.d.ts +24 -0
- package/dist/src/utils/pricer.d.ts +52 -0
- package/dist/src/utils/prices/chainlinkRead.d.ts +4 -0
- package/dist/src/utils/prices/curveVirtualPrice.d.ts +4 -0
- package/dist/src/utils/prices/getDQUICK.d.ts +4 -0
- package/dist/src/utils/prices/priceFetcherFactory.d.ts +10 -0
- package/dist/src/utils/prices/priceService.d.ts +13 -0
- package/dist/src/utils/prices/services/coinGeckoService.d.ts +12 -0
- package/dist/src/utils/prices/services/defillamaService.d.ts +12 -0
- package/dist/src/utils/prices/services/dexScreenerService.d.ts +12 -0
- package/dist/src/utils/prices/services/erc4626Service.d.ts +9 -0
- package/dist/src/utils/prices/services/getERC4626.d.ts +4 -0
- package/dist/src/utils/prices/services/indexCoopService.d.ts +12 -0
- package/dist/src/utils/prices/services/priceFetcher.d.ts +8 -0
- package/dist/src/utils/prices/uniV2Price.d.ts +7 -0
- package/dist/src/utils/prisma.d.ts +16 -0
- package/dist/src/utils/providers.d.ts +13 -0
- package/dist/src/utils/queries/activeCampaigns.d.ts +3 -0
- package/dist/src/utils/queries/allCampaigns.d.ts +6 -0
- package/dist/src/utils/queries/campaignsForMainParameter.d.ts +2 -0
- package/dist/src/utils/queries/claimsOverTime.d.ts +8 -0
- package/dist/src/utils/queries/endingCampaigns.d.ts +10 -0
- package/dist/src/utils/queries/futureCampaigns.d.ts +3 -0
- package/dist/src/utils/queries/mainParameterCampaigns.d.ts +5 -0
- package/dist/src/utils/queries/rewardsAmount.d.ts +10 -0
- package/dist/src/utils/queries/unclaimed.d.ts +11 -0
- package/dist/src/utils/rateLimit.d.ts +63 -0
- package/dist/src/utils/stryke.d.ts +2 -0
- package/dist/src/utils/throw.d.ts +4 -0
- package/dist/src/utils/trace.d.ts +26 -0
- package/dist/src/utils/validation.d.ts +5 -0
- package/dist/tsconfig.package.tsbuildinfo +1 -0
- package/package.json +91 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
import { type Elysia } from "elysia";
|
2
|
+
export declare const endingCampaignsController: (app: Elysia) => Elysia<"", false, {
|
3
|
+
decorator: {};
|
4
|
+
store: {};
|
5
|
+
derive: {};
|
6
|
+
resolve: {};
|
7
|
+
}, {
|
8
|
+
type: {};
|
9
|
+
error: {};
|
10
|
+
}, {
|
11
|
+
schema: {};
|
12
|
+
macro: {};
|
13
|
+
}, {
|
14
|
+
v3: {
|
15
|
+
internal: {
|
16
|
+
endingCampaigns: {
|
17
|
+
get: {
|
18
|
+
body: unknown;
|
19
|
+
params: Record<never, string>;
|
20
|
+
query: {
|
21
|
+
maxEndDate?: number | undefined;
|
22
|
+
minEndDate?: number | undefined;
|
23
|
+
minStartDate?: number | undefined;
|
24
|
+
nonRenewedOnly?: string | undefined;
|
25
|
+
};
|
26
|
+
headers: unknown;
|
27
|
+
response: {
|
28
|
+
200: any[];
|
29
|
+
};
|
30
|
+
};
|
31
|
+
};
|
32
|
+
};
|
33
|
+
};
|
34
|
+
}, {
|
35
|
+
derive: {};
|
36
|
+
resolve: {};
|
37
|
+
schema: {};
|
38
|
+
}, {
|
39
|
+
derive: {};
|
40
|
+
resolve: {};
|
41
|
+
schema: {};
|
42
|
+
}>;
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { type Elysia } from "elysia";
|
2
|
+
import { type TotalUnclaimedOutput } from "../../utils/queries/unclaimed";
|
3
|
+
export declare const unclaimedController: (app: Elysia) => Elysia<"", false, {
|
4
|
+
decorator: {};
|
5
|
+
store: {};
|
6
|
+
derive: {};
|
7
|
+
resolve: {};
|
8
|
+
}, {
|
9
|
+
type: {};
|
10
|
+
error: {};
|
11
|
+
}, {
|
12
|
+
schema: {};
|
13
|
+
macro: {};
|
14
|
+
}, {
|
15
|
+
v3: {
|
16
|
+
internal: {
|
17
|
+
unclaimed: {
|
18
|
+
get: {
|
19
|
+
body: unknown;
|
20
|
+
params: Record<never, string>;
|
21
|
+
query: {
|
22
|
+
timestamp?: number | undefined;
|
23
|
+
months?: number | undefined;
|
24
|
+
};
|
25
|
+
headers: unknown;
|
26
|
+
response: {
|
27
|
+
200: (TotalUnclaimedOutput & {
|
28
|
+
usdValue?: number;
|
29
|
+
})[];
|
30
|
+
};
|
31
|
+
};
|
32
|
+
};
|
33
|
+
};
|
34
|
+
};
|
35
|
+
}, {
|
36
|
+
derive: {};
|
37
|
+
resolve: {};
|
38
|
+
schema: {};
|
39
|
+
}, {
|
40
|
+
derive: {};
|
41
|
+
resolve: {};
|
42
|
+
schema: {};
|
43
|
+
}>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { type Campaign, type CampaignDynamicData, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
type campaignType = Campaign.AJNA;
|
4
|
+
export declare function AjnaDynamicData(chainId: MerklChainId, campaigns: CampaignParameters<campaignType>[]): Promise<UncachedResult<Partial<CampaignDynamicData<campaignType>[]>>>;
|
5
|
+
export {};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { type Campaign, type CampaignDynamicData, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
type campaignType = Campaign.BADGER;
|
4
|
+
export declare function BadgerDynamicData(chainId: MerklChainId, campaigns: CampaignParameters<campaignType>[]): Promise<UncachedResult<Partial<CampaignDynamicData<campaignType>[]>>>;
|
5
|
+
export {};
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { type Campaign, type CampaignDynamicData, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
export declare function CLAMMDynamicData(chainId: MerklChainId, campaigns: CampaignParameters<Campaign.CLAMM>[]): Promise<UncachedResult<Partial<CampaignDynamicData<Campaign.CLAMM>[]>>>;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { type Campaign, type CampaignDynamicData, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
export declare function CompoundDynamicData(chainId: MerklChainId, campaigns: CampaignParameters<Campaign.COMPOUND>[]): Promise<UncachedResult<Partial<CampaignDynamicData<Campaign.COMPOUND>[]>>>;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { type Campaign, type CampaignDynamicData, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
type campaignType = Campaign.DOLOMITE;
|
4
|
+
export declare function DolomiteDynamicData(chainId: MerklChainId, campaigns: CampaignParameters<campaignType>[]): Promise<UncachedResult<Partial<CampaignDynamicData<campaignType>[]>>>;
|
5
|
+
export {};
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { type Campaign, type CampaignDynamicData, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
export declare function ERC20DynamicData(chainId: MerklChainId, campaigns: CampaignParameters<Campaign.ERC20>[]): Promise<UncachedResult<Partial<CampaignDynamicData<Campaign.ERC20>[]>>>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function fetchEulerVaultName(vaultAddress: string, chainId: number): Promise<string | null>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function getBlacklistedSupply(index: number, decimals: number, blacklist: string[], calls: string[]): number;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function fetchMetamorphoTvl(chainId: number, vaultAddress: string): Promise<number>;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import type { Multicall3 } from "libs/sdk/src/generated/Multicall";
|
2
|
+
export declare enum tokenType {
|
3
|
+
uniswapv2 = "uniswapv2",
|
4
|
+
poolside = "poolside",
|
5
|
+
balancerGauge = "balancerGauge",
|
6
|
+
balancerPool = "balancerPool",
|
7
|
+
unknown = "unknown",
|
8
|
+
gearbox = "gearbox",
|
9
|
+
compound = "compound",
|
10
|
+
radiant_borrow = "radiant_borrow",
|
11
|
+
radiant_lend = "radiant_lend",
|
12
|
+
fluid = "fluid",
|
13
|
+
ionic = "ionic",
|
14
|
+
metamorpho = "metamorpho",
|
15
|
+
aerodrome = "aerodrome",
|
16
|
+
velodrome = "velodrome",
|
17
|
+
moonwell = "moonwell",
|
18
|
+
aave_lending = "aave_lending",
|
19
|
+
aave_borrowing = "aave_borrowing",
|
20
|
+
fraxlend = "fraxlend",
|
21
|
+
curve = "curve",
|
22
|
+
sturdy_aggregator = "sturdy_aggregator",
|
23
|
+
sturdy_silo = "sturdy_silo",
|
24
|
+
splice = "splice",// todo
|
25
|
+
toros = "toros",// todo
|
26
|
+
curve_2 = "curve_2",
|
27
|
+
aura = "aura",
|
28
|
+
akron = "akron",
|
29
|
+
enzyme = "enzyme",
|
30
|
+
dragonswap = "dragonswap",
|
31
|
+
silostaking = "silostaking",
|
32
|
+
euler_lend = "euler_lend",
|
33
|
+
euler_borrow = "euler_borrow",
|
34
|
+
koi = "koi",
|
35
|
+
baseswap = "baseswap",
|
36
|
+
layerbank = "layerbank",
|
37
|
+
beefy = "beefy",
|
38
|
+
fenix = "fenix",
|
39
|
+
zkswap = "zkswap"
|
40
|
+
}
|
41
|
+
export type tokenTypeStruct = {
|
42
|
+
type: tokenType;
|
43
|
+
calls: Multicall3.Call3Struct[];
|
44
|
+
typeInfo: any;
|
45
|
+
};
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import type { Pricer } from "../../../../utils/pricer";
|
2
|
+
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
|
+
import { tokenType, type tokenTypeStruct } from "./helpers/tokenType";
|
4
|
+
export declare function getTokenPricesInfo(index: number, type: tokenType, typeInfo: any, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<tokenTypeStruct>;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Interface } from "@ethersproject/abi";
|
2
|
+
import type { Multicall3 } from "libs/sdk/src/generated/Multicall";
|
3
|
+
import { type tokenTypeStruct } from "./helpers/tokenType";
|
4
|
+
export declare const factoryInterface: Interface;
|
5
|
+
export declare const balancerGaugeInterface: Interface;
|
6
|
+
export declare const OneInchStakingInterface: Interface;
|
7
|
+
export declare const compoundInterface: Interface;
|
8
|
+
export declare const radiantInterface: Interface;
|
9
|
+
export declare const ionicInterface: Interface;
|
10
|
+
export declare const layerBankInterface: Interface;
|
11
|
+
export declare const metamorphoInterface: Interface;
|
12
|
+
export declare const moonwellInterface: Interface;
|
13
|
+
export declare const aaveInterface: Interface;
|
14
|
+
export declare const fraxlendInterface: Interface;
|
15
|
+
export declare const curveInterface: Interface;
|
16
|
+
export declare const sturdyInterface: Interface;
|
17
|
+
export declare const torosInterface: Interface;
|
18
|
+
export declare const auraInterface: Interface;
|
19
|
+
export declare const fluidInterface: Interface;
|
20
|
+
export declare const enzymeInterface: Interface;
|
21
|
+
export declare const eulerInterface: Interface;
|
22
|
+
export declare const beefyInterface: Interface;
|
23
|
+
export declare function getTokenTypeRound1(calls: Multicall3.ResultStructOutput[], targetToken: string, index: number): tokenTypeStruct;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Interface } from "@ethersproject/abi";
|
2
|
+
import type { Multicall3 } from "libs/sdk/src/generated/Multicall";
|
3
|
+
import { tokenType, type tokenTypeStruct } from "./helpers/tokenType";
|
4
|
+
export declare const balancerPoolInterface: Interface;
|
5
|
+
export declare const gearboxVaultInterface: Interface;
|
6
|
+
export declare const auraOperatorInterface: Interface;
|
7
|
+
export declare function getTokenTypeRound2(index: number, type: tokenType, typeInfo: any, calls: Multicall3.ResultStructOutput[]): tokenTypeStruct;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Interface } from "@ethersproject/abi";
|
2
|
+
import type { Multicall3 } from "libs/sdk/src/generated/Multicall";
|
3
|
+
import { tokenType, type tokenTypeStruct } from "./helpers/tokenType";
|
4
|
+
export declare const BALANCER_VAULT_ADDRESS = "0xBA12222222228d8Ba445958a75a0704d566BF2C8";
|
5
|
+
export declare const balancerVaultInterface: Interface;
|
6
|
+
export declare function getTokenTypeRound3(index: number, type: tokenType, typeInfo: any, calls: Multicall3.ResultStructOutput[]): tokenTypeStruct;
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { type Campaign, type CampaignParameters } from "@sdk";
|
2
|
+
import type { Multicall3 } from "libs/sdk/src/generated/Multicall";
|
3
|
+
import { tokenType, type tokenTypeStruct } from "./helpers/tokenType";
|
4
|
+
export declare function getTokenTypeRound4(index: number, type: tokenType, typeInfo: any, calls: Multicall3.ResultStructOutput[], campaign: CampaignParameters<Campaign.ERC20>): tokenTypeStruct;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { type Campaign, type CampaignDynamicData, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
type ReturnType = CampaignDynamicData<Campaign.ERC20_SNAPSHOT>[];
|
4
|
+
export declare function ERC20_SNAPSHOTDynamicData(chainId: MerklChainId, campaigns: CampaignParameters<Campaign.ERC20_SNAPSHOT>[]): Promise<UncachedResult<Partial<ReturnType>>>;
|
5
|
+
export {};
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { type Campaign, type CampaignDynamicData, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
export declare function EulerDynamicData(chainId: MerklChainId, campaigns: CampaignParameters<Campaign.EULER>[]): Promise<UncachedResult<Partial<CampaignDynamicData<Campaign.EULER>[]>>>;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { Campaign, CampaignDynamicData, CampaignParameters, MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
type ReturnType = CampaignDynamicData<Campaign.JSON_AIRDROP>[];
|
4
|
+
export declare function JSON_AIRDROPDynamicData(_chainId: MerklChainId, campaigns: CampaignParameters<Campaign.JSON_AIRDROP>[]): Promise<UncachedResult<Partial<ReturnType>>>;
|
5
|
+
export {};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { type Campaign, type CampaignDynamicData, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
type ReturnType = Partial<CampaignDynamicData<Campaign.MORPHO>[]>;
|
4
|
+
export declare function MORPHODynamicData(chainId: MerklChainId, campaigns: CampaignParameters<Campaign.MORPHO>[]): Promise<UncachedResult<ReturnType>>;
|
5
|
+
export {};
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { type Campaign, type CampaignDynamicData, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
export declare function RadiantDynamicData(chainId: MerklChainId, campaigns: CampaignParameters<Campaign.RADIANT>[]): Promise<UncachedResult<Partial<CampaignDynamicData<Campaign.RADIANT>[]>>>;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { type Campaign, type CampaignDynamicData, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import { utils } from "ethers";
|
3
|
+
import type { UncachedResult } from "../../../utils/execute";
|
4
|
+
export declare const SILO_INTERFACE: utils.Interface;
|
5
|
+
type ReturnType = Partial<CampaignDynamicData<Campaign.SILO>[]>;
|
6
|
+
export declare function SILODynamicData(chainId: MerklChainId, campaigns: CampaignParameters<Campaign.SILO>[]): Promise<UncachedResult<ReturnType>>;
|
7
|
+
export {};
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { Campaign, type CampaignDynamicData, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../utils/execute";
|
3
|
+
export declare function campaignsDynamicData<T extends Campaign>(chainId: MerklChainId, campaigns: CampaignParameters<T>[], type: T): Promise<UncachedResult<Partial<CampaignDynamicData<T>[]>>>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function getCampaigns(chainId: number): Promise<any>;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { type MerklChainId } from "@sdk";
|
2
|
+
export type RewardsT = {
|
3
|
+
[chainId: number]: {
|
4
|
+
tokenData: {
|
5
|
+
[token: string]: {
|
6
|
+
accumulated: string;
|
7
|
+
unclaimed: string;
|
8
|
+
decimals: number;
|
9
|
+
symbol: string;
|
10
|
+
proof: string[];
|
11
|
+
};
|
12
|
+
};
|
13
|
+
campaignData: {
|
14
|
+
[campaignId: string]: {
|
15
|
+
[reason: string]: {
|
16
|
+
accumulated: string;
|
17
|
+
unclaimed: string;
|
18
|
+
token: string;
|
19
|
+
decimals: number;
|
20
|
+
symbol: string;
|
21
|
+
mainParameter: string;
|
22
|
+
auxiliaryData1: string;
|
23
|
+
auxiliaryData2: string;
|
24
|
+
};
|
25
|
+
};
|
26
|
+
};
|
27
|
+
};
|
28
|
+
};
|
29
|
+
export declare const getRewards: (chainIds: MerklChainId[], user: string, merklRoots: string[], creatorTag?: string) => Promise<RewardsT>;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { type MerklChainId } from "@sdk";
|
2
|
+
export declare type A51StrategiesType = {
|
3
|
+
pool: string;
|
4
|
+
vault: string;
|
5
|
+
id: string;
|
6
|
+
tickLower: number;
|
7
|
+
tickUpper: number;
|
8
|
+
};
|
9
|
+
export type A51StrategiesReturnType = {
|
10
|
+
[pool: string]: {
|
11
|
+
[vault: string]: {
|
12
|
+
id: string;
|
13
|
+
tickLower: number;
|
14
|
+
tickUpper: number;
|
15
|
+
}[];
|
16
|
+
};
|
17
|
+
};
|
18
|
+
export declare function fetchA51Strategies(chainId: MerklChainId, pools: string[]): Promise<A51StrategiesReturnType>;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { MerklChainId } from "@sdk";
|
2
|
+
export type LogType = {
|
3
|
+
data: string;
|
4
|
+
topics: ReadonlyArray<string>;
|
5
|
+
blockNumber: string;
|
6
|
+
address: string;
|
7
|
+
blockHash: string;
|
8
|
+
logIndex: string;
|
9
|
+
};
|
10
|
+
export declare function safeFetchLogs(chainId: MerklChainId, topics: string[], addresses: string[], fromBlock: number, toBlock: number): Promise<LogType[]>;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { type MerklChainId } from "@sdk";
|
2
|
+
export type CompoundVaultType = {
|
3
|
+
address: string;
|
4
|
+
asset: string;
|
5
|
+
chainId: MerklChainId;
|
6
|
+
debtTokenAddress: string;
|
7
|
+
name: string;
|
8
|
+
};
|
9
|
+
export type CompoundVaultsType = {
|
10
|
+
[chainId_compFork: string]: {
|
11
|
+
address: string;
|
12
|
+
symbolCToken: string;
|
13
|
+
decimalsCToken: number;
|
14
|
+
underlying: string;
|
15
|
+
symbolUnderlying: string;
|
16
|
+
decimalsUnderlying: number;
|
17
|
+
}[];
|
18
|
+
};
|
19
|
+
export declare const getCompoundV2ForksVaultsWithCache: () => Promise<CompoundVaultsType>;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { type MerklChainId } from "@sdk";
|
2
|
+
export type EulerVaultType = {
|
3
|
+
address: string;
|
4
|
+
asset: string;
|
5
|
+
chainId: MerklChainId;
|
6
|
+
debtTokenAddress: string;
|
7
|
+
name: string;
|
8
|
+
collaterals: {
|
9
|
+
address: string;
|
10
|
+
borrowLTV: string;
|
11
|
+
nameCollateral: string;
|
12
|
+
symbolCollateral: string;
|
13
|
+
symbolUnderlying: string;
|
14
|
+
}[];
|
15
|
+
};
|
16
|
+
export declare const getEulerV2VaultsWithCache: () => Promise<EulerVaultType[]>;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { CampaignsCacheUpdaterReturnType } from "../../backgroundJobs/jobs/campaignsCacheUpdater";
|
2
|
+
import { AMM, type ChainId, type MerklAPIType } from "@sdk";
|
3
|
+
import type { MerklChainData } from "../../types";
|
4
|
+
export declare function getClamsInfo(chainIds?: number[] | readonly ChainId[], AMMs?: Lowercase<keyof typeof AMM>[], user?: string, onlyLive?: boolean): Promise<MerklAPIType>;
|
5
|
+
export declare function campaignsToOldFormat(campaignData: CampaignsCacheUpdaterReturnType, merklChainData: MerklChainData): MerklAPIType[number];
|
@@ -0,0 +1,27 @@
|
|
1
|
+
export interface Token {
|
2
|
+
readonly name: string;
|
3
|
+
readonly address: string;
|
4
|
+
readonly decimals: number;
|
5
|
+
readonly symbol: string;
|
6
|
+
readonly useInSwap?: boolean;
|
7
|
+
readonly hasPermit?: boolean;
|
8
|
+
readonly permitVersion?: string;
|
9
|
+
readonly logoURI?: string;
|
10
|
+
readonly tags?: string[];
|
11
|
+
readonly wrappingMethod?: "Curve" | "BorrowStaker" | "Aave Matic Market" | "Wrap Native" | "Convex";
|
12
|
+
readonly underlyingTokens?: string[];
|
13
|
+
}
|
14
|
+
export interface TokenInfoListType {
|
15
|
+
[symbol: string]: Token;
|
16
|
+
}
|
17
|
+
export interface TokenList {
|
18
|
+
[chainId: number]: TokenInfoListType;
|
19
|
+
}
|
20
|
+
export declare const getTokensListWithCache: () => Promise<TokenList>;
|
21
|
+
export type MerklTokens = {
|
22
|
+
[address: string]: {
|
23
|
+
symbol: string;
|
24
|
+
decimals: number;
|
25
|
+
};
|
26
|
+
};
|
27
|
+
export declare function getMerklTokenList(chainId: number): Promise<MerklTokens>;
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { type MerklChainId } from "@sdk";
|
2
|
+
export declare const getMorphoMarketsWithCache: (chainId: MerklChainId, subtype: string) => Promise<any>;
|
3
|
+
export declare const getRadiantMarketsWithCache: (chainId: MerklChainId, poolAddressProvider: string) => Promise<any>;
|
4
|
+
export declare const getSiloMarketsWithCache: (chainId: MerklChainId, repository: string) => Promise<any>;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { type Forwarder, type ForwarderParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
export type UserPosition = {
|
4
|
+
balance: number;
|
5
|
+
token: string;
|
6
|
+
origin: string;
|
7
|
+
totalSupply: number;
|
8
|
+
tvl: number;
|
9
|
+
};
|
10
|
+
export type FetchedCampaign = {
|
11
|
+
rewardToken: string;
|
12
|
+
targetToken: string;
|
13
|
+
symbolRewardToken: string;
|
14
|
+
subtype: number;
|
15
|
+
tvl: number;
|
16
|
+
poolId: string;
|
17
|
+
decimals: number;
|
18
|
+
totalSupplyTargetToken: number;
|
19
|
+
computedtotalSupply: number;
|
20
|
+
amount: number;
|
21
|
+
forwarders?: {
|
22
|
+
[address: string]: ForwarderParameters<Forwarder>;
|
23
|
+
};
|
24
|
+
};
|
25
|
+
export type MorphoPositionType = {
|
26
|
+
[mainParameter: string]: {
|
27
|
+
userPositions: UserPosition[];
|
28
|
+
decimals: number;
|
29
|
+
totalSupply: number;
|
30
|
+
userTVL: number;
|
31
|
+
};
|
32
|
+
};
|
33
|
+
export type Res = {
|
34
|
+
userPositions: UserPosition[];
|
35
|
+
decimals: number;
|
36
|
+
totalSupply: number;
|
37
|
+
userTVL: number;
|
38
|
+
};
|
39
|
+
export declare function getAjnaUserPositions(user: string, _chainId: MerklChainId, campaigns: {
|
40
|
+
[mainparameter: string]: FetchedCampaign;
|
41
|
+
}): Promise<UncachedResult<MorphoPositionType>>;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
import type { FetchedCampaign } from "../morpho";
|
4
|
+
export type UserPosition = {
|
5
|
+
balance: number;
|
6
|
+
token: string;
|
7
|
+
origin: string;
|
8
|
+
totalSupply: number;
|
9
|
+
tvl: number;
|
10
|
+
};
|
11
|
+
export type MorphoPositionType = {
|
12
|
+
[mainParameter: string]: {
|
13
|
+
userPositions: UserPosition[];
|
14
|
+
decimals: number;
|
15
|
+
totalSupply: number;
|
16
|
+
userTVL: number;
|
17
|
+
};
|
18
|
+
};
|
19
|
+
export type Res = {
|
20
|
+
userPositions: UserPosition[];
|
21
|
+
decimals: number;
|
22
|
+
totalSupply: number;
|
23
|
+
userTVL: number;
|
24
|
+
};
|
25
|
+
export declare function getBadgerUserPositions(user: string, _chainId: MerklChainId, campaigns: {
|
26
|
+
[mainparameter: string]: FetchedCampaign;
|
27
|
+
}): Promise<UncachedResult<MorphoPositionType>>;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
import type { CLAMMPosition } from "../types";
|
4
|
+
export declare function getClammUserPositions(user: string, chainId: MerklChainId, poolsByAmm: {
|
5
|
+
[amm: string]: {
|
6
|
+
[pool: string]: any;
|
7
|
+
};
|
8
|
+
}): Promise<UncachedResult<CLAMMPosition>>;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { AMM, type ANGLE_NETWORKS } from "@sdk";
|
2
|
+
import { type PositionType } from ".";
|
3
|
+
export declare function fetchAmmPositionsV2(chainId: (typeof ANGLE_NETWORKS.merkl)[number], user: string, amms: AMM[]): Promise<{
|
4
|
+
[amm in AMM]?: {
|
5
|
+
nft: PositionType[];
|
6
|
+
direct: PositionType[];
|
7
|
+
};
|
8
|
+
}>;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { AMM, type MerklChainId } from "@sdk";
|
2
|
+
export type FarmPositionsType = {
|
3
|
+
[nftWrapper: string]: {
|
4
|
+
farmAddress: string;
|
5
|
+
id: string;
|
6
|
+
pool: string;
|
7
|
+
holder: string;
|
8
|
+
}[];
|
9
|
+
};
|
10
|
+
export declare function fetchFarmedPositionsV2(chainId: MerklChainId, owners: string[], amm: AMM): Promise<FarmPositionsType>;
|
11
|
+
export declare const fetchFarmedPositionsV2WithCache: (chainId: MerklChainId, user: string[], amm: AMM) => Promise<any>;
|
@@ -0,0 +1,37 @@
|
|
1
|
+
export type TGUniswapV3Positions = {
|
2
|
+
id: string;
|
3
|
+
liquidity: string;
|
4
|
+
tickLower: {
|
5
|
+
id: string;
|
6
|
+
};
|
7
|
+
tickUpper: {
|
8
|
+
id: string;
|
9
|
+
};
|
10
|
+
token0?: {
|
11
|
+
symbol: string;
|
12
|
+
};
|
13
|
+
token1?: {
|
14
|
+
symbol: string;
|
15
|
+
};
|
16
|
+
};
|
17
|
+
export declare type PositionType = {
|
18
|
+
id: string;
|
19
|
+
startTimestamp: number;
|
20
|
+
endTimestamp: number;
|
21
|
+
pool: {
|
22
|
+
id: string;
|
23
|
+
};
|
24
|
+
tickLower: string;
|
25
|
+
tickUpper: string;
|
26
|
+
liquidity: string;
|
27
|
+
owner: string;
|
28
|
+
handler?: string;
|
29
|
+
};
|
30
|
+
export declare const positionsQuery: string;
|
31
|
+
export declare const nftWrapperPositionsQuery: string;
|
32
|
+
export declare const nftPositionByIdsQuery: string;
|
33
|
+
/** Queries */
|
34
|
+
export declare const positionMultipleOwnersQuery: string;
|
35
|
+
export declare const positionsWithPastQuery: string;
|
36
|
+
export declare const almBalancesQuery: string;
|
37
|
+
export declare const almNFTBalancesQuery: string;
|