@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,26 @@
|
|
1
|
+
import { type Forwarder, type ForwarderParameters, type MerklChainId } from "@sdk";
|
2
|
+
import { utils } from "ethers";
|
3
|
+
import type { UncachedResult } from "../../../utils/execute";
|
4
|
+
export declare const IONICCERC20_INTERFACE: utils.Interface;
|
5
|
+
type FetchedCampaign = {
|
6
|
+
rewardToken: string;
|
7
|
+
symbolRewardToken: string;
|
8
|
+
subtype: number;
|
9
|
+
compFork: number;
|
10
|
+
tvl: number;
|
11
|
+
forwarders?: {
|
12
|
+
[address: string]: ForwarderParameters<Forwarder>;
|
13
|
+
};
|
14
|
+
targetToken: string;
|
15
|
+
decimalsTargetToken: number;
|
16
|
+
totalSupplyTargetToken: number;
|
17
|
+
underlyingToken: string;
|
18
|
+
symbolUnderlyingToken: string;
|
19
|
+
decimalsUnderlyingToken: number;
|
20
|
+
symbolTargetToken: string;
|
21
|
+
amount: number;
|
22
|
+
};
|
23
|
+
export declare function getCompoundUserPositions(user: string, _chainId: MerklChainId, campaigns: {
|
24
|
+
[mainparameter: string]: FetchedCampaign;
|
25
|
+
}): Promise<UncachedResult<any>>;
|
26
|
+
export {};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import type { MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
import type { DolomitePositionFetchingDataType } from "../prepareFetch";
|
4
|
+
export type DolomitePositionType = {
|
5
|
+
[mainParameter: string]: {
|
6
|
+
decimals: number;
|
7
|
+
token: string;
|
8
|
+
symbol: string;
|
9
|
+
userPositions: {
|
10
|
+
borrowBalance: number;
|
11
|
+
supplyBalance: number;
|
12
|
+
token: string;
|
13
|
+
origin: string;
|
14
|
+
}[];
|
15
|
+
};
|
16
|
+
};
|
17
|
+
export declare function getDolomiteUserPositions(user: string, _chainId: MerklChainId, dolomitePositionFetchingData: DolomitePositionFetchingDataType): Promise<UncachedResult<DolomitePositionType>>;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
export declare function getERC20UserPositions(user: string, _chainId: MerklChainId, tokens: {
|
4
|
+
[marketAddress: string]: string[];
|
5
|
+
}): Promise<UncachedResult<any>>;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
export declare function getEulerUserPositions(user: string, _chainId: MerklChainId, tokens: {
|
4
|
+
[marketAddress: string]: string[];
|
5
|
+
}): Promise<UncachedResult<any>>;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { type Forwarder, type ForwarderParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
export type MorphoPositionType = {
|
4
|
+
[mainParameter: string]: {
|
5
|
+
userPositions: UserPosition[];
|
6
|
+
decimals: number;
|
7
|
+
totalSupply: number;
|
8
|
+
userTVL: number;
|
9
|
+
};
|
10
|
+
};
|
11
|
+
export type FetchedCampaign = {
|
12
|
+
rewardToken: string;
|
13
|
+
targetToken: string;
|
14
|
+
symbolRewardToken: string;
|
15
|
+
subtype: number;
|
16
|
+
tvl: number;
|
17
|
+
marketId: string;
|
18
|
+
decimals: number;
|
19
|
+
totalSupplyTargetToken: number;
|
20
|
+
amount: number;
|
21
|
+
forwarders?: {
|
22
|
+
[address: string]: ForwarderParameters<Forwarder>;
|
23
|
+
};
|
24
|
+
};
|
25
|
+
export type UserPosition = {
|
26
|
+
balance: number;
|
27
|
+
token: string;
|
28
|
+
origin: string;
|
29
|
+
totalSupply: number;
|
30
|
+
tvl: number;
|
31
|
+
};
|
32
|
+
export type Res = {
|
33
|
+
userPositions: UserPosition[];
|
34
|
+
decimals: number;
|
35
|
+
totalSupply: number;
|
36
|
+
userTVL: number;
|
37
|
+
};
|
38
|
+
export declare function getMorphoUserPositions(user: string, _chainId: MerklChainId, campaigns: {
|
39
|
+
[mainparameter: string]: FetchedCampaign;
|
40
|
+
}): Promise<UncachedResult<MorphoPositionType>>;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Campaign, type CampaignParameters, type DolomiteSubCampaignType } from "@sdk";
|
2
|
+
export type DolomitePositionFetchingDataType = {
|
3
|
+
[key: string]: {
|
4
|
+
decimals: number;
|
5
|
+
targetToken: string;
|
6
|
+
marketIndex: number;
|
7
|
+
totalSupplyTargetToken?: number;
|
8
|
+
symbol: string;
|
9
|
+
subCampaignType: DolomiteSubCampaignType;
|
10
|
+
campaigns: {
|
11
|
+
[key: string]: {
|
12
|
+
rewardToken: string;
|
13
|
+
symbolRewardToken: string;
|
14
|
+
amount: number;
|
15
|
+
};
|
16
|
+
};
|
17
|
+
};
|
18
|
+
};
|
19
|
+
export declare function prepareFetch(type: Campaign, previous: any, // FIXME
|
20
|
+
campaign: CampaignParameters<Campaign>): {
|
21
|
+
[marketAddress: string]: string[];
|
22
|
+
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
export type CLAMMPosition = {
|
2
|
+
userPositions: {
|
3
|
+
almAddress: string;
|
4
|
+
balance0: number;
|
5
|
+
balance1: number;
|
6
|
+
id: string;
|
7
|
+
inRangeLiquidity: number;
|
8
|
+
lowerTick: number;
|
9
|
+
origin: number;
|
10
|
+
totalLiquidity: number;
|
11
|
+
tvl: number;
|
12
|
+
upperTick: number;
|
13
|
+
}[];
|
14
|
+
tick: number;
|
15
|
+
userTVL: number;
|
16
|
+
userBalanceToken0: number;
|
17
|
+
userBalanceToken1: number;
|
18
|
+
userTotalLiquidity: number;
|
19
|
+
userInRangeLiquidity: number;
|
20
|
+
};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { ChainId } from "@sdk";
|
2
|
+
export type CampaignRewardsT = {
|
3
|
+
recipient: string;
|
4
|
+
reason: string;
|
5
|
+
rewardToken: string;
|
6
|
+
amount: string;
|
7
|
+
}[];
|
8
|
+
export declare const getCampaignRewardsWithCache: (chainId: ChainId, root: string, campaignId: string) => Promise<any>;
|
9
|
+
export declare const getCampaignRewardsDeltaWithCache: (chainId: ChainId, from: number, to: number, campaignId: string) => Promise<any>;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import type { ChainId } from "@sdk";
|
2
|
+
export declare const getRewardsMainParameterWithCache: (chainId: ChainId, root: string, mainParameter: string) => Promise<any>;
|
3
|
+
export declare const getRewardsMainParameterDeltaWithCache: (chainId: ChainId, from: number, to: number, mainParameter: string) => Promise<any>;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { UncachedResult } from "../../utils/execute";
|
2
|
+
type ReturnType = {
|
3
|
+
[address: string]: {
|
4
|
+
symbol: string;
|
5
|
+
balance: string;
|
6
|
+
decimals: number;
|
7
|
+
};
|
8
|
+
};
|
9
|
+
export declare function getOnlyUserBalance(chainId: number, userAddress: string, tokenAddresses: string[]): Promise<UncachedResult<ReturnType>>;
|
10
|
+
export declare function getUserBalances(user: string, chainId: number, tokenAddresses?: string[]): Promise<UncachedResult<ReturnType>>;
|
11
|
+
export {};
|
@@ -0,0 +1,206 @@
|
|
1
|
+
import Elysia from "elysia";
|
2
|
+
export declare const AccountingController: Elysia<"/accounting", false, {
|
3
|
+
decorator: {};
|
4
|
+
store: {};
|
5
|
+
derive: {};
|
6
|
+
resolve: {};
|
7
|
+
}, {
|
8
|
+
type: {};
|
9
|
+
error: {};
|
10
|
+
}, {
|
11
|
+
schema: {};
|
12
|
+
macro: {};
|
13
|
+
}, {
|
14
|
+
accounting: {
|
15
|
+
index: {
|
16
|
+
get: {
|
17
|
+
body: unknown;
|
18
|
+
params: Record<never, string>;
|
19
|
+
query: {
|
20
|
+
items?: number | undefined;
|
21
|
+
page?: number | undefined;
|
22
|
+
};
|
23
|
+
headers: {
|
24
|
+
authorization: string;
|
25
|
+
};
|
26
|
+
response: {
|
27
|
+
200: {
|
28
|
+
id: string;
|
29
|
+
chainId: number;
|
30
|
+
fromTokenId: string;
|
31
|
+
toTokenId: string;
|
32
|
+
multisig: string;
|
33
|
+
recipient: string;
|
34
|
+
amountIn: string;
|
35
|
+
amountOut: string;
|
36
|
+
datetime: Date;
|
37
|
+
timestamp: number;
|
38
|
+
}[];
|
39
|
+
};
|
40
|
+
};
|
41
|
+
};
|
42
|
+
} & {
|
43
|
+
revenues: {
|
44
|
+
get: {
|
45
|
+
body: unknown;
|
46
|
+
params: Record<never, string>;
|
47
|
+
query: unknown;
|
48
|
+
headers: {
|
49
|
+
authorization: string;
|
50
|
+
};
|
51
|
+
response: {
|
52
|
+
200: {
|
53
|
+
totalAmount: number;
|
54
|
+
};
|
55
|
+
};
|
56
|
+
};
|
57
|
+
};
|
58
|
+
} & {
|
59
|
+
revenues: {
|
60
|
+
"per-month": {
|
61
|
+
":year": {
|
62
|
+
":month": {
|
63
|
+
get: {
|
64
|
+
body: unknown;
|
65
|
+
params: {
|
66
|
+
month: number;
|
67
|
+
year: number;
|
68
|
+
};
|
69
|
+
query: unknown;
|
70
|
+
headers: {
|
71
|
+
authorization: string;
|
72
|
+
};
|
73
|
+
response: {
|
74
|
+
200: {
|
75
|
+
totalAmount: number;
|
76
|
+
from: string;
|
77
|
+
to: string;
|
78
|
+
};
|
79
|
+
};
|
80
|
+
};
|
81
|
+
};
|
82
|
+
};
|
83
|
+
};
|
84
|
+
};
|
85
|
+
} & {
|
86
|
+
revenues: {
|
87
|
+
chains: {
|
88
|
+
":chainId": {
|
89
|
+
get: {
|
90
|
+
body: unknown;
|
91
|
+
params: {
|
92
|
+
chainId: number;
|
93
|
+
};
|
94
|
+
query: unknown;
|
95
|
+
headers: {
|
96
|
+
authorization: string;
|
97
|
+
};
|
98
|
+
response: {
|
99
|
+
200: {
|
100
|
+
totalAmount: number;
|
101
|
+
};
|
102
|
+
};
|
103
|
+
};
|
104
|
+
};
|
105
|
+
};
|
106
|
+
};
|
107
|
+
} & {
|
108
|
+
revenues: {
|
109
|
+
chains: {
|
110
|
+
":chainId": {
|
111
|
+
"per-month": {
|
112
|
+
":year": {
|
113
|
+
":month": {
|
114
|
+
get: {
|
115
|
+
body: unknown;
|
116
|
+
params: {
|
117
|
+
chainId: number;
|
118
|
+
month: number;
|
119
|
+
year: number;
|
120
|
+
};
|
121
|
+
query: unknown;
|
122
|
+
headers: {
|
123
|
+
authorization: string;
|
124
|
+
};
|
125
|
+
response: {
|
126
|
+
200: {
|
127
|
+
totalAmount: number;
|
128
|
+
from: string;
|
129
|
+
to: string;
|
130
|
+
};
|
131
|
+
};
|
132
|
+
};
|
133
|
+
};
|
134
|
+
};
|
135
|
+
};
|
136
|
+
};
|
137
|
+
};
|
138
|
+
};
|
139
|
+
} & {
|
140
|
+
tokens: {
|
141
|
+
":chainId": {
|
142
|
+
":tokenAddress": {
|
143
|
+
get: {
|
144
|
+
body: unknown;
|
145
|
+
params: {
|
146
|
+
chainId: number;
|
147
|
+
tokenAddress: string;
|
148
|
+
};
|
149
|
+
query: unknown;
|
150
|
+
headers: {
|
151
|
+
authorization: string;
|
152
|
+
};
|
153
|
+
response: {
|
154
|
+
200: {
|
155
|
+
totalAmount: number;
|
156
|
+
totalAmountUSD: number;
|
157
|
+
};
|
158
|
+
};
|
159
|
+
};
|
160
|
+
};
|
161
|
+
};
|
162
|
+
};
|
163
|
+
} & {
|
164
|
+
tokens: {
|
165
|
+
":chainId": {
|
166
|
+
":tokenAddress": {
|
167
|
+
"per-month": {
|
168
|
+
":year": {
|
169
|
+
":month": {
|
170
|
+
get: {
|
171
|
+
body: unknown;
|
172
|
+
params: {
|
173
|
+
chainId: number;
|
174
|
+
tokenAddress: string;
|
175
|
+
month: number;
|
176
|
+
year: number;
|
177
|
+
};
|
178
|
+
query: unknown;
|
179
|
+
headers: {
|
180
|
+
authorization: string;
|
181
|
+
};
|
182
|
+
response: {
|
183
|
+
200: {
|
184
|
+
totalAmount: number;
|
185
|
+
totalAmountUSD: number;
|
186
|
+
from: string;
|
187
|
+
to: string;
|
188
|
+
};
|
189
|
+
};
|
190
|
+
};
|
191
|
+
};
|
192
|
+
};
|
193
|
+
};
|
194
|
+
};
|
195
|
+
};
|
196
|
+
};
|
197
|
+
};
|
198
|
+
}, {
|
199
|
+
derive: {};
|
200
|
+
resolve: {};
|
201
|
+
schema: {};
|
202
|
+
}, {
|
203
|
+
derive: {};
|
204
|
+
resolve: {};
|
205
|
+
schema: {};
|
206
|
+
}>;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
export declare const TokensDto: import("@sinclair/typebox").TObject<{
|
2
|
+
chainId: import("@sinclair/typebox").TNumber;
|
3
|
+
tokenAddress: import("@sinclair/typebox").TString;
|
4
|
+
}>;
|
5
|
+
export declare const GetTransactionsQueryModel: import("@sinclair/typebox").TObject<{
|
6
|
+
page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
7
|
+
items: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
8
|
+
}>;
|
9
|
+
export declare const TokensDateDto: import("@sinclair/typebox").TObject<{
|
10
|
+
chainId: import("@sinclair/typebox").TNumber;
|
11
|
+
tokenAddress: import("@sinclair/typebox").TString;
|
12
|
+
month: import("@sinclair/typebox").TNumber;
|
13
|
+
year: import("@sinclair/typebox").TNumber;
|
14
|
+
}>;
|
15
|
+
export declare const DateDto: import("@sinclair/typebox").TObject<{
|
16
|
+
month: import("@sinclair/typebox").TNumber;
|
17
|
+
year: import("@sinclair/typebox").TNumber;
|
18
|
+
}>;
|
19
|
+
export declare const ChainDto: import("@sinclair/typebox").TObject<{
|
20
|
+
chainId: import("@sinclair/typebox").TNumber;
|
21
|
+
}>;
|
22
|
+
export declare const RevenuesDto: import("@sinclair/typebox").TObject<{
|
23
|
+
chainId: import("@sinclair/typebox").TNumber;
|
24
|
+
month: import("@sinclair/typebox").TNumber;
|
25
|
+
year: import("@sinclair/typebox").TNumber;
|
26
|
+
}>;
|
27
|
+
export declare const GetRevenuesDto: import("@sinclair/typebox").TObject<{
|
28
|
+
chainId: import("@sinclair/typebox").TNumber;
|
29
|
+
month: import("@sinclair/typebox").TNumber;
|
30
|
+
year: import("@sinclair/typebox").TNumber;
|
31
|
+
}>;
|
32
|
+
export type GetTransactionsQueryModel = typeof GetTransactionsQueryModel.static;
|
@@ -0,0 +1,99 @@
|
|
1
|
+
import type { GetTransactionsQueryModel } from "./";
|
2
|
+
export declare class AccountingRepository {
|
3
|
+
static findMany(query: GetTransactionsQueryModel): Promise<{
|
4
|
+
id: string;
|
5
|
+
chainId: number;
|
6
|
+
fromTokenId: string;
|
7
|
+
toTokenId: string;
|
8
|
+
multisig: string;
|
9
|
+
recipient: string;
|
10
|
+
amountIn: string;
|
11
|
+
amountOut: string;
|
12
|
+
datetime: Date;
|
13
|
+
timestamp: number;
|
14
|
+
}[]>;
|
15
|
+
static getByTokenForDumper(fromTokenId: string): Promise<{
|
16
|
+
id: string;
|
17
|
+
chainId: number;
|
18
|
+
fromTokenId: string;
|
19
|
+
toTokenId: string;
|
20
|
+
multisig: string;
|
21
|
+
recipient: string;
|
22
|
+
amountIn: string;
|
23
|
+
amountOut: string;
|
24
|
+
datetime: Date;
|
25
|
+
timestamp: number;
|
26
|
+
}[]>;
|
27
|
+
static getForMonthForRecipient(recipient: string, toTokenId: string, month: number, year: number): Promise<{
|
28
|
+
id: string;
|
29
|
+
chainId: number;
|
30
|
+
fromTokenId: string;
|
31
|
+
toTokenId: string;
|
32
|
+
multisig: string;
|
33
|
+
recipient: string;
|
34
|
+
amountIn: string;
|
35
|
+
amountOut: string;
|
36
|
+
datetime: Date;
|
37
|
+
timestamp: number;
|
38
|
+
}[]>;
|
39
|
+
static getForMultisigBetweenDates(startDate: Date, endDate: Date): Promise<{
|
40
|
+
id: string;
|
41
|
+
chainId: number;
|
42
|
+
fromTokenId: string;
|
43
|
+
toTokenId: string;
|
44
|
+
multisig: string;
|
45
|
+
recipient: string;
|
46
|
+
amountIn: string;
|
47
|
+
amountOut: string;
|
48
|
+
datetime: Date;
|
49
|
+
timestamp: number;
|
50
|
+
}[]>;
|
51
|
+
static getForMultisig(): Promise<{
|
52
|
+
id: string;
|
53
|
+
chainId: number;
|
54
|
+
fromTokenId: string;
|
55
|
+
toTokenId: string;
|
56
|
+
multisig: string;
|
57
|
+
recipient: string;
|
58
|
+
amountIn: string;
|
59
|
+
amountOut: string;
|
60
|
+
datetime: Date;
|
61
|
+
timestamp: number;
|
62
|
+
}[]>;
|
63
|
+
static getForMultisigByChain(chainId: number): Promise<{
|
64
|
+
id: string;
|
65
|
+
chainId: number;
|
66
|
+
fromTokenId: string;
|
67
|
+
toTokenId: string;
|
68
|
+
multisig: string;
|
69
|
+
recipient: string;
|
70
|
+
amountIn: string;
|
71
|
+
amountOut: string;
|
72
|
+
datetime: Date;
|
73
|
+
timestamp: number;
|
74
|
+
}[]>;
|
75
|
+
static getForMultisigByChainBetweenDates(chainId: number, startDate: Date, endDate: Date): Promise<{
|
76
|
+
id: string;
|
77
|
+
chainId: number;
|
78
|
+
fromTokenId: string;
|
79
|
+
toTokenId: string;
|
80
|
+
multisig: string;
|
81
|
+
recipient: string;
|
82
|
+
amountIn: string;
|
83
|
+
amountOut: string;
|
84
|
+
datetime: Date;
|
85
|
+
timestamp: number;
|
86
|
+
}[]>;
|
87
|
+
static getForDumperBetweenDates(fromTokenId: string, startDate: Date, endDate: Date): Promise<{
|
88
|
+
id: string;
|
89
|
+
chainId: number;
|
90
|
+
fromTokenId: string;
|
91
|
+
toTokenId: string;
|
92
|
+
multisig: string;
|
93
|
+
recipient: string;
|
94
|
+
amountIn: string;
|
95
|
+
amountOut: string;
|
96
|
+
datetime: Date;
|
97
|
+
timestamp: number;
|
98
|
+
}[]>;
|
99
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import type { GetTransactionsQueryModel } from "./";
|
2
|
+
import type { ChainId } from "@sdk";
|
3
|
+
export declare class AccountingService {
|
4
|
+
static hashId(chainId: ChainId, fromTokenId: string, toTokenId: string, timestamp: number): string;
|
5
|
+
static getTokenId(chainId: number, address: string): string;
|
6
|
+
static getMany(query: GetTransactionsQueryModel): Promise<{
|
7
|
+
id: string;
|
8
|
+
chainId: number;
|
9
|
+
fromTokenId: string;
|
10
|
+
toTokenId: string;
|
11
|
+
multisig: string;
|
12
|
+
recipient: string;
|
13
|
+
amountIn: string;
|
14
|
+
amountOut: string;
|
15
|
+
datetime: Date;
|
16
|
+
timestamp: number;
|
17
|
+
}[]>;
|
18
|
+
static getRevenue(): Promise<{
|
19
|
+
totalAmount: number;
|
20
|
+
}>;
|
21
|
+
static getRevenueByChain(chainId: number): Promise<{
|
22
|
+
totalAmount: number;
|
23
|
+
}>;
|
24
|
+
static getMonthlyRevenue(year: number, month: number): Promise<{
|
25
|
+
totalAmount: number;
|
26
|
+
from: string;
|
27
|
+
to: string;
|
28
|
+
}>;
|
29
|
+
static getMonthlyRevenueByChain(chainId: number, year: number, month: number): Promise<{
|
30
|
+
totalAmount: number;
|
31
|
+
from: string;
|
32
|
+
to: string;
|
33
|
+
}>;
|
34
|
+
static getTokenTransaction(tokenAddress: string, chainId: number): Promise<{
|
35
|
+
totalAmount: number;
|
36
|
+
totalAmountUSD: number;
|
37
|
+
}>;
|
38
|
+
static getTokenMonthlyTransaction(tokenAddress: string, chainId: number, year: number, month: number): Promise<{
|
39
|
+
totalAmount: number;
|
40
|
+
totalAmountUSD: number;
|
41
|
+
from: string;
|
42
|
+
to: string;
|
43
|
+
}>;
|
44
|
+
}
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { Resource } from "../prisma";
|
2
|
+
/**
|
3
|
+
* Apr Record
|
4
|
+
* @description Describes one apr snapshot for an opportunity
|
5
|
+
* @see {@link Resource}
|
6
|
+
*/
|
7
|
+
export type AprRecord = Resource<"AprRecord", "id" | "opportunityId", {
|
8
|
+
breakdowns: AprBreakdown["model"][];
|
9
|
+
}>;
|
10
|
+
/**
|
11
|
+
* Apr Breakdown
|
12
|
+
* @description Describes one apr fraction of record
|
13
|
+
* @see {@link Resource}
|
14
|
+
*/
|
15
|
+
export type AprBreakdown = Resource<"AprBreakdown", "id" | "aprRecordId">;
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { type CampaignDynamicData, Campaign as CampaignTypeV3 } from "@sdk";
|
2
|
+
import type { AprRecord } from "./apr.model";
|
3
|
+
export declare abstract class AprService {
|
4
|
+
static hashId(opportunityId: string, timestamp: bigint): string;
|
5
|
+
static extractFromDynamicData<C extends CampaignTypeV3>(type: C, campaignsDynamicData: CampaignDynamicData<C>[], timestamp?: bigint): AprRecord["model"];
|
6
|
+
}
|