From 314c6546aa52d337b25188c27cc4a99b7c187af6 Mon Sep 17 00:00:00 2001 From: Petar Todorovic Date: Thu, 16 Apr 2026 10:53:06 +0200 Subject: [PATCH] feat: update schemas --- .changeset/silly-jokes-start.md | 5 + src/api/index.msw.ts | 6834 ++++++++++++----- src/api/index.ts | 106 +- src/api/schemas/actionArgumentsDto.ts | 12 +- .../actionArgumentsDtoInputTokenNetwork.ts | 1 + .../actionArgumentsDtoOutputTokenNetwork.ts | 1 + src/api/schemas/actionDto.ts | 4 +- src/api/schemas/actionDtoType.ts | 2 + .../actionsControllerGetActionsNetwork.ts | 105 + .../actionsControllerGetActionsParams.ts | 10 + .../actionsControllerGetActionsStatus.ts | 10 +- ...actionsControllerGetActionsStatusesItem.ts | 13 + .../actionsControllerGetActionsType.ts | 2 + src/api/schemas/actionsQueryDto.ts | 6 + src/api/schemas/actionsQueryDtoNetwork.ts | 108 + .../schemas/actionsQueryDtoStatusesItem.ts | 13 + src/api/schemas/actionsQueryDtoType.ts | 2 + src/api/schemas/allocationDto.ts | 51 + src/api/schemas/allocationDtoNetwork.ts | 108 + src/api/schemas/allocationDtoRewardRate.ts | 7 + src/api/schemas/allocationRewardRateDto.ts | 6 + src/api/schemas/argumentFieldDtoName.ts | 3 + src/api/schemas/balanceDto.ts | 6 + src/api/schemas/balanceHistorySnapshotDto.ts | 12 + src/api/schemas/balancesRequestDto.ts | 6 +- .../schemas/createManageActionDtoAction.ts | 2 + src/api/schemas/curatorDto.ts | 21 + src/api/schemas/curatorDtoDescription.ts | 5 + src/api/schemas/curatorDtoLogoURI.ts | 5 + src/api/schemas/curatorDtoName.ts | 5 + src/api/schemas/getBalancesArgumentsDto.ts | 8 + src/api/schemas/index.ts | 77 + src/api/schemas/liquidityStateDto.ts | 15 + src/api/schemas/liquidityStateDtoLiquidity.ts | 5 + .../schemas/liquidityStateDtoUtilization.ts | 5 + src/api/schemas/networkDtoId.ts | 1 + src/api/schemas/networks.ts | 4 +- src/api/schemas/pendingActionDto.ts | 5 + src/api/schemas/pendingActionDtoType.ts | 2 + src/api/schemas/rewardDtoYieldSource.ts | 1 + src/api/schemas/rewardEventDto.ts | 23 + .../schemas/rewardRateHistoryResponseDto.ts | 18 + .../rewardRateHistoryResponseDtoInterval.ts | 12 + src/api/schemas/rewardRateSnapshotDto.ts | 6 + src/api/schemas/riskParameterDto.ts | 19 + src/api/schemas/riskParameterDtoAsset.ts | 1 + .../schemas/riskParameterDtoIntegrationId.ts | 1 + src/api/schemas/riskParameterDtoProtocol.ts | 1 + src/api/schemas/riskParameterDtoValue.ts | 1 + src/api/schemas/tokenDtoNetwork.ts | 1 + src/api/schemas/transactionDtoNetwork.ts | 1 + src/api/schemas/transactionDtoType.ts | 1 + src/api/schemas/tvlHistoryResponseDto.ts | 18 + .../schemas/tvlHistoryResponseDtoInterval.ts | 12 + src/api/schemas/tvlSnapshotDto.ts | 8 + src/api/schemas/validatorProviderDto.ts | 41 +- src/api/schemas/validatorProviderDtoTvlUsd.ts | 5 + src/api/schemas/validatorProviderDtoType.ts | 11 + src/api/schemas/yieldBalancesDto.ts | 6 + src/api/schemas/yieldBalancesDtoRewardRate.ts | 7 + src/api/schemas/yieldDto.ts | 6 + src/api/schemas/yieldDtoNetwork.ts | 1 + src/api/schemas/yieldMechanicsDto.ts | 3 + src/api/schemas/yieldQueryDto.ts | 2 +- src/api/schemas/yieldQueryDtoNetwork.ts | 1 + src/api/schemas/yieldQueryDtoSort.ts | 4 +- src/api/schemas/yieldRequirementsDto.ts | 6 + src/api/schemas/yieldRiskCredoraDto.ts | 18 + src/api/schemas/yieldRiskCredoraDtoCurator.ts | 4 + src/api/schemas/yieldRiskCredoraDtoPsl.ts | 4 + .../schemas/yieldRiskCredoraDtoPublishDate.ts | 4 + src/api/schemas/yieldRiskCredoraDtoRating.ts | 4 + src/api/schemas/yieldRiskCredoraDtoScore.ts | 4 + src/api/schemas/yieldRiskDto.ts | 9 + src/api/schemas/yieldRiskExponentialDto.ts | 15 + .../yieldRiskExponentialDtoPoolRating.ts | 4 + .../yieldRiskExponentialDtoPoolScore.ts | 4 + ...ieldRiskExponentialDtoRatingDescription.ts | 6 + src/api/schemas/yieldRiskExponentialDtoUrl.ts | 4 + src/api/schemas/yieldStateDto.ts | 6 + .../yieldsControllerGetBalanceHistory200.ts | 5 + ...eldsControllerGetBalanceHistory200AllOf.ts | 5 + .../yieldsControllerGetBalanceHistory400.ts | 5 + .../yieldsControllerGetBalanceHistory401.ts | 5 + .../yieldsControllerGetBalanceHistory429.ts | 6 + .../yieldsControllerGetBalanceHistory500.ts | 5 + ...eldsControllerGetBalanceHistoryInterval.ts | 10 + ...yieldsControllerGetBalanceHistoryParams.ts | 40 + .../yieldsControllerGetBalanceHistorySort.ts | 8 + ...sControllerGetYieldRewardRateHistory400.ts | 5 + ...sControllerGetYieldRewardRateHistory401.ts | 5 + ...sControllerGetYieldRewardRateHistory429.ts | 6 + ...sControllerGetYieldRewardRateHistory500.ts | 5 + ...rollerGetYieldRewardRateHistoryInterval.ts | 9 + ...ntrollerGetYieldRewardRateHistoryParams.ts | 32 + ...ntrollerGetYieldRewardRateHistoryPeriod.ts | 12 + .../yieldsControllerGetYieldRewards400.ts | 5 + .../yieldsControllerGetYieldRewards401.ts | 5 + .../yieldsControllerGetYieldRewards429.ts | 6 + .../yieldsControllerGetYieldRewards500.ts | 5 + .../yieldsControllerGetYieldRewardsParams.ts | 31 + .../yieldsControllerGetYieldRewardsSort.ts | 8 + .../yieldsControllerGetYieldRisk400.ts | 5 + .../yieldsControllerGetYieldRisk401.ts | 5 + .../yieldsControllerGetYieldRisk429.ts | 6 + .../yieldsControllerGetYieldRisk500.ts | 5 + .../yieldsControllerGetYieldTvlHistory400.ts | 5 + .../yieldsControllerGetYieldTvlHistory401.ts | 5 + .../yieldsControllerGetYieldTvlHistory429.ts | 6 + .../yieldsControllerGetYieldTvlHistory500.ts | 5 + ...ldsControllerGetYieldTvlHistoryInterval.ts | 9 + ...ieldsControllerGetYieldTvlHistoryParams.ts | 32 + ...ieldsControllerGetYieldTvlHistoryPeriod.ts | 12 + .../yieldsControllerGetYieldsNetwork.ts | 1 + .../yieldsControllerGetYieldsParams.ts | 2 +- .../schemas/yieldsControllerGetYieldsSort.ts | 2 + 116 files changed, 6464 insertions(+), 1755 deletions(-) create mode 100644 .changeset/silly-jokes-start.md create mode 100644 src/api/schemas/actionsControllerGetActionsNetwork.ts create mode 100644 src/api/schemas/actionsControllerGetActionsStatusesItem.ts create mode 100644 src/api/schemas/actionsQueryDtoNetwork.ts create mode 100644 src/api/schemas/actionsQueryDtoStatusesItem.ts create mode 100644 src/api/schemas/allocationDto.ts create mode 100644 src/api/schemas/allocationDtoNetwork.ts create mode 100644 src/api/schemas/allocationDtoRewardRate.ts create mode 100644 src/api/schemas/allocationRewardRateDto.ts create mode 100644 src/api/schemas/balanceHistorySnapshotDto.ts create mode 100644 src/api/schemas/curatorDto.ts create mode 100644 src/api/schemas/curatorDtoDescription.ts create mode 100644 src/api/schemas/curatorDtoLogoURI.ts create mode 100644 src/api/schemas/curatorDtoName.ts create mode 100644 src/api/schemas/liquidityStateDto.ts create mode 100644 src/api/schemas/liquidityStateDtoLiquidity.ts create mode 100644 src/api/schemas/liquidityStateDtoUtilization.ts create mode 100644 src/api/schemas/rewardEventDto.ts create mode 100644 src/api/schemas/rewardRateHistoryResponseDto.ts create mode 100644 src/api/schemas/rewardRateHistoryResponseDtoInterval.ts create mode 100644 src/api/schemas/rewardRateSnapshotDto.ts create mode 100644 src/api/schemas/riskParameterDto.ts create mode 100644 src/api/schemas/riskParameterDtoAsset.ts create mode 100644 src/api/schemas/riskParameterDtoIntegrationId.ts create mode 100644 src/api/schemas/riskParameterDtoProtocol.ts create mode 100644 src/api/schemas/riskParameterDtoValue.ts create mode 100644 src/api/schemas/tvlHistoryResponseDto.ts create mode 100644 src/api/schemas/tvlHistoryResponseDtoInterval.ts create mode 100644 src/api/schemas/tvlSnapshotDto.ts create mode 100644 src/api/schemas/validatorProviderDtoTvlUsd.ts create mode 100644 src/api/schemas/validatorProviderDtoType.ts create mode 100644 src/api/schemas/yieldBalancesDtoRewardRate.ts create mode 100644 src/api/schemas/yieldRequirementsDto.ts create mode 100644 src/api/schemas/yieldRiskCredoraDto.ts create mode 100644 src/api/schemas/yieldRiskCredoraDtoCurator.ts create mode 100644 src/api/schemas/yieldRiskCredoraDtoPsl.ts create mode 100644 src/api/schemas/yieldRiskCredoraDtoPublishDate.ts create mode 100644 src/api/schemas/yieldRiskCredoraDtoRating.ts create mode 100644 src/api/schemas/yieldRiskCredoraDtoScore.ts create mode 100644 src/api/schemas/yieldRiskDto.ts create mode 100644 src/api/schemas/yieldRiskExponentialDto.ts create mode 100644 src/api/schemas/yieldRiskExponentialDtoPoolRating.ts create mode 100644 src/api/schemas/yieldRiskExponentialDtoPoolScore.ts create mode 100644 src/api/schemas/yieldRiskExponentialDtoRatingDescription.ts create mode 100644 src/api/schemas/yieldRiskExponentialDtoUrl.ts create mode 100644 src/api/schemas/yieldsControllerGetBalanceHistory200.ts create mode 100644 src/api/schemas/yieldsControllerGetBalanceHistory200AllOf.ts create mode 100644 src/api/schemas/yieldsControllerGetBalanceHistory400.ts create mode 100644 src/api/schemas/yieldsControllerGetBalanceHistory401.ts create mode 100644 src/api/schemas/yieldsControllerGetBalanceHistory429.ts create mode 100644 src/api/schemas/yieldsControllerGetBalanceHistory500.ts create mode 100644 src/api/schemas/yieldsControllerGetBalanceHistoryInterval.ts create mode 100644 src/api/schemas/yieldsControllerGetBalanceHistoryParams.ts create mode 100644 src/api/schemas/yieldsControllerGetBalanceHistorySort.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRewardRateHistory400.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRewardRateHistory401.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRewardRateHistory429.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRewardRateHistory500.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRewardRateHistoryInterval.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRewardRateHistoryParams.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRewardRateHistoryPeriod.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRewards400.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRewards401.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRewards429.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRewards500.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRewardsParams.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRewardsSort.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRisk400.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRisk401.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRisk429.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldRisk500.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldTvlHistory400.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldTvlHistory401.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldTvlHistory429.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldTvlHistory500.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldTvlHistoryInterval.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldTvlHistoryParams.ts create mode 100644 src/api/schemas/yieldsControllerGetYieldTvlHistoryPeriod.ts diff --git a/.changeset/silly-jokes-start.md b/.changeset/silly-jokes-start.md new file mode 100644 index 0000000..c468b06 --- /dev/null +++ b/.changeset/silly-jokes-start.md @@ -0,0 +1,5 @@ +--- +"@yieldxyz/sdk": patch +--- + +feat: update schemas diff --git a/src/api/index.msw.ts b/src/api/index.msw.ts index 950de8b..4a4d454 100644 --- a/src/api/index.msw.ts +++ b/src/api/index.msw.ts @@ -7,11 +7,16 @@ import type { BalancesResponseDto, HealthStatusDto, NetworkDto, + PaginatedResponseDto, ProviderDto, ProvidersControllerGetProviders200, + RewardRateHistoryResponseDto, + RiskParameterDto, TransactionDto, + TvlHistoryResponseDto, YieldBalancesDto, YieldDto, + YieldsControllerGetBalanceHistory200, YieldsControllerGetYields200, YieldsControllerGetYieldValidators200, } from "./schemas"; @@ -19,6 +24,7 @@ import { BalanceType, ERCStandards, HealthStatus, + Networks, RewardClaiming, RewardSchedule, YieldType, @@ -136,6 +142,7 @@ export const getYieldsControllerGetYieldsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -251,6 +258,7 @@ export const getYieldsControllerGetYieldsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -378,6 +386,7 @@ export const getYieldsControllerGetYieldsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -507,6 +516,7 @@ export const getYieldsControllerGetYieldsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -636,6 +646,7 @@ export const getYieldsControllerGetYieldsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -782,6 +793,7 @@ export const getYieldsControllerGetYieldsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -818,6 +830,7 @@ export const getYieldsControllerGetYieldsResponseMock = "staking", "restaking", "protocol_incentive", + "campaign_incentive", "points", "lending_interest", "mev", @@ -884,6 +897,36 @@ export const getYieldsControllerGetYieldsResponseMock = }, undefined, ]), + risk: faker.helpers.arrayElement([ + { + ...{ + updatedAt: faker.string.alpha({ length: { min: 10, max: 20 } }), + exponentialFi: faker.helpers.arrayElement([ + { + poolRating: faker.helpers.arrayElement([{}, undefined]), + poolScore: faker.helpers.arrayElement([{}, undefined]), + ratingDescription: faker.helpers.arrayElement([ + {}, + undefined, + ]), + url: faker.helpers.arrayElement([{}, undefined]), + }, + undefined, + ]), + credora: faker.helpers.arrayElement([ + { + rating: faker.helpers.arrayElement([{}, undefined]), + score: faker.helpers.arrayElement([{}, undefined]), + psl: faker.helpers.arrayElement([{}, undefined]), + publishDate: faker.helpers.arrayElement([{}, undefined]), + curator: faker.helpers.arrayElement([{}, undefined]), + }, + undefined, + ]), + }, + }, + undefined, + ]), status: { ...{ enter: faker.datatype.boolean(), @@ -1013,6 +1056,7 @@ export const getYieldsControllerGetYieldsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -1119,6 +1163,18 @@ export const getYieldsControllerGetYieldsResponseMock = }, undefined, ]), + requirements: faker.helpers.arrayElement([ + { + ...{ + kycRequired: faker.datatype.boolean(), + kycUrl: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + undefined, + ]), supportsLedgerWalletApi: faker.helpers.arrayElement([ faker.datatype.boolean(), undefined, @@ -1163,6 +1219,9 @@ export const getYieldsControllerGetYieldsResponseMock = "rangeMax", "percentage", "tokenId", + "skipPrechecks", + "useMaxAllowance", + "feePayerAddress", ] as const), type: faker.helpers.arrayElement([ "string", @@ -1271,6 +1330,9 @@ export const getYieldsControllerGetYieldsResponseMock = "rangeMax", "percentage", "tokenId", + "skipPrechecks", + "useMaxAllowance", + "feePayerAddress", ] as const), type: faker.helpers.arrayElement([ "string", @@ -1380,6 +1442,9 @@ export const getYieldsControllerGetYieldsResponseMock = "rangeMax", "percentage", "tokenId", + "skipPrechecks", + "useMaxAllowance", + "feePayerAddress", ] as const), type: faker.helpers.arrayElement([ "string", @@ -1497,6 +1562,9 @@ export const getYieldsControllerGetYieldsResponseMock = "rangeMax", "percentage", "tokenId", + "skipPrechecks", + "useMaxAllowance", + "feePayerAddress", ] as const), type: faker.helpers.arrayElement([ "string", @@ -1598,6 +1666,16 @@ export const getYieldsControllerGetYieldsResponseMock = }, }, providerId: faker.string.alpha({ length: { min: 10, max: 20 } }), + curator: faker.helpers.arrayElement([ + { + ...{ + name: faker.helpers.arrayElement([{}, undefined]), + description: faker.helpers.arrayElement([{}, undefined]), + logoURI: faker.helpers.arrayElement([{}, undefined]), + }, + }, + undefined, + ]), tags: faker.helpers.arrayElement([ Array.from( { length: faker.number.int({ min: 1, max: 10 }) }, @@ -1715,6 +1793,7 @@ export const getYieldsControllerGetYieldsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -1852,6 +1931,7 @@ export const getYieldsControllerGetYieldsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -2050,6 +2130,7 @@ export const getYieldsControllerGetYieldsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -2187,6 +2268,7 @@ export const getYieldsControllerGetYieldsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -2253,6 +2335,181 @@ export const getYieldsControllerGetYieldsResponseMock = }, undefined, ]), + liquidityState: faker.helpers.arrayElement([ + { + ...{ + liquidity: faker.helpers.arrayElement([{}, undefined]), + utilization: faker.helpers.arrayElement([{}, undefined]), + }, + }, + undefined, + ]), + allocations: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + address: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + yieldId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + providerId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + allocation: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + allocationUsd: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + weight: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + targetWeight: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + rewardRate: { + ...{ + total: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + rateType: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + }, + }, + tvl: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + tvlUsd: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + maxCapacity: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + remainingCapacity: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + })), + undefined, + ]), }, }, undefined, @@ -2303,6 +2560,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "STAKE", "UNSTAKE", "CLAIM_REWARDS", + "AUTO_SWEEP_UNSTAKE_REWARDS", + "AUTO_SWEEP_WITHDRAW_REWARDS", "RESTAKE_REWARDS", "WITHDRAW", "WITHDRAW_ALL", @@ -2354,6 +2613,9 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "rangeMax", "percentage", "tokenId", + "skipPrechecks", + "useMaxAllowance", + "feePayerAddress", ] as const), type: faker.helpers.arrayElement([ "string", @@ -2416,6 +2678,13 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( }, undefined, ]), + amount: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), })), token: { ...{ @@ -2512,6 +2781,7 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -2682,6 +2952,7 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -2718,6 +2989,7 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "staking", "restaking", "protocol_incentive", + "campaign_incentive", "points", "lending_interest", "mev", @@ -2737,10 +3009,26 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( { ...{ name: faker.string.alpha({ length: { min: 10, max: 20 } }), - uniqueId: faker.string.alpha({ + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + logoURI: faker.string.alpha({ length: { min: 10, max: 20 } }), + description: faker.string.alpha({ length: { min: 10, max: 20 }, }), website: faker.string.alpha({ length: { min: 10, max: 20 } }), + tvlUsd: {}, + type: faker.helpers.arrayElement([ + "protocol", + "validator_provider", + ] as const), + references: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), rank: faker.number.float({ min: undefined, max: undefined, @@ -2805,6 +3093,18 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( }, undefined, ]), + uniqueId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + createdAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), + updatedAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), }, }, undefined, @@ -3039,6 +3339,7 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -3075,6 +3376,7 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "staking", "restaking", "protocol_incentive", + "campaign_incentive", "points", "lending_interest", "mev", @@ -3094,8 +3396,26 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( { ...{ name: faker.string.alpha({ length: { min: 10, max: 20 } }), - uniqueId: faker.string.alpha({ length: { min: 10, max: 20 } }), + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + logoURI: faker.string.alpha({ length: { min: 10, max: 20 } }), + description: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), website: faker.string.alpha({ length: { min: 10, max: 20 } }), + tvlUsd: {}, + type: faker.helpers.arrayElement([ + "protocol", + "validator_provider", + ] as const), + references: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), rank: faker.number.float({ min: undefined, max: undefined, @@ -3160,6 +3480,18 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( }, undefined, ]), + uniqueId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + createdAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), + updatedAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), }, }, undefined, @@ -3268,38 +3600,179 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - })), - outputTokenBalance: faker.helpers.arrayElement([ - { - ...{ - address: faker.string.alpha({ length: { min: 10, max: 20 } }), - type: faker.helpers.arrayElement(Object.values(BalanceType)), - amount: faker.string.alpha({ length: { min: 10, max: 20 } }), - amountRaw: faker.string.alpha({ length: { min: 10, max: 20 } }), - date: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - `${faker.date.past().toISOString().split(".")[0]}Z`, - null, - ]), - undefined, - ]), - feeConfigurationId: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - pendingActions: Array.from( - { length: faker.number.int({ min: 1, max: 10 }) }, - (_, i) => i + 1, - ).map(() => ({ - intent: faker.helpers.arrayElement([ - "enter", - "manage", - "exit", + shareAmount: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + shareAmountRaw: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + shareToken: faker.helpers.arrayElement([ + { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + undefined, + ]), + })), + outputTokenBalance: faker.helpers.arrayElement([ + { + ...{ + address: faker.string.alpha({ length: { min: 10, max: 20 } }), + type: faker.helpers.arrayElement(Object.values(BalanceType)), + amount: faker.string.alpha({ length: { min: 10, max: 20 } }), + amountRaw: faker.string.alpha({ length: { min: 10, max: 20 } }), + date: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + null, + ]), + undefined, + ]), + feeConfigurationId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + pendingActions: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + intent: faker.helpers.arrayElement([ + "enter", + "manage", + "exit", ] as const), type: faker.helpers.arrayElement([ "STAKE", "UNSTAKE", "CLAIM_REWARDS", + "AUTO_SWEEP_UNSTAKE_REWARDS", + "AUTO_SWEEP_WITHDRAW_REWARDS", "RESTAKE_REWARDS", "WITHDRAW", "WITHDRAW_ALL", @@ -3351,6 +3824,9 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "rangeMax", "percentage", "tokenId", + "skipPrechecks", + "useMaxAllowance", + "feePayerAddress", ] as const), type: faker.helpers.arrayElement([ "string", @@ -3413,6 +3889,13 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( }, undefined, ]), + amount: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), })), token: { ...{ @@ -3509,6 +3992,7 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -3679,6 +4163,7 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -3721,6 +4206,7 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "staking", "restaking", "protocol_incentive", + "campaign_incentive", "points", "lending_interest", "mev", @@ -3742,12 +4228,30 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( name: faker.string.alpha({ length: { min: 10, max: 20 }, }), - uniqueId: faker.string.alpha({ + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + logoURI: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + description: faker.string.alpha({ length: { min: 10, max: 20 }, }), website: faker.string.alpha({ length: { min: 10, max: 20 }, }), + tvlUsd: {}, + type: faker.helpers.arrayElement([ + "protocol", + "validator_provider", + ] as const), + references: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), rank: faker.number.float({ min: undefined, max: undefined, @@ -3812,6 +4316,18 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( }, undefined, ]), + uniqueId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + createdAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), + updatedAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), }, }, undefined, @@ -4048,6 +4564,7 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -4090,6 +4607,7 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "staking", "restaking", "protocol_incentive", + "campaign_incentive", "points", "lending_interest", "mev", @@ -4109,12 +4627,30 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( { ...{ name: faker.string.alpha({ length: { min: 10, max: 20 } }), - uniqueId: faker.string.alpha({ + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + logoURI: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + description: faker.string.alpha({ length: { min: 10, max: 20 }, }), website: faker.string.alpha({ length: { min: 10, max: 20 }, }), + tvlUsd: {}, + type: faker.helpers.arrayElement([ + "protocol", + "validator_provider", + ] as const), + references: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), rank: faker.number.float({ min: undefined, max: undefined, @@ -4179,6 +4715,18 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( }, undefined, ]), + uniqueId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + createdAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), + updatedAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), }, }, undefined, @@ -4287,60 +4835,366 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - }, - }, - undefined, - ]), - })), - errors: Array.from( - { length: faker.number.int({ min: 1, max: 10 }) }, - (_, i) => i + 1, - ).map(() => ({ - yieldId: faker.string.alpha({ length: { min: 10, max: 20 } }), - error: faker.string.alpha({ length: { min: 10, max: 20 } }), - })), - ...overrideResponse, -}); - -export const getYieldsControllerGetYieldResponseMock = ( - overrideResponse: Partial = {}, -): YieldDto => ({ - id: faker.string.alpha({ length: { min: 10, max: 20 } }), - network: faker.helpers.arrayElement([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "monad-testnet", - "monad", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "agoric", + shareAmount: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + shareAmountRaw: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + shareToken: faker.helpers.arrayElement([ + { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + undefined, + ]), + }, + }, + undefined, + ]), + rewardRate: faker.helpers.arrayElement([ + { + ...{ + total: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + rateType: faker.string.alpha({ length: { min: 10, max: 20 } }), + components: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + rate: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + rateType: faker.string.alpha({ length: { min: 10, max: 20 } }), + token: { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + yieldSource: faker.helpers.arrayElement([ + "staking", + "restaking", + "protocol_incentive", + "campaign_incentive", + "points", + "lending_interest", + "mev", + "real_world_asset_yield", + "vault", + ] as const), + description: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + })), + }, + }, + undefined, + ]), + })), + errors: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + yieldId: faker.string.alpha({ length: { min: 10, max: 20 } }), + error: faker.string.alpha({ length: { min: 10, max: 20 } }), + })), + ...overrideResponse, +}); + +export const getYieldsControllerGetYieldResponseMock = ( + overrideResponse: Partial = {}, +): YieldDto => ({ + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", "akash", "axelar", "band-protocol", @@ -4392,6 +5246,7 @@ export const getYieldsControllerGetYieldResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -4410,7 +5265,392 @@ export const getYieldsControllerGetYieldResponseMock = ( faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - inputTokens: Array.from( + inputTokens: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + })), + outputToken: faker.helpers.arrayElement([ + { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + undefined, + ]), + token: { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + tokens: Array.from( { length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1, ).map(() => ({ @@ -4507,6 +5747,7 @@ export const getYieldsControllerGetYieldResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -4535,1699 +5776,2883 @@ export const getYieldsControllerGetYieldResponseMock = ( undefined, ]), })), - outputToken: faker.helpers.arrayElement([ - { - ...{ - symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), - name: faker.string.alpha({ length: { min: 10, max: 20 } }), - decimals: faker.number.float({ + rewardRate: { + ...{ + total: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + rateType: faker.string.alpha({ length: { min: 10, max: 20 } }), + components: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + rate: faker.number.float({ min: undefined, max: undefined, fractionDigits: 2, }), - network: faker.helpers.arrayElement([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "monad-testnet", - "monad", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", + rateType: faker.string.alpha({ length: { min: 10, max: 20 } }), + token: { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + yieldSource: faker.helpers.arrayElement([ + "staking", + "restaking", + "protocol_incentive", + "campaign_incentive", + "points", + "lending_interest", + "mev", + "real_world_asset_yield", + "vault", ] as const), - address: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - logoURI: faker.helpers.arrayElement([ + description: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - isPoints: faker.helpers.arrayElement([ - faker.datatype.boolean(), + })), + }, + }, + statistics: faker.helpers.arrayElement([ + { + ...{ + tvlUsd: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), undefined, ]), - coinGeckoId: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), + tvl: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), undefined, ]), - }, - }, - undefined, - ]), - token: { - ...{ - symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), - name: faker.string.alpha({ length: { min: 10, max: 20 } }), - decimals: faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - network: faker.helpers.arrayElement([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "monad-testnet", - "monad", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", - ] as const), - address: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - logoURI: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - isPoints: faker.helpers.arrayElement([ - faker.datatype.boolean(), - undefined, - ]), - coinGeckoId: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), + tvlRaw: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + uniqueUsers: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + null, + ]), + undefined, + ]), + averagePositionSizeUsd: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + averagePositionSize: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + }, + }, + undefined, + ]), + risk: faker.helpers.arrayElement([ + { + ...{ + updatedAt: faker.string.alpha({ length: { min: 10, max: 20 } }), + exponentialFi: faker.helpers.arrayElement([ + { + poolRating: faker.helpers.arrayElement([{}, undefined]), + poolScore: faker.helpers.arrayElement([{}, undefined]), + ratingDescription: faker.helpers.arrayElement([{}, undefined]), + url: faker.helpers.arrayElement([{}, undefined]), + }, + undefined, + ]), + credora: faker.helpers.arrayElement([ + { + rating: faker.helpers.arrayElement([{}, undefined]), + score: faker.helpers.arrayElement([{}, undefined]), + psl: faker.helpers.arrayElement([{}, undefined]), + publishDate: faker.helpers.arrayElement([{}, undefined]), + curator: faker.helpers.arrayElement([{}, undefined]), + }, + undefined, + ]), + }, }, + undefined, + ]), + status: { + ...{ enter: faker.datatype.boolean(), exit: faker.datatype.boolean() }, }, - tokens: Array.from( - { length: faker.number.int({ min: 1, max: 10 }) }, - (_, i) => i + 1, - ).map(() => ({ - symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), - name: faker.string.alpha({ length: { min: 10, max: 20 } }), - decimals: faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - network: faker.helpers.arrayElement([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "monad-testnet", - "monad", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", - ] as const), - address: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - logoURI: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - isPoints: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), - coinGeckoId: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - })), - rewardRate: { + metadata: { ...{ - total: faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - rateType: faker.string.alpha({ length: { min: 10, max: 20 } }), - components: Array.from( - { length: faker.number.int({ min: 1, max: 10 }) }, - (_, i) => i + 1, - ).map(() => ({ - rate: faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - rateType: faker.string.alpha({ length: { min: 10, max: 20 } }), - token: { + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + logoURI: faker.string.alpha({ length: { min: 10, max: 20 } }), + description: faker.string.alpha({ length: { min: 10, max: 20 } }), + documentation: faker.string.alpha({ length: { min: 10, max: 20 } }), + underMaintenance: faker.datatype.boolean(), + deprecated: faker.datatype.boolean(), + supportedStandards: faker.helpers.arrayElements( + Object.values(ERCStandards), + ), + }, + }, + mechanics: { + ...{ + type: faker.helpers.arrayElement(Object.values(YieldType)), + requiresValidatorSelection: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + rewardSchedule: faker.helpers.arrayElement(Object.values(RewardSchedule)), + rewardClaiming: faker.helpers.arrayElement(Object.values(RewardClaiming)), + gasFeeToken: { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + lockupPeriod: faker.helpers.arrayElement([ + { ...{ - symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), - name: faker.string.alpha({ length: { min: 10, max: 20 } }), - decimals: faker.number.float({ + seconds: faker.number.float({ min: undefined, max: undefined, fractionDigits: 2, }), - network: faker.helpers.arrayElement([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "monad-testnet", - "monad", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", - ] as const), - address: faker.helpers.arrayElement([ + }, + }, + undefined, + ]), + cooldownPeriod: faker.helpers.arrayElement([ + { + ...{ + seconds: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + }, + }, + undefined, + ]), + warmupPeriod: faker.helpers.arrayElement([ + { + ...{ + seconds: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + }, + }, + undefined, + ]), + fee: faker.helpers.arrayElement([ + { + ...{ + deposit: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + withdrawal: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + management: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + performance: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + undefined, + ]), + entryLimits: faker.helpers.arrayElement([ + { + ...{ + minimum: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + maximum: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + }, + }, + undefined, + ]), + requirements: faker.helpers.arrayElement([ + { + ...{ + kycRequired: faker.datatype.boolean(), + kycUrl: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - logoURI: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), + }, + }, + undefined, + ]), + supportsLedgerWalletApi: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + extraTransactionFormatsSupported: faker.helpers.arrayElement([ + faker.helpers.arrayElements(["raw", "default"] as const), + undefined, + ]), + arguments: faker.helpers.arrayElement([ + { + ...{ + enter: faker.helpers.arrayElement([ + { + fields: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + name: faker.helpers.arrayElement([ + "amount", + "amounts", + "validatorAddress", + "validatorAddresses", + "receiverAddress", + "providerId", + "duration", + "inputToken", + "inputTokenNetwork", + "outputToken", + "outputTokenNetwork", + "subnetId", + "tronResource", + "feeConfigurationId", + "cosmosPubKey", + "tezosPubKey", + "cAddressBech", + "pAddressBech", + "executionMode", + "ledgerWalletApiCompatible", + "useMaxAmount", + "useInstantExecution", + "rangeMin", + "rangeMax", + "percentage", + "tokenId", + "skipPrechecks", + "useMaxAllowance", + "feePayerAddress", + ] as const), + type: faker.helpers.arrayElement([ + "string", + "number", + "address", + "enum", + "boolean", + ] as const), + label: faker.string.alpha({ length: { min: 10, max: 20 } }), + description: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + required: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + options: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), + optionsRef: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + default: faker.helpers.arrayElement([{}, undefined]), + placeholder: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + minimum: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + maximum: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + isArray: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + })), + notes: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, undefined, ]), - isPoints: faker.helpers.arrayElement([ - faker.datatype.boolean(), + exit: faker.helpers.arrayElement([ + { + fields: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + name: faker.helpers.arrayElement([ + "amount", + "amounts", + "validatorAddress", + "validatorAddresses", + "receiverAddress", + "providerId", + "duration", + "inputToken", + "inputTokenNetwork", + "outputToken", + "outputTokenNetwork", + "subnetId", + "tronResource", + "feeConfigurationId", + "cosmosPubKey", + "tezosPubKey", + "cAddressBech", + "pAddressBech", + "executionMode", + "ledgerWalletApiCompatible", + "useMaxAmount", + "useInstantExecution", + "rangeMin", + "rangeMax", + "percentage", + "tokenId", + "skipPrechecks", + "useMaxAllowance", + "feePayerAddress", + ] as const), + type: faker.helpers.arrayElement([ + "string", + "number", + "address", + "enum", + "boolean", + ] as const), + label: faker.string.alpha({ length: { min: 10, max: 20 } }), + description: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + required: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + options: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), + optionsRef: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + default: faker.helpers.arrayElement([{}, undefined]), + placeholder: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + minimum: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + maximum: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + isArray: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + })), + notes: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + undefined, + ]), + manage: faker.helpers.arrayElement([ + { + [faker.string.alphanumeric(5)]: { + fields: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + name: faker.helpers.arrayElement([ + "amount", + "amounts", + "validatorAddress", + "validatorAddresses", + "receiverAddress", + "providerId", + "duration", + "inputToken", + "inputTokenNetwork", + "outputToken", + "outputTokenNetwork", + "subnetId", + "tronResource", + "feeConfigurationId", + "cosmosPubKey", + "tezosPubKey", + "cAddressBech", + "pAddressBech", + "executionMode", + "ledgerWalletApiCompatible", + "useMaxAmount", + "useInstantExecution", + "rangeMin", + "rangeMax", + "percentage", + "tokenId", + "skipPrechecks", + "useMaxAllowance", + "feePayerAddress", + ] as const), + type: faker.helpers.arrayElement([ + "string", + "number", + "address", + "enum", + "boolean", + ] as const), + label: faker.string.alpha({ length: { min: 10, max: 20 } }), + description: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + required: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + options: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), + optionsRef: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + default: faker.helpers.arrayElement([{}, undefined]), + placeholder: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + minimum: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + maximum: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + isArray: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + })), + notes: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, undefined, ]), - coinGeckoId: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), + balance: faker.helpers.arrayElement([ + { + ...{ + fields: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + name: faker.helpers.arrayElement([ + "amount", + "amounts", + "validatorAddress", + "validatorAddresses", + "receiverAddress", + "providerId", + "duration", + "inputToken", + "inputTokenNetwork", + "outputToken", + "outputTokenNetwork", + "subnetId", + "tronResource", + "feeConfigurationId", + "cosmosPubKey", + "tezosPubKey", + "cAddressBech", + "pAddressBech", + "executionMode", + "ledgerWalletApiCompatible", + "useMaxAmount", + "useInstantExecution", + "rangeMin", + "rangeMax", + "percentage", + "tokenId", + "skipPrechecks", + "useMaxAllowance", + "feePayerAddress", + ] as const), + type: faker.helpers.arrayElement([ + "string", + "number", + "address", + "enum", + "boolean", + ] as const), + label: faker.string.alpha({ length: { min: 10, max: 20 } }), + description: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + required: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + options: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), + optionsRef: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + default: faker.helpers.arrayElement([{}, undefined]), + placeholder: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + minimum: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + maximum: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + isArray: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + })), + notes: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, undefined, ]), }, - }, - yieldSource: faker.helpers.arrayElement([ - "staking", - "restaking", - "protocol_incentive", - "points", - "lending_interest", - "mev", - "real_world_asset_yield", - "vault", - ] as const), - description: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - })), - }, - }, - statistics: faker.helpers.arrayElement([ - { - ...{ - tvlUsd: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), + }, + undefined, + ]), + possibleFeeTakingMechanisms: faker.helpers.arrayElement([ + { + ...{ + depositFee: faker.datatype.boolean(), + managementFee: faker.datatype.boolean(), + performanceFee: faker.datatype.boolean(), + validatorRebates: faker.datatype.boolean(), + }, + }, + undefined, + ]), + }, + }, + providerId: faker.string.alpha({ length: { min: 10, max: 20 } }), + curator: faker.helpers.arrayElement([ + { + ...{ + name: faker.helpers.arrayElement([{}, undefined]), + description: faker.helpers.arrayElement([{}, undefined]), + logoURI: faker.helpers.arrayElement([{}, undefined]), + }, + }, + undefined, + ]), + tags: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => faker.string.alpha({ length: { min: 10, max: 20 } })), + undefined, + ]), + state: faker.helpers.arrayElement([ + { + ...{ + pricePerShareState: faker.helpers.arrayElement([ + { + ...{ + price: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + shareToken: { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + quoteToken: { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + }, + }, undefined, ]), - tvl: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), - undefined, - ]), - tvlRaw: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), - undefined, - ]), - uniqueUsers: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - null, - ]), + concentratedLiquidityPoolState: faker.helpers.arrayElement([ + { + ...{ + baseApr: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + price: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + tickSpacing: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + minTick: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + maxTick: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + volume24hUsd: faker.helpers.arrayElement([ + faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + null, + ]), + fee24hUsd: faker.helpers.arrayElement([ + faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + null, + ]), + tvlUsd: faker.helpers.arrayElement([ + faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + null, + ]), + feeTier: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + baseToken: { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + quoteToken: { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + }, + }, undefined, ]), - averagePositionSizeUsd: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), + capacityState: faker.helpers.arrayElement([ + { + ...{ + current: faker.string.alpha({ length: { min: 10, max: 20 } }), + max: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + remaining: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + }, + }, undefined, ]), - averagePositionSize: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), + liquidityState: faker.helpers.arrayElement([ + { + ...{ + liquidity: faker.helpers.arrayElement([{}, undefined]), + utilization: faker.helpers.arrayElement([{}, undefined]), + }, + }, undefined, ]), - }, - }, - undefined, - ]), - status: { - ...{ enter: faker.datatype.boolean(), exit: faker.datatype.boolean() }, - }, - metadata: { - ...{ - name: faker.string.alpha({ length: { min: 10, max: 20 } }), - logoURI: faker.string.alpha({ length: { min: 10, max: 20 } }), - description: faker.string.alpha({ length: { min: 10, max: 20 } }), - documentation: faker.string.alpha({ length: { min: 10, max: 20 } }), - underMaintenance: faker.datatype.boolean(), - deprecated: faker.datatype.boolean(), - supportedStandards: faker.helpers.arrayElements( - Object.values(ERCStandards), - ), - }, - }, - mechanics: { - ...{ - type: faker.helpers.arrayElement(Object.values(YieldType)), - requiresValidatorSelection: faker.helpers.arrayElement([ - faker.datatype.boolean(), - undefined, - ]), - rewardSchedule: faker.helpers.arrayElement(Object.values(RewardSchedule)), - rewardClaiming: faker.helpers.arrayElement(Object.values(RewardClaiming)), - gasFeeToken: { - ...{ - symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), - name: faker.string.alpha({ length: { min: 10, max: 20 } }), - decimals: faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - network: faker.helpers.arrayElement([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "monad-testnet", - "monad", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", - ] as const), - address: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - logoURI: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - isPoints: faker.helpers.arrayElement([ - faker.datatype.boolean(), - undefined, - ]), - coinGeckoId: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - }, - }, - lockupPeriod: faker.helpers.arrayElement([ - { - ...{ - seconds: faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - }, - }, - undefined, - ]), - cooldownPeriod: faker.helpers.arrayElement([ - { - ...{ - seconds: faker.number.float({ + allocations: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + address: faker.string.alpha({ length: { min: 10, max: 20 } }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + yieldId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + providerId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + allocation: faker.string.alpha({ length: { min: 10, max: 20 } }), + allocationUsd: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + weight: faker.number.float({ min: undefined, max: undefined, fractionDigits: 2, }), - }, - }, - undefined, - ]), - warmupPeriod: faker.helpers.arrayElement([ - { - ...{ - seconds: faker.number.float({ + targetWeight: faker.number.float({ min: undefined, max: undefined, fractionDigits: 2, }), - }, - }, - undefined, - ]), - fee: faker.helpers.arrayElement([ - { - ...{ - deposit: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - withdrawal: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - management: faker.helpers.arrayElement([ + rewardRate: { + ...{ + total: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + rateType: faker.string.alpha({ length: { min: 10, max: 20 } }), + }, + }, + tvl: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, + null, ]), - performance: faker.helpers.arrayElement([ + tvlUsd: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, + null, ]), - }, - }, - undefined, - ]), - entryLimits: faker.helpers.arrayElement([ - { - ...{ - minimum: faker.helpers.arrayElement([ + maxCapacity: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), null, ]), - maximum: faker.helpers.arrayElement([ + remainingCapacity: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), null, ]), - }, - }, - undefined, - ]), - supportsLedgerWalletApi: faker.helpers.arrayElement([ - faker.datatype.boolean(), - undefined, - ]), - extraTransactionFormatsSupported: faker.helpers.arrayElement([ - faker.helpers.arrayElements(["raw", "default"] as const), + })), + undefined, + ]), + }, + }, + undefined, + ]), + ...overrideResponse, +}); + +export const getYieldsControllerGetYieldRiskResponseMock = + (): RiskParameterDto[] => + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + category: faker.string.alpha({ length: { min: 10, max: 20 } }), + item: faker.string.alpha({ length: { min: 10, max: 20 } }), + isDynamic: faker.datatype.boolean(), + value: faker.helpers.arrayElement([{}, undefined]), + network: faker.helpers.arrayElement([ + faker.helpers.arrayElement(Object.values(Networks)), undefined, ]), - arguments: faker.helpers.arrayElement([ - { - ...{ - enter: faker.helpers.arrayElement([ - { - fields: Array.from( - { length: faker.number.int({ min: 1, max: 10 }) }, - (_, i) => i + 1, - ).map(() => ({ - name: faker.helpers.arrayElement([ - "amount", - "amounts", - "validatorAddress", - "validatorAddresses", - "receiverAddress", - "providerId", - "duration", - "inputToken", - "inputTokenNetwork", - "outputToken", - "outputTokenNetwork", - "subnetId", - "tronResource", - "feeConfigurationId", - "cosmosPubKey", - "tezosPubKey", - "cAddressBech", - "pAddressBech", - "executionMode", - "ledgerWalletApiCompatible", - "useMaxAmount", - "useInstantExecution", - "rangeMin", - "rangeMax", - "percentage", - "tokenId", - ] as const), - type: faker.helpers.arrayElement([ - "string", - "number", - "address", - "enum", - "boolean", - ] as const), - label: faker.string.alpha({ length: { min: 10, max: 20 } }), - description: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - required: faker.helpers.arrayElement([ - faker.datatype.boolean(), - undefined, - ]), - options: faker.helpers.arrayElement([ - Array.from( + asset: faker.helpers.arrayElement([{}, undefined]), + protocol: faker.helpers.arrayElement([{}, undefined]), + integrationId: faker.helpers.arrayElement([{}, undefined]), + createdAt: `${faker.date.past().toISOString().split(".")[0]}Z`, + updatedAt: `${faker.date.past().toISOString().split(".")[0]}Z`, + })); + +export const getYieldsControllerGetBalanceHistoryResponseMock = + (): YieldsControllerGetBalanceHistory200 => ({ + ...{ + total: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + offset: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + limit: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + }, + ...{ + items: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + timestamp: faker.string.alpha({ length: { min: 10, max: 20 } }), + blockNumber: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + yieldId: faker.string.alpha({ length: { min: 10, max: 20 } }), + balances: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + address: faker.string.alpha({ length: { min: 10, max: 20 } }), + type: faker.helpers.arrayElement(Object.values(BalanceType)), + amount: faker.string.alpha({ length: { min: 10, max: 20 } }), + amountRaw: faker.string.alpha({ length: { min: 10, max: 20 } }), + date: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + null, + ]), + undefined, + ]), + feeConfigurationId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + pendingActions: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + intent: faker.helpers.arrayElement([ + "enter", + "manage", + "exit", + ] as const), + type: faker.helpers.arrayElement([ + "STAKE", + "UNSTAKE", + "CLAIM_REWARDS", + "AUTO_SWEEP_UNSTAKE_REWARDS", + "AUTO_SWEEP_WITHDRAW_REWARDS", + "RESTAKE_REWARDS", + "WITHDRAW", + "WITHDRAW_ALL", + "RESTAKE", + "CLAIM_UNSTAKED", + "UNLOCK_LOCKED", + "STAKE_LOCKED", + "VOTE", + "REVOKE", + "VOTE_LOCKED", + "REVOTE", + "REBOND", + "MIGRATE", + "VERIFY_WITHDRAW_CREDENTIALS", + "DELEGATE", + ] as const), + passthrough: faker.string.alpha({ length: { min: 10, max: 20 } }), + arguments: faker.helpers.arrayElement([ + { + ...{ + fields: Array.from( { length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1, - ).map(() => + ).map(() => ({ + name: faker.helpers.arrayElement([ + "amount", + "amounts", + "validatorAddress", + "validatorAddresses", + "receiverAddress", + "providerId", + "duration", + "inputToken", + "inputTokenNetwork", + "outputToken", + "outputTokenNetwork", + "subnetId", + "tronResource", + "feeConfigurationId", + "cosmosPubKey", + "tezosPubKey", + "cAddressBech", + "pAddressBech", + "executionMode", + "ledgerWalletApiCompatible", + "useMaxAmount", + "useInstantExecution", + "rangeMin", + "rangeMax", + "percentage", + "tokenId", + "skipPrechecks", + "useMaxAllowance", + "feePayerAddress", + ] as const), + type: faker.helpers.arrayElement([ + "string", + "number", + "address", + "enum", + "boolean", + ] as const), + label: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + description: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + required: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + options: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), + optionsRef: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + default: faker.helpers.arrayElement([{}, undefined]), + placeholder: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + minimum: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + maximum: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + isArray: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + })), + notes: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), - ), + undefined, + ]), + }, + }, + undefined, + ]), + amount: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + })), + token: { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + validator: faker.helpers.arrayElement([ + { + ...{ + address: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - optionsRef: faker.helpers.arrayElement([ + logoURI: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - default: faker.helpers.arrayElement([{}, undefined]), - placeholder: faker.helpers.arrayElement([ + website: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - minimum: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), + rewardRate: faker.helpers.arrayElement([ + { + ...{ + total: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + rateType: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + components: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + rate: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + rateType: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + token: { + ...{ + symbol: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + name: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + }, + }, + yieldSource: faker.helpers.arrayElement([ + "staking", + "restaking", + "protocol_incentive", + "campaign_incentive", + "points", + "lending_interest", + "mev", + "real_world_asset_yield", + "vault", + ] as const), + description: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + })), + }, + }, undefined, ]), - maximum: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), + provider: faker.helpers.arrayElement([ + { + ...{ + name: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + id: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + logoURI: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + description: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + website: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + tvlUsd: {}, + type: faker.helpers.arrayElement([ + "protocol", + "validator_provider", + ] as const), + references: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + ), + undefined, + ]), + rank: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + preferred: faker.datatype.boolean(), + revshare: faker.helpers.arrayElement([ + { + ...{ + trial: faker.helpers.arrayElement([ + { + ...{ + minRevShare: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + maxRevShare: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + }, + }, + undefined, + ]), + standard: faker.helpers.arrayElement([ + { + ...{ + minRevShare: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + maxRevShare: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + }, + }, + undefined, + ]), + pro: faker.helpers.arrayElement([ + { + ...{ + minRevShare: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + maxRevShare: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + }, + }, + undefined, + ]), + }, + }, + undefined, + ]), + uniqueId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + createdAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), + updatedAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), + }, + }, undefined, ]), - isArray: faker.helpers.arrayElement([ - faker.datatype.boolean(), + commission: faker.helpers.arrayElement([ + faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), undefined, ]), - })), - notes: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - }, - undefined, - ]), - exit: faker.helpers.arrayElement([ - { - fields: Array.from( - { length: faker.number.int({ min: 1, max: 10 }) }, - (_, i) => i + 1, - ).map(() => ({ - name: faker.helpers.arrayElement([ - "amount", - "amounts", - "validatorAddress", - "validatorAddresses", - "receiverAddress", - "providerId", - "duration", - "inputToken", - "inputTokenNetwork", - "outputToken", - "outputTokenNetwork", - "subnetId", - "tronResource", - "feeConfigurationId", - "cosmosPubKey", - "tezosPubKey", - "cAddressBech", - "pAddressBech", - "executionMode", - "ledgerWalletApiCompatible", - "useMaxAmount", - "useInstantExecution", - "rangeMin", - "rangeMax", - "percentage", - "tokenId", - ] as const), - type: faker.helpers.arrayElement([ - "string", - "number", - "address", - "enum", - "boolean", - ] as const), - label: faker.string.alpha({ length: { min: 10, max: 20 } }), - description: faker.helpers.arrayElement([ + tvlUsd: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - required: faker.helpers.arrayElement([ - faker.datatype.boolean(), - undefined, - ]), - options: faker.helpers.arrayElement([ - Array.from( - { length: faker.number.int({ min: 1, max: 10 }) }, - (_, i) => i + 1, - ).map(() => - faker.string.alpha({ length: { min: 10, max: 20 } }), - ), - undefined, - ]), - optionsRef: faker.helpers.arrayElement([ + tvl: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - default: faker.helpers.arrayElement([{}, undefined]), - placeholder: faker.helpers.arrayElement([ + tvlRaw: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - minimum: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), + votingPower: faker.helpers.arrayElement([ + faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), undefined, ]), - maximum: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), + preferred: faker.helpers.arrayElement([ + faker.datatype.boolean(), undefined, ]), - isArray: faker.helpers.arrayElement([ - faker.datatype.boolean(), + minimumStake: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - })), - notes: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - }, - undefined, - ]), - manage: faker.helpers.arrayElement([ - { - [faker.string.alphanumeric(5)]: { - fields: Array.from( - { length: faker.number.int({ min: 1, max: 10 }) }, - (_, i) => i + 1, - ).map(() => ({ - name: faker.helpers.arrayElement([ - "amount", - "amounts", - "validatorAddress", - "validatorAddresses", - "receiverAddress", - "providerId", - "duration", - "inputToken", - "inputTokenNetwork", - "outputToken", - "outputTokenNetwork", - "subnetId", - "tronResource", - "feeConfigurationId", - "cosmosPubKey", - "tezosPubKey", - "cAddressBech", - "pAddressBech", - "executionMode", - "ledgerWalletApiCompatible", - "useMaxAmount", - "useInstantExecution", - "rangeMin", - "rangeMax", - "percentage", - "tokenId", - ] as const), - type: faker.helpers.arrayElement([ - "string", - "number", - "address", - "enum", - "boolean", - ] as const), - label: faker.string.alpha({ length: { min: 10, max: 20 } }), - description: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - required: faker.helpers.arrayElement([ - faker.datatype.boolean(), - undefined, - ]), - options: faker.helpers.arrayElement([ - Array.from( - { length: faker.number.int({ min: 1, max: 10 }) }, - (_, i) => i + 1, - ).map(() => - faker.string.alpha({ length: { min: 10, max: 20 } }), - ), - undefined, - ]), - optionsRef: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - default: faker.helpers.arrayElement([{}, undefined]), - placeholder: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - minimum: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), - undefined, - ]), - maximum: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), - undefined, - ]), - isArray: faker.helpers.arrayElement([ - faker.datatype.boolean(), - undefined, - ]), - })), - notes: faker.helpers.arrayElement([ + remainingPossibleStake: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - }, - }, - undefined, - ]), - balance: faker.helpers.arrayElement([ - { - ...{ - fields: Array.from( - { length: faker.number.int({ min: 1, max: 10 }) }, - (_, i) => i + 1, - ).map(() => ({ - name: faker.helpers.arrayElement([ - "amount", - "amounts", - "validatorAddress", - "validatorAddresses", - "receiverAddress", - "providerId", - "duration", - "inputToken", - "inputTokenNetwork", - "outputToken", - "outputTokenNetwork", - "subnetId", - "tronResource", - "feeConfigurationId", - "cosmosPubKey", - "tezosPubKey", - "cAddressBech", - "pAddressBech", - "executionMode", - "ledgerWalletApiCompatible", - "useMaxAmount", - "useInstantExecution", - "rangeMin", - "rangeMax", - "percentage", - "tokenId", - ] as const), - type: faker.helpers.arrayElement([ - "string", - "number", - "address", - "enum", - "boolean", - ] as const), - label: faker.string.alpha({ length: { min: 10, max: 20 } }), - description: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - required: faker.helpers.arrayElement([ - faker.datatype.boolean(), - undefined, - ]), - options: faker.helpers.arrayElement([ - Array.from( - { length: faker.number.int({ min: 1, max: 10 }) }, - (_, i) => i + 1, - ).map(() => - faker.string.alpha({ length: { min: 10, max: 20 } }), - ), - undefined, - ]), - optionsRef: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - default: faker.helpers.arrayElement([{}, undefined]), - placeholder: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - minimum: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), - undefined, - ]), - maximum: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), - undefined, - ]), - isArray: faker.helpers.arrayElement([ - faker.datatype.boolean(), - undefined, - ]), - })), - notes: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), + remainingSlots: faker.helpers.arrayElement([ + faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + undefined, + ]), + nominatorCount: faker.helpers.arrayElement([ + faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), undefined, ]), - }, - }, - undefined, - ]), - }, - }, - undefined, - ]), - possibleFeeTakingMechanisms: faker.helpers.arrayElement([ - { - ...{ - depositFee: faker.datatype.boolean(), - managementFee: faker.datatype.boolean(), - performanceFee: faker.datatype.boolean(), - validatorRebates: faker.datatype.boolean(), - }, - }, - undefined, - ]), - }, - }, - providerId: faker.string.alpha({ length: { min: 10, max: 20 } }), - tags: faker.helpers.arrayElement([ - Array.from( - { length: faker.number.int({ min: 1, max: 10 }) }, - (_, i) => i + 1, - ).map(() => faker.string.alpha({ length: { min: 10, max: 20 } })), - undefined, - ]), - state: faker.helpers.arrayElement([ - { - ...{ - pricePerShareState: faker.helpers.arrayElement([ - { - ...{ - price: faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - shareToken: { - ...{ - symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), - name: faker.string.alpha({ length: { min: 10, max: 20 } }), - decimals: faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - network: faker.helpers.arrayElement([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "monad-testnet", - "monad", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", - ] as const), - address: faker.helpers.arrayElement([ + status: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + providerId: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - logoURI: faker.helpers.arrayElement([ + pricePerShare: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - isPoints: faker.helpers.arrayElement([ - faker.datatype.boolean(), + subnetId: faker.helpers.arrayElement([ + faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), undefined, ]), - coinGeckoId: faker.helpers.arrayElement([ + subnetName: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + marketCap: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + tokenSymbol: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), }, }, - quoteToken: { - ...{ - symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), - name: faker.string.alpha({ length: { min: 10, max: 20 } }), - decimals: faker.number.float({ + undefined, + ]), + validators: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + address: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + website: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + rewardRate: faker.helpers.arrayElement([ + { + ...{ + total: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + rateType: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + components: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + rate: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + rateType: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + token: { + ...{ + symbol: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + name: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + }, + }, + yieldSource: faker.helpers.arrayElement([ + "staking", + "restaking", + "protocol_incentive", + "campaign_incentive", + "points", + "lending_interest", + "mev", + "real_world_asset_yield", + "vault", + ] as const), + description: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + })), + }, + }, + undefined, + ]), + provider: faker.helpers.arrayElement([ + { + ...{ + name: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + logoURI: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + description: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + website: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + tvlUsd: {}, + type: faker.helpers.arrayElement([ + "protocol", + "validator_provider", + ] as const), + references: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), + rank: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + preferred: faker.datatype.boolean(), + revshare: faker.helpers.arrayElement([ + { + ...{ + trial: faker.helpers.arrayElement([ + { + ...{ + minRevShare: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + maxRevShare: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + }, + }, + undefined, + ]), + standard: faker.helpers.arrayElement([ + { + ...{ + minRevShare: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + maxRevShare: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + }, + }, + undefined, + ]), + pro: faker.helpers.arrayElement([ + { + ...{ + minRevShare: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + maxRevShare: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + }, + }, + undefined, + ]), + }, + }, + undefined, + ]), + uniqueId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + createdAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), + updatedAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), + }, + }, + undefined, + ]), + commission: faker.helpers.arrayElement([ + faker.number.float({ min: undefined, max: undefined, fractionDigits: 2, }), - network: faker.helpers.arrayElement([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "monad-testnet", - "monad", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", - ] as const), - address: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - logoURI: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - isPoints: faker.helpers.arrayElement([ - faker.datatype.boolean(), - undefined, - ]), - coinGeckoId: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - }, - }, - }, - }, - undefined, - ]), - concentratedLiquidityPoolState: faker.helpers.arrayElement([ - { - ...{ - baseApr: faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - price: faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - tickSpacing: faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - minTick: faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - maxTick: faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - volume24hUsd: faker.helpers.arrayElement([ - faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - null, - ]), - fee24hUsd: faker.helpers.arrayElement([ - faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - null, - ]), - tvlUsd: faker.helpers.arrayElement([ - faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - null, - ]), - feeTier: faker.number.float({ - min: undefined, - max: undefined, - fractionDigits: 2, - }), - baseToken: { - ...{ - symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), - name: faker.string.alpha({ length: { min: 10, max: 20 } }), - decimals: faker.number.float({ + undefined, + ]), + tvlUsd: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + tvl: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + tvlRaw: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + votingPower: faker.helpers.arrayElement([ + faker.number.float({ min: undefined, max: undefined, fractionDigits: 2, }), - network: faker.helpers.arrayElement([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "monad-testnet", - "monad", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", - ] as const), - address: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - logoURI: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - isPoints: faker.helpers.arrayElement([ - faker.datatype.boolean(), - undefined, - ]), - coinGeckoId: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - }, - }, - quoteToken: { + undefined, + ]), + preferred: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + minimumStake: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + remainingPossibleStake: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + remainingSlots: faker.helpers.arrayElement([ + faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + undefined, + ]), + nominatorCount: faker.helpers.arrayElement([ + faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + undefined, + ]), + status: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + providerId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + pricePerShare: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + subnetId: faker.helpers.arrayElement([ + faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + undefined, + ]), + subnetName: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + marketCap: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + tokenSymbol: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + })), + undefined, + ]), + amountUsd: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + isEarning: faker.datatype.boolean(), + priceRange: faker.helpers.arrayElement([{}, undefined]), + tokenId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + shareAmount: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + shareAmountRaw: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + shareToken: faker.helpers.arrayElement([ + { ...{ symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), name: faker.string.alpha({ length: { min: 10, max: 20 } }), @@ -6322,70 +8747,47 @@ export const getYieldsControllerGetYieldResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", "solana", "solana-devnet", "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", - ] as const), - address: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - logoURI: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - isPoints: faker.helpers.arrayElement([ - faker.datatype.boolean(), - undefined, - ]), - coinGeckoId: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), - }, - }, - }, - }, - undefined, - ]), - capacityState: faker.helpers.arrayElement([ - { - ...{ - current: faker.string.alpha({ length: { min: 10, max: 20 } }), - max: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), - undefined, - ]), - remaining: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, - ]), - undefined, - ]), - }, - }, - undefined, - ]), - }, + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + undefined, + ]), + })), + })), + undefined, + ]), }, - undefined, - ]), - ...overrideResponse, -}); + }); export const getYieldsControllerGetYieldBalancesResponseMock = ( overrideResponse: Partial = {}, @@ -6419,6 +8821,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "STAKE", "UNSTAKE", "CLAIM_REWARDS", + "AUTO_SWEEP_UNSTAKE_REWARDS", + "AUTO_SWEEP_WITHDRAW_REWARDS", "RESTAKE_REWARDS", "WITHDRAW", "WITHDRAW_ALL", @@ -6470,6 +8874,9 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "rangeMax", "percentage", "tokenId", + "skipPrechecks", + "useMaxAllowance", + "feePayerAddress", ] as const), type: faker.helpers.arrayElement([ "string", @@ -6532,6 +8939,13 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( }, undefined, ]), + amount: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), })), token: { ...{ @@ -6628,6 +9042,7 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -6796,6 +9211,7 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -6832,6 +9248,7 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "staking", "restaking", "protocol_incentive", + "campaign_incentive", "points", "lending_interest", "mev", @@ -6851,8 +9268,26 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( { ...{ name: faker.string.alpha({ length: { min: 10, max: 20 } }), - uniqueId: faker.string.alpha({ length: { min: 10, max: 20 } }), + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + logoURI: faker.string.alpha({ length: { min: 10, max: 20 } }), + description: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), website: faker.string.alpha({ length: { min: 10, max: 20 } }), + tvlUsd: {}, + type: faker.helpers.arrayElement([ + "protocol", + "validator_provider", + ] as const), + references: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), rank: faker.number.float({ min: undefined, max: undefined, @@ -6917,6 +9352,18 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( }, undefined, ]), + uniqueId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + createdAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), + updatedAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), }, }, undefined, @@ -7147,6 +9594,7 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -7183,6 +9631,7 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "staking", "restaking", "protocol_incentive", + "campaign_incentive", "points", "lending_interest", "mev", @@ -7202,8 +9651,24 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( { ...{ name: faker.string.alpha({ length: { min: 10, max: 20 } }), - uniqueId: faker.string.alpha({ length: { min: 10, max: 20 } }), + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + logoURI: faker.string.alpha({ length: { min: 10, max: 20 } }), + description: faker.string.alpha({ length: { min: 10, max: 20 } }), website: faker.string.alpha({ length: { min: 10, max: 20 } }), + tvlUsd: {}, + type: faker.helpers.arrayElement([ + "protocol", + "validator_provider", + ] as const), + references: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), rank: faker.number.float({ min: undefined, max: undefined, @@ -7268,6 +9733,18 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( }, undefined, ]), + uniqueId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + createdAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), + updatedAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), }, }, undefined, @@ -7376,6 +9853,145 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), + shareAmount: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + shareAmountRaw: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + shareToken: faker.helpers.arrayElement([ + { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + undefined, + ]), })), outputTokenBalance: faker.helpers.arrayElement([ { @@ -7408,6 +10024,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "STAKE", "UNSTAKE", "CLAIM_REWARDS", + "AUTO_SWEEP_UNSTAKE_REWARDS", + "AUTO_SWEEP_WITHDRAW_REWARDS", "RESTAKE_REWARDS", "WITHDRAW", "WITHDRAW_ALL", @@ -7459,6 +10077,9 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "rangeMax", "percentage", "tokenId", + "skipPrechecks", + "useMaxAllowance", + "feePayerAddress", ] as const), type: faker.helpers.arrayElement([ "string", @@ -7521,6 +10142,13 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( }, undefined, ]), + amount: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), })), token: { ...{ @@ -7617,6 +10245,7 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -7787,6 +10416,7 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -7829,6 +10459,7 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "staking", "restaking", "protocol_incentive", + "campaign_incentive", "points", "lending_interest", "mev", @@ -7848,12 +10479,30 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( { ...{ name: faker.string.alpha({ length: { min: 10, max: 20 } }), - uniqueId: faker.string.alpha({ + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + logoURI: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + description: faker.string.alpha({ length: { min: 10, max: 20 }, }), website: faker.string.alpha({ length: { min: 10, max: 20 }, }), + tvlUsd: {}, + type: faker.helpers.arrayElement([ + "protocol", + "validator_provider", + ] as const), + references: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), rank: faker.number.float({ min: undefined, max: undefined, @@ -7918,6 +10567,18 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( }, undefined, ]), + uniqueId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + createdAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), + updatedAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), }, }, undefined, @@ -8154,6 +10815,7 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -8190,6 +10852,7 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "staking", "restaking", "protocol_incentive", + "campaign_incentive", "points", "lending_interest", "mev", @@ -8209,10 +10872,26 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( { ...{ name: faker.string.alpha({ length: { min: 10, max: 20 } }), - uniqueId: faker.string.alpha({ + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + logoURI: faker.string.alpha({ length: { min: 10, max: 20 } }), + description: faker.string.alpha({ length: { min: 10, max: 20 }, }), website: faker.string.alpha({ length: { min: 10, max: 20 } }), + tvlUsd: {}, + type: faker.helpers.arrayElement([ + "protocol", + "validator_provider", + ] as const), + references: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), rank: faker.number.float({ min: undefined, max: undefined, @@ -8277,6 +10956,18 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( }, undefined, ]), + uniqueId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + createdAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), + updatedAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), }, }, undefined, @@ -8375,16 +11066,322 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( amountUsd: faker.helpers.arrayElement([ faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), - null, + null, + ]), + undefined, + ]), + isEarning: faker.datatype.boolean(), + priceRange: faker.helpers.arrayElement([{}, undefined]), + tokenId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + shareAmount: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + shareAmountRaw: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + shareToken: faker.helpers.arrayElement([ + { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + undefined, + ]), + }, + }, + undefined, + ]), + rewardRate: faker.helpers.arrayElement([ + { + ...{ + total: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + rateType: faker.string.alpha({ length: { min: 10, max: 20 } }), + components: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + rate: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + rateType: faker.string.alpha({ length: { min: 10, max: 20 } }), + token: { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + network: faker.helpers.arrayElement([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "monad-testnet", + "monad", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ] as const), + address: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + logoURI: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + isPoints: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + coinGeckoId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + yieldSource: faker.helpers.arrayElement([ + "staking", + "restaking", + "protocol_incentive", + "campaign_incentive", + "points", + "lending_interest", + "mev", + "real_world_asset_yield", + "vault", + ] as const), + description: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, ]), - undefined, - ]), - isEarning: faker.datatype.boolean(), - priceRange: faker.helpers.arrayElement([{}, undefined]), - tokenId: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - undefined, - ]), + })), }, }, undefined, @@ -8392,6 +11389,77 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( ...overrideResponse, }); +export const getYieldsControllerGetYieldRewardsResponseMock = ( + overrideResponse: Partial = {}, +): PaginatedResponseDto => ({ + total: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + offset: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + limit: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + ...overrideResponse, +}); + +export const getYieldsControllerGetYieldRewardRateHistoryResponseMock = ( + overrideResponse: Partial = {}, +): RewardRateHistoryResponseDto => ({ + total: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + offset: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + limit: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + yieldId: faker.string.alpha({ length: { min: 10, max: 20 } }), + interval: faker.helpers.arrayElement(["day", "week", "month"] as const), + from: faker.string.alpha({ length: { min: 10, max: 20 } }), + to: faker.string.alpha({ length: { min: 10, max: 20 } }), + ...overrideResponse, +}); + +export const getYieldsControllerGetYieldTvlHistoryResponseMock = ( + overrideResponse: Partial = {}, +): TvlHistoryResponseDto => ({ + total: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + offset: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + limit: faker.number.float({ + min: undefined, + max: undefined, + fractionDigits: 2, + }), + yieldId: faker.string.alpha({ length: { min: 10, max: 20 } }), + interval: faker.helpers.arrayElement(["day", "week", "month"] as const), + from: faker.string.alpha({ length: { min: 10, max: 20 } }), + to: faker.string.alpha({ length: { min: 10, max: 20 } }), + ...overrideResponse, +}); + export const getYieldsControllerGetYieldValidatorsResponseMock = (): YieldsControllerGetYieldValidators200 => ({ ...{ @@ -8550,6 +11618,7 @@ export const getYieldsControllerGetYieldValidatorsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -8586,6 +11655,7 @@ export const getYieldsControllerGetYieldValidatorsResponseMock = "staking", "restaking", "protocol_incentive", + "campaign_incentive", "points", "lending_interest", "mev", @@ -8605,8 +11675,26 @@ export const getYieldsControllerGetYieldValidatorsResponseMock = { ...{ name: faker.string.alpha({ length: { min: 10, max: 20 } }), - uniqueId: faker.string.alpha({ length: { min: 10, max: 20 } }), + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + logoURI: faker.string.alpha({ length: { min: 10, max: 20 } }), + description: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), website: faker.string.alpha({ length: { min: 10, max: 20 } }), + tvlUsd: {}, + type: faker.helpers.arrayElement([ + "protocol", + "validator_provider", + ] as const), + references: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + undefined, + ]), rank: faker.number.float({ min: undefined, max: undefined, @@ -8671,6 +11759,18 @@ export const getYieldsControllerGetYieldValidatorsResponseMock = }, undefined, ]), + uniqueId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + createdAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), + updatedAt: faker.helpers.arrayElement([ + `${faker.date.past().toISOString().split(".")[0]}Z`, + undefined, + ]), }, }, undefined, @@ -8804,6 +11904,8 @@ export const getActionsControllerGetActionsResponseMock = "STAKE", "UNSTAKE", "CLAIM_REWARDS", + "AUTO_SWEEP_UNSTAKE_REWARDS", + "AUTO_SWEEP_WITHDRAW_REWARDS", "RESTAKE_REWARDS", "WITHDRAW", "WITHDRAW_ALL", @@ -8926,6 +12028,7 @@ export const getActionsControllerGetActionsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -9007,6 +12110,7 @@ export const getActionsControllerGetActionsResponseMock = "INFSTONES_PROVISION", "INFSTONES_EXIT_REQUEST", "INFSTONES_CLAIM_REQUEST", + "BATCH", ] as const), hash: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), @@ -9197,6 +12301,7 @@ export const getActionsControllerGetActionsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -9304,6 +12409,7 @@ export const getActionsControllerGetActionsResponseMock = "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -9368,6 +12474,22 @@ export const getActionsControllerGetActionsResponseMock = faker.datatype.boolean(), undefined, ]), + skipPrechecks: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + useMaxAllowance: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + feePayerAddress: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + receiverAddress: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), rangeMin: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, @@ -9415,6 +12537,8 @@ export const getActionsControllerGetActionResponseMock = ( "STAKE", "UNSTAKE", "CLAIM_REWARDS", + "AUTO_SWEEP_UNSTAKE_REWARDS", + "AUTO_SWEEP_WITHDRAW_REWARDS", "RESTAKE_REWARDS", "WITHDRAW", "WITHDRAW_ALL", @@ -9537,6 +12661,7 @@ export const getActionsControllerGetActionResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -9618,6 +12743,7 @@ export const getActionsControllerGetActionResponseMock = ( "INFSTONES_PROVISION", "INFSTONES_EXIT_REQUEST", "INFSTONES_CLAIM_REQUEST", + "BATCH", ] as const), hash: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), @@ -9800,6 +12926,7 @@ export const getActionsControllerGetActionResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -9907,6 +13034,7 @@ export const getActionsControllerGetActionResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -9971,6 +13099,22 @@ export const getActionsControllerGetActionResponseMock = ( faker.datatype.boolean(), undefined, ]), + skipPrechecks: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + useMaxAllowance: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + feePayerAddress: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + receiverAddress: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), rangeMin: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, @@ -10015,6 +13159,8 @@ export const getActionsControllerEnterYieldResponseMock = ( "STAKE", "UNSTAKE", "CLAIM_REWARDS", + "AUTO_SWEEP_UNSTAKE_REWARDS", + "AUTO_SWEEP_WITHDRAW_REWARDS", "RESTAKE_REWARDS", "WITHDRAW", "WITHDRAW_ALL", @@ -10137,6 +13283,7 @@ export const getActionsControllerEnterYieldResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -10218,6 +13365,7 @@ export const getActionsControllerEnterYieldResponseMock = ( "INFSTONES_PROVISION", "INFSTONES_EXIT_REQUEST", "INFSTONES_CLAIM_REQUEST", + "BATCH", ] as const), hash: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), @@ -10400,6 +13548,7 @@ export const getActionsControllerEnterYieldResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -10507,6 +13656,7 @@ export const getActionsControllerEnterYieldResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -10571,6 +13721,22 @@ export const getActionsControllerEnterYieldResponseMock = ( faker.datatype.boolean(), undefined, ]), + skipPrechecks: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + useMaxAllowance: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + feePayerAddress: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + receiverAddress: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), rangeMin: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, @@ -10615,6 +13781,8 @@ export const getActionsControllerExitYieldResponseMock = ( "STAKE", "UNSTAKE", "CLAIM_REWARDS", + "AUTO_SWEEP_UNSTAKE_REWARDS", + "AUTO_SWEEP_WITHDRAW_REWARDS", "RESTAKE_REWARDS", "WITHDRAW", "WITHDRAW_ALL", @@ -10737,6 +13905,7 @@ export const getActionsControllerExitYieldResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -10818,6 +13987,7 @@ export const getActionsControllerExitYieldResponseMock = ( "INFSTONES_PROVISION", "INFSTONES_EXIT_REQUEST", "INFSTONES_CLAIM_REQUEST", + "BATCH", ] as const), hash: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), @@ -11000,6 +14170,7 @@ export const getActionsControllerExitYieldResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -11107,6 +14278,7 @@ export const getActionsControllerExitYieldResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -11171,6 +14343,22 @@ export const getActionsControllerExitYieldResponseMock = ( faker.datatype.boolean(), undefined, ]), + skipPrechecks: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + useMaxAllowance: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + feePayerAddress: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + receiverAddress: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), rangeMin: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, @@ -11215,6 +14403,8 @@ export const getActionsControllerManageYieldResponseMock = ( "STAKE", "UNSTAKE", "CLAIM_REWARDS", + "AUTO_SWEEP_UNSTAKE_REWARDS", + "AUTO_SWEEP_WITHDRAW_REWARDS", "RESTAKE_REWARDS", "WITHDRAW", "WITHDRAW_ALL", @@ -11337,6 +14527,7 @@ export const getActionsControllerManageYieldResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -11418,6 +14609,7 @@ export const getActionsControllerManageYieldResponseMock = ( "INFSTONES_PROVISION", "INFSTONES_EXIT_REQUEST", "INFSTONES_CLAIM_REQUEST", + "BATCH", ] as const), hash: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), @@ -11600,6 +14792,7 @@ export const getActionsControllerManageYieldResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -11707,6 +14900,7 @@ export const getActionsControllerManageYieldResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -11771,6 +14965,22 @@ export const getActionsControllerManageYieldResponseMock = ( faker.datatype.boolean(), undefined, ]), + skipPrechecks: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + useMaxAllowance: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + feePayerAddress: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + receiverAddress: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), rangeMin: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, @@ -11897,6 +15107,7 @@ export const getTransactionsControllerSubmitTransactionHashResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -11978,6 +15189,7 @@ export const getTransactionsControllerSubmitTransactionHashResponseMock = ( "INFSTONES_PROVISION", "INFSTONES_EXIT_REQUEST", "INFSTONES_CLAIM_REQUEST", + "BATCH", ] as const), hash: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), @@ -12118,6 +15330,7 @@ export const getTransactionsControllerSubmitTransactionResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -12199,6 +15412,7 @@ export const getTransactionsControllerSubmitTransactionResponseMock = ( "INFSTONES_PROVISION", "INFSTONES_EXIT_REQUEST", "INFSTONES_CLAIM_REQUEST", + "BATCH", ] as const), hash: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), @@ -12339,6 +15553,7 @@ export const getTransactionsControllerGetTransactionResponseMock = ( "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -12420,6 +15635,7 @@ export const getTransactionsControllerGetTransactionResponseMock = ( "INFSTONES_PROVISION", "INFSTONES_EXIT_REQUEST", "INFSTONES_CLAIM_REQUEST", + "BATCH", ] as const), hash: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), @@ -12560,6 +15776,7 @@ export const getNetworksControllerGetNetworksResponseMock = (): NetworkDto[] => "kusama", "westend", "bittensor", + "aptos", "binancebeacon", "cardano", "near", @@ -12746,6 +15963,64 @@ export const getYieldsControllerGetYieldMockHandler = ( ); }; +export const getYieldsControllerGetYieldRiskMockHandler = ( + overrideResponse?: + | RiskParameterDto[] + | (( + info: Parameters[1]>[0], + ) => Promise | RiskParameterDto[]), + options?: RequestHandlerOptions, +) => { + return http.get( + "*/v1/yields/:yieldId/risk", + async (info) => { + await delay(1000); + + return new HttpResponse( + JSON.stringify( + overrideResponse !== undefined + ? typeof overrideResponse === "function" + ? await overrideResponse(info) + : overrideResponse + : getYieldsControllerGetYieldRiskResponseMock(), + ), + { status: 200, headers: { "Content-Type": "application/json" } }, + ); + }, + options, + ); +}; + +export const getYieldsControllerGetBalanceHistoryMockHandler = ( + overrideResponse?: + | YieldsControllerGetBalanceHistory200 + | (( + info: Parameters[1]>[0], + ) => + | Promise + | YieldsControllerGetBalanceHistory200), + options?: RequestHandlerOptions, +) => { + return http.get( + "*/v1/yields/:yieldId/balances/history", + async (info) => { + await delay(1000); + + return new HttpResponse( + JSON.stringify( + overrideResponse !== undefined + ? typeof overrideResponse === "function" + ? await overrideResponse(info) + : overrideResponse + : getYieldsControllerGetBalanceHistoryResponseMock(), + ), + { status: 200, headers: { "Content-Type": "application/json" } }, + ); + }, + options, + ); +}; + export const getYieldsControllerGetYieldBalancesMockHandler = ( overrideResponse?: | YieldBalancesDto @@ -12774,6 +16049,92 @@ export const getYieldsControllerGetYieldBalancesMockHandler = ( ); }; +export const getYieldsControllerGetYieldRewardsMockHandler = ( + overrideResponse?: + | PaginatedResponseDto + | (( + info: Parameters[1]>[0], + ) => Promise | PaginatedResponseDto), + options?: RequestHandlerOptions, +) => { + return http.get( + "*/v1/yields/:yieldId/rewards/history", + async (info) => { + await delay(1000); + + return new HttpResponse( + JSON.stringify( + overrideResponse !== undefined + ? typeof overrideResponse === "function" + ? await overrideResponse(info) + : overrideResponse + : getYieldsControllerGetYieldRewardsResponseMock(), + ), + { status: 200, headers: { "Content-Type": "application/json" } }, + ); + }, + options, + ); +}; + +export const getYieldsControllerGetYieldRewardRateHistoryMockHandler = ( + overrideResponse?: + | RewardRateHistoryResponseDto + | (( + info: Parameters[1]>[0], + ) => + | Promise + | RewardRateHistoryResponseDto), + options?: RequestHandlerOptions, +) => { + return http.get( + "*/v1/yields/:yieldId/reward-rate/history", + async (info) => { + await delay(1000); + + return new HttpResponse( + JSON.stringify( + overrideResponse !== undefined + ? typeof overrideResponse === "function" + ? await overrideResponse(info) + : overrideResponse + : getYieldsControllerGetYieldRewardRateHistoryResponseMock(), + ), + { status: 200, headers: { "Content-Type": "application/json" } }, + ); + }, + options, + ); +}; + +export const getYieldsControllerGetYieldTvlHistoryMockHandler = ( + overrideResponse?: + | TvlHistoryResponseDto + | (( + info: Parameters[1]>[0], + ) => Promise | TvlHistoryResponseDto), + options?: RequestHandlerOptions, +) => { + return http.get( + "*/v1/yields/:yieldId/tvl/history", + async (info) => { + await delay(1000); + + return new HttpResponse( + JSON.stringify( + overrideResponse !== undefined + ? typeof overrideResponse === "function" + ? await overrideResponse(info) + : overrideResponse + : getYieldsControllerGetYieldTvlHistoryResponseMock(), + ), + { status: 200, headers: { "Content-Type": "application/json" } }, + ); + }, + options, + ); +}; + export const getYieldsControllerGetYieldValidatorsMockHandler = ( overrideResponse?: | YieldsControllerGetYieldValidators200 @@ -13147,7 +16508,12 @@ export const getYieldXyzAPIMock = () => [ getYieldsControllerGetYieldsMockHandler(), getYieldsControllerGetAggregateBalancesMockHandler(), getYieldsControllerGetYieldMockHandler(), + getYieldsControllerGetYieldRiskMockHandler(), + getYieldsControllerGetBalanceHistoryMockHandler(), getYieldsControllerGetYieldBalancesMockHandler(), + getYieldsControllerGetYieldRewardsMockHandler(), + getYieldsControllerGetYieldRewardRateHistoryMockHandler(), + getYieldsControllerGetYieldTvlHistoryMockHandler(), getYieldsControllerGetYieldValidatorsMockHandler(), getActionsControllerGetActionsMockHandler(), getActionsControllerGetActionMockHandler(), diff --git a/src/api/index.ts b/src/api/index.ts index ca15f35..463d9be 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -9,17 +9,26 @@ import type { CreateManageActionDto, HealthStatusDto, NetworkDto, + PaginatedResponseDto, ProviderDto, ProvidersControllerGetProviders200, ProvidersControllerGetProvidersParams, + RewardRateHistoryResponseDto, + RiskParameterDto, SubmitHashDto, SubmitTransactionDto, TransactionDto, + TvlHistoryResponseDto, YieldBalancesDto, YieldBalancesRequestDto, YieldDto, + YieldsControllerGetBalanceHistory200, + YieldsControllerGetBalanceHistoryParams, + YieldsControllerGetYieldRewardRateHistoryParams, + YieldsControllerGetYieldRewardsParams, YieldsControllerGetYields200, YieldsControllerGetYieldsParams, + YieldsControllerGetYieldTvlHistoryParams, YieldsControllerGetYieldValidators200, YieldsControllerGetYieldValidatorsParams, } from "./schemas"; @@ -73,6 +82,37 @@ export const getYield = ( ); }; +/** + * Retrieve risk metadata associated with a specific yield. + * @summary Get risk metadata for a yield + */ +export const getYieldRisk = ( + yieldId: string, + options?: SecondParameter>, +) => { + return customFetch( + { url: `/v1/yields/${yieldId}/risk`, method: "GET" }, + options, + ); +}; + +/** + * Returns a chronological time series of balance snapshots for a wallet address within a yield. Each entry reflects the position at a specific timestamp or block. Supports configurable sampling intervals and point-in-time queries. Only available for ERC4626 vaults with indexed transfer history. + * @summary Get historical balance snapshots for a yield + */ +export const getBalanceHistory = ( + yieldId: string, + params: YieldsControllerGetBalanceHistoryParams, + options?: SecondParameter< + typeof customFetch + >, +) => { + return customFetch( + { url: `/v1/yields/${yieldId}/balances/history`, method: "GET", params }, + options, + ); +}; + /** * Retrieve all balances associated with a yield opportunity for a specific wallet address, including active, pending, claimable, and withdrawable balances. The network is automatically determined from the yield configuration. * @summary Get balances for a specific yield @@ -93,6 +133,51 @@ export const getYieldBalances = ( ); }; +/** + * Retrieve a chronological list of on-chain reward events for an indexed yield. Each record includes timestamp, token metadata, amount, reward source, and transaction reference. + * @summary Get reward history + */ +export const getYieldRewards = ( + yieldId: string, + params: YieldsControllerGetYieldRewardsParams, + options?: SecondParameter>, +) => { + return customFetch( + { url: `/v1/yields/${yieldId}/rewards/history`, method: "GET", params }, + options, + ); +}; + +/** + * Returns a chronological time series of reward rate snapshots for the specified yield, suitable for charting and analytics. Supports configurable time ranges, sampling intervals (day/week/month), and pagination. + * @summary Get historical reward rate snapshots for a yield + */ +export const getYieldRewardRateHistory = ( + yieldId: string, + params?: YieldsControllerGetYieldRewardRateHistoryParams, + options?: SecondParameter>, +) => { + return customFetch( + { url: `/v1/yields/${yieldId}/reward-rate/history`, method: "GET", params }, + options, + ); +}; + +/** + * Returns a chronological time series of Total Value Locked for the specified yield, expressed in underlying token units. Supports configurable time ranges, sampling intervals (day/week/month), and pagination. + * @summary Get historical TVL snapshots for a yield + */ +export const getYieldTvlHistory = ( + yieldId: string, + params?: YieldsControllerGetYieldTvlHistoryParams, + options?: SecondParameter>, +) => { + return customFetch( + { url: `/v1/yields/${yieldId}/tvl/history`, method: "GET", params }, + options, + ); +}; + /** * Retrieve a paginated list of validators available for staking or delegation for this yield opportunity. * @summary Get yield validators @@ -200,7 +285,7 @@ export const manageYield = ( * @summary Submit transaction hash */ export const submitTransactionHash = ( - transactionId: string, + transactionId: unknown, submitHashDto: SubmitHashDto, options?: SecondParameter>, ) => { @@ -220,7 +305,7 @@ export const submitTransactionHash = ( * @summary Submit transaction */ export const submitTransaction = ( - transactionId: string, + transactionId: unknown, submitTransactionDto: SubmitTransactionDto, options?: SecondParameter>, ) => { @@ -240,7 +325,7 @@ export const submitTransaction = ( * @summary Get transaction details */ export const getTransaction = ( - transactionId: string, + transactionId: unknown, options?: SecondParameter>, ) => { return customFetch( @@ -312,9 +397,24 @@ export type GetAggregateBalancesResult = NonNullable< Awaited> >; export type GetYieldResult = NonNullable>>; +export type GetYieldRiskResult = NonNullable< + Awaited> +>; +export type GetBalanceHistoryResult = NonNullable< + Awaited> +>; export type GetYieldBalancesResult = NonNullable< Awaited> >; +export type GetYieldRewardsResult = NonNullable< + Awaited> +>; +export type GetYieldRewardRateHistoryResult = NonNullable< + Awaited> +>; +export type GetYieldTvlHistoryResult = NonNullable< + Awaited> +>; export type GetYieldValidatorsResult = NonNullable< Awaited> >; diff --git a/src/api/schemas/actionArgumentsDto.ts b/src/api/schemas/actionArgumentsDto.ts index 811fc5a..45364ce 100644 --- a/src/api/schemas/actionArgumentsDto.ts +++ b/src/api/schemas/actionArgumentsDto.ts @@ -4,9 +4,9 @@ import type { ActionArgumentsDtoOutputTokenNetwork } from "./actionArgumentsDtoO import type { ActionArgumentsDtoTronResource } from "./actionArgumentsDtoTronResource"; export interface ActionArgumentsDto { - /** Amount to stake/unstake */ + /** Amount in human-readable token units, not the smallest denomination. For example, "1.500000" for 1.5 USDC (6 decimals) or "0.01" for 0.01 ETH (18 decimals). Precision up to the token's decimal places is supported. */ amount?: string; - /** Amounts to stake/unstake */ + /** Amounts in human-readable token units, not the smallest denomination. Precision up to the token's decimal places is supported. */ amounts?: string[]; /** Validator address for single validator selection */ validatorAddress?: string; @@ -46,6 +46,14 @@ export interface ActionArgumentsDto { useMaxAmount?: boolean; /** Use instant execution for exit (faster but may have fees) */ useInstantExecution?: boolean; + /** Skip pre-flight balance and rent checks */ + skipPrechecks?: boolean; + /** When true, ERC20 approval transactions use the maximum allowance (uint256.max) instead of the exact deposit amount. Useful to avoid repeated approval transactions on subsequent deposits. */ + useMaxAllowance?: boolean; + /** Fee payer address for gas-sponsored wallets (Solana). When provided, this address is used as the payer for account creation instructions and as the transaction-level fee payer. */ + feePayerAddress?: string; + /** Receiver wallet address: ERC4626 vault flows, or on Solana the address for tokens after an optional post-exit swap */ + receiverAddress?: string; /** Minimum price bound for concentrated liquidity pools (as decimal string). Must be non-negative (can be 0) and less than rangeMax. */ rangeMin?: string; /** Maximum price bound for concentrated liquidity pools (as decimal string). Must be positive and greater than rangeMin. */ diff --git a/src/api/schemas/actionArgumentsDtoInputTokenNetwork.ts b/src/api/schemas/actionArgumentsDtoInputTokenNetwork.ts index ac83446..0d18879 100644 --- a/src/api/schemas/actionArgumentsDtoInputTokenNetwork.ts +++ b/src/api/schemas/actionArgumentsDtoInputTokenNetwork.ts @@ -91,6 +91,7 @@ export const ActionArgumentsDtoInputTokenNetwork = { kusama: "kusama", westend: "westend", bittensor: "bittensor", + aptos: "aptos", binancebeacon: "binancebeacon", cardano: "cardano", near: "near", diff --git a/src/api/schemas/actionArgumentsDtoOutputTokenNetwork.ts b/src/api/schemas/actionArgumentsDtoOutputTokenNetwork.ts index 38f3e52..14d35df 100644 --- a/src/api/schemas/actionArgumentsDtoOutputTokenNetwork.ts +++ b/src/api/schemas/actionArgumentsDtoOutputTokenNetwork.ts @@ -91,6 +91,7 @@ export const ActionArgumentsDtoOutputTokenNetwork = { kusama: "kusama", westend: "westend", bittensor: "bittensor", + aptos: "aptos", binancebeacon: "binancebeacon", cardano: "cardano", near: "near", diff --git a/src/api/schemas/actionDto.ts b/src/api/schemas/actionDto.ts index 27abb1d..32f19ad 100644 --- a/src/api/schemas/actionDto.ts +++ b/src/api/schemas/actionDto.ts @@ -17,12 +17,12 @@ export interface ActionDto { /** User wallet address */ address: string; /** - * Amount involved in the action + * Amount involved in the action, in human-readable token units (not the smallest denomination). * @nullable */ amount: string | null; /** - * Raw wei amount (full precision) + * Raw smallest-denomination amount (full precision) * @nullable */ amountRaw: string | null; diff --git a/src/api/schemas/actionDtoType.ts b/src/api/schemas/actionDtoType.ts index d8c980d..05ac30c 100644 --- a/src/api/schemas/actionDtoType.ts +++ b/src/api/schemas/actionDtoType.ts @@ -8,6 +8,8 @@ export const ActionDtoType = { STAKE: "STAKE", UNSTAKE: "UNSTAKE", CLAIM_REWARDS: "CLAIM_REWARDS", + AUTO_SWEEP_UNSTAKE_REWARDS: "AUTO_SWEEP_UNSTAKE_REWARDS", + AUTO_SWEEP_WITHDRAW_REWARDS: "AUTO_SWEEP_WITHDRAW_REWARDS", RESTAKE_REWARDS: "RESTAKE_REWARDS", WITHDRAW: "WITHDRAW", WITHDRAW_ALL: "WITHDRAW_ALL", diff --git a/src/api/schemas/actionsControllerGetActionsNetwork.ts b/src/api/schemas/actionsControllerGetActionsNetwork.ts new file mode 100644 index 0000000..efc0fa9 --- /dev/null +++ b/src/api/schemas/actionsControllerGetActionsNetwork.ts @@ -0,0 +1,105 @@ +export type ActionsControllerGetActionsNetwork = + (typeof ActionsControllerGetActionsNetwork)[keyof typeof ActionsControllerGetActionsNetwork]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const ActionsControllerGetActionsNetwork = { + ethereum: "ethereum", + "ethereum-goerli": "ethereum-goerli", + "ethereum-holesky": "ethereum-holesky", + "ethereum-sepolia": "ethereum-sepolia", + "ethereum-hoodi": "ethereum-hoodi", + arbitrum: "arbitrum", + base: "base", + "base-sepolia": "base-sepolia", + gnosis: "gnosis", + optimism: "optimism", + polygon: "polygon", + "polygon-amoy": "polygon-amoy", + starknet: "starknet", + zksync: "zksync", + linea: "linea", + unichain: "unichain", + "monad-testnet": "monad-testnet", + monad: "monad", + "avalanche-c": "avalanche-c", + "avalanche-c-atomic": "avalanche-c-atomic", + "avalanche-p": "avalanche-p", + binance: "binance", + celo: "celo", + fantom: "fantom", + harmony: "harmony", + moonriver: "moonriver", + okc: "okc", + viction: "viction", + core: "core", + sonic: "sonic", + plasma: "plasma", + katana: "katana", + hyperevm: "hyperevm", + agoric: "agoric", + akash: "akash", + axelar: "axelar", + "band-protocol": "band-protocol", + bitsong: "bitsong", + canto: "canto", + chihuahua: "chihuahua", + comdex: "comdex", + coreum: "coreum", + cosmos: "cosmos", + crescent: "crescent", + cronos: "cronos", + cudos: "cudos", + desmos: "desmos", + dydx: "dydx", + evmos: "evmos", + "fetch-ai": "fetch-ai", + "gravity-bridge": "gravity-bridge", + injective: "injective", + irisnet: "irisnet", + juno: "juno", + kava: "kava", + "ki-network": "ki-network", + "mars-protocol": "mars-protocol", + nym: "nym", + "okex-chain": "okex-chain", + onomy: "onomy", + osmosis: "osmosis", + persistence: "persistence", + quicksilver: "quicksilver", + regen: "regen", + secret: "secret", + sentinel: "sentinel", + sommelier: "sommelier", + stafi: "stafi", + stargaze: "stargaze", + stride: "stride", + teritori: "teritori", + tgrade: "tgrade", + umee: "umee", + sei: "sei", + mantra: "mantra", + celestia: "celestia", + saga: "saga", + zetachain: "zetachain", + dymension: "dymension", + humansai: "humansai", + neutron: "neutron", + polkadot: "polkadot", + kusama: "kusama", + westend: "westend", + bittensor: "bittensor", + aptos: "aptos", + binancebeacon: "binancebeacon", + cardano: "cardano", + near: "near", + solana: "solana", + "solana-devnet": "solana-devnet", + stellar: "stellar", + "stellar-testnet": "stellar-testnet", + sui: "sui", + tezos: "tezos", + tron: "tron", + ton: "ton", + "ton-testnet": "ton-testnet", + hyperliquid: "hyperliquid", +} as const; diff --git a/src/api/schemas/actionsControllerGetActionsParams.ts b/src/api/schemas/actionsControllerGetActionsParams.ts index 833e6a2..4ceb4bf 100644 --- a/src/api/schemas/actionsControllerGetActionsParams.ts +++ b/src/api/schemas/actionsControllerGetActionsParams.ts @@ -1,5 +1,7 @@ import type { ActionsControllerGetActionsIntent } from "./actionsControllerGetActionsIntent"; +import type { ActionsControllerGetActionsNetwork } from "./actionsControllerGetActionsNetwork"; import type { ActionsControllerGetActionsStatus } from "./actionsControllerGetActionsStatus"; +import type { ActionsControllerGetActionsStatusesItem } from "./actionsControllerGetActionsStatusesItem"; import type { ActionsControllerGetActionsType } from "./actionsControllerGetActionsType"; export type ActionsControllerGetActionsParams = { @@ -22,6 +24,10 @@ export type ActionsControllerGetActionsParams = { * Filter actions by status */ status?: ActionsControllerGetActionsStatus; + /** + * Filter actions by multiple statuses (supports CSV or repeated query params) + */ + statuses?: ActionsControllerGetActionsStatusesItem[]; /** * Filter actions by intent */ @@ -34,4 +40,8 @@ export type ActionsControllerGetActionsParams = { * Filter actions by specific yield */ yieldId?: string; + /** + * Filter by network + */ + network?: ActionsControllerGetActionsNetwork; }; diff --git a/src/api/schemas/actionsControllerGetActionsStatus.ts b/src/api/schemas/actionsControllerGetActionsStatus.ts index 06ffa7e..ce5d843 100644 --- a/src/api/schemas/actionsControllerGetActionsStatus.ts +++ b/src/api/schemas/actionsControllerGetActionsStatus.ts @@ -3,7 +3,11 @@ export type ActionsControllerGetActionsStatus = // eslint-disable-next-line @typescript-eslint/no-redeclare export const ActionsControllerGetActionsStatus = { - pending: "pending", - completed: "completed", - failed: "failed", + CANCELED: "CANCELED", + CREATED: "CREATED", + WAITING_FOR_NEXT: "WAITING_FOR_NEXT", + PROCESSING: "PROCESSING", + FAILED: "FAILED", + SUCCESS: "SUCCESS", + STALE: "STALE", } as const; diff --git a/src/api/schemas/actionsControllerGetActionsStatusesItem.ts b/src/api/schemas/actionsControllerGetActionsStatusesItem.ts new file mode 100644 index 0000000..c1049b5 --- /dev/null +++ b/src/api/schemas/actionsControllerGetActionsStatusesItem.ts @@ -0,0 +1,13 @@ +export type ActionsControllerGetActionsStatusesItem = + (typeof ActionsControllerGetActionsStatusesItem)[keyof typeof ActionsControllerGetActionsStatusesItem]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const ActionsControllerGetActionsStatusesItem = { + CANCELED: "CANCELED", + CREATED: "CREATED", + WAITING_FOR_NEXT: "WAITING_FOR_NEXT", + PROCESSING: "PROCESSING", + FAILED: "FAILED", + SUCCESS: "SUCCESS", + STALE: "STALE", +} as const; diff --git a/src/api/schemas/actionsControllerGetActionsType.ts b/src/api/schemas/actionsControllerGetActionsType.ts index 92825db..a1a2ade 100644 --- a/src/api/schemas/actionsControllerGetActionsType.ts +++ b/src/api/schemas/actionsControllerGetActionsType.ts @@ -6,6 +6,8 @@ export const ActionsControllerGetActionsType = { STAKE: "STAKE", UNSTAKE: "UNSTAKE", CLAIM_REWARDS: "CLAIM_REWARDS", + AUTO_SWEEP_UNSTAKE_REWARDS: "AUTO_SWEEP_UNSTAKE_REWARDS", + AUTO_SWEEP_WITHDRAW_REWARDS: "AUTO_SWEEP_WITHDRAW_REWARDS", RESTAKE_REWARDS: "RESTAKE_REWARDS", WITHDRAW: "WITHDRAW", WITHDRAW_ALL: "WITHDRAW_ALL", diff --git a/src/api/schemas/actionsQueryDto.ts b/src/api/schemas/actionsQueryDto.ts index 2ec8b50..44400ae 100644 --- a/src/api/schemas/actionsQueryDto.ts +++ b/src/api/schemas/actionsQueryDto.ts @@ -1,5 +1,7 @@ import type { ActionsQueryDtoIntent } from "./actionsQueryDtoIntent"; +import type { ActionsQueryDtoNetwork } from "./actionsQueryDtoNetwork"; import type { ActionsQueryDtoStatus } from "./actionsQueryDtoStatus"; +import type { ActionsQueryDtoStatusesItem } from "./actionsQueryDtoStatusesItem"; import type { ActionsQueryDtoType } from "./actionsQueryDtoType"; export interface ActionsQueryDto { @@ -18,10 +20,14 @@ export interface ActionsQueryDto { address: string; /** Filter by action status */ status?: ActionsQueryDtoStatus; + /** Filter by multiple action statuses (supports CSV or repeated query params) */ + statuses?: ActionsQueryDtoStatusesItem[]; /** Filter by action intent */ intent?: ActionsQueryDtoIntent; /** Filter by action type */ type?: ActionsQueryDtoType; /** Filter by yield ID */ yieldId?: string; + /** Filter by network */ + network?: ActionsQueryDtoNetwork; } diff --git a/src/api/schemas/actionsQueryDtoNetwork.ts b/src/api/schemas/actionsQueryDtoNetwork.ts new file mode 100644 index 0000000..1223853 --- /dev/null +++ b/src/api/schemas/actionsQueryDtoNetwork.ts @@ -0,0 +1,108 @@ +/** + * Filter by network + */ +export type ActionsQueryDtoNetwork = + (typeof ActionsQueryDtoNetwork)[keyof typeof ActionsQueryDtoNetwork]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const ActionsQueryDtoNetwork = { + ethereum: "ethereum", + "ethereum-goerli": "ethereum-goerli", + "ethereum-holesky": "ethereum-holesky", + "ethereum-sepolia": "ethereum-sepolia", + "ethereum-hoodi": "ethereum-hoodi", + arbitrum: "arbitrum", + base: "base", + "base-sepolia": "base-sepolia", + gnosis: "gnosis", + optimism: "optimism", + polygon: "polygon", + "polygon-amoy": "polygon-amoy", + starknet: "starknet", + zksync: "zksync", + linea: "linea", + unichain: "unichain", + "monad-testnet": "monad-testnet", + monad: "monad", + "avalanche-c": "avalanche-c", + "avalanche-c-atomic": "avalanche-c-atomic", + "avalanche-p": "avalanche-p", + binance: "binance", + celo: "celo", + fantom: "fantom", + harmony: "harmony", + moonriver: "moonriver", + okc: "okc", + viction: "viction", + core: "core", + sonic: "sonic", + plasma: "plasma", + katana: "katana", + hyperevm: "hyperevm", + agoric: "agoric", + akash: "akash", + axelar: "axelar", + "band-protocol": "band-protocol", + bitsong: "bitsong", + canto: "canto", + chihuahua: "chihuahua", + comdex: "comdex", + coreum: "coreum", + cosmos: "cosmos", + crescent: "crescent", + cronos: "cronos", + cudos: "cudos", + desmos: "desmos", + dydx: "dydx", + evmos: "evmos", + "fetch-ai": "fetch-ai", + "gravity-bridge": "gravity-bridge", + injective: "injective", + irisnet: "irisnet", + juno: "juno", + kava: "kava", + "ki-network": "ki-network", + "mars-protocol": "mars-protocol", + nym: "nym", + "okex-chain": "okex-chain", + onomy: "onomy", + osmosis: "osmosis", + persistence: "persistence", + quicksilver: "quicksilver", + regen: "regen", + secret: "secret", + sentinel: "sentinel", + sommelier: "sommelier", + stafi: "stafi", + stargaze: "stargaze", + stride: "stride", + teritori: "teritori", + tgrade: "tgrade", + umee: "umee", + sei: "sei", + mantra: "mantra", + celestia: "celestia", + saga: "saga", + zetachain: "zetachain", + dymension: "dymension", + humansai: "humansai", + neutron: "neutron", + polkadot: "polkadot", + kusama: "kusama", + westend: "westend", + bittensor: "bittensor", + aptos: "aptos", + binancebeacon: "binancebeacon", + cardano: "cardano", + near: "near", + solana: "solana", + "solana-devnet": "solana-devnet", + stellar: "stellar", + "stellar-testnet": "stellar-testnet", + sui: "sui", + tezos: "tezos", + tron: "tron", + ton: "ton", + "ton-testnet": "ton-testnet", + hyperliquid: "hyperliquid", +} as const; diff --git a/src/api/schemas/actionsQueryDtoStatusesItem.ts b/src/api/schemas/actionsQueryDtoStatusesItem.ts new file mode 100644 index 0000000..ff335d8 --- /dev/null +++ b/src/api/schemas/actionsQueryDtoStatusesItem.ts @@ -0,0 +1,13 @@ +export type ActionsQueryDtoStatusesItem = + (typeof ActionsQueryDtoStatusesItem)[keyof typeof ActionsQueryDtoStatusesItem]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const ActionsQueryDtoStatusesItem = { + CANCELED: "CANCELED", + CREATED: "CREATED", + WAITING_FOR_NEXT: "WAITING_FOR_NEXT", + PROCESSING: "PROCESSING", + FAILED: "FAILED", + SUCCESS: "SUCCESS", + STALE: "STALE", +} as const; diff --git a/src/api/schemas/actionsQueryDtoType.ts b/src/api/schemas/actionsQueryDtoType.ts index 740a4a4..1021f4d 100644 --- a/src/api/schemas/actionsQueryDtoType.ts +++ b/src/api/schemas/actionsQueryDtoType.ts @@ -9,6 +9,8 @@ export const ActionsQueryDtoType = { STAKE: "STAKE", UNSTAKE: "UNSTAKE", CLAIM_REWARDS: "CLAIM_REWARDS", + AUTO_SWEEP_UNSTAKE_REWARDS: "AUTO_SWEEP_UNSTAKE_REWARDS", + AUTO_SWEEP_WITHDRAW_REWARDS: "AUTO_SWEEP_WITHDRAW_REWARDS", RESTAKE_REWARDS: "RESTAKE_REWARDS", WITHDRAW: "WITHDRAW", WITHDRAW_ALL: "WITHDRAW_ALL", diff --git a/src/api/schemas/allocationDto.ts b/src/api/schemas/allocationDto.ts new file mode 100644 index 0000000..645ce38 --- /dev/null +++ b/src/api/schemas/allocationDto.ts @@ -0,0 +1,51 @@ +import type { AllocationDtoNetwork } from "./allocationDtoNetwork"; +import type { AllocationDtoRewardRate } from "./allocationDtoRewardRate"; + +export interface AllocationDto { + /** Contract address of the underlying strategy */ + address: string; + /** Network the underlying strategy is on */ + network: AllocationDtoNetwork; + /** Display name of the underlying strategy */ + name: string; + /** Yield ID if this strategy is supported as a separate yield opportunity */ + yieldId?: string; + /** Provider ID for this strategy (e.g., morpho, aave, lido) */ + providerId?: string; + /** Amount allocated to this strategy in input token units */ + allocation: string; + /** + * USD value of the allocation + * @nullable + */ + allocationUsd: string | null; + /** Current weight of this strategy as a percentage (0-100) */ + weight: number; + /** Target weight of this strategy as a percentage (0-100) */ + targetWeight: number; + /** + * Reward rate of the underlying strategy + * @nullable + */ + rewardRate: AllocationDtoRewardRate; + /** + * Total value locked in the underlying strategy in input token units + * @nullable + */ + tvl: string | null; + /** + * Total value locked in USD for the underlying strategy + * @nullable + */ + tvlUsd: string | null; + /** + * Maximum capacity of the underlying strategy + * @nullable + */ + maxCapacity: string | null; + /** + * Remaining capacity in the underlying strategy + * @nullable + */ + remainingCapacity: string | null; +} diff --git a/src/api/schemas/allocationDtoNetwork.ts b/src/api/schemas/allocationDtoNetwork.ts new file mode 100644 index 0000000..b55b9d7 --- /dev/null +++ b/src/api/schemas/allocationDtoNetwork.ts @@ -0,0 +1,108 @@ +/** + * Network the underlying strategy is on + */ +export type AllocationDtoNetwork = + (typeof AllocationDtoNetwork)[keyof typeof AllocationDtoNetwork]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const AllocationDtoNetwork = { + ethereum: "ethereum", + "ethereum-goerli": "ethereum-goerli", + "ethereum-holesky": "ethereum-holesky", + "ethereum-sepolia": "ethereum-sepolia", + "ethereum-hoodi": "ethereum-hoodi", + arbitrum: "arbitrum", + base: "base", + "base-sepolia": "base-sepolia", + gnosis: "gnosis", + optimism: "optimism", + polygon: "polygon", + "polygon-amoy": "polygon-amoy", + starknet: "starknet", + zksync: "zksync", + linea: "linea", + unichain: "unichain", + "monad-testnet": "monad-testnet", + monad: "monad", + "avalanche-c": "avalanche-c", + "avalanche-c-atomic": "avalanche-c-atomic", + "avalanche-p": "avalanche-p", + binance: "binance", + celo: "celo", + fantom: "fantom", + harmony: "harmony", + moonriver: "moonriver", + okc: "okc", + viction: "viction", + core: "core", + sonic: "sonic", + plasma: "plasma", + katana: "katana", + hyperevm: "hyperevm", + agoric: "agoric", + akash: "akash", + axelar: "axelar", + "band-protocol": "band-protocol", + bitsong: "bitsong", + canto: "canto", + chihuahua: "chihuahua", + comdex: "comdex", + coreum: "coreum", + cosmos: "cosmos", + crescent: "crescent", + cronos: "cronos", + cudos: "cudos", + desmos: "desmos", + dydx: "dydx", + evmos: "evmos", + "fetch-ai": "fetch-ai", + "gravity-bridge": "gravity-bridge", + injective: "injective", + irisnet: "irisnet", + juno: "juno", + kava: "kava", + "ki-network": "ki-network", + "mars-protocol": "mars-protocol", + nym: "nym", + "okex-chain": "okex-chain", + onomy: "onomy", + osmosis: "osmosis", + persistence: "persistence", + quicksilver: "quicksilver", + regen: "regen", + secret: "secret", + sentinel: "sentinel", + sommelier: "sommelier", + stafi: "stafi", + stargaze: "stargaze", + stride: "stride", + teritori: "teritori", + tgrade: "tgrade", + umee: "umee", + sei: "sei", + mantra: "mantra", + celestia: "celestia", + saga: "saga", + zetachain: "zetachain", + dymension: "dymension", + humansai: "humansai", + neutron: "neutron", + polkadot: "polkadot", + kusama: "kusama", + westend: "westend", + bittensor: "bittensor", + aptos: "aptos", + binancebeacon: "binancebeacon", + cardano: "cardano", + near: "near", + solana: "solana", + "solana-devnet": "solana-devnet", + stellar: "stellar", + "stellar-testnet": "stellar-testnet", + sui: "sui", + tezos: "tezos", + tron: "tron", + ton: "ton", + "ton-testnet": "ton-testnet", + hyperliquid: "hyperliquid", +} as const; diff --git a/src/api/schemas/allocationDtoRewardRate.ts b/src/api/schemas/allocationDtoRewardRate.ts new file mode 100644 index 0000000..c1180e3 --- /dev/null +++ b/src/api/schemas/allocationDtoRewardRate.ts @@ -0,0 +1,7 @@ +import type { AllocationRewardRateDto } from "./allocationRewardRateDto"; + +/** + * Reward rate of the underlying strategy + * @nullable + */ +export type AllocationDtoRewardRate = AllocationRewardRateDto | null; diff --git a/src/api/schemas/allocationRewardRateDto.ts b/src/api/schemas/allocationRewardRateDto.ts new file mode 100644 index 0000000..50e7d62 --- /dev/null +++ b/src/api/schemas/allocationRewardRateDto.ts @@ -0,0 +1,6 @@ +export interface AllocationRewardRateDto { + /** Total reward rate */ + total: number; + /** Whether this rate is APR or APY */ + rateType: string; +} diff --git a/src/api/schemas/argumentFieldDtoName.ts b/src/api/schemas/argumentFieldDtoName.ts index 1d62091..ba2af1d 100644 --- a/src/api/schemas/argumentFieldDtoName.ts +++ b/src/api/schemas/argumentFieldDtoName.ts @@ -32,4 +32,7 @@ export const ArgumentFieldDtoName = { rangeMax: "rangeMax", percentage: "percentage", tokenId: "tokenId", + skipPrechecks: "skipPrechecks", + useMaxAllowance: "useMaxAllowance", + feePayerAddress: "feePayerAddress", } as const; diff --git a/src/api/schemas/balanceDto.ts b/src/api/schemas/balanceDto.ts index 256c504..5d46d63 100644 --- a/src/api/schemas/balanceDto.ts +++ b/src/api/schemas/balanceDto.ts @@ -45,4 +45,10 @@ export interface BalanceDto { priceRange?: BalanceDtoPriceRange; /** NFT token ID for liquidity positions (e.g., PancakeSwap V3 position NFT ID) */ tokenId?: string; + /** Share balance in human-readable format */ + shareAmount?: string; + /** Share balance in full precision (smallest unit) */ + shareAmountRaw?: string; + /** The share token that shareAmount and shareAmountRaw are denominated in */ + shareToken?: TokenDto; } diff --git a/src/api/schemas/balanceHistorySnapshotDto.ts b/src/api/schemas/balanceHistorySnapshotDto.ts new file mode 100644 index 0000000..b3feb2c --- /dev/null +++ b/src/api/schemas/balanceHistorySnapshotDto.ts @@ -0,0 +1,12 @@ +import type { BalanceDto } from "./balanceDto"; + +export interface BalanceHistorySnapshotDto { + /** Timestamp of this snapshot (ISO 8601) */ + timestamp: string; + /** Block number closest to this snapshot */ + blockNumber: number; + /** Unique identifier of the yield */ + yieldId: string; + /** Balance entries at this point in time */ + balances: BalanceDto[]; +} diff --git a/src/api/schemas/balancesRequestDto.ts b/src/api/schemas/balancesRequestDto.ts index 06a4d44..37342a0 100644 --- a/src/api/schemas/balancesRequestDto.ts +++ b/src/api/schemas/balancesRequestDto.ts @@ -1,6 +1,10 @@ import type { BalancesQueryDto } from "./balancesQueryDto"; export interface BalancesRequestDto { - /** Array of balance queries */ + /** + * Array of balance queries (maximum 25 queries per request) + * @minItems 1 + * @maxItems 25 + */ queries: BalancesQueryDto[]; } diff --git a/src/api/schemas/createManageActionDtoAction.ts b/src/api/schemas/createManageActionDtoAction.ts index 8c62374..bb33229 100644 --- a/src/api/schemas/createManageActionDtoAction.ts +++ b/src/api/schemas/createManageActionDtoAction.ts @@ -9,6 +9,8 @@ export const CreateManageActionDtoAction = { STAKE: "STAKE", UNSTAKE: "UNSTAKE", CLAIM_REWARDS: "CLAIM_REWARDS", + AUTO_SWEEP_UNSTAKE_REWARDS: "AUTO_SWEEP_UNSTAKE_REWARDS", + AUTO_SWEEP_WITHDRAW_REWARDS: "AUTO_SWEEP_WITHDRAW_REWARDS", RESTAKE_REWARDS: "RESTAKE_REWARDS", WITHDRAW: "WITHDRAW", WITHDRAW_ALL: "WITHDRAW_ALL", diff --git a/src/api/schemas/curatorDto.ts b/src/api/schemas/curatorDto.ts new file mode 100644 index 0000000..07e9b3a --- /dev/null +++ b/src/api/schemas/curatorDto.ts @@ -0,0 +1,21 @@ +import type { CuratorDtoDescription } from "./curatorDtoDescription"; +import type { CuratorDtoLogoURI } from "./curatorDtoLogoURI"; +import type { CuratorDtoName } from "./curatorDtoName"; + +export interface CuratorDto { + /** + * Curator name + * @nullable + */ + name?: CuratorDtoName; + /** + * Curator description + * @nullable + */ + description?: CuratorDtoDescription; + /** + * Curator logo URI + * @nullable + */ + logoURI?: CuratorDtoLogoURI; +} diff --git a/src/api/schemas/curatorDtoDescription.ts b/src/api/schemas/curatorDtoDescription.ts new file mode 100644 index 0000000..cb076fd --- /dev/null +++ b/src/api/schemas/curatorDtoDescription.ts @@ -0,0 +1,5 @@ +/** + * Curator description + * @nullable + */ +export type CuratorDtoDescription = { [key: string]: unknown } | null; diff --git a/src/api/schemas/curatorDtoLogoURI.ts b/src/api/schemas/curatorDtoLogoURI.ts new file mode 100644 index 0000000..4d5a034 --- /dev/null +++ b/src/api/schemas/curatorDtoLogoURI.ts @@ -0,0 +1,5 @@ +/** + * Curator logo URI + * @nullable + */ +export type CuratorDtoLogoURI = { [key: string]: unknown } | null; diff --git a/src/api/schemas/curatorDtoName.ts b/src/api/schemas/curatorDtoName.ts new file mode 100644 index 0000000..e8033a8 --- /dev/null +++ b/src/api/schemas/curatorDtoName.ts @@ -0,0 +1,5 @@ +/** + * Curator name + * @nullable + */ +export type CuratorDtoName = { [key: string]: unknown } | null; diff --git a/src/api/schemas/getBalancesArgumentsDto.ts b/src/api/schemas/getBalancesArgumentsDto.ts index 0183d6a..f8f7b8e 100644 --- a/src/api/schemas/getBalancesArgumentsDto.ts +++ b/src/api/schemas/getBalancesArgumentsDto.ts @@ -3,4 +3,12 @@ export interface GetBalancesArgumentsDto { cAddressBech?: string; /** Avalanche P-chain address */ pAddressBech?: string; + /** + * Day of month when auto-sweep window starts (used by Solana auto-sweep balance actions) + * @minimum 1 + * @maximum 31 + */ + autoSweepDayOfMonth?: number; + /** IANA timezone used to evaluate auto-sweep window day (e.g. Europe/London) */ + autoSweepTimezone?: string; } diff --git a/src/api/schemas/index.ts b/src/api/schemas/index.ts index 1222690..4469bae 100644 --- a/src/api/schemas/index.ts +++ b/src/api/schemas/index.ts @@ -30,8 +30,10 @@ export * from "./actionsControllerGetActions401"; export * from "./actionsControllerGetActions429"; export * from "./actionsControllerGetActions500"; export * from "./actionsControllerGetActionsIntent"; +export * from "./actionsControllerGetActionsNetwork"; export * from "./actionsControllerGetActionsParams"; export * from "./actionsControllerGetActionsStatus"; +export * from "./actionsControllerGetActionsStatusesItem"; export * from "./actionsControllerGetActionsType"; export * from "./actionsControllerManageYield400"; export * from "./actionsControllerManageYield401"; @@ -40,8 +42,14 @@ export * from "./actionsControllerManageYield429"; export * from "./actionsControllerManageYield500"; export * from "./actionsQueryDto"; export * from "./actionsQueryDtoIntent"; +export * from "./actionsQueryDtoNetwork"; export * from "./actionsQueryDtoStatus"; +export * from "./actionsQueryDtoStatusesItem"; export * from "./actionsQueryDtoType"; +export * from "./allocationDto"; +export * from "./allocationDtoNetwork"; +export * from "./allocationDtoRewardRate"; +export * from "./allocationRewardRateDto"; export * from "./argumentFieldDto"; export * from "./argumentFieldDtoDefault"; export * from "./argumentFieldDtoName"; @@ -50,6 +58,7 @@ export * from "./argumentSchemaDto"; export * from "./balanceDto"; export * from "./balanceDtoPriceRange"; export * from "./balanceDtoValidator"; +export * from "./balanceHistorySnapshotDto"; export * from "./balancesQueryDto"; export * from "./balancesRequestDto"; export * from "./balancesResponseDto"; @@ -59,10 +68,17 @@ export * from "./concentratedLiquidityPoolStateDto"; export * from "./createActionDto"; export * from "./createManageActionDto"; export * from "./createManageActionDtoAction"; +export * from "./curatorDto"; +export * from "./curatorDtoDescription"; +export * from "./curatorDtoLogoURI"; +export * from "./curatorDtoName"; export * from "./eRCStandards"; export * from "./getBalancesArgumentsDto"; export * from "./healthStatus"; export * from "./healthStatusDto"; +export * from "./liquidityStateDto"; +export * from "./liquidityStateDtoLiquidity"; +export * from "./liquidityStateDtoUtilization"; export * from "./networkDto"; export * from "./networkDtoCategory"; export * from "./networkDtoId"; @@ -98,8 +114,17 @@ export * from "./revShareTiersDto"; export * from "./rewardClaiming"; export * from "./rewardDto"; export * from "./rewardDtoYieldSource"; +export * from "./rewardEventDto"; export * from "./rewardRateDto"; +export * from "./rewardRateHistoryResponseDto"; +export * from "./rewardRateHistoryResponseDtoInterval"; +export * from "./rewardRateSnapshotDto"; export * from "./rewardSchedule"; +export * from "./riskParameterDto"; +export * from "./riskParameterDtoAsset"; +export * from "./riskParameterDtoIntegrationId"; +export * from "./riskParameterDtoProtocol"; +export * from "./riskParameterDtoValue"; export * from "./submitHashDto"; export * from "./submitTransactionDto"; export * from "./timePeriodDto"; @@ -123,11 +148,17 @@ export * from "./transactionsControllerSubmitTransaction500"; export * from "./transactionsControllerSubmitTransactionHash401"; export * from "./transactionsControllerSubmitTransactionHash429"; export * from "./transactionsControllerSubmitTransactionHash500"; +export * from "./tvlHistoryResponseDto"; +export * from "./tvlHistoryResponseDtoInterval"; +export * from "./tvlSnapshotDto"; export * from "./validatorDto"; export * from "./validatorProviderDto"; +export * from "./validatorProviderDtoTvlUsd"; +export * from "./validatorProviderDtoType"; export * from "./validatorQueryDto"; export * from "./yieldBalancesDto"; export * from "./yieldBalancesDtoOutputTokenBalance"; +export * from "./yieldBalancesDtoRewardRate"; export * from "./yieldBalancesRequestDto"; export * from "./yieldDto"; export * from "./yieldDtoNetwork"; @@ -144,6 +175,19 @@ export * from "./yieldQueryDtoNetwork"; export * from "./yieldQueryDtoSort"; export * from "./yieldQueryDtoType"; export * from "./yieldQueryDtoTypesItem"; +export * from "./yieldRequirementsDto"; +export * from "./yieldRiskCredoraDto"; +export * from "./yieldRiskCredoraDtoCurator"; +export * from "./yieldRiskCredoraDtoPsl"; +export * from "./yieldRiskCredoraDtoPublishDate"; +export * from "./yieldRiskCredoraDtoRating"; +export * from "./yieldRiskCredoraDtoScore"; +export * from "./yieldRiskDto"; +export * from "./yieldRiskExponentialDto"; +export * from "./yieldRiskExponentialDtoPoolRating"; +export * from "./yieldRiskExponentialDtoPoolScore"; +export * from "./yieldRiskExponentialDtoRatingDescription"; +export * from "./yieldRiskExponentialDtoUrl"; export * from "./yieldStateDto"; export * from "./yieldStatisticsDto"; export * from "./yieldStatusDto"; @@ -151,6 +195,15 @@ export * from "./yieldsControllerGetAggregateBalances400"; export * from "./yieldsControllerGetAggregateBalances401"; export * from "./yieldsControllerGetAggregateBalances429"; export * from "./yieldsControllerGetAggregateBalances500"; +export * from "./yieldsControllerGetBalanceHistory200"; +export * from "./yieldsControllerGetBalanceHistory200AllOf"; +export * from "./yieldsControllerGetBalanceHistory400"; +export * from "./yieldsControllerGetBalanceHistory401"; +export * from "./yieldsControllerGetBalanceHistory429"; +export * from "./yieldsControllerGetBalanceHistory500"; +export * from "./yieldsControllerGetBalanceHistoryInterval"; +export * from "./yieldsControllerGetBalanceHistoryParams"; +export * from "./yieldsControllerGetBalanceHistorySort"; export * from "./yieldsControllerGetYield400"; export * from "./yieldsControllerGetYield401"; export * from "./yieldsControllerGetYield429"; @@ -159,6 +212,23 @@ export * from "./yieldsControllerGetYieldBalances400"; export * from "./yieldsControllerGetYieldBalances401"; export * from "./yieldsControllerGetYieldBalances429"; export * from "./yieldsControllerGetYieldBalances500"; +export * from "./yieldsControllerGetYieldRewardRateHistory400"; +export * from "./yieldsControllerGetYieldRewardRateHistory401"; +export * from "./yieldsControllerGetYieldRewardRateHistory429"; +export * from "./yieldsControllerGetYieldRewardRateHistory500"; +export * from "./yieldsControllerGetYieldRewardRateHistoryInterval"; +export * from "./yieldsControllerGetYieldRewardRateHistoryParams"; +export * from "./yieldsControllerGetYieldRewardRateHistoryPeriod"; +export * from "./yieldsControllerGetYieldRewards400"; +export * from "./yieldsControllerGetYieldRewards401"; +export * from "./yieldsControllerGetYieldRewards429"; +export * from "./yieldsControllerGetYieldRewards500"; +export * from "./yieldsControllerGetYieldRewardsParams"; +export * from "./yieldsControllerGetYieldRewardsSort"; +export * from "./yieldsControllerGetYieldRisk400"; +export * from "./yieldsControllerGetYieldRisk401"; +export * from "./yieldsControllerGetYieldRisk429"; +export * from "./yieldsControllerGetYieldRisk500"; export * from "./yieldsControllerGetYields200"; export * from "./yieldsControllerGetYields200AllOf"; export * from "./yieldsControllerGetYields400"; @@ -170,6 +240,13 @@ export * from "./yieldsControllerGetYieldsParams"; export * from "./yieldsControllerGetYieldsSort"; export * from "./yieldsControllerGetYieldsType"; export * from "./yieldsControllerGetYieldsTypesItem"; +export * from "./yieldsControllerGetYieldTvlHistory400"; +export * from "./yieldsControllerGetYieldTvlHistory401"; +export * from "./yieldsControllerGetYieldTvlHistory429"; +export * from "./yieldsControllerGetYieldTvlHistory500"; +export * from "./yieldsControllerGetYieldTvlHistoryInterval"; +export * from "./yieldsControllerGetYieldTvlHistoryParams"; +export * from "./yieldsControllerGetYieldTvlHistoryPeriod"; export * from "./yieldsControllerGetYieldValidators200"; export * from "./yieldsControllerGetYieldValidators200AllOf"; export * from "./yieldsControllerGetYieldValidators400"; diff --git a/src/api/schemas/liquidityStateDto.ts b/src/api/schemas/liquidityStateDto.ts new file mode 100644 index 0000000..52ee595 --- /dev/null +++ b/src/api/schemas/liquidityStateDto.ts @@ -0,0 +1,15 @@ +import type { LiquidityStateDtoLiquidity } from "./liquidityStateDtoLiquidity"; +import type { LiquidityStateDtoUtilization } from "./liquidityStateDtoUtilization"; + +export interface LiquidityStateDto { + /** + * Available liquidity in underlying token units + * @nullable + */ + liquidity?: LiquidityStateDtoLiquidity; + /** + * Utilization rate as a decimal (e.g., 0.8 = 80%) + * @nullable + */ + utilization?: LiquidityStateDtoUtilization; +} diff --git a/src/api/schemas/liquidityStateDtoLiquidity.ts b/src/api/schemas/liquidityStateDtoLiquidity.ts new file mode 100644 index 0000000..ad73862 --- /dev/null +++ b/src/api/schemas/liquidityStateDtoLiquidity.ts @@ -0,0 +1,5 @@ +/** + * Available liquidity in underlying token units + * @nullable + */ +export type LiquidityStateDtoLiquidity = { [key: string]: unknown } | null; diff --git a/src/api/schemas/liquidityStateDtoUtilization.ts b/src/api/schemas/liquidityStateDtoUtilization.ts new file mode 100644 index 0000000..7f6ad3d --- /dev/null +++ b/src/api/schemas/liquidityStateDtoUtilization.ts @@ -0,0 +1,5 @@ +/** + * Utilization rate as a decimal (e.g., 0.8 = 80%) + * @nullable + */ +export type LiquidityStateDtoUtilization = { [key: string]: unknown } | null; diff --git a/src/api/schemas/networkDtoId.ts b/src/api/schemas/networkDtoId.ts index 33271b2..835b5e0 100644 --- a/src/api/schemas/networkDtoId.ts +++ b/src/api/schemas/networkDtoId.ts @@ -90,6 +90,7 @@ export const NetworkDtoId = { kusama: "kusama", westend: "westend", bittensor: "bittensor", + aptos: "aptos", binancebeacon: "binancebeacon", cardano: "cardano", near: "near", diff --git a/src/api/schemas/networks.ts b/src/api/schemas/networks.ts index ee359fa..7d4cc70 100644 --- a/src/api/schemas/networks.ts +++ b/src/api/schemas/networks.ts @@ -1,6 +1,3 @@ -/** - * Network for this address - */ export type Networks = (typeof Networks)[keyof typeof Networks]; // eslint-disable-next-line @typescript-eslint/no-redeclare @@ -90,6 +87,7 @@ export const Networks = { kusama: "kusama", westend: "westend", bittensor: "bittensor", + aptos: "aptos", binancebeacon: "binancebeacon", cardano: "cardano", near: "near", diff --git a/src/api/schemas/pendingActionDto.ts b/src/api/schemas/pendingActionDto.ts index c9d47db..7645e41 100644 --- a/src/api/schemas/pendingActionDto.ts +++ b/src/api/schemas/pendingActionDto.ts @@ -14,4 +14,9 @@ export interface PendingActionDto { * @nullable */ arguments?: PendingActionDtoArguments; + /** + * Amount involved in the action, in human-readable token units (not the smallest denomination). + * @nullable + */ + amount?: string | null; } diff --git a/src/api/schemas/pendingActionDtoType.ts b/src/api/schemas/pendingActionDtoType.ts index 9db31f0..cb74051 100644 --- a/src/api/schemas/pendingActionDtoType.ts +++ b/src/api/schemas/pendingActionDtoType.ts @@ -9,6 +9,8 @@ export const PendingActionDtoType = { STAKE: "STAKE", UNSTAKE: "UNSTAKE", CLAIM_REWARDS: "CLAIM_REWARDS", + AUTO_SWEEP_UNSTAKE_REWARDS: "AUTO_SWEEP_UNSTAKE_REWARDS", + AUTO_SWEEP_WITHDRAW_REWARDS: "AUTO_SWEEP_WITHDRAW_REWARDS", RESTAKE_REWARDS: "RESTAKE_REWARDS", WITHDRAW: "WITHDRAW", WITHDRAW_ALL: "WITHDRAW_ALL", diff --git a/src/api/schemas/rewardDtoYieldSource.ts b/src/api/schemas/rewardDtoYieldSource.ts index 2b51b6c..c938044 100644 --- a/src/api/schemas/rewardDtoYieldSource.ts +++ b/src/api/schemas/rewardDtoYieldSource.ts @@ -9,6 +9,7 @@ export const RewardDtoYieldSource = { staking: "staking", restaking: "restaking", protocol_incentive: "protocol_incentive", + campaign_incentive: "campaign_incentive", points: "points", lending_interest: "lending_interest", mev: "mev", diff --git a/src/api/schemas/rewardEventDto.ts b/src/api/schemas/rewardEventDto.ts new file mode 100644 index 0000000..14cbde0 --- /dev/null +++ b/src/api/schemas/rewardEventDto.ts @@ -0,0 +1,23 @@ +import type { TokenDto } from "./tokenDto"; + +export interface RewardEventDto { + /** Timestamp of this reward event (ISO 8601) */ + timestamp: string; + /** Block number when the reward was earned */ + blockNumber: number; + /** Unique identifier of the yield */ + yieldId: string; + /** Token metadata for the reward */ + token: TokenDto; + /** Human-readable reward amount */ + amount: string; + /** Raw reward amount in base units (wei) */ + amountRaw: string; + /** Source of the reward derived from yield type */ + yieldSource: string; + /** + * Transaction hash where the reward was earned + * @nullable + */ + transactionHash?: string | null; +} diff --git a/src/api/schemas/rewardRateHistoryResponseDto.ts b/src/api/schemas/rewardRateHistoryResponseDto.ts new file mode 100644 index 0000000..ebf09e6 --- /dev/null +++ b/src/api/schemas/rewardRateHistoryResponseDto.ts @@ -0,0 +1,18 @@ +import type { RewardRateHistoryResponseDtoInterval } from "./rewardRateHistoryResponseDtoInterval"; + +export interface RewardRateHistoryResponseDto { + /** Total number of items available */ + total: number; + /** Offset of the current page */ + offset: number; + /** Limit of the current page */ + limit: number; + /** Unique identifier of the yield */ + yieldId: string; + /** Sampling interval used for this response */ + interval: RewardRateHistoryResponseDtoInterval; + /** Start of the returned date range (ISO 8601) */ + from: string; + /** End of the returned date range (ISO 8601) */ + to: string; +} diff --git a/src/api/schemas/rewardRateHistoryResponseDtoInterval.ts b/src/api/schemas/rewardRateHistoryResponseDtoInterval.ts new file mode 100644 index 0000000..5143443 --- /dev/null +++ b/src/api/schemas/rewardRateHistoryResponseDtoInterval.ts @@ -0,0 +1,12 @@ +/** + * Sampling interval used for this response + */ +export type RewardRateHistoryResponseDtoInterval = + (typeof RewardRateHistoryResponseDtoInterval)[keyof typeof RewardRateHistoryResponseDtoInterval]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const RewardRateHistoryResponseDtoInterval = { + day: "day", + week: "week", + month: "month", +} as const; diff --git a/src/api/schemas/rewardRateSnapshotDto.ts b/src/api/schemas/rewardRateSnapshotDto.ts new file mode 100644 index 0000000..ba85e8e --- /dev/null +++ b/src/api/schemas/rewardRateSnapshotDto.ts @@ -0,0 +1,6 @@ +export interface RewardRateSnapshotDto { + /** Timestamp of this snapshot (ISO 8601) */ + timestamp: string; + /** Reward rate as a decimal string */ + rewardRate: string; +} diff --git a/src/api/schemas/riskParameterDto.ts b/src/api/schemas/riskParameterDto.ts new file mode 100644 index 0000000..a9f15d2 --- /dev/null +++ b/src/api/schemas/riskParameterDto.ts @@ -0,0 +1,19 @@ +import type { Networks } from "./networks"; +import type { RiskParameterDtoAsset } from "./riskParameterDtoAsset"; +import type { RiskParameterDtoIntegrationId } from "./riskParameterDtoIntegrationId"; +import type { RiskParameterDtoProtocol } from "./riskParameterDtoProtocol"; +import type { RiskParameterDtoValue } from "./riskParameterDtoValue"; + +export interface RiskParameterDto { + id: string; + category: string; + item: string; + isDynamic: boolean; + value?: RiskParameterDtoValue; + network?: Networks; + asset?: RiskParameterDtoAsset; + protocol?: RiskParameterDtoProtocol; + integrationId?: RiskParameterDtoIntegrationId; + createdAt: string; + updatedAt: string; +} diff --git a/src/api/schemas/riskParameterDtoAsset.ts b/src/api/schemas/riskParameterDtoAsset.ts new file mode 100644 index 0000000..9d66e94 --- /dev/null +++ b/src/api/schemas/riskParameterDtoAsset.ts @@ -0,0 +1 @@ +export type RiskParameterDtoAsset = { [key: string]: unknown }; diff --git a/src/api/schemas/riskParameterDtoIntegrationId.ts b/src/api/schemas/riskParameterDtoIntegrationId.ts new file mode 100644 index 0000000..a99b57b --- /dev/null +++ b/src/api/schemas/riskParameterDtoIntegrationId.ts @@ -0,0 +1 @@ +export type RiskParameterDtoIntegrationId = { [key: string]: unknown }; diff --git a/src/api/schemas/riskParameterDtoProtocol.ts b/src/api/schemas/riskParameterDtoProtocol.ts new file mode 100644 index 0000000..5bac87a --- /dev/null +++ b/src/api/schemas/riskParameterDtoProtocol.ts @@ -0,0 +1 @@ +export type RiskParameterDtoProtocol = { [key: string]: unknown }; diff --git a/src/api/schemas/riskParameterDtoValue.ts b/src/api/schemas/riskParameterDtoValue.ts new file mode 100644 index 0000000..6f44c52 --- /dev/null +++ b/src/api/schemas/riskParameterDtoValue.ts @@ -0,0 +1 @@ +export type RiskParameterDtoValue = { [key: string]: unknown }; diff --git a/src/api/schemas/tokenDtoNetwork.ts b/src/api/schemas/tokenDtoNetwork.ts index b8deba9..db00c41 100644 --- a/src/api/schemas/tokenDtoNetwork.ts +++ b/src/api/schemas/tokenDtoNetwork.ts @@ -91,6 +91,7 @@ export const TokenDtoNetwork = { kusama: "kusama", westend: "westend", bittensor: "bittensor", + aptos: "aptos", binancebeacon: "binancebeacon", cardano: "cardano", near: "near", diff --git a/src/api/schemas/transactionDtoNetwork.ts b/src/api/schemas/transactionDtoNetwork.ts index 061ad92..73242cd 100644 --- a/src/api/schemas/transactionDtoNetwork.ts +++ b/src/api/schemas/transactionDtoNetwork.ts @@ -91,6 +91,7 @@ export const TransactionDtoNetwork = { kusama: "kusama", westend: "westend", bittensor: "bittensor", + aptos: "aptos", binancebeacon: "binancebeacon", cardano: "cardano", near: "near", diff --git a/src/api/schemas/transactionDtoType.ts b/src/api/schemas/transactionDtoType.ts index 6407141..b61c9c3 100644 --- a/src/api/schemas/transactionDtoType.ts +++ b/src/api/schemas/transactionDtoType.ts @@ -60,4 +60,5 @@ export const TransactionDtoType = { INFSTONES_PROVISION: "INFSTONES_PROVISION", INFSTONES_EXIT_REQUEST: "INFSTONES_EXIT_REQUEST", INFSTONES_CLAIM_REQUEST: "INFSTONES_CLAIM_REQUEST", + BATCH: "BATCH", } as const; diff --git a/src/api/schemas/tvlHistoryResponseDto.ts b/src/api/schemas/tvlHistoryResponseDto.ts new file mode 100644 index 0000000..dd5d704 --- /dev/null +++ b/src/api/schemas/tvlHistoryResponseDto.ts @@ -0,0 +1,18 @@ +import type { TvlHistoryResponseDtoInterval } from "./tvlHistoryResponseDtoInterval"; + +export interface TvlHistoryResponseDto { + /** Total number of items available */ + total: number; + /** Offset of the current page */ + offset: number; + /** Limit of the current page */ + limit: number; + /** Unique identifier of the yield */ + yieldId: string; + /** Sampling interval used for this response */ + interval: TvlHistoryResponseDtoInterval; + /** Start of the returned date range (ISO 8601) */ + from: string; + /** End of the returned date range (ISO 8601) */ + to: string; +} diff --git a/src/api/schemas/tvlHistoryResponseDtoInterval.ts b/src/api/schemas/tvlHistoryResponseDtoInterval.ts new file mode 100644 index 0000000..3414fb2 --- /dev/null +++ b/src/api/schemas/tvlHistoryResponseDtoInterval.ts @@ -0,0 +1,12 @@ +/** + * Sampling interval used for this response + */ +export type TvlHistoryResponseDtoInterval = + (typeof TvlHistoryResponseDtoInterval)[keyof typeof TvlHistoryResponseDtoInterval]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const TvlHistoryResponseDtoInterval = { + day: "day", + week: "week", + month: "month", +} as const; diff --git a/src/api/schemas/tvlSnapshotDto.ts b/src/api/schemas/tvlSnapshotDto.ts new file mode 100644 index 0000000..bb1318f --- /dev/null +++ b/src/api/schemas/tvlSnapshotDto.ts @@ -0,0 +1,8 @@ +export interface TvlSnapshotDto { + /** Timestamp of this snapshot (ISO 8601) */ + timestamp: string; + /** Total value locked in token units (human-readable) */ + tvl: string; + /** Total value locked in smallest token unit (wei) */ + tvlRaw: string; +} diff --git a/src/api/schemas/validatorProviderDto.ts b/src/api/schemas/validatorProviderDto.ts index 3355c67..34b3f75 100644 --- a/src/api/schemas/validatorProviderDto.ts +++ b/src/api/schemas/validatorProviderDto.ts @@ -1,16 +1,49 @@ import type { RevShareTiersDto } from "./revShareTiersDto"; +import type { ValidatorProviderDtoTvlUsd } from "./validatorProviderDtoTvlUsd"; +import type { ValidatorProviderDtoType } from "./validatorProviderDtoType"; export interface ValidatorProviderDto { - /** Provider display name */ + /** Provider name */ name: string; - /** Unique identifier for the provider */ - uniqueId: string; - /** Provider website URL */ + /** Provider ID */ + id: string; + /** Provider logo URI */ + logoURI: string; + /** Short description of the provider */ + description: string; + /** Provider website */ website: string; + /** + * Total TVL across the entire provider in USD + * @nullable + */ + tvlUsd: ValidatorProviderDtoTvlUsd; + /** Type of provider (protocol or validator provider) */ + type: ValidatorProviderDtoType; + /** + * Optional social/media references or audit links + * @nullable + */ + references?: string[] | null; /** Provider ranking (lower numbers indicate higher preference) */ rank: number; /** Whether this provider is marked as preferred */ preferred: boolean; /** Revenue sharing details by tier */ revshare?: RevShareTiersDto; + /** + * Provider ID (deprecated, use `id` instead) + * @deprecated + */ + uniqueId?: string; + /** + * Creation timestamp (deprecated) + * @deprecated + */ + createdAt?: string; + /** + * Last update timestamp (deprecated) + * @deprecated + */ + updatedAt?: string; } diff --git a/src/api/schemas/validatorProviderDtoTvlUsd.ts b/src/api/schemas/validatorProviderDtoTvlUsd.ts new file mode 100644 index 0000000..13e138a --- /dev/null +++ b/src/api/schemas/validatorProviderDtoTvlUsd.ts @@ -0,0 +1,5 @@ +/** + * Total TVL across the entire provider in USD + * @nullable + */ +export type ValidatorProviderDtoTvlUsd = { [key: string]: unknown } | null; diff --git a/src/api/schemas/validatorProviderDtoType.ts b/src/api/schemas/validatorProviderDtoType.ts new file mode 100644 index 0000000..1c6f422 --- /dev/null +++ b/src/api/schemas/validatorProviderDtoType.ts @@ -0,0 +1,11 @@ +/** + * Type of provider (protocol or validator provider) + */ +export type ValidatorProviderDtoType = + (typeof ValidatorProviderDtoType)[keyof typeof ValidatorProviderDtoType]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const ValidatorProviderDtoType = { + protocol: "protocol", + validator_provider: "validator_provider", +} as const; diff --git a/src/api/schemas/yieldBalancesDto.ts b/src/api/schemas/yieldBalancesDto.ts index a3485de..ad451f6 100644 --- a/src/api/schemas/yieldBalancesDto.ts +++ b/src/api/schemas/yieldBalancesDto.ts @@ -1,5 +1,6 @@ import type { BalanceDto } from "./balanceDto"; import type { YieldBalancesDtoOutputTokenBalance } from "./yieldBalancesDtoOutputTokenBalance"; +import type { YieldBalancesDtoRewardRate } from "./yieldBalancesDtoRewardRate"; export interface YieldBalancesDto { /** Unique identifier of the yield */ @@ -11,4 +12,9 @@ export interface YieldBalancesDto { * @nullable */ outputTokenBalance?: YieldBalancesDtoOutputTokenBalance; + /** + * Personalized reward rate breakdown for this balance position + * @nullable + */ + rewardRate?: YieldBalancesDtoRewardRate; } diff --git a/src/api/schemas/yieldBalancesDtoRewardRate.ts b/src/api/schemas/yieldBalancesDtoRewardRate.ts new file mode 100644 index 0000000..fd712f5 --- /dev/null +++ b/src/api/schemas/yieldBalancesDtoRewardRate.ts @@ -0,0 +1,7 @@ +import type { RewardRateDto } from "./rewardRateDto"; + +/** + * Personalized reward rate breakdown for this balance position + * @nullable + */ +export type YieldBalancesDtoRewardRate = RewardRateDto | null; diff --git a/src/api/schemas/yieldDto.ts b/src/api/schemas/yieldDto.ts index 9cb90c0..3ce00a8 100644 --- a/src/api/schemas/yieldDto.ts +++ b/src/api/schemas/yieldDto.ts @@ -1,8 +1,10 @@ +import type { CuratorDto } from "./curatorDto"; import type { RewardRateDto } from "./rewardRateDto"; import type { TokenDto } from "./tokenDto"; import type { YieldDtoNetwork } from "./yieldDtoNetwork"; import type { YieldMechanicsDto } from "./yieldMechanicsDto"; import type { YieldMetadataDto } from "./yieldMetadataDto"; +import type { YieldRiskDto } from "./yieldRiskDto"; import type { YieldStateDto } from "./yieldStateDto"; import type { YieldStatisticsDto } from "./yieldStatisticsDto"; import type { YieldStatusDto } from "./yieldStatusDto"; @@ -26,6 +28,8 @@ export interface YieldDto { rewardRate: RewardRateDto; /** Key statistics and analytics for this yield opportunity */ statistics?: YieldStatisticsDto; + /** Risk scores and provider ratings for this yield */ + risk?: YieldRiskDto; /** Current availability of user actions like enter, exit, claim */ status: YieldStatusDto; /** Descriptive metadata including name, logo, description, and documentation */ @@ -34,6 +38,8 @@ export interface YieldDto { mechanics: YieldMechanicsDto; /** The provider ID this yield belongs to */ providerId: string; + /** Curator information for the yield (if applicable) */ + curator?: CuratorDto; /** Optional tags for filtering or categorization */ tags?: string[]; /** Dynamic, real-time protocol-level state values that affect entering or exiting a yield (e.g., pool price, capacity, price per share, liquidity, queue depth) */ diff --git a/src/api/schemas/yieldDtoNetwork.ts b/src/api/schemas/yieldDtoNetwork.ts index c45e9b9..58a4b45 100644 --- a/src/api/schemas/yieldDtoNetwork.ts +++ b/src/api/schemas/yieldDtoNetwork.ts @@ -91,6 +91,7 @@ export const YieldDtoNetwork = { kusama: "kusama", westend: "westend", bittensor: "bittensor", + aptos: "aptos", binancebeacon: "binancebeacon", cardano: "cardano", near: "near", diff --git a/src/api/schemas/yieldMechanicsDto.ts b/src/api/schemas/yieldMechanicsDto.ts index fed4484..bb6289f 100644 --- a/src/api/schemas/yieldMechanicsDto.ts +++ b/src/api/schemas/yieldMechanicsDto.ts @@ -7,6 +7,7 @@ import type { YieldEntryLimitsDto } from "./yieldEntryLimitsDto"; import type { YieldFeeDto } from "./yieldFeeDto"; import type { YieldMechanicsArgumentsDto } from "./yieldMechanicsArgumentsDto"; import type { YieldMechanicsDtoExtraTransactionFormatsSupportedItem } from "./yieldMechanicsDtoExtraTransactionFormatsSupportedItem"; +import type { YieldRequirementsDto } from "./yieldRequirementsDto"; import type { YieldType } from "./yieldType"; export interface YieldMechanicsDto { @@ -27,6 +28,8 @@ export interface YieldMechanicsDto { fee?: YieldFeeDto; /** Entry amount limits for this yield */ entryLimits?: YieldEntryLimitsDto; + /** Access requirements (e.g. KYC) for this yield */ + requirements?: YieldRequirementsDto; /** Supports Ledger Wallet API (connect via Ledger Live) */ supportsLedgerWalletApi?: boolean; /** Additional transaction formats supported (e.g. safe, batch) */ diff --git a/src/api/schemas/yieldQueryDto.ts b/src/api/schemas/yieldQueryDto.ts index e001702..5e177f2 100644 --- a/src/api/schemas/yieldQueryDto.ts +++ b/src/api/schemas/yieldQueryDto.ts @@ -45,6 +45,6 @@ export interface YieldQueryDto { providers?: string[]; /** Search by yield name */ search?: string; - /** Sort by yield status */ + /** Sort by yield status or reward rate */ sort?: YieldQueryDtoSort; } diff --git a/src/api/schemas/yieldQueryDtoNetwork.ts b/src/api/schemas/yieldQueryDtoNetwork.ts index a740a9e..40e0f69 100644 --- a/src/api/schemas/yieldQueryDtoNetwork.ts +++ b/src/api/schemas/yieldQueryDtoNetwork.ts @@ -91,6 +91,7 @@ export const YieldQueryDtoNetwork = { kusama: "kusama", westend: "westend", bittensor: "bittensor", + aptos: "aptos", binancebeacon: "binancebeacon", cardano: "cardano", near: "near", diff --git a/src/api/schemas/yieldQueryDtoSort.ts b/src/api/schemas/yieldQueryDtoSort.ts index 96f874d..4533a9e 100644 --- a/src/api/schemas/yieldQueryDtoSort.ts +++ b/src/api/schemas/yieldQueryDtoSort.ts @@ -1,5 +1,5 @@ /** - * Sort by yield status + * Sort by yield status or reward rate */ export type YieldQueryDtoSort = (typeof YieldQueryDtoSort)[keyof typeof YieldQueryDtoSort]; @@ -10,4 +10,6 @@ export const YieldQueryDtoSort = { statusEnterDesc: "statusEnterDesc", statusExitAsc: "statusExitAsc", statusExitDesc: "statusExitDesc", + rewardRateAsc: "rewardRateAsc", + rewardRateDesc: "rewardRateDesc", } as const; diff --git a/src/api/schemas/yieldRequirementsDto.ts b/src/api/schemas/yieldRequirementsDto.ts new file mode 100644 index 0000000..d301379 --- /dev/null +++ b/src/api/schemas/yieldRequirementsDto.ts @@ -0,0 +1,6 @@ +export interface YieldRequirementsDto { + /** Whether off-chain KYC is required before transacting */ + kycRequired: boolean; + /** Issuer's KYC portal URL */ + kycUrl?: string; +} diff --git a/src/api/schemas/yieldRiskCredoraDto.ts b/src/api/schemas/yieldRiskCredoraDto.ts new file mode 100644 index 0000000..97d48f7 --- /dev/null +++ b/src/api/schemas/yieldRiskCredoraDto.ts @@ -0,0 +1,18 @@ +import type { YieldRiskCredoraDtoCurator } from "./yieldRiskCredoraDtoCurator"; +import type { YieldRiskCredoraDtoPsl } from "./yieldRiskCredoraDtoPsl"; +import type { YieldRiskCredoraDtoPublishDate } from "./yieldRiskCredoraDtoPublishDate"; +import type { YieldRiskCredoraDtoRating } from "./yieldRiskCredoraDtoRating"; +import type { YieldRiskCredoraDtoScore } from "./yieldRiskCredoraDtoScore"; + +export interface YieldRiskCredoraDto { + /** Credora rating */ + rating?: YieldRiskCredoraDtoRating; + /** Credora score (1-5) */ + score?: YieldRiskCredoraDtoScore; + /** Probability of Significant Loss (annualized) */ + psl?: YieldRiskCredoraDtoPsl; + /** Credora publish date */ + publishDate?: YieldRiskCredoraDtoPublishDate; + /** Credora curator name */ + curator?: YieldRiskCredoraDtoCurator; +} diff --git a/src/api/schemas/yieldRiskCredoraDtoCurator.ts b/src/api/schemas/yieldRiskCredoraDtoCurator.ts new file mode 100644 index 0000000..c4c72c8 --- /dev/null +++ b/src/api/schemas/yieldRiskCredoraDtoCurator.ts @@ -0,0 +1,4 @@ +/** + * Credora curator name + */ +export type YieldRiskCredoraDtoCurator = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskCredoraDtoPsl.ts b/src/api/schemas/yieldRiskCredoraDtoPsl.ts new file mode 100644 index 0000000..2b9939e --- /dev/null +++ b/src/api/schemas/yieldRiskCredoraDtoPsl.ts @@ -0,0 +1,4 @@ +/** + * Probability of Significant Loss (annualized) + */ +export type YieldRiskCredoraDtoPsl = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskCredoraDtoPublishDate.ts b/src/api/schemas/yieldRiskCredoraDtoPublishDate.ts new file mode 100644 index 0000000..f82bf16 --- /dev/null +++ b/src/api/schemas/yieldRiskCredoraDtoPublishDate.ts @@ -0,0 +1,4 @@ +/** + * Credora publish date + */ +export type YieldRiskCredoraDtoPublishDate = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskCredoraDtoRating.ts b/src/api/schemas/yieldRiskCredoraDtoRating.ts new file mode 100644 index 0000000..66e4a7f --- /dev/null +++ b/src/api/schemas/yieldRiskCredoraDtoRating.ts @@ -0,0 +1,4 @@ +/** + * Credora rating + */ +export type YieldRiskCredoraDtoRating = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskCredoraDtoScore.ts b/src/api/schemas/yieldRiskCredoraDtoScore.ts new file mode 100644 index 0000000..dca082b --- /dev/null +++ b/src/api/schemas/yieldRiskCredoraDtoScore.ts @@ -0,0 +1,4 @@ +/** + * Credora score (1-5) + */ +export type YieldRiskCredoraDtoScore = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskDto.ts b/src/api/schemas/yieldRiskDto.ts new file mode 100644 index 0000000..798d5c7 --- /dev/null +++ b/src/api/schemas/yieldRiskDto.ts @@ -0,0 +1,9 @@ +import type { YieldRiskCredoraDto } from "./yieldRiskCredoraDto"; +import type { YieldRiskExponentialDto } from "./yieldRiskExponentialDto"; + +export interface YieldRiskDto { + /** Risk data last update timestamp */ + updatedAt: string; + exponentialFi?: YieldRiskExponentialDto; + credora?: YieldRiskCredoraDto; +} diff --git a/src/api/schemas/yieldRiskExponentialDto.ts b/src/api/schemas/yieldRiskExponentialDto.ts new file mode 100644 index 0000000..aa6af82 --- /dev/null +++ b/src/api/schemas/yieldRiskExponentialDto.ts @@ -0,0 +1,15 @@ +import type { YieldRiskExponentialDtoPoolRating } from "./yieldRiskExponentialDtoPoolRating"; +import type { YieldRiskExponentialDtoPoolScore } from "./yieldRiskExponentialDtoPoolScore"; +import type { YieldRiskExponentialDtoRatingDescription } from "./yieldRiskExponentialDtoRatingDescription"; +import type { YieldRiskExponentialDtoUrl } from "./yieldRiskExponentialDtoUrl"; + +export interface YieldRiskExponentialDto { + /** Exponential pool rating */ + poolRating?: YieldRiskExponentialDtoPoolRating; + /** Exponential pool score (1-5) */ + poolScore?: YieldRiskExponentialDtoPoolScore; + /** Exponential rating description */ + ratingDescription?: YieldRiskExponentialDtoRatingDescription; + /** Exponential pool URL */ + url?: YieldRiskExponentialDtoUrl; +} diff --git a/src/api/schemas/yieldRiskExponentialDtoPoolRating.ts b/src/api/schemas/yieldRiskExponentialDtoPoolRating.ts new file mode 100644 index 0000000..a3efe6a --- /dev/null +++ b/src/api/schemas/yieldRiskExponentialDtoPoolRating.ts @@ -0,0 +1,4 @@ +/** + * Exponential pool rating + */ +export type YieldRiskExponentialDtoPoolRating = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskExponentialDtoPoolScore.ts b/src/api/schemas/yieldRiskExponentialDtoPoolScore.ts new file mode 100644 index 0000000..c9b40ec --- /dev/null +++ b/src/api/schemas/yieldRiskExponentialDtoPoolScore.ts @@ -0,0 +1,4 @@ +/** + * Exponential pool score (1-5) + */ +export type YieldRiskExponentialDtoPoolScore = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskExponentialDtoRatingDescription.ts b/src/api/schemas/yieldRiskExponentialDtoRatingDescription.ts new file mode 100644 index 0000000..11769d0 --- /dev/null +++ b/src/api/schemas/yieldRiskExponentialDtoRatingDescription.ts @@ -0,0 +1,6 @@ +/** + * Exponential rating description + */ +export type YieldRiskExponentialDtoRatingDescription = { + [key: string]: unknown; +}; diff --git a/src/api/schemas/yieldRiskExponentialDtoUrl.ts b/src/api/schemas/yieldRiskExponentialDtoUrl.ts new file mode 100644 index 0000000..ab035d2 --- /dev/null +++ b/src/api/schemas/yieldRiskExponentialDtoUrl.ts @@ -0,0 +1,4 @@ +/** + * Exponential pool URL + */ +export type YieldRiskExponentialDtoUrl = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldStateDto.ts b/src/api/schemas/yieldStateDto.ts index 5faad63..e05e1c6 100644 --- a/src/api/schemas/yieldStateDto.ts +++ b/src/api/schemas/yieldStateDto.ts @@ -1,5 +1,7 @@ +import type { AllocationDto } from "./allocationDto"; import type { CapacityDto } from "./capacityDto"; import type { ConcentratedLiquidityPoolStateDto } from "./concentratedLiquidityPoolStateDto"; +import type { LiquidityStateDto } from "./liquidityStateDto"; import type { PricePerShareStateDto } from "./pricePerShareStateDto"; export interface YieldStateDto { @@ -9,4 +11,8 @@ export interface YieldStateDto { concentratedLiquidityPoolState?: ConcentratedLiquidityPoolStateDto; /** Capacity state metadata */ capacityState?: CapacityDto; + /** Liquidity state (available liquidity, utilization rate) */ + liquidityState?: LiquidityStateDto; + /** Allocations to underlying strategies for vault yields (e.g., OAV, Morpho). Includes allocation, APY, TVL, and capacity per strategy. */ + allocations?: AllocationDto[]; } diff --git a/src/api/schemas/yieldsControllerGetBalanceHistory200.ts b/src/api/schemas/yieldsControllerGetBalanceHistory200.ts new file mode 100644 index 0000000..c4476cf --- /dev/null +++ b/src/api/schemas/yieldsControllerGetBalanceHistory200.ts @@ -0,0 +1,5 @@ +import type { PaginatedResponseDto } from "./paginatedResponseDto"; +import type { YieldsControllerGetBalanceHistory200AllOf } from "./yieldsControllerGetBalanceHistory200AllOf"; + +export type YieldsControllerGetBalanceHistory200 = PaginatedResponseDto & + YieldsControllerGetBalanceHistory200AllOf; diff --git a/src/api/schemas/yieldsControllerGetBalanceHistory200AllOf.ts b/src/api/schemas/yieldsControllerGetBalanceHistory200AllOf.ts new file mode 100644 index 0000000..6d7a70b --- /dev/null +++ b/src/api/schemas/yieldsControllerGetBalanceHistory200AllOf.ts @@ -0,0 +1,5 @@ +import type { BalanceHistorySnapshotDto } from "./balanceHistorySnapshotDto"; + +export type YieldsControllerGetBalanceHistory200AllOf = { + items?: BalanceHistorySnapshotDto[]; +}; diff --git a/src/api/schemas/yieldsControllerGetBalanceHistory400.ts b/src/api/schemas/yieldsControllerGetBalanceHistory400.ts new file mode 100644 index 0000000..b8546b7 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetBalanceHistory400.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetBalanceHistory400 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetBalanceHistory401.ts b/src/api/schemas/yieldsControllerGetBalanceHistory401.ts new file mode 100644 index 0000000..50db703 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetBalanceHistory401.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetBalanceHistory401 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetBalanceHistory429.ts b/src/api/schemas/yieldsControllerGetBalanceHistory429.ts new file mode 100644 index 0000000..b9ff2d2 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetBalanceHistory429.ts @@ -0,0 +1,6 @@ +export type YieldsControllerGetBalanceHistory429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetBalanceHistory500.ts b/src/api/schemas/yieldsControllerGetBalanceHistory500.ts new file mode 100644 index 0000000..cc79a84 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetBalanceHistory500.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetBalanceHistory500 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetBalanceHistoryInterval.ts b/src/api/schemas/yieldsControllerGetBalanceHistoryInterval.ts new file mode 100644 index 0000000..d78eb49 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetBalanceHistoryInterval.ts @@ -0,0 +1,10 @@ +export type YieldsControllerGetBalanceHistoryInterval = + (typeof YieldsControllerGetBalanceHistoryInterval)[keyof typeof YieldsControllerGetBalanceHistoryInterval]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const YieldsControllerGetBalanceHistoryInterval = { + block: "block", + hour: "hour", + day: "day", + week: "week", +} as const; diff --git a/src/api/schemas/yieldsControllerGetBalanceHistoryParams.ts b/src/api/schemas/yieldsControllerGetBalanceHistoryParams.ts new file mode 100644 index 0000000..c194658 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetBalanceHistoryParams.ts @@ -0,0 +1,40 @@ +import type { YieldsControllerGetBalanceHistoryInterval } from "./yieldsControllerGetBalanceHistoryInterval"; +import type { YieldsControllerGetBalanceHistorySort } from "./yieldsControllerGetBalanceHistorySort"; + +export type YieldsControllerGetBalanceHistoryParams = { + /** + * Wallet address to fetch history for + */ + address: string; + /** + * Start of time range (ISO 8601) + */ + from?: string; + /** + * End of time range (ISO 8601). Defaults to now. + */ + to?: string; + /** + * Block number for a point-in-time snapshot. When provided, from/to/interval are ignored. + */ + blockNumber?: number; + /** + * Sampling resolution for the time series + */ + interval?: YieldsControllerGetBalanceHistoryInterval; + /** + * Sort order by timestamp. Defaults to most recent first (desc). + */ + sort?: YieldsControllerGetBalanceHistorySort; + /** + * Maximum number of items to return (default 30, max 100) + * @minimum 1 + * @maximum 100 + */ + limit?: number; + /** + * Pagination offset + * @minimum 0 + */ + offset?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetBalanceHistorySort.ts b/src/api/schemas/yieldsControllerGetBalanceHistorySort.ts new file mode 100644 index 0000000..a1f5ad3 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetBalanceHistorySort.ts @@ -0,0 +1,8 @@ +export type YieldsControllerGetBalanceHistorySort = + (typeof YieldsControllerGetBalanceHistorySort)[keyof typeof YieldsControllerGetBalanceHistorySort]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const YieldsControllerGetBalanceHistorySort = { + asc: "asc", + desc: "desc", +} as const; diff --git a/src/api/schemas/yieldsControllerGetYieldRewardRateHistory400.ts b/src/api/schemas/yieldsControllerGetYieldRewardRateHistory400.ts new file mode 100644 index 0000000..4d49985 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRewardRateHistory400.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldRewardRateHistory400 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldRewardRateHistory401.ts b/src/api/schemas/yieldsControllerGetYieldRewardRateHistory401.ts new file mode 100644 index 0000000..16a3e50 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRewardRateHistory401.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldRewardRateHistory401 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldRewardRateHistory429.ts b/src/api/schemas/yieldsControllerGetYieldRewardRateHistory429.ts new file mode 100644 index 0000000..0ce3884 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRewardRateHistory429.ts @@ -0,0 +1,6 @@ +export type YieldsControllerGetYieldRewardRateHistory429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldRewardRateHistory500.ts b/src/api/schemas/yieldsControllerGetYieldRewardRateHistory500.ts new file mode 100644 index 0000000..fc8cbf4 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRewardRateHistory500.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldRewardRateHistory500 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldRewardRateHistoryInterval.ts b/src/api/schemas/yieldsControllerGetYieldRewardRateHistoryInterval.ts new file mode 100644 index 0000000..b8def9f --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRewardRateHistoryInterval.ts @@ -0,0 +1,9 @@ +export type YieldsControllerGetYieldRewardRateHistoryInterval = + (typeof YieldsControllerGetYieldRewardRateHistoryInterval)[keyof typeof YieldsControllerGetYieldRewardRateHistoryInterval]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const YieldsControllerGetYieldRewardRateHistoryInterval = { + day: "day", + week: "week", + month: "month", +} as const; diff --git a/src/api/schemas/yieldsControllerGetYieldRewardRateHistoryParams.ts b/src/api/schemas/yieldsControllerGetYieldRewardRateHistoryParams.ts new file mode 100644 index 0000000..a134a5d --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRewardRateHistoryParams.ts @@ -0,0 +1,32 @@ +import type { YieldsControllerGetYieldRewardRateHistoryInterval } from "./yieldsControllerGetYieldRewardRateHistoryInterval"; +import type { YieldsControllerGetYieldRewardRateHistoryPeriod } from "./yieldsControllerGetYieldRewardRateHistoryPeriod"; + +export type YieldsControllerGetYieldRewardRateHistoryParams = { + /** + * Pagination offset + * @minimum 0 + */ + offset?: number; + /** + * Maximum number of data points to return (default 100, max 365) + * @minimum 1 + * @maximum 365 + */ + limit?: number; + /** + * Start of time range (ISO 8601). Overrides period when provided. + */ + from?: string; + /** + * End of time range (ISO 8601). Defaults to now. + */ + to?: string; + /** + * Predefined time window. Ignored when from/to are provided. Default: 30d. + */ + period?: YieldsControllerGetYieldRewardRateHistoryPeriod; + /** + * Sampling resolution (day/week/month). Default: day. + */ + interval?: YieldsControllerGetYieldRewardRateHistoryInterval; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldRewardRateHistoryPeriod.ts b/src/api/schemas/yieldsControllerGetYieldRewardRateHistoryPeriod.ts new file mode 100644 index 0000000..ff408cd --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRewardRateHistoryPeriod.ts @@ -0,0 +1,12 @@ +export type YieldsControllerGetYieldRewardRateHistoryPeriod = + (typeof YieldsControllerGetYieldRewardRateHistoryPeriod)[keyof typeof YieldsControllerGetYieldRewardRateHistoryPeriod]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const YieldsControllerGetYieldRewardRateHistoryPeriod = { + "1d": "1d", + "7d": "7d", + "30d": "30d", + "90d": "90d", + "1y": "1y", + all: "all", +} as const; diff --git a/src/api/schemas/yieldsControllerGetYieldRewards400.ts b/src/api/schemas/yieldsControllerGetYieldRewards400.ts new file mode 100644 index 0000000..03cbe13 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRewards400.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldRewards400 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldRewards401.ts b/src/api/schemas/yieldsControllerGetYieldRewards401.ts new file mode 100644 index 0000000..b6d92ad --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRewards401.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldRewards401 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldRewards429.ts b/src/api/schemas/yieldsControllerGetYieldRewards429.ts new file mode 100644 index 0000000..1f1f2a8 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRewards429.ts @@ -0,0 +1,6 @@ +export type YieldsControllerGetYieldRewards429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldRewards500.ts b/src/api/schemas/yieldsControllerGetYieldRewards500.ts new file mode 100644 index 0000000..f4da5b8 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRewards500.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldRewards500 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldRewardsParams.ts b/src/api/schemas/yieldsControllerGetYieldRewardsParams.ts new file mode 100644 index 0000000..097ae8d --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRewardsParams.ts @@ -0,0 +1,31 @@ +import type { YieldsControllerGetYieldRewardsSort } from "./yieldsControllerGetYieldRewardsSort"; + +export type YieldsControllerGetYieldRewardsParams = { + /** + * Wallet address to fetch rewards for + */ + address: string; + /** + * Start of time range (ISO 8601) + */ + from?: string; + /** + * End of time range (ISO 8601) + */ + to?: string; + /** + * Sort order by timestamp (default: desc) + */ + sort?: YieldsControllerGetYieldRewardsSort; + /** + * Maximum number of items to return (default: 100, max: 100) + * @minimum 1 + * @maximum 100 + */ + limit?: number; + /** + * Pagination offset (default: 0) + * @minimum 0 + */ + offset?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldRewardsSort.ts b/src/api/schemas/yieldsControllerGetYieldRewardsSort.ts new file mode 100644 index 0000000..0c05314 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRewardsSort.ts @@ -0,0 +1,8 @@ +export type YieldsControllerGetYieldRewardsSort = + (typeof YieldsControllerGetYieldRewardsSort)[keyof typeof YieldsControllerGetYieldRewardsSort]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const YieldsControllerGetYieldRewardsSort = { + asc: "asc", + desc: "desc", +} as const; diff --git a/src/api/schemas/yieldsControllerGetYieldRisk400.ts b/src/api/schemas/yieldsControllerGetYieldRisk400.ts new file mode 100644 index 0000000..77f0581 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRisk400.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldRisk400 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldRisk401.ts b/src/api/schemas/yieldsControllerGetYieldRisk401.ts new file mode 100644 index 0000000..69f5cdf --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRisk401.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldRisk401 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldRisk429.ts b/src/api/schemas/yieldsControllerGetYieldRisk429.ts new file mode 100644 index 0000000..25aef44 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRisk429.ts @@ -0,0 +1,6 @@ +export type YieldsControllerGetYieldRisk429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldRisk500.ts b/src/api/schemas/yieldsControllerGetYieldRisk500.ts new file mode 100644 index 0000000..cfe6076 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldRisk500.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldRisk500 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldTvlHistory400.ts b/src/api/schemas/yieldsControllerGetYieldTvlHistory400.ts new file mode 100644 index 0000000..65e5a6f --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldTvlHistory400.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldTvlHistory400 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldTvlHistory401.ts b/src/api/schemas/yieldsControllerGetYieldTvlHistory401.ts new file mode 100644 index 0000000..f1821d7 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldTvlHistory401.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldTvlHistory401 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldTvlHistory429.ts b/src/api/schemas/yieldsControllerGetYieldTvlHistory429.ts new file mode 100644 index 0000000..9416e83 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldTvlHistory429.ts @@ -0,0 +1,6 @@ +export type YieldsControllerGetYieldTvlHistory429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldTvlHistory500.ts b/src/api/schemas/yieldsControllerGetYieldTvlHistory500.ts new file mode 100644 index 0000000..3a51035 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldTvlHistory500.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldTvlHistory500 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldTvlHistoryInterval.ts b/src/api/schemas/yieldsControllerGetYieldTvlHistoryInterval.ts new file mode 100644 index 0000000..3994f81 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldTvlHistoryInterval.ts @@ -0,0 +1,9 @@ +export type YieldsControllerGetYieldTvlHistoryInterval = + (typeof YieldsControllerGetYieldTvlHistoryInterval)[keyof typeof YieldsControllerGetYieldTvlHistoryInterval]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const YieldsControllerGetYieldTvlHistoryInterval = { + day: "day", + week: "week", + month: "month", +} as const; diff --git a/src/api/schemas/yieldsControllerGetYieldTvlHistoryParams.ts b/src/api/schemas/yieldsControllerGetYieldTvlHistoryParams.ts new file mode 100644 index 0000000..67e37c8 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldTvlHistoryParams.ts @@ -0,0 +1,32 @@ +import type { YieldsControllerGetYieldTvlHistoryInterval } from "./yieldsControllerGetYieldTvlHistoryInterval"; +import type { YieldsControllerGetYieldTvlHistoryPeriod } from "./yieldsControllerGetYieldTvlHistoryPeriod"; + +export type YieldsControllerGetYieldTvlHistoryParams = { + /** + * Pagination offset + * @minimum 0 + */ + offset?: number; + /** + * Maximum number of data points to return (default 100, max 365) + * @minimum 1 + * @maximum 365 + */ + limit?: number; + /** + * Start of time range (ISO 8601). Overrides period when provided. + */ + from?: string; + /** + * End of time range (ISO 8601). Defaults to now. + */ + to?: string; + /** + * Predefined time window. Ignored when from/to are provided. Default: 30d. + */ + period?: YieldsControllerGetYieldTvlHistoryPeriod; + /** + * Sampling resolution (day/week/month). Default: day. + */ + interval?: YieldsControllerGetYieldTvlHistoryInterval; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldTvlHistoryPeriod.ts b/src/api/schemas/yieldsControllerGetYieldTvlHistoryPeriod.ts new file mode 100644 index 0000000..bb6183a --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldTvlHistoryPeriod.ts @@ -0,0 +1,12 @@ +export type YieldsControllerGetYieldTvlHistoryPeriod = + (typeof YieldsControllerGetYieldTvlHistoryPeriod)[keyof typeof YieldsControllerGetYieldTvlHistoryPeriod]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const YieldsControllerGetYieldTvlHistoryPeriod = { + "1d": "1d", + "7d": "7d", + "30d": "30d", + "90d": "90d", + "1y": "1y", + all: "all", +} as const; diff --git a/src/api/schemas/yieldsControllerGetYieldsNetwork.ts b/src/api/schemas/yieldsControllerGetYieldsNetwork.ts index 399a834..154f607 100644 --- a/src/api/schemas/yieldsControllerGetYieldsNetwork.ts +++ b/src/api/schemas/yieldsControllerGetYieldsNetwork.ts @@ -88,6 +88,7 @@ export const YieldsControllerGetYieldsNetwork = { kusama: "kusama", westend: "westend", bittensor: "bittensor", + aptos: "aptos", binancebeacon: "binancebeacon", cardano: "cardano", near: "near", diff --git a/src/api/schemas/yieldsControllerGetYieldsParams.ts b/src/api/schemas/yieldsControllerGetYieldsParams.ts index e3b94f8..76f0b6f 100644 --- a/src/api/schemas/yieldsControllerGetYieldsParams.ts +++ b/src/api/schemas/yieldsControllerGetYieldsParams.ts @@ -77,7 +77,7 @@ export type YieldsControllerGetYieldsParams = { */ search?: string; /** - * Sort by yield status + * Sort by yield status or reward rate */ sort?: YieldsControllerGetYieldsSort; }; diff --git a/src/api/schemas/yieldsControllerGetYieldsSort.ts b/src/api/schemas/yieldsControllerGetYieldsSort.ts index 617446a..5ee184a 100644 --- a/src/api/schemas/yieldsControllerGetYieldsSort.ts +++ b/src/api/schemas/yieldsControllerGetYieldsSort.ts @@ -7,4 +7,6 @@ export const YieldsControllerGetYieldsSort = { statusEnterDesc: "statusEnterDesc", statusExitAsc: "statusExitAsc", statusExitDesc: "statusExitDesc", + rewardRateAsc: "rewardRateAsc", + rewardRateDesc: "rewardRateDesc", } as const;