diff --git a/.changeset/brave-pugs-follow.md b/.changeset/brave-pugs-follow.md new file mode 100644 index 0000000..a22f2a8 --- /dev/null +++ b/.changeset/brave-pugs-follow.md @@ -0,0 +1,5 @@ +--- +"@yieldxyz/sdk": patch +--- + +feat: regenerate API schemas to add Robinhood Chain network diff --git a/src/api/index.msw.ts b/src/api/index.msw.ts index e859e03..19db98c 100644 --- a/src/api/index.msw.ts +++ b/src/api/index.msw.ts @@ -6,25 +6,31 @@ import type { ActionsControllerGetActions200, BalancesResponseDto, HealthStatusDto, + KycStatusResponseDto, NetworkDto, PaginatedResponseDto, ProviderDto, ProvidersControllerGetProviders200, RewardRateHistoryResponseDto, - RiskParameterDto, + TokensControllerGetTokens200, TransactionDto, TvlHistoryResponseDto, YieldBalancesDto, YieldDto, + YieldRiskDto, YieldsControllerGetBalanceHistory200, + YieldsControllerGetYieldCampaigns200, YieldsControllerGetYields200, YieldsControllerGetYieldValidators200, } from "./schemas"; import { BalanceType, + CampaignPayoutFrequency, + CampaignQualificationType, + CampaignRewardMode, + CampaignStatus, ERCStandards, HealthStatus, - Networks, RewardClaiming, RewardSchedule, YieldType, @@ -63,6 +69,8 @@ export const getYieldsControllerGetYieldsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -78,6 +86,8 @@ export const getYieldsControllerGetYieldsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -175,6 +185,8 @@ export const getYieldsControllerGetYieldsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -190,6 +202,8 @@ export const getYieldsControllerGetYieldsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -299,6 +313,8 @@ export const getYieldsControllerGetYieldsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -314,6 +330,8 @@ export const getYieldsControllerGetYieldsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -425,6 +443,8 @@ export const getYieldsControllerGetYieldsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -440,6 +460,8 @@ export const getYieldsControllerGetYieldsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -551,6 +573,8 @@ export const getYieldsControllerGetYieldsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -566,6 +590,8 @@ export const getYieldsControllerGetYieldsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -686,6 +712,8 @@ export const getYieldsControllerGetYieldsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -701,6 +729,8 @@ export const getYieldsControllerGetYieldsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -788,11 +818,12 @@ export const getYieldsControllerGetYieldsResponseMock = }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -804,6 +835,81 @@ export const getYieldsControllerGetYieldsResponseMock = })), }, }, + feeConfigurations: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + default: faker.datatype.boolean(), + managementFeeBps: faker.helpers.arrayElement([ + faker.helpers.arrayElement([null]), + undefined, + ]), + performanceFeeBps: faker.helpers.arrayElement([ + faker.helpers.arrayElement([null]), + undefined, + ]), + depositFeeBps: faker.helpers.arrayElement([ + faker.helpers.arrayElement([null]), + undefined, + ]), + allocatorVaultContractAddress: faker.helpers.arrayElement([ + faker.helpers.arrayElement([null]), + undefined, + ]), + statistics: faker.helpers.arrayElement([ + { + ...{ + tvlUsd: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + 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({ 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, + ]), + })), + undefined, + ]), statistics: faker.helpers.arrayElement([ { ...{ @@ -856,29 +962,16 @@ export const getYieldsControllerGetYieldsResponseMock = 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, - ]), + ratings: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + rating: faker.string.alpha({ length: { min: 10, max: 20 } }), + source: faker.helpers.arrayElement([ + "credora", + "stakingRewards", + ] as const), + })), }, }, undefined, @@ -902,6 +995,7 @@ export const getYieldsControllerGetYieldsResponseMock = supportedStandards: faker.helpers.arrayElements( Object.values(ERCStandards), ), + supportsCampaigns: faker.datatype.boolean(), }, }, mechanics: { @@ -941,6 +1035,8 @@ export const getYieldsControllerGetYieldsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -956,6 +1052,8 @@ export const getYieldsControllerGetYieldsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -1093,6 +1191,13 @@ export const getYieldsControllerGetYieldsResponseMock = ]), null, ]), + subsequentMinimum: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + null, + ]), }, }, undefined, @@ -1101,8 +1206,110 @@ export const getYieldsControllerGetYieldsResponseMock = { ...{ kycRequired: faker.datatype.boolean(), - kycUrl: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), + kyc: faker.helpers.arrayElement([ + { + ...{ + kycMode: faker.helpers.arrayElement([ + "none", + "oauth_redirect", + "external_redirect", + "iframe", + "deeplink", + "native_sdk", + ] as const), + iframeAllowed: faker.datatype.boolean(), + authorizeUrl: 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, + ]), + eligibility: { + defaultPolicy: faker.helpers.arrayElement([ + "deny", + "allow", + ] as const), + countries: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + ), + blockedCountries: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + ), + blockedSubdivisions: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + ), + usPersonAllowed: faker.datatype.boolean(), + investorEligibility: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + jurisdiction: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + tier: faker.helpers.arrayElement([ + "us_retail", + "us_accredited", + "us_qualified_purchaser", + "eu_retail", + "eu_professional", + "eu_professional_optup", + "eu_eligible_counterparty", + "uk_retail", + "uk_professional", + "ch_qualified", + "sg_ai", + "sg_ii", + "hk_pi", + "my_sophisticated", + "br_qi", + "br_pi", + "ae_professional", + ] as const), + verificationLevel: faker.helpers.arrayElement([ + "self_attested", + "verified_documentation", + "letter", + "third_party_attestation", + ] as const), + expiresAfterDays: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + undefined, + ]), + })), + subjectTypes: faker.helpers.arrayElements([ + "KYC", + "KYB", + ] as const), + }, + mandatoryDisclosureUrl: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + }, + }, undefined, ]), }, @@ -1129,6 +1336,8 @@ export const getYieldsControllerGetYieldsResponseMock = name: faker.helpers.arrayElement([ "amount", "amounts", + "shareAmount", + "shareAmountRaw", "validatorAddress", "validatorAddresses", "receiverAddress", @@ -1149,6 +1358,7 @@ export const getYieldsControllerGetYieldsResponseMock = "ledgerWalletApiCompatible", "useMaxAmount", "useInstantExecution", + "useAutoClaim", "rangeMin", "rangeMax", "percentage", @@ -1240,6 +1450,8 @@ export const getYieldsControllerGetYieldsResponseMock = name: faker.helpers.arrayElement([ "amount", "amounts", + "shareAmount", + "shareAmountRaw", "validatorAddress", "validatorAddresses", "receiverAddress", @@ -1260,6 +1472,7 @@ export const getYieldsControllerGetYieldsResponseMock = "ledgerWalletApiCompatible", "useMaxAmount", "useInstantExecution", + "useAutoClaim", "rangeMin", "rangeMax", "percentage", @@ -1352,6 +1565,8 @@ export const getYieldsControllerGetYieldsResponseMock = name: faker.helpers.arrayElement([ "amount", "amounts", + "shareAmount", + "shareAmountRaw", "validatorAddress", "validatorAddresses", "receiverAddress", @@ -1372,6 +1587,7 @@ export const getYieldsControllerGetYieldsResponseMock = "ledgerWalletApiCompatible", "useMaxAmount", "useInstantExecution", + "useAutoClaim", "rangeMin", "rangeMax", "percentage", @@ -1472,6 +1688,8 @@ export const getYieldsControllerGetYieldsResponseMock = name: faker.helpers.arrayElement([ "amount", "amounts", + "shareAmount", + "shareAmountRaw", "validatorAddress", "validatorAddresses", "receiverAddress", @@ -1492,6 +1710,7 @@ export const getYieldsControllerGetYieldsResponseMock = "ledgerWalletApiCompatible", "useMaxAmount", "useInstantExecution", + "useAutoClaim", "rangeMin", "rangeMax", "percentage", @@ -1600,6 +1819,7 @@ export const getYieldsControllerGetYieldsResponseMock = }, }, providerId: faker.string.alpha({ length: { min: 10, max: 20 } }), + prime: faker.datatype.boolean(), curator: faker.helpers.arrayElement([ { ...{ @@ -1661,6 +1881,8 @@ export const getYieldsControllerGetYieldsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -1676,6 +1898,8 @@ export const getYieldsControllerGetYieldsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -1795,6 +2019,8 @@ export const getYieldsControllerGetYieldsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -1810,6 +2036,8 @@ export const getYieldsControllerGetYieldsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -1963,6 +2191,8 @@ export const getYieldsControllerGetYieldsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -1978,6 +2208,8 @@ export const getYieldsControllerGetYieldsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -2097,6 +2329,8 @@ export const getYieldsControllerGetYieldsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -2112,6 +2346,8 @@ export const getYieldsControllerGetYieldsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -2273,6 +2509,8 @@ export const getYieldsControllerGetYieldsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -2288,6 +2526,8 @@ export const getYieldsControllerGetYieldsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -2419,124 +2659,560 @@ export const getYieldsControllerGetYieldsResponseMock = }, undefined, ]), - })), - undefined, - ]), - }, - }); - -export const getYieldsControllerGetAggregateBalancesResponseMock = ( - overrideResponse: Partial> = {}, -): BalancesResponseDto => ({ - items: Array.from( - { length: faker.number.int({ min: 1, max: 10 }) }, - (_, i) => i + 1, - ).map(() => ({ - 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().slice(0, 19) + "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(() => ({ - 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, + investmentSchedule: faker.helpers.arrayElement([ + { + ...{ + timezone: faker.string.alpha({ length: { min: 10, max: 20 } }), + subscription: { + ...{ + paths: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + kind: faker.helpers.arrayElement([ + "instant", + "standard", + ] as const), + cadence: faker.helpers.arrayElement([ + "continuous", + "daily_cutoff", + "periodic", + "scheduled", + ] as const), + status: faker.helpers.arrayElement([ + "open", + "closed", + "settling", + ] as const), + businessDaysOnly: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + cutoffTime: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + currentWindow: faker.helpers.arrayElement([ + { + ...{ + opensAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + closesAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + source: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + "onchain", + "api", + "config", + ] as const), + undefined, + ]), + }, + }, + null, + ]), + nextWindow: faker.helpers.arrayElement([ + { + ...{ + opensAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + closesAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + source: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + "onchain", + "api", + "config", + ] as const), + undefined, + ]), + }, + }, + null, + ]), + settlement: { + ...{ + type: faker.helpers.arrayElement([ + "atomic", + "next_business_day", + "cohort", + "cooldown", + ] as const), + marketDays: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + undefined, + ]), + estimatedDuration: faker.helpers.arrayElement([ + { + ...{ + seconds: faker.number.float({ + fractionDigits: 2, + }), + }, + }, + undefined, + ]), + estimatedSettlementAt: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + claimRequired: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + instantPortion: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + undefined, + ]), + deferredDeliveryAt: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + }, + }, + accrual: { + ...{ + startsAt: faker.helpers.arrayElement([ + "immediate", + "next_business_day", + "on_cycle_start", + "on_settlement", + ] as const), + startsAtDate: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + minimumHold: faker.helpers.arrayElement([ + { + ...{ + seconds: faker.number.float({ + fractionDigits: 2, + }), + }, + }, + undefined, + ]), + }, + }, + limits: faker.helpers.arrayElement([ + { + ...{ + individualPer24h: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + globalPer24h: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + globalRemainingPer24h: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + maxFractionOfNav: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + undefined, + ]), + liquidityBounded: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + availableLiquidity: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + minimumAmount: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + }, + }, + undefined, + ]), + fee: faker.helpers.arrayElement([ + { + ...{ + rate: faker.number.float({ fractionDigits: 2 }), + }, + }, + undefined, + ]), + })), + }, + }, + redemption: { + ...{ + paths: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + kind: faker.helpers.arrayElement([ + "instant", + "standard", + ] as const), + cadence: faker.helpers.arrayElement([ + "continuous", + "daily_cutoff", + "periodic", + "scheduled", + ] as const), + status: faker.helpers.arrayElement([ + "open", + "closed", + "settling", + ] as const), + businessDaysOnly: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + cutoffTime: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + currentWindow: faker.helpers.arrayElement([ + { + ...{ + opensAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + closesAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + source: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + "onchain", + "api", + "config", + ] as const), + undefined, + ]), + }, + }, + null, + ]), + nextWindow: faker.helpers.arrayElement([ + { + ...{ + opensAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + closesAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + source: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + "onchain", + "api", + "config", + ] as const), + undefined, + ]), + }, + }, + null, + ]), + settlement: { + ...{ + type: faker.helpers.arrayElement([ + "atomic", + "next_business_day", + "cohort", + "cooldown", + ] as const), + marketDays: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + undefined, + ]), + estimatedDuration: faker.helpers.arrayElement([ + { + ...{ + seconds: faker.number.float({ + fractionDigits: 2, + }), + }, + }, + undefined, + ]), + estimatedSettlementAt: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + claimRequired: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + instantPortion: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + undefined, + ]), + deferredDeliveryAt: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + }, + }, + accrual: { + ...{ + startsAt: faker.helpers.arrayElement([ + "immediate", + "next_business_day", + "on_cycle_start", + "on_settlement", + ] as const), + startsAtDate: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + minimumHold: faker.helpers.arrayElement([ + { + ...{ + seconds: faker.number.float({ + fractionDigits: 2, + }), + }, + }, + undefined, + ]), + }, + }, + limits: faker.helpers.arrayElement([ + { + ...{ + individualPer24h: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + globalPer24h: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + globalRemainingPer24h: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + maxFractionOfNav: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + undefined, + ]), + liquidityBounded: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + availableLiquidity: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + minimumAmount: faker.helpers.arrayElement([ + faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + undefined, + ]), + }, + }, + undefined, + ]), + fee: faker.helpers.arrayElement([ + { + ...{ + rate: faker.number.float({ fractionDigits: 2 }), + }, + }, + undefined, + ]), + })), + }, + }, + notes: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + undefined, + ]), + executionContracts: faker.helpers.arrayElement([ + { + ...{ + enter: 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, + ]), + exit: 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, + ]), + }, + }, + undefined, + ]), + })), + undefined, + ]), + }, + }); + +export const getYieldsControllerGetAggregateBalancesResponseMock = ( + overrideResponse: Partial> = {}, +): BalancesResponseDto => ({ + items: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + 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().slice(0, 19) + "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", + "WITHDRAW_REQUEST", + "INSTANT_WITHDRAW", + "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(() => ({ + name: faker.helpers.arrayElement([ + "amount", + "amounts", + "shareAmount", + "shareAmountRaw", + "validatorAddress", + "validatorAddresses", + "receiverAddress", + "providerId", + "duration", + "inputToken", + "inputTokenNetwork", + "outputToken", + "outputTokenNetwork", + "subnetId", + "tronResource", + "feeConfigurationId", + "cosmosPubKey", + "tezosPubKey", + "cAddressBech", + "pAddressBech", + "executionMode", + "ledgerWalletApiCompatible", + "useMaxAmount", + "useInstantExecution", + "useAutoClaim", + "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( @@ -2615,6 +3291,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -2630,6 +3308,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -2774,6 +3454,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -2789,6 +3471,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -2876,11 +3560,12 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -3033,24 +3718,28 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( 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({ 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 } }), + subnet: faker.helpers.arrayElement([ + { + ...{ + id: faker.number.float({ fractionDigits: 2 }), + name: 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, + ]), + tvl: 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, + ]), + }, + }, undefined, ]), }, @@ -3116,6 +3805,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -3131,6 +3822,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -3218,11 +3911,12 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -3375,24 +4069,28 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( 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({ 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 } }), + subnet: faker.helpers.arrayElement([ + { + ...{ + id: faker.number.float({ fractionDigits: 2 }), + name: 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, + ]), + tvl: 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, + ]), + }, + }, undefined, ]), })), @@ -3444,6 +4142,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -3459,6 +4159,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -3577,6 +4279,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( type: faker.helpers.arrayElement([ "STAKE", "UNSTAKE", + "WITHDRAW_REQUEST", + "INSTANT_WITHDRAW", "CLAIM_REWARDS", "AUTO_SWEEP_UNSTAKE_REWARDS", "AUTO_SWEEP_WITHDRAW_REWARDS", @@ -3607,6 +4311,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( name: faker.helpers.arrayElement([ "amount", "amounts", + "shareAmount", + "shareAmountRaw", "validatorAddress", "validatorAddresses", "receiverAddress", @@ -3627,6 +4333,7 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "ledgerWalletApiCompatible", "useMaxAmount", "useInstantExecution", + "useAutoClaim", "rangeMin", "rangeMax", "percentage", @@ -3728,6 +4435,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -3743,6 +4452,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -3887,6 +4598,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -3902,6 +4615,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -3995,11 +4710,12 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -4158,24 +4874,28 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( 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({ 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 } }), + subnet: faker.helpers.arrayElement([ + { + ...{ + id: faker.number.float({ fractionDigits: 2 }), + name: 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, + ]), + tvl: 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, + ]), + }, + }, undefined, ]), }, @@ -4243,6 +4963,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -4258,6 +4980,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -4351,11 +5075,12 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -4512,24 +5237,28 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( 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({ 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 } }), + subnet: faker.helpers.arrayElement([ + { + ...{ + id: faker.number.float({ fractionDigits: 2 }), + name: 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, + ]), + tvl: 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, + ]), + }, + }, undefined, ]), })), @@ -4581,6 +5310,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -4596,6 +5327,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -4722,6 +5455,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -4737,6 +5472,8 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -4824,11 +5561,12 @@ export const getYieldsControllerGetAggregateBalancesResponseMock = ( }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -4876,6 +5614,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -4891,6 +5631,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -4988,6 +5730,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -5003,6 +5747,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -5109,6 +5855,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -5124,6 +5872,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -5235,6 +5985,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -5250,6 +6002,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -5361,6 +6115,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -5376,6 +6132,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -5491,6 +6249,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -5506,6 +6266,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -5593,11 +6355,12 @@ export const getYieldsControllerGetYieldResponseMock = ( }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -5609,6 +6372,81 @@ export const getYieldsControllerGetYieldResponseMock = ( })), }, }, + feeConfigurations: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + default: faker.datatype.boolean(), + managementFeeBps: faker.helpers.arrayElement([ + faker.helpers.arrayElement([null]), + undefined, + ]), + performanceFeeBps: faker.helpers.arrayElement([ + faker.helpers.arrayElement([null]), + undefined, + ]), + depositFeeBps: faker.helpers.arrayElement([ + faker.helpers.arrayElement([null]), + undefined, + ]), + allocatorVaultContractAddress: faker.helpers.arrayElement([ + faker.helpers.arrayElement([null]), + undefined, + ]), + statistics: faker.helpers.arrayElement([ + { + ...{ + tvlUsd: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + 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({ 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, + ]), + })), + undefined, + ]), statistics: faker.helpers.arrayElement([ { ...{ @@ -5661,26 +6499,16 @@ export const getYieldsControllerGetYieldResponseMock = ( 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, - ]), + ratings: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + rating: faker.string.alpha({ length: { min: 10, max: 20 } }), + source: faker.helpers.arrayElement([ + "credora", + "stakingRewards", + ] as const), + })), }, }, undefined, @@ -5699,6 +6527,7 @@ export const getYieldsControllerGetYieldResponseMock = ( supportedStandards: faker.helpers.arrayElements( Object.values(ERCStandards), ), + supportsCampaigns: faker.datatype.boolean(), }, }, mechanics: { @@ -5734,6 +6563,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -5749,6 +6580,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -5886,6 +6719,13 @@ export const getYieldsControllerGetYieldResponseMock = ( ]), null, ]), + subsequentMinimum: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + null, + ]), }, }, undefined, @@ -5894,8 +6734,98 @@ export const getYieldsControllerGetYieldResponseMock = ( { ...{ kycRequired: faker.datatype.boolean(), - kycUrl: faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), + kyc: faker.helpers.arrayElement([ + { + ...{ + kycMode: faker.helpers.arrayElement([ + "none", + "oauth_redirect", + "external_redirect", + "iframe", + "deeplink", + "native_sdk", + ] as const), + iframeAllowed: faker.datatype.boolean(), + authorizeUrl: 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, + ]), + eligibility: { + defaultPolicy: faker.helpers.arrayElement([ + "deny", + "allow", + ] as const), + countries: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + blockedCountries: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + blockedSubdivisions: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => + faker.string.alpha({ length: { min: 10, max: 20 } }), + ), + usPersonAllowed: faker.datatype.boolean(), + investorEligibility: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + jurisdiction: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + tier: faker.helpers.arrayElement([ + "us_retail", + "us_accredited", + "us_qualified_purchaser", + "eu_retail", + "eu_professional", + "eu_professional_optup", + "eu_eligible_counterparty", + "uk_retail", + "uk_professional", + "ch_qualified", + "sg_ai", + "sg_ii", + "hk_pi", + "my_sophisticated", + "br_qi", + "br_pi", + "ae_professional", + ] as const), + verificationLevel: faker.helpers.arrayElement([ + "self_attested", + "verified_documentation", + "letter", + "third_party_attestation", + ] as const), + expiresAfterDays: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + undefined, + ]), + })), + subjectTypes: faker.helpers.arrayElements([ + "KYC", + "KYB", + ] as const), + }, + mandatoryDisclosureUrl: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, undefined, ]), }, @@ -5922,6 +6852,8 @@ export const getYieldsControllerGetYieldResponseMock = ( name: faker.helpers.arrayElement([ "amount", "amounts", + "shareAmount", + "shareAmountRaw", "validatorAddress", "validatorAddresses", "receiverAddress", @@ -5942,6 +6874,7 @@ export const getYieldsControllerGetYieldResponseMock = ( "ledgerWalletApiCompatible", "useMaxAmount", "useInstantExecution", + "useAutoClaim", "rangeMin", "rangeMax", "percentage", @@ -6019,6 +6952,8 @@ export const getYieldsControllerGetYieldResponseMock = ( name: faker.helpers.arrayElement([ "amount", "amounts", + "shareAmount", + "shareAmountRaw", "validatorAddress", "validatorAddresses", "receiverAddress", @@ -6039,6 +6974,7 @@ export const getYieldsControllerGetYieldResponseMock = ( "ledgerWalletApiCompatible", "useMaxAmount", "useInstantExecution", + "useAutoClaim", "rangeMin", "rangeMax", "percentage", @@ -6117,6 +7053,8 @@ export const getYieldsControllerGetYieldResponseMock = ( name: faker.helpers.arrayElement([ "amount", "amounts", + "shareAmount", + "shareAmountRaw", "validatorAddress", "validatorAddresses", "receiverAddress", @@ -6137,6 +7075,7 @@ export const getYieldsControllerGetYieldResponseMock = ( "ledgerWalletApiCompatible", "useMaxAmount", "useInstantExecution", + "useAutoClaim", "rangeMin", "rangeMax", "percentage", @@ -6216,6 +7155,8 @@ export const getYieldsControllerGetYieldResponseMock = ( name: faker.helpers.arrayElement([ "amount", "amounts", + "shareAmount", + "shareAmountRaw", "validatorAddress", "validatorAddresses", "receiverAddress", @@ -6236,6 +7177,7 @@ export const getYieldsControllerGetYieldResponseMock = ( "ledgerWalletApiCompatible", "useMaxAmount", "useInstantExecution", + "useAutoClaim", "rangeMin", "rangeMax", "percentage", @@ -6323,6 +7265,7 @@ export const getYieldsControllerGetYieldResponseMock = ( }, }, providerId: faker.string.alpha({ length: { min: 10, max: 20 } }), + prime: faker.datatype.boolean(), curator: faker.helpers.arrayElement([ { ...{ @@ -6380,6 +7323,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -6395,6 +7340,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -6504,6 +7451,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -6519,6 +7468,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -6662,6 +7613,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -6677,6 +7630,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -6786,6 +7741,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -6801,6 +7758,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -6952,6 +7911,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -6967,6 +7928,8 @@ export const getYieldsControllerGetYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -7078,16 +8041,387 @@ export const getYieldsControllerGetYieldResponseMock = ( faker.string.alpha({ length: { min: 10, max: 20 } }), null, ]), - null, - ]), - remainingCapacity: faker.helpers.arrayElement([ - faker.helpers.arrayElement([ - faker.string.alpha({ length: { min: 10, max: 20 } }), - null, + null, + ]), + remainingCapacity: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + null, + ]), + })), + undefined, + ]), + }, + }, + undefined, + ]), + investmentSchedule: faker.helpers.arrayElement([ + { + ...{ + timezone: faker.string.alpha({ length: { min: 10, max: 20 } }), + subscription: { + ...{ + paths: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + kind: faker.helpers.arrayElement([ + "instant", + "standard", + ] as const), + cadence: faker.helpers.arrayElement([ + "continuous", + "daily_cutoff", + "periodic", + "scheduled", + ] as const), + status: faker.helpers.arrayElement([ + "open", + "closed", + "settling", + ] as const), + businessDaysOnly: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + cutoffTime: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + currentWindow: faker.helpers.arrayElement([ + { + ...{ + opensAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + closesAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + source: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + "onchain", + "api", + "config", + ] as const), + undefined, + ]), + }, + }, + null, + ]), + nextWindow: faker.helpers.arrayElement([ + { + ...{ + opensAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + closesAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + source: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + "onchain", + "api", + "config", + ] as const), + undefined, + ]), + }, + }, + null, + ]), + settlement: { + ...{ + type: faker.helpers.arrayElement([ + "atomic", + "next_business_day", + "cohort", + "cooldown", + ] as const), + marketDays: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + undefined, + ]), + estimatedDuration: faker.helpers.arrayElement([ + { + ...{ seconds: faker.number.float({ fractionDigits: 2 }) }, + }, + undefined, + ]), + estimatedSettlementAt: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + claimRequired: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + instantPortion: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + undefined, + ]), + deferredDeliveryAt: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + accrual: { + ...{ + startsAt: faker.helpers.arrayElement([ + "immediate", + "next_business_day", + "on_cycle_start", + "on_settlement", + ] as const), + startsAtDate: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + minimumHold: faker.helpers.arrayElement([ + { + ...{ seconds: faker.number.float({ fractionDigits: 2 }) }, + }, + undefined, + ]), + }, + }, + limits: faker.helpers.arrayElement([ + { + ...{ + individualPer24h: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + globalPer24h: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + globalRemainingPer24h: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + maxFractionOfNav: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + undefined, + ]), + liquidityBounded: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + availableLiquidity: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + minimumAmount: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + undefined, + ]), + fee: faker.helpers.arrayElement([ + { ...{ rate: faker.number.float({ fractionDigits: 2 }) } }, + undefined, + ]), + })), + }, + }, + redemption: { + ...{ + paths: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + kind: faker.helpers.arrayElement([ + "instant", + "standard", + ] as const), + cadence: faker.helpers.arrayElement([ + "continuous", + "daily_cutoff", + "periodic", + "scheduled", + ] as const), + status: faker.helpers.arrayElement([ + "open", + "closed", + "settling", + ] as const), + businessDaysOnly: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + cutoffTime: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + currentWindow: faker.helpers.arrayElement([ + { + ...{ + opensAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + closesAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + source: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + "onchain", + "api", + "config", + ] as const), + undefined, + ]), + }, + }, + null, + ]), + nextWindow: faker.helpers.arrayElement([ + { + ...{ + opensAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + closesAt: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + source: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + "onchain", + "api", + "config", + ] as const), + undefined, + ]), + }, + }, + null, + ]), + settlement: { + ...{ + type: faker.helpers.arrayElement([ + "atomic", + "next_business_day", + "cohort", + "cooldown", + ] as const), + marketDays: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + undefined, + ]), + estimatedDuration: faker.helpers.arrayElement([ + { + ...{ seconds: faker.number.float({ fractionDigits: 2 }) }, + }, + undefined, + ]), + estimatedSettlementAt: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + claimRequired: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + instantPortion: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + undefined, + ]), + deferredDeliveryAt: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + accrual: { + ...{ + startsAt: faker.helpers.arrayElement([ + "immediate", + "next_business_day", + "on_cycle_start", + "on_settlement", + ] as const), + startsAtDate: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + minimumHold: faker.helpers.arrayElement([ + { + ...{ seconds: faker.number.float({ fractionDigits: 2 }) }, + }, + undefined, + ]), + }, + }, + limits: faker.helpers.arrayElement([ + { + ...{ + individualPer24h: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + globalPer24h: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + globalRemainingPer24h: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + maxFractionOfNav: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + undefined, + ]), + liquidityBounded: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), + availableLiquidity: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + minimumAmount: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + undefined, + ]), + fee: faker.helpers.arrayElement([ + { ...{ rate: faker.number.float({ fractionDigits: 2 }) } }, + undefined, ]), - null, - ]), - })), + })), + }, + }, + notes: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + }, + }, + undefined, + ]), + executionContracts: faker.helpers.arrayElement([ + { + ...{ + enter: 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, + ]), + exit: 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, ]), }, @@ -7097,27 +8431,44 @@ export const getYieldsControllerGetYieldResponseMock = ( ...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)), +export const getYieldsControllerGetYieldRiskResponseMock = ( + overrideResponse: Partial> = {}, +): YieldRiskDto => ({ + updatedAt: faker.string.alpha({ length: { min: 10, max: 20 } }), + 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, + ]), + stakingRewards: faker.helpers.arrayElement([ + { + rating: faker.helpers.arrayElement([{}, undefined]), + score: faker.helpers.arrayElement([{}, undefined]), + potentialRating: faker.helpers.arrayElement([{}, undefined]), + potentialScore: faker.helpers.arrayElement([{}, undefined]), + ratedAt: faker.helpers.arrayElement([{}, undefined]), + ratedSince: faker.helpers.arrayElement([{}, undefined]), + profileUrl: faker.helpers.arrayElement([{}, undefined]), + reportUrl: faker.helpers.arrayElement([{}, undefined]), + providerName: faker.helpers.arrayElement([{}, undefined]), + version: faker.helpers.arrayElement([{}, undefined]), + type: faker.helpers.arrayElement([{}, undefined]), + chain: faker.helpers.arrayElement([{}, undefined]), + contractAddress: faker.helpers.arrayElement([{}, undefined]), + riskMetrics: faker.helpers.arrayElement([ + { users: faker.helpers.arrayElement([{}, undefined]) }, undefined, ]), - asset: faker.helpers.arrayElement([{}, undefined]), - protocol: faker.helpers.arrayElement([{}, undefined]), - integrationId: faker.helpers.arrayElement([{}, undefined]), - createdAt: faker.date.past().toISOString().slice(0, 19) + "Z", - updatedAt: faker.date.past().toISOString().slice(0, 19) + "Z", - })); + }, + undefined, + ]), + ...overrideResponse, +}); export const getYieldsControllerGetBalanceHistoryResponseMock = (): YieldsControllerGetBalanceHistory200 => ({ @@ -7166,6 +8517,8 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = type: faker.helpers.arrayElement([ "STAKE", "UNSTAKE", + "WITHDRAW_REQUEST", + "INSTANT_WITHDRAW", "CLAIM_REWARDS", "AUTO_SWEEP_UNSTAKE_REWARDS", "AUTO_SWEEP_WITHDRAW_REWARDS", @@ -7196,6 +8549,8 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = name: faker.helpers.arrayElement([ "amount", "amounts", + "shareAmount", + "shareAmountRaw", "validatorAddress", "validatorAddresses", "receiverAddress", @@ -7216,6 +8571,7 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = "ledgerWalletApiCompatible", "useMaxAmount", "useInstantExecution", + "useAutoClaim", "rangeMin", "rangeMax", "percentage", @@ -7319,6 +8675,8 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -7334,6 +8692,8 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -7480,6 +8840,8 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -7495,6 +8857,8 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -7588,11 +8952,12 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -7757,24 +9122,28 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = 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({ 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 } }), + subnet: faker.helpers.arrayElement([ + { + ...{ + id: faker.number.float({ fractionDigits: 2 }), + name: 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, + ]), + tvl: 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, + ]), + }, + }, undefined, ]), }, @@ -7842,6 +9211,8 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -7857,6 +9228,8 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -7950,11 +9323,12 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -8113,24 +9487,28 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = 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({ 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 } }), + subnet: faker.helpers.arrayElement([ + { + ...{ + id: faker.number.float({ fractionDigits: 2 }), + name: 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, + ]), + tvl: 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, + ]), + }, + }, undefined, ]), })), @@ -8182,6 +9560,8 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -8197,6 +9577,8 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -8285,6 +9667,21 @@ export const getYieldsControllerGetBalanceHistoryResponseMock = undefined, ]), })), + periodDelta: faker.helpers.arrayElement([ + { + ...{ + shareAmount: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + shareAmountRaw: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + amount: faker.string.alpha({ length: { min: 10, max: 20 } }), + amountRaw: faker.string.alpha({ length: { min: 10, max: 20 } }), + }, + }, + undefined, + ]), })), undefined, ]), @@ -8322,6 +9719,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( type: faker.helpers.arrayElement([ "STAKE", "UNSTAKE", + "WITHDRAW_REQUEST", + "INSTANT_WITHDRAW", "CLAIM_REWARDS", "AUTO_SWEEP_UNSTAKE_REWARDS", "AUTO_SWEEP_WITHDRAW_REWARDS", @@ -8352,6 +9751,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( name: faker.helpers.arrayElement([ "amount", "amounts", + "shareAmount", + "shareAmountRaw", "validatorAddress", "validatorAddresses", "receiverAddress", @@ -8372,6 +9773,7 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "ledgerWalletApiCompatible", "useMaxAmount", "useInstantExecution", + "useAutoClaim", "rangeMin", "rangeMax", "percentage", @@ -8473,6 +9875,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -8488,6 +9892,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -8630,6 +10036,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -8645,6 +10053,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -8732,11 +10142,12 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -8889,24 +10300,28 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( 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({ 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 } }), + subnet: faker.helpers.arrayElement([ + { + ...{ + id: faker.number.float({ fractionDigits: 2 }), + name: 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, + ]), + tvl: 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, + ]), + }, + }, undefined, ]), }, @@ -8968,6 +10383,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -8983,6 +10400,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -9070,11 +10489,12 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -9225,24 +10645,28 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( 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({ 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 } }), + subnet: faker.helpers.arrayElement([ + { + ...{ + id: faker.number.float({ fractionDigits: 2 }), + name: 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, + ]), + tvl: 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, + ]), + }, + }, undefined, ]), })), @@ -9294,6 +10718,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -9309,6 +10735,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -9427,6 +10855,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( type: faker.helpers.arrayElement([ "STAKE", "UNSTAKE", + "WITHDRAW_REQUEST", + "INSTANT_WITHDRAW", "CLAIM_REWARDS", "AUTO_SWEEP_UNSTAKE_REWARDS", "AUTO_SWEEP_WITHDRAW_REWARDS", @@ -9457,6 +10887,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( name: faker.helpers.arrayElement([ "amount", "amounts", + "shareAmount", + "shareAmountRaw", "validatorAddress", "validatorAddresses", "receiverAddress", @@ -9477,6 +10909,7 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "ledgerWalletApiCompatible", "useMaxAmount", "useInstantExecution", + "useAutoClaim", "rangeMin", "rangeMax", "percentage", @@ -9578,6 +11011,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -9593,6 +11028,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -9737,6 +11174,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -9752,6 +11191,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -9845,11 +11286,12 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -10006,24 +11448,28 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( 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({ 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 } }), + subnet: faker.helpers.arrayElement([ + { + ...{ + id: faker.number.float({ fractionDigits: 2 }), + name: 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, + ]), + tvl: 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, + ]), + }, + }, undefined, ]), }, @@ -10091,6 +11537,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -10106,6 +11554,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -10193,11 +11643,12 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -10350,24 +11801,28 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( 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({ 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 } }), + subnet: faker.helpers.arrayElement([ + { + ...{ + id: faker.number.float({ fractionDigits: 2 }), + name: 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, + ]), + tvl: 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, + ]), + }, + }, undefined, ]), })), @@ -10419,6 +11874,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -10434,6 +11891,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -10560,6 +12019,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -10575,6 +12036,8 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -10662,11 +12125,12 @@ export const getYieldsControllerGetYieldBalancesResponseMock = ( }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -10698,6 +12162,13 @@ export const getYieldsControllerGetYieldRewardRateHistoryResponseMock = ( total: faker.number.float({ fractionDigits: 2 }), offset: faker.number.float({ fractionDigits: 2 }), limit: faker.number.float({ fractionDigits: 2 }), + items: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + timestamp: faker.string.alpha({ length: { min: 10, max: 20 } }), + rewardRate: faker.string.alpha({ length: { min: 10, max: 20 } }), + })), 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 } }), @@ -10785,6 +12256,8 @@ export const getYieldsControllerGetYieldValidatorsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -10800,6 +12273,8 @@ export const getYieldsControllerGetYieldValidatorsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -10887,11 +12362,12 @@ export const getYieldsControllerGetYieldValidatorsResponseMock = }, yieldSource: faker.helpers.arrayElement([ "staking", + "liquid_staking", "restaking", "protocol_incentive", "campaign_incentive", "points", - "lending_interest", + "lending", "mev", "real_world_asset_yield", "vault", @@ -10978,92 +12454,621 @@ export const getYieldsControllerGetYieldValidatorsResponseMock = ]), }, }, - undefined, - ]), - uniqueId: faker.helpers.arrayElement([ + undefined, + ]), + uniqueId: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + createdAt: faker.helpers.arrayElement([ + faker.date.past().toISOString().slice(0, 19) + "Z", + undefined, + ]), + updatedAt: faker.helpers.arrayElement([ + faker.date.past().toISOString().slice(0, 19) + "Z", + undefined, + ]), + }, + }, + undefined, + ]), + commission: faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + 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({ fractionDigits: 2 }), + 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({ fractionDigits: 2 }), + undefined, + ]), + nominatorCount: faker.helpers.arrayElement([ + faker.number.float({ 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, + ]), + subnet: faker.helpers.arrayElement([ + { + ...{ + id: faker.number.float({ fractionDigits: 2 }), + name: 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, + ]), + tvl: 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, + ]), + }, + }, + undefined, + ]), + })), + undefined, + ]), + }, + }); + +export const getYieldsControllerGetYieldCampaignsResponseMock = + (): YieldsControllerGetYieldCampaigns200 => ({ + ...{ + total: faker.number.float({ fractionDigits: 2 }), + offset: faker.number.float({ fractionDigits: 2 }), + limit: faker.number.float({ fractionDigits: 2 }), + }, + ...{ + items: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + id: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + createdAt: faker.date.past().toISOString().slice(0, 19) + "Z", + updatedAt: faker.date.past().toISOString().slice(0, 19) + "Z", + yieldId: faker.string.alpha({ length: { min: 10, max: 20 } }), + status: faker.helpers.arrayElement(Object.values(CampaignStatus)), + rewardMode: faker.helpers.arrayElement( + Object.values(CampaignRewardMode), + ), + rewardRate: { + ...{ + total: faker.number.float({ 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({ 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({ 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", + "robinhood", + "robinhood-testnet", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "tempo", + "pharos", + "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", + "liquid_staking", + "restaking", + "protocol_incentive", + "campaign_incentive", + "points", + "lending", + "mev", + "real_world_asset_yield", + "vault", + ] as const), + description: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, ]), - createdAt: faker.helpers.arrayElement([ - faker.date.past().toISOString().slice(0, 19) + "Z", - undefined, - ]), - updatedAt: faker.helpers.arrayElement([ - faker.date.past().toISOString().slice(0, 19) + "Z", - undefined, + })), + }, + }, + totalBudget: faker.string.alpha({ length: { min: 10, max: 20 } }), + distributedBudget: faker.string.alpha({ + length: { min: 10, max: 20 }, + }), + remainingBudget: faker.string.alpha({ length: { min: 10, max: 20 } }), + configuredHourlyEmission: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, + ]), + undefined, + ]), + apyCeiling: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.number.float({ fractionDigits: 2 }), + null, + ]), + undefined, + ]), + qualificationConfig: { + ...{ + type: faker.helpers.arrayElement( + Object.values(CampaignQualificationType), + ), + threshold: faker.string.alpha({ length: { min: 10, max: 20 } }), + maxIncentivizedTvlToken: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + null, ]), - }, + undefined, + ]), + }, + }, + startTime: faker.date.past().toISOString().slice(0, 19) + "Z", + endTime: faker.date.past().toISOString().slice(0, 19) + "Z", + lastProcessedHour: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.date.past().toISOString().slice(0, 19) + "Z", + null, + ]), + undefined, + ]), + nextPayoutDueAt: faker.helpers.arrayElement([ + faker.helpers.arrayElement([ + faker.date.past().toISOString().slice(0, 19) + "Z", + null, + ]), + undefined, + ]), + payoutFrequency: faker.helpers.arrayElement( + Object.values(CampaignPayoutFrequency), + ), + rewardToken: { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ 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", + "robinhood", + "robinhood-testnet", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "tempo", + "pharos", + "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, + ]), + }, + }); + +export const getTokensControllerGetTokensResponseMock = + (): TokensControllerGetTokens200 => ({ + ...{ + total: faker.number.float({ fractionDigits: 2 }), + offset: faker.number.float({ fractionDigits: 2 }), + limit: faker.number.float({ fractionDigits: 2 }), + }, + ...{ + items: faker.helpers.arrayElement([ + Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => ({ + token: { + ...{ + symbol: faker.string.alpha({ length: { min: 10, max: 20 } }), + name: faker.string.alpha({ length: { min: 10, max: 20 } }), + decimals: faker.number.float({ 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", + "robinhood", + "robinhood-testnet", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "tempo", + "pharos", + "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, - ]), - commission: faker.helpers.arrayElement([ - faker.number.float({ fractionDigits: 2 }), - 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({ fractionDigits: 2 }), - 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({ fractionDigits: 2 }), - undefined, - ]), - nominatorCount: faker.helpers.arrayElement([ - faker.number.float({ 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({ 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, - ]), + }, + availableYields: Array.from( + { length: faker.number.int({ min: 1, max: 10 }) }, + (_, i) => i + 1, + ).map(() => faker.string.alpha({ length: { min: 10, max: 20 } })), })), undefined, ]), @@ -11092,6 +13097,8 @@ export const getActionsControllerGetActionsResponseMock = type: faker.helpers.arrayElement([ "STAKE", "UNSTAKE", + "WITHDRAW_REQUEST", + "INSTANT_WITHDRAW", "CLAIM_REWARDS", "AUTO_SWEEP_UNSTAKE_REWARDS", "AUTO_SWEEP_WITHDRAW_REWARDS", @@ -11159,6 +13166,8 @@ export const getActionsControllerGetActionsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -11174,6 +13183,8 @@ export const getActionsControllerGetActionsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -11258,6 +13269,7 @@ export const getActionsControllerGetActionsResponseMock = "DEPOSIT", "APPROVAL", "STAKE", + "SET_OPERATOR", "CLAIM_UNSTAKED", "CLAIM_REWARDS", "RESTAKE_REWARDS", @@ -11394,6 +13406,14 @@ export const getActionsControllerGetActionsResponseMock = ), 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, + ]), validatorAddress: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, @@ -11439,6 +13459,8 @@ export const getActionsControllerGetActionsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -11454,6 +13476,8 @@ export const getActionsControllerGetActionsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -11547,6 +13571,8 @@ export const getActionsControllerGetActionsResponseMock = "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -11562,6 +13588,8 @@ export const getActionsControllerGetActionsResponseMock = "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -11675,6 +13703,10 @@ export const getActionsControllerGetActionsResponseMock = faker.datatype.boolean(), undefined, ]), + useAutoClaim: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), skipPrechecks: faker.helpers.arrayElement([ faker.datatype.boolean(), undefined, @@ -11740,6 +13772,8 @@ export const getActionsControllerGetActionResponseMock = ( type: faker.helpers.arrayElement([ "STAKE", "UNSTAKE", + "WITHDRAW_REQUEST", + "INSTANT_WITHDRAW", "CLAIM_REWARDS", "AUTO_SWEEP_UNSTAKE_REWARDS", "AUTO_SWEEP_WITHDRAW_REWARDS", @@ -11807,6 +13841,8 @@ export const getActionsControllerGetActionResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -11822,6 +13858,8 @@ export const getActionsControllerGetActionResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -11906,6 +13944,7 @@ export const getActionsControllerGetActionResponseMock = ( "DEPOSIT", "APPROVAL", "STAKE", + "SET_OPERATOR", "CLAIM_UNSTAKED", "CLAIM_REWARDS", "RESTAKE_REWARDS", @@ -12040,6 +14079,14 @@ export const getActionsControllerGetActionResponseMock = ( ).map(() => 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, + ]), validatorAddress: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, @@ -12083,6 +14130,8 @@ export const getActionsControllerGetActionResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -12098,6 +14147,8 @@ export const getActionsControllerGetActionResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -12191,6 +14242,8 @@ export const getActionsControllerGetActionResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -12206,6 +14259,8 @@ export const getActionsControllerGetActionResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -12319,6 +14374,10 @@ export const getActionsControllerGetActionResponseMock = ( faker.datatype.boolean(), undefined, ]), + useAutoClaim: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), skipPrechecks: faker.helpers.arrayElement([ faker.datatype.boolean(), undefined, @@ -12381,6 +14440,8 @@ export const getActionsControllerEnterYieldResponseMock = ( type: faker.helpers.arrayElement([ "STAKE", "UNSTAKE", + "WITHDRAW_REQUEST", + "INSTANT_WITHDRAW", "CLAIM_REWARDS", "AUTO_SWEEP_UNSTAKE_REWARDS", "AUTO_SWEEP_WITHDRAW_REWARDS", @@ -12448,6 +14509,8 @@ export const getActionsControllerEnterYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -12463,6 +14526,8 @@ export const getActionsControllerEnterYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -12547,6 +14612,7 @@ export const getActionsControllerEnterYieldResponseMock = ( "DEPOSIT", "APPROVAL", "STAKE", + "SET_OPERATOR", "CLAIM_UNSTAKED", "CLAIM_REWARDS", "RESTAKE_REWARDS", @@ -12681,6 +14747,14 @@ export const getActionsControllerEnterYieldResponseMock = ( ).map(() => 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, + ]), validatorAddress: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, @@ -12724,6 +14798,8 @@ export const getActionsControllerEnterYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -12739,6 +14815,8 @@ export const getActionsControllerEnterYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -12832,6 +14910,8 @@ export const getActionsControllerEnterYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -12847,6 +14927,8 @@ export const getActionsControllerEnterYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -12960,6 +15042,10 @@ export const getActionsControllerEnterYieldResponseMock = ( faker.datatype.boolean(), undefined, ]), + useAutoClaim: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), skipPrechecks: faker.helpers.arrayElement([ faker.datatype.boolean(), undefined, @@ -13022,6 +15108,8 @@ export const getActionsControllerExitYieldResponseMock = ( type: faker.helpers.arrayElement([ "STAKE", "UNSTAKE", + "WITHDRAW_REQUEST", + "INSTANT_WITHDRAW", "CLAIM_REWARDS", "AUTO_SWEEP_UNSTAKE_REWARDS", "AUTO_SWEEP_WITHDRAW_REWARDS", @@ -13089,6 +15177,8 @@ export const getActionsControllerExitYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -13104,6 +15194,8 @@ export const getActionsControllerExitYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -13188,6 +15280,7 @@ export const getActionsControllerExitYieldResponseMock = ( "DEPOSIT", "APPROVAL", "STAKE", + "SET_OPERATOR", "CLAIM_UNSTAKED", "CLAIM_REWARDS", "RESTAKE_REWARDS", @@ -13322,6 +15415,14 @@ export const getActionsControllerExitYieldResponseMock = ( ).map(() => 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, + ]), validatorAddress: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, @@ -13365,6 +15466,8 @@ export const getActionsControllerExitYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -13380,6 +15483,8 @@ export const getActionsControllerExitYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -13473,6 +15578,8 @@ export const getActionsControllerExitYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -13488,6 +15595,8 @@ export const getActionsControllerExitYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -13601,6 +15710,10 @@ export const getActionsControllerExitYieldResponseMock = ( faker.datatype.boolean(), undefined, ]), + useAutoClaim: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), skipPrechecks: faker.helpers.arrayElement([ faker.datatype.boolean(), undefined, @@ -13663,6 +15776,8 @@ export const getActionsControllerManageYieldResponseMock = ( type: faker.helpers.arrayElement([ "STAKE", "UNSTAKE", + "WITHDRAW_REQUEST", + "INSTANT_WITHDRAW", "CLAIM_REWARDS", "AUTO_SWEEP_UNSTAKE_REWARDS", "AUTO_SWEEP_WITHDRAW_REWARDS", @@ -13730,6 +15845,8 @@ export const getActionsControllerManageYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -13745,6 +15862,8 @@ export const getActionsControllerManageYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -13829,6 +15948,7 @@ export const getActionsControllerManageYieldResponseMock = ( "DEPOSIT", "APPROVAL", "STAKE", + "SET_OPERATOR", "CLAIM_UNSTAKED", "CLAIM_REWARDS", "RESTAKE_REWARDS", @@ -13963,6 +16083,14 @@ export const getActionsControllerManageYieldResponseMock = ( ).map(() => 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, + ]), validatorAddress: faker.helpers.arrayElement([ faker.string.alpha({ length: { min: 10, max: 20 } }), undefined, @@ -14006,6 +16134,8 @@ export const getActionsControllerManageYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -14021,6 +16151,8 @@ export const getActionsControllerManageYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -14114,6 +16246,8 @@ export const getActionsControllerManageYieldResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -14129,6 +16263,8 @@ export const getActionsControllerManageYieldResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -14242,6 +16378,10 @@ export const getActionsControllerManageYieldResponseMock = ( faker.datatype.boolean(), undefined, ]), + useAutoClaim: faker.helpers.arrayElement([ + faker.datatype.boolean(), + undefined, + ]), skipPrechecks: faker.helpers.arrayElement([ faker.datatype.boolean(), undefined, @@ -14320,6 +16460,8 @@ export const getTransactionsControllerSubmitTransactionHashResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -14335,6 +16477,8 @@ export const getTransactionsControllerSubmitTransactionHashResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -14419,6 +16563,7 @@ export const getTransactionsControllerSubmitTransactionHashResponseMock = ( "DEPOSIT", "APPROVAL", "STAKE", + "SET_OPERATOR", "CLAIM_UNSTAKED", "CLAIM_REWARDS", "RESTAKE_REWARDS", @@ -14558,6 +16703,8 @@ export const getTransactionsControllerSubmitTransactionResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -14573,6 +16720,8 @@ export const getTransactionsControllerSubmitTransactionResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -14657,6 +16806,7 @@ export const getTransactionsControllerSubmitTransactionResponseMock = ( "DEPOSIT", "APPROVAL", "STAKE", + "SET_OPERATOR", "CLAIM_UNSTAKED", "CLAIM_REWARDS", "RESTAKE_REWARDS", @@ -14796,6 +16946,8 @@ export const getTransactionsControllerGetTransactionResponseMock = ( "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -14811,6 +16963,8 @@ export const getTransactionsControllerGetTransactionResponseMock = ( "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -14895,6 +17049,7 @@ export const getTransactionsControllerGetTransactionResponseMock = ( "DEPOSIT", "APPROVAL", "STAKE", + "SET_OPERATOR", "CLAIM_UNSTAKED", "CLAIM_REWARDS", "RESTAKE_REWARDS", @@ -15010,6 +17165,23 @@ export const getTransactionsControllerGetTransactionResponseMock = ( ...overrideResponse, }); +export const getKycControllerGetStatusResponseMock = ( + overrideResponse: Partial> = {}, +): KycStatusResponseDto => ({ + kycStatus: faker.helpers.arrayElement([ + "not_required", + "not_started", + "pending", + "approved", + "rejected", + ] as const), + authorizeUrl: faker.helpers.arrayElement([ + faker.string.alpha({ length: { min: 10, max: 20 } }), + undefined, + ]), + ...overrideResponse, +}); + export const getNetworksControllerGetNetworksResponseMock = (): NetworkDto[] => Array.from( { length: faker.number.int({ min: 1, max: 10 }) }, @@ -15034,6 +17206,8 @@ export const getNetworksControllerGetNetworksResponseMock = (): NetworkDto[] => "unichain", "monad-testnet", "monad", + "robinhood", + "robinhood-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -15049,6 +17223,8 @@ export const getNetworksControllerGetNetworksResponseMock = (): NetworkDto[] => "plasma", "katana", "hyperevm", + "tempo", + "pharos", "agoric", "akash", "axelar", @@ -15272,10 +17448,10 @@ export const getYieldsControllerGetYieldMockHandler = ( export const getYieldsControllerGetYieldRiskMockHandler = ( overrideResponse?: - | RiskParameterDto[] + | YieldRiskDto | (( info: Parameters[1]>[0], - ) => Promise | RiskParameterDto[]), + ) => Promise | YieldRiskDto), options?: RequestHandlerOptions, ) => { return http.get( @@ -15444,6 +17620,58 @@ export const getYieldsControllerGetYieldValidatorsMockHandler = ( ); }; +export const getYieldsControllerGetYieldCampaignsMockHandler = ( + overrideResponse?: + | YieldsControllerGetYieldCampaigns200 + | (( + info: Parameters[1]>[0], + ) => + | Promise + | YieldsControllerGetYieldCampaigns200), + options?: RequestHandlerOptions, +) => { + return http.get( + "*/v1/yields/:yieldId/campaigns", + async (info: Parameters[1]>[0]) => { + return HttpResponse.json( + overrideResponse !== undefined + ? typeof overrideResponse === "function" + ? await overrideResponse(info) + : overrideResponse + : getYieldsControllerGetYieldCampaignsResponseMock(), + { status: 200 }, + ); + }, + options, + ); +}; + +export const getTokensControllerGetTokensMockHandler = ( + overrideResponse?: + | TokensControllerGetTokens200 + | (( + info: Parameters[1]>[0], + ) => + | Promise + | TokensControllerGetTokens200), + options?: RequestHandlerOptions, +) => { + return http.get( + "*/v1/tokens", + async (info: Parameters[1]>[0]) => { + return HttpResponse.json( + overrideResponse !== undefined + ? typeof overrideResponse === "function" + ? await overrideResponse(info) + : overrideResponse + : getTokensControllerGetTokensResponseMock(), + { status: 200 }, + ); + }, + options, + ); +}; + export const getActionsControllerGetActionsMockHandler = ( overrideResponse?: | ActionsControllerGetActions200 @@ -15638,6 +17866,30 @@ export const getTransactionsControllerGetTransactionMockHandler = ( ); }; +export const getKycControllerGetStatusMockHandler = ( + overrideResponse?: + | KycStatusResponseDto + | (( + info: Parameters[1]>[0], + ) => Promise | KycStatusResponseDto), + options?: RequestHandlerOptions, +) => { + return http.get( + "*/v1/yields/:yieldId/kyc/status", + async (info: Parameters[1]>[0]) => { + return HttpResponse.json( + overrideResponse !== undefined + ? typeof overrideResponse === "function" + ? await overrideResponse(info) + : overrideResponse + : getKycControllerGetStatusResponseMock(), + { status: 200 }, + ); + }, + options, + ); +}; + export const getNetworksControllerGetNetworksMockHandler = ( overrideResponse?: | NetworkDto[] @@ -15746,6 +17998,8 @@ export const getYieldXyzAPIMock = () => [ getYieldsControllerGetYieldRewardRateHistoryMockHandler(), getYieldsControllerGetYieldTvlHistoryMockHandler(), getYieldsControllerGetYieldValidatorsMockHandler(), + getYieldsControllerGetYieldCampaignsMockHandler(), + getTokensControllerGetTokensMockHandler(), getActionsControllerGetActionsMockHandler(), getActionsControllerGetActionMockHandler(), getActionsControllerEnterYieldMockHandler(), @@ -15754,6 +18008,7 @@ export const getYieldXyzAPIMock = () => [ getTransactionsControllerSubmitTransactionHashMockHandler(), getTransactionsControllerSubmitTransactionMockHandler(), getTransactionsControllerGetTransactionMockHandler(), + getKycControllerGetStatusMockHandler(), getNetworksControllerGetNetworksMockHandler(), getProvidersControllerGetProvidersMockHandler(), getProvidersControllerGetProviderMockHandler(), diff --git a/src/api/index.ts b/src/api/index.ts index 463d9be..7c13b54 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -8,22 +8,28 @@ import type { CreateActionDto, CreateManageActionDto, HealthStatusDto, + KycControllerGetStatusParams, + KycStatusResponseDto, NetworkDto, PaginatedResponseDto, ProviderDto, ProvidersControllerGetProviders200, ProvidersControllerGetProvidersParams, RewardRateHistoryResponseDto, - RiskParameterDto, SubmitHashDto, SubmitTransactionDto, + TokensControllerGetTokens200, + TokensControllerGetTokensParams, TransactionDto, TvlHistoryResponseDto, YieldBalancesDto, YieldBalancesRequestDto, YieldDto, + YieldRiskDto, YieldsControllerGetBalanceHistory200, YieldsControllerGetBalanceHistoryParams, + YieldsControllerGetYieldCampaigns200, + YieldsControllerGetYieldCampaignsParams, YieldsControllerGetYieldRewardRateHistoryParams, YieldsControllerGetYieldRewardsParams, YieldsControllerGetYields200, @@ -83,14 +89,14 @@ export const getYield = ( }; /** - * Retrieve risk metadata associated with a specific yield. - * @summary Get risk metadata for a yield + * Retrieve consolidated risk ratings from third-party providers for a yield. + * @summary Get risk ratings for a yield */ export const getYieldRisk = ( yieldId: string, - options?: SecondParameter>, + options?: SecondParameter>, ) => { - return customFetch( + return customFetch( { url: `/v1/yields/${yieldId}/risk`, method: "GET" }, options, ); @@ -195,6 +201,37 @@ export const getYieldValidators = ( ); }; +/** + * Returns campaign metadata for the given yield opportunity within the API key project scope. + * @summary Get yield campaigns + */ +export const getYieldCampaigns = ( + yieldId: string, + params?: YieldsControllerGetYieldCampaignsParams, + options?: SecondParameter< + typeof customFetch + >, +) => { + return customFetch( + { url: `/v1/yields/${yieldId}/campaigns`, method: "GET", params }, + options, + ); +}; + +/** + * Retrieve tokens that have at least one enabled yield available for this project. Optionally filter by one or more networks and yield types. Returns the full list by default; callers should respect `total` and use `offset`/`limit`, as a default page size may be introduced in future. + * @summary List tokens with available yields + */ +export const tokensGetTokens = ( + params?: TokensControllerGetTokensParams, + options?: SecondParameter>, +) => { + return customFetch( + { url: `/v1/tokens`, method: "GET", params }, + options, + ); +}; + /** * Retrieve all actions performed by a user, with optional filtering by yield, status, category, etc. In the future, this may include personalized action recommendations. * @summary Get user actions @@ -335,8 +372,23 @@ export const getTransaction = ( }; /** - * Retrieve a list of all supported networks that can be used for filtering yields and other operations. - * @summary List all available networks + * Returns the normalized KYC status for the given address. Yields without a KYC requirement return not_required. + * @summary Get the KYC status of an address for a yield + */ +export const kycGetStatus = ( + yieldId: string, + params: KycControllerGetStatusParams, + options?: SecondParameter>, +) => { + return customFetch( + { url: `/v1/yields/${yieldId}/kyc/status`, method: "GET", params }, + options, + ); +}; + +/** + * Retrieve networks with enabled yield opportunities for the authenticated project. + * @summary List enabled networks */ export const getNetworks = ( options?: SecondParameter>, @@ -418,6 +470,12 @@ export type GetYieldTvlHistoryResult = NonNullable< export type GetYieldValidatorsResult = NonNullable< Awaited> >; +export type GetYieldCampaignsResult = NonNullable< + Awaited> +>; +export type TokensGetTokensResult = NonNullable< + Awaited> +>; export type GetActionsResult = NonNullable< Awaited> >; @@ -442,6 +500,9 @@ export type SubmitTransactionResult = NonNullable< export type GetTransactionResult = NonNullable< Awaited> >; +export type KycGetStatusResult = NonNullable< + Awaited> +>; export type GetNetworksResult = NonNullable< Awaited> >; diff --git a/src/api/schemas/accrualSpecDto.ts b/src/api/schemas/accrualSpecDto.ts new file mode 100644 index 0000000..7d70c08 --- /dev/null +++ b/src/api/schemas/accrualSpecDto.ts @@ -0,0 +1,11 @@ +import type { AccrualSpecDtoStartsAt } from "./accrualSpecDtoStartsAt"; +import type { TimePeriodDto } from "./timePeriodDto"; + +export interface AccrualSpecDto { + /** When earning starts (subscription) / earn-through boundary (redemption): immediate, next_business_day, on_cycle_start, or on_settlement */ + startsAt: AccrualSpecDtoStartsAt; + /** Concrete accrual start date when known (ISO 8601, cron-filled) */ + startsAtDate?: string; + /** Minimum hold before redemption is allowed */ + minimumHold?: TimePeriodDto; +} diff --git a/src/api/schemas/accrualSpecDtoStartsAt.ts b/src/api/schemas/accrualSpecDtoStartsAt.ts new file mode 100644 index 0000000..6bd0181 --- /dev/null +++ b/src/api/schemas/accrualSpecDtoStartsAt.ts @@ -0,0 +1,12 @@ +/** + * When earning starts (subscription) / earn-through boundary (redemption): immediate, next_business_day, on_cycle_start, or on_settlement + */ +export type AccrualSpecDtoStartsAt = + (typeof AccrualSpecDtoStartsAt)[keyof typeof AccrualSpecDtoStartsAt]; + +export const AccrualSpecDtoStartsAt = { + immediate: "immediate", + next_business_day: "next_business_day", + on_cycle_start: "on_cycle_start", + on_settlement: "on_settlement", +} as const; diff --git a/src/api/schemas/actionArgumentsDto.ts b/src/api/schemas/actionArgumentsDto.ts index 45364ce..4632e08 100644 --- a/src/api/schemas/actionArgumentsDto.ts +++ b/src/api/schemas/actionArgumentsDto.ts @@ -8,6 +8,10 @@ export interface ActionArgumentsDto { amount?: string; /** Amounts in human-readable token units, not the smallest denomination. Precision up to the token's decimal places is supported. */ amounts?: string[]; + /** Share amount to withdraw */ + shareAmount?: string; + /** Share amount to withdraw in raw decimals */ + shareAmountRaw?: string; /** Validator address for single validator selection */ validatorAddress?: string; /** Multiple validator addresses */ @@ -46,6 +50,8 @@ export interface ActionArgumentsDto { useMaxAmount?: boolean; /** Use instant execution for exit (faster but may have fees) */ useInstantExecution?: boolean; + /** Authorize the redeem operator to auto-claim settled async redemptions (one-time per wallet) */ + useAutoClaim?: 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. */ diff --git a/src/api/schemas/actionArgumentsDtoInputTokenNetwork.ts b/src/api/schemas/actionArgumentsDtoInputTokenNetwork.ts index 3568910..bf9eaa9 100644 --- a/src/api/schemas/actionArgumentsDtoInputTokenNetwork.ts +++ b/src/api/schemas/actionArgumentsDtoInputTokenNetwork.ts @@ -23,6 +23,8 @@ export const ActionArgumentsDtoInputTokenNetwork = { unichain: "unichain", "monad-testnet": "monad-testnet", monad: "monad", + robinhood: "robinhood", + "robinhood-testnet": "robinhood-testnet", "avalanche-c": "avalanche-c", "avalanche-c-atomic": "avalanche-c-atomic", "avalanche-p": "avalanche-p", @@ -38,6 +40,8 @@ export const ActionArgumentsDtoInputTokenNetwork = { plasma: "plasma", katana: "katana", hyperevm: "hyperevm", + tempo: "tempo", + pharos: "pharos", agoric: "agoric", akash: "akash", axelar: "axelar", diff --git a/src/api/schemas/actionArgumentsDtoOutputTokenNetwork.ts b/src/api/schemas/actionArgumentsDtoOutputTokenNetwork.ts index 0f84d76..aa07733 100644 --- a/src/api/schemas/actionArgumentsDtoOutputTokenNetwork.ts +++ b/src/api/schemas/actionArgumentsDtoOutputTokenNetwork.ts @@ -23,6 +23,8 @@ export const ActionArgumentsDtoOutputTokenNetwork = { unichain: "unichain", "monad-testnet": "monad-testnet", monad: "monad", + robinhood: "robinhood", + "robinhood-testnet": "robinhood-testnet", "avalanche-c": "avalanche-c", "avalanche-c-atomic": "avalanche-c-atomic", "avalanche-p": "avalanche-p", @@ -38,6 +40,8 @@ export const ActionArgumentsDtoOutputTokenNetwork = { plasma: "plasma", katana: "katana", hyperevm: "hyperevm", + tempo: "tempo", + pharos: "pharos", agoric: "agoric", akash: "akash", axelar: "axelar", diff --git a/src/api/schemas/actionDtoType.ts b/src/api/schemas/actionDtoType.ts index f9ada2b..eb4aa86 100644 --- a/src/api/schemas/actionDtoType.ts +++ b/src/api/schemas/actionDtoType.ts @@ -6,6 +6,8 @@ export type ActionDtoType = (typeof ActionDtoType)[keyof typeof ActionDtoType]; export const ActionDtoType = { STAKE: "STAKE", UNSTAKE: "UNSTAKE", + WITHDRAW_REQUEST: "WITHDRAW_REQUEST", + INSTANT_WITHDRAW: "INSTANT_WITHDRAW", CLAIM_REWARDS: "CLAIM_REWARDS", AUTO_SWEEP_UNSTAKE_REWARDS: "AUTO_SWEEP_UNSTAKE_REWARDS", AUTO_SWEEP_WITHDRAW_REWARDS: "AUTO_SWEEP_WITHDRAW_REWARDS", diff --git a/src/api/schemas/actionsControllerGetActionsNetwork.ts b/src/api/schemas/actionsControllerGetActionsNetwork.ts index d4077d0..b070651 100644 --- a/src/api/schemas/actionsControllerGetActionsNetwork.ts +++ b/src/api/schemas/actionsControllerGetActionsNetwork.ts @@ -20,6 +20,8 @@ export const ActionsControllerGetActionsNetwork = { unichain: "unichain", "monad-testnet": "monad-testnet", monad: "monad", + robinhood: "robinhood", + "robinhood-testnet": "robinhood-testnet", "avalanche-c": "avalanche-c", "avalanche-c-atomic": "avalanche-c-atomic", "avalanche-p": "avalanche-p", @@ -35,6 +37,8 @@ export const ActionsControllerGetActionsNetwork = { plasma: "plasma", katana: "katana", hyperevm: "hyperevm", + tempo: "tempo", + pharos: "pharos", agoric: "agoric", akash: "akash", axelar: "axelar", diff --git a/src/api/schemas/actionsControllerGetActionsParams.ts b/src/api/schemas/actionsControllerGetActionsParams.ts index 4ceb4bf..a30e495 100644 --- a/src/api/schemas/actionsControllerGetActionsParams.ts +++ b/src/api/schemas/actionsControllerGetActionsParams.ts @@ -3,6 +3,7 @@ import type { ActionsControllerGetActionsNetwork } from "./actionsControllerGetA import type { ActionsControllerGetActionsStatus } from "./actionsControllerGetActionsStatus"; import type { ActionsControllerGetActionsStatusesItem } from "./actionsControllerGetActionsStatusesItem"; import type { ActionsControllerGetActionsType } from "./actionsControllerGetActionsType"; +import type { ActionsControllerGetActionsYieldTypesItem } from "./actionsControllerGetActionsYieldTypesItem"; export type ActionsControllerGetActionsParams = { /** @@ -40,6 +41,10 @@ export type ActionsControllerGetActionsParams = { * Filter actions by specific yield */ yieldId?: string; + /** + * Filter actions by multiple yield types (supports CSV or repeated query params) + */ + yieldTypes?: ActionsControllerGetActionsYieldTypesItem[]; /** * Filter by network */ diff --git a/src/api/schemas/actionsControllerGetActionsType.ts b/src/api/schemas/actionsControllerGetActionsType.ts index 21d3947..70881dc 100644 --- a/src/api/schemas/actionsControllerGetActionsType.ts +++ b/src/api/schemas/actionsControllerGetActionsType.ts @@ -4,6 +4,8 @@ export type ActionsControllerGetActionsType = export const ActionsControllerGetActionsType = { STAKE: "STAKE", UNSTAKE: "UNSTAKE", + WITHDRAW_REQUEST: "WITHDRAW_REQUEST", + INSTANT_WITHDRAW: "INSTANT_WITHDRAW", CLAIM_REWARDS: "CLAIM_REWARDS", AUTO_SWEEP_UNSTAKE_REWARDS: "AUTO_SWEEP_UNSTAKE_REWARDS", AUTO_SWEEP_WITHDRAW_REWARDS: "AUTO_SWEEP_WITHDRAW_REWARDS", diff --git a/src/api/schemas/actionsControllerGetActionsYieldTypesItem.ts b/src/api/schemas/actionsControllerGetActionsYieldTypesItem.ts new file mode 100644 index 0000000..cc2d168 --- /dev/null +++ b/src/api/schemas/actionsControllerGetActionsYieldTypesItem.ts @@ -0,0 +1,14 @@ +export type ActionsControllerGetActionsYieldTypesItem = + (typeof ActionsControllerGetActionsYieldTypesItem)[keyof typeof ActionsControllerGetActionsYieldTypesItem]; + +export const ActionsControllerGetActionsYieldTypesItem = { + staking: "staking", + restaking: "restaking", + lending: "lending", + vault: "vault", + fixed_yield: "fixed_yield", + real_world_asset: "real_world_asset", + concentrated_liquidity_pool: "concentrated_liquidity_pool", + liquidity_pool: "liquidity_pool", + liquid_staking: "liquid_staking", +} as const; diff --git a/src/api/schemas/actionsQueryDto.ts b/src/api/schemas/actionsQueryDto.ts index 44400ae..049fe98 100644 --- a/src/api/schemas/actionsQueryDto.ts +++ b/src/api/schemas/actionsQueryDto.ts @@ -3,6 +3,7 @@ import type { ActionsQueryDtoNetwork } from "./actionsQueryDtoNetwork"; import type { ActionsQueryDtoStatus } from "./actionsQueryDtoStatus"; import type { ActionsQueryDtoStatusesItem } from "./actionsQueryDtoStatusesItem"; import type { ActionsQueryDtoType } from "./actionsQueryDtoType"; +import type { ActionsQueryDtoYieldTypesItem } from "./actionsQueryDtoYieldTypesItem"; export interface ActionsQueryDto { /** @@ -28,6 +29,8 @@ export interface ActionsQueryDto { type?: ActionsQueryDtoType; /** Filter by yield ID */ yieldId?: string; + /** Filter by multiple yield types (supports CSV or repeated query params) */ + yieldTypes?: ActionsQueryDtoYieldTypesItem[]; /** Filter by network */ network?: ActionsQueryDtoNetwork; } diff --git a/src/api/schemas/actionsQueryDtoNetwork.ts b/src/api/schemas/actionsQueryDtoNetwork.ts index 5a4671e..79299a8 100644 --- a/src/api/schemas/actionsQueryDtoNetwork.ts +++ b/src/api/schemas/actionsQueryDtoNetwork.ts @@ -23,6 +23,8 @@ export const ActionsQueryDtoNetwork = { unichain: "unichain", "monad-testnet": "monad-testnet", monad: "monad", + robinhood: "robinhood", + "robinhood-testnet": "robinhood-testnet", "avalanche-c": "avalanche-c", "avalanche-c-atomic": "avalanche-c-atomic", "avalanche-p": "avalanche-p", @@ -38,6 +40,8 @@ export const ActionsQueryDtoNetwork = { plasma: "plasma", katana: "katana", hyperevm: "hyperevm", + tempo: "tempo", + pharos: "pharos", agoric: "agoric", akash: "akash", axelar: "axelar", diff --git a/src/api/schemas/actionsQueryDtoType.ts b/src/api/schemas/actionsQueryDtoType.ts index c63d8ac..cf203e7 100644 --- a/src/api/schemas/actionsQueryDtoType.ts +++ b/src/api/schemas/actionsQueryDtoType.ts @@ -7,6 +7,8 @@ export type ActionsQueryDtoType = export const ActionsQueryDtoType = { STAKE: "STAKE", UNSTAKE: "UNSTAKE", + WITHDRAW_REQUEST: "WITHDRAW_REQUEST", + INSTANT_WITHDRAW: "INSTANT_WITHDRAW", CLAIM_REWARDS: "CLAIM_REWARDS", AUTO_SWEEP_UNSTAKE_REWARDS: "AUTO_SWEEP_UNSTAKE_REWARDS", AUTO_SWEEP_WITHDRAW_REWARDS: "AUTO_SWEEP_WITHDRAW_REWARDS", diff --git a/src/api/schemas/actionsQueryDtoYieldTypesItem.ts b/src/api/schemas/actionsQueryDtoYieldTypesItem.ts new file mode 100644 index 0000000..710f375 --- /dev/null +++ b/src/api/schemas/actionsQueryDtoYieldTypesItem.ts @@ -0,0 +1,14 @@ +export type ActionsQueryDtoYieldTypesItem = + (typeof ActionsQueryDtoYieldTypesItem)[keyof typeof ActionsQueryDtoYieldTypesItem]; + +export const ActionsQueryDtoYieldTypesItem = { + staking: "staking", + restaking: "restaking", + lending: "lending", + vault: "vault", + fixed_yield: "fixed_yield", + real_world_asset: "real_world_asset", + concentrated_liquidity_pool: "concentrated_liquidity_pool", + liquidity_pool: "liquidity_pool", + liquid_staking: "liquid_staking", +} as const; diff --git a/src/api/schemas/allocationDtoNetwork.ts b/src/api/schemas/allocationDtoNetwork.ts index 66e0109..870b645 100644 --- a/src/api/schemas/allocationDtoNetwork.ts +++ b/src/api/schemas/allocationDtoNetwork.ts @@ -23,6 +23,8 @@ export const AllocationDtoNetwork = { unichain: "unichain", "monad-testnet": "monad-testnet", monad: "monad", + robinhood: "robinhood", + "robinhood-testnet": "robinhood-testnet", "avalanche-c": "avalanche-c", "avalanche-c-atomic": "avalanche-c-atomic", "avalanche-p": "avalanche-p", @@ -38,6 +40,8 @@ export const AllocationDtoNetwork = { plasma: "plasma", katana: "katana", hyperevm: "hyperevm", + tempo: "tempo", + pharos: "pharos", agoric: "agoric", akash: "akash", axelar: "axelar", diff --git a/src/api/schemas/argumentFieldDtoName.ts b/src/api/schemas/argumentFieldDtoName.ts index 7a0b4a4..31f63e6 100644 --- a/src/api/schemas/argumentFieldDtoName.ts +++ b/src/api/schemas/argumentFieldDtoName.ts @@ -7,6 +7,8 @@ export type ArgumentFieldDtoName = export const ArgumentFieldDtoName = { amount: "amount", amounts: "amounts", + shareAmount: "shareAmount", + shareAmountRaw: "shareAmountRaw", validatorAddress: "validatorAddress", validatorAddresses: "validatorAddresses", receiverAddress: "receiverAddress", @@ -27,6 +29,7 @@ export const ArgumentFieldDtoName = { ledgerWalletApiCompatible: "ledgerWalletApiCompatible", useMaxAmount: "useMaxAmount", useInstantExecution: "useInstantExecution", + useAutoClaim: "useAutoClaim", rangeMin: "rangeMin", rangeMax: "rangeMax", percentage: "percentage", diff --git a/src/api/schemas/balanceHistorySnapshotDto.ts b/src/api/schemas/balanceHistorySnapshotDto.ts index b3feb2c..511a712 100644 --- a/src/api/schemas/balanceHistorySnapshotDto.ts +++ b/src/api/schemas/balanceHistorySnapshotDto.ts @@ -1,4 +1,5 @@ import type { BalanceDto } from "./balanceDto"; +import type { BalanceHistorySnapshotPeriodDeltaDto } from "./balanceHistorySnapshotPeriodDeltaDto"; export interface BalanceHistorySnapshotDto { /** Timestamp of this snapshot (ISO 8601) */ @@ -9,4 +10,6 @@ export interface BalanceHistorySnapshotDto { yieldId: string; /** Balance entries at this point in time */ balances: BalanceDto[]; + /** Balance delta during this period vs the previous snapshot. Omitted for point-in-time (blockNumber) queries. */ + periodDelta?: BalanceHistorySnapshotPeriodDeltaDto; } diff --git a/src/api/schemas/balanceHistorySnapshotPeriodDeltaDto.ts b/src/api/schemas/balanceHistorySnapshotPeriodDeltaDto.ts new file mode 100644 index 0000000..0e23f09 --- /dev/null +++ b/src/api/schemas/balanceHistorySnapshotPeriodDeltaDto.ts @@ -0,0 +1,10 @@ +export interface BalanceHistorySnapshotPeriodDeltaDto { + /** Net vault share balance change from indexed transfers during this period */ + shareAmount: string; + /** Net vault share balance change in base units (wei) */ + shareAmountRaw: string; + /** Net change in underlying position vs the previous snapshot (includes price-per-share effects) */ + amount: string; + /** Net underlying position change in base units */ + amountRaw: string; +} diff --git a/src/api/schemas/campaignPayoutFrequency.ts b/src/api/schemas/campaignPayoutFrequency.ts new file mode 100644 index 0000000..7807d4a --- /dev/null +++ b/src/api/schemas/campaignPayoutFrequency.ts @@ -0,0 +1,9 @@ +export type CampaignPayoutFrequency = + (typeof CampaignPayoutFrequency)[keyof typeof CampaignPayoutFrequency]; + +export const CampaignPayoutFrequency = { + weekly: "weekly", + daily: "daily", + six_hourly: "six_hourly", + end_of_campaign: "end_of_campaign", +} as const; diff --git a/src/api/schemas/campaignQualificationConfigDto.ts b/src/api/schemas/campaignQualificationConfigDto.ts new file mode 100644 index 0000000..9e7633b --- /dev/null +++ b/src/api/schemas/campaignQualificationConfigDto.ts @@ -0,0 +1,12 @@ +import type { CampaignQualificationType } from "./campaignQualificationType"; + +export interface CampaignQualificationConfigDto { + type: CampaignQualificationType; + /** Minimum qualifying token amount balance. */ + threshold: string; + /** + * Optional per-user token cap. + * @nullable + */ + maxIncentivizedTvlToken?: string | null; +} diff --git a/src/api/schemas/campaignQualificationType.ts b/src/api/schemas/campaignQualificationType.ts new file mode 100644 index 0000000..d947fae --- /dev/null +++ b/src/api/schemas/campaignQualificationType.ts @@ -0,0 +1,6 @@ +export type CampaignQualificationType = + (typeof CampaignQualificationType)[keyof typeof CampaignQualificationType]; + +export const CampaignQualificationType = { + min_token_amount: "min_token_amount", +} as const; diff --git a/src/api/schemas/campaignRewardMode.ts b/src/api/schemas/campaignRewardMode.ts new file mode 100644 index 0000000..fa6df0e --- /dev/null +++ b/src/api/schemas/campaignRewardMode.ts @@ -0,0 +1,7 @@ +export type CampaignRewardMode = + (typeof CampaignRewardMode)[keyof typeof CampaignRewardMode]; + +export const CampaignRewardMode = { + normal: "normal", + compound: "compound", +} as const; diff --git a/src/api/schemas/campaignStatus.ts b/src/api/schemas/campaignStatus.ts new file mode 100644 index 0000000..cf9c2e2 --- /dev/null +++ b/src/api/schemas/campaignStatus.ts @@ -0,0 +1,9 @@ +export type CampaignStatus = + (typeof CampaignStatus)[keyof typeof CampaignStatus]; + +export const CampaignStatus = { + draft: "draft", + active: "active", + paused: "paused", + ended: "ended", +} as const; diff --git a/src/api/schemas/createManageActionDtoAction.ts b/src/api/schemas/createManageActionDtoAction.ts index 4aff050..c77e4b9 100644 --- a/src/api/schemas/createManageActionDtoAction.ts +++ b/src/api/schemas/createManageActionDtoAction.ts @@ -7,6 +7,8 @@ export type CreateManageActionDtoAction = export const CreateManageActionDtoAction = { STAKE: "STAKE", UNSTAKE: "UNSTAKE", + WITHDRAW_REQUEST: "WITHDRAW_REQUEST", + INSTANT_WITHDRAW: "INSTANT_WITHDRAW", CLAIM_REWARDS: "CLAIM_REWARDS", AUTO_SWEEP_UNSTAKE_REWARDS: "AUTO_SWEEP_UNSTAKE_REWARDS", AUTO_SWEEP_WITHDRAW_REWARDS: "AUTO_SWEEP_WITHDRAW_REWARDS", diff --git a/src/api/schemas/executionContractsDto.ts b/src/api/schemas/executionContractsDto.ts new file mode 100644 index 0000000..93b27e6 --- /dev/null +++ b/src/api/schemas/executionContractsDto.ts @@ -0,0 +1,6 @@ +export interface ExecutionContractsDto { + /** Contract addresses that may appear as tx.to for enter transactions */ + enter?: string[]; + /** Contract addresses that may appear as tx.to for exit transactions */ + exit?: string[]; +} diff --git a/src/api/schemas/index.ts b/src/api/schemas/index.ts index bfe6d96..b38f221 100644 --- a/src/api/schemas/index.ts +++ b/src/api/schemas/index.ts @@ -1,3 +1,5 @@ +export * from "./accrualSpecDto"; +export * from "./accrualSpecDtoStartsAt"; export * from "./actionArgumentsDto"; export * from "./actionArgumentsDtoExecutionMode"; export * from "./actionArgumentsDtoInputTokenNetwork"; @@ -33,6 +35,7 @@ export * from "./actionsControllerGetActionsParams"; export * from "./actionsControllerGetActionsStatus"; export * from "./actionsControllerGetActionsStatusesItem"; export * from "./actionsControllerGetActionsType"; +export * from "./actionsControllerGetActionsYieldTypesItem"; export * from "./actionsControllerManageYield400"; export * from "./actionsControllerManageYield401"; export * from "./actionsControllerManageYield403"; @@ -44,6 +47,7 @@ export * from "./actionsQueryDtoNetwork"; export * from "./actionsQueryDtoStatus"; export * from "./actionsQueryDtoStatusesItem"; export * from "./actionsQueryDtoType"; +export * from "./actionsQueryDtoYieldTypesItem"; export * from "./allocationDto"; export * from "./allocationDtoNetwork"; export * from "./allocationRewardRateDto"; @@ -55,10 +59,16 @@ export * from "./argumentSchemaDto"; export * from "./balanceDto"; export * from "./balanceDtoPriceRange"; export * from "./balanceHistorySnapshotDto"; +export * from "./balanceHistorySnapshotPeriodDeltaDto"; export * from "./balancesQueryDto"; export * from "./balancesRequestDto"; export * from "./balancesResponseDto"; export * from "./balanceType"; +export * from "./campaignPayoutFrequency"; +export * from "./campaignQualificationConfigDto"; +export * from "./campaignQualificationType"; +export * from "./campaignRewardMode"; +export * from "./campaignStatus"; export * from "./capacityDto"; export * from "./concentratedLiquidityPoolStateDto"; export * from "./createActionDto"; @@ -69,9 +79,24 @@ export * from "./curatorDtoDescription"; export * from "./curatorDtoLogoURI"; export * from "./curatorDtoName"; export * from "./eRCStandards"; +export * from "./executionContractsDto"; export * from "./getBalancesArgumentsDto"; export * from "./healthStatus"; export * from "./healthStatusDto"; +export * from "./investmentScheduleDto"; +export * from "./investorEligibilityEntryDto"; +export * from "./investorEligibilityEntryDtoTier"; +export * from "./investorEligibilityEntryDtoVerificationLevel"; +export * from "./kycControllerGetStatus401"; +export * from "./kycControllerGetStatus429"; +export * from "./kycControllerGetStatusParams"; +export * from "./kycEligibilityDto"; +export * from "./kycEligibilityDtoDefaultPolicy"; +export * from "./kycEligibilityDtoSubjectTypesItem"; +export * from "./kycMetadataDto"; +export * from "./kycMetadataDtoKycMode"; +export * from "./kycStatusResponseDto"; +export * from "./kycStatusResponseDtoKycStatus"; export * from "./liquidityStateDto"; export * from "./liquidityStateDtoLiquidity"; export * from "./liquidityStateDtoUtilization"; @@ -85,6 +110,8 @@ export * from "./networksControllerGetNetworks429"; export * from "./networksControllerGetNetworks500"; export * from "./paginatedResponseDto"; export * from "./paginationQueryDto"; +export * from "./pathFeeDto"; +export * from "./pathLimitsDto"; export * from "./pendingActionDto"; export * from "./pendingActionDtoIntent"; export * from "./pendingActionDtoType"; @@ -114,16 +141,27 @@ 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 "./schedulePathDto"; +export * from "./schedulePathDtoCadence"; +export * from "./schedulePathDtoKind"; +export * from "./schedulePathDtoStatus"; +export * from "./settlementSpecDto"; +export * from "./settlementSpecDtoType"; +export * from "./sideScheduleDto"; export * from "./submitHashDto"; export * from "./submitTransactionDto"; export * from "./timePeriodDto"; export * from "./tokenDto"; export * from "./tokenDtoNetwork"; +export * from "./tokensControllerGetTokens200"; +export * from "./tokensControllerGetTokens400"; +export * from "./tokensControllerGetTokens401"; +export * from "./tokensControllerGetTokens429"; +export * from "./tokensControllerGetTokens500"; +export * from "./tokensControllerGetTokensNetworksItem"; +export * from "./tokensControllerGetTokensParams"; +export * from "./tokensControllerGetTokensYieldTypesItem"; +export * from "./tokenWithAvailableYieldsDto"; export * from "./transactionDto"; export * from "./transactionDtoAnnotatedTransaction"; export * from "./transactionDtoNetwork"; @@ -149,12 +187,21 @@ export * from "./validatorProviderDto"; export * from "./validatorProviderDtoTvlUsd"; export * from "./validatorProviderDtoType"; export * from "./validatorQueryDto"; +export * from "./validatorSubnetDto"; +export * from "./windowBoundsDto"; +export * from "./windowBoundsDtoSource"; export * from "./yieldBalancesDto"; export * from "./yieldBalancesRequestDto"; +export * from "./yieldCampaignDto"; export * from "./yieldDto"; export * from "./yieldDtoNetwork"; export * from "./yieldEntryLimitsDto"; export * from "./yieldErrorDto"; +export * from "./yieldFeeConfigurationDto"; +export * from "./yieldFeeConfigurationDtoAllocatorVaultContractAddress"; +export * from "./yieldFeeConfigurationDtoDepositFeeBps"; +export * from "./yieldFeeConfigurationDtoManagementFeeBps"; +export * from "./yieldFeeConfigurationDtoPerformanceFeeBps"; export * from "./yieldFeeDto"; export * from "./yieldMechanicsArgumentsDto"; export * from "./yieldMechanicsArgumentsDtoManage"; @@ -174,11 +221,25 @@ 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 "./yieldRiskEntryDto"; +export * from "./yieldRiskEntryDtoSource"; +export * from "./yieldRiskStakingRewardsDto"; +export * from "./yieldRiskStakingRewardsDtoChain"; +export * from "./yieldRiskStakingRewardsDtoContractAddress"; +export * from "./yieldRiskStakingRewardsDtoPotentialRating"; +export * from "./yieldRiskStakingRewardsDtoPotentialScore"; +export * from "./yieldRiskStakingRewardsDtoProfileUrl"; +export * from "./yieldRiskStakingRewardsDtoProviderName"; +export * from "./yieldRiskStakingRewardsDtoRatedAt"; +export * from "./yieldRiskStakingRewardsDtoRatedSince"; +export * from "./yieldRiskStakingRewardsDtoRating"; +export * from "./yieldRiskStakingRewardsDtoReportUrl"; +export * from "./yieldRiskStakingRewardsDtoScore"; +export * from "./yieldRiskStakingRewardsDtoType"; +export * from "./yieldRiskStakingRewardsDtoVersion"; +export * from "./yieldRiskStakingRewardsMetricsDto"; +export * from "./yieldRiskStakingRewardsMetricsDtoUsers"; +export * from "./yieldRiskSummaryDto"; export * from "./yieldStateDto"; export * from "./yieldStatisticsDto"; export * from "./yieldStatusDto"; @@ -202,6 +263,12 @@ export * from "./yieldsControllerGetYieldBalances400"; export * from "./yieldsControllerGetYieldBalances401"; export * from "./yieldsControllerGetYieldBalances429"; export * from "./yieldsControllerGetYieldBalances500"; +export * from "./yieldsControllerGetYieldCampaigns200"; +export * from "./yieldsControllerGetYieldCampaigns400"; +export * from "./yieldsControllerGetYieldCampaigns401"; +export * from "./yieldsControllerGetYieldCampaigns429"; +export * from "./yieldsControllerGetYieldCampaigns500"; +export * from "./yieldsControllerGetYieldCampaignsParams"; export * from "./yieldsControllerGetYieldRewardRateHistory400"; export * from "./yieldsControllerGetYieldRewardRateHistory401"; export * from "./yieldsControllerGetYieldRewardRateHistory429"; @@ -242,4 +309,7 @@ export * from "./yieldsControllerGetYieldValidators401"; export * from "./yieldsControllerGetYieldValidators429"; export * from "./yieldsControllerGetYieldValidators500"; export * from "./yieldsControllerGetYieldValidatorsParams"; +export * from "./yieldTokensQueryDto"; +export * from "./yieldTokensQueryDtoNetworksItem"; +export * from "./yieldTokensQueryDtoYieldTypesItem"; export * from "./yieldType"; diff --git a/src/api/schemas/investmentScheduleDto.ts b/src/api/schemas/investmentScheduleDto.ts new file mode 100644 index 0000000..3872240 --- /dev/null +++ b/src/api/schemas/investmentScheduleDto.ts @@ -0,0 +1,12 @@ +import type { SideScheduleDto } from "./sideScheduleDto"; + +export interface InvestmentScheduleDto { + /** Issuer operating timezone (IANA); cutoff times and business days resolve against this */ + timezone: string; + /** Subscription (enter) side */ + subscription: SideScheduleDto; + /** Redemption (exit) side */ + redemption: SideScheduleDto; + /** Free-form footnotes from the issuer */ + notes?: string; +} diff --git a/src/api/schemas/investorEligibilityEntryDto.ts b/src/api/schemas/investorEligibilityEntryDto.ts new file mode 100644 index 0000000..3c5927d --- /dev/null +++ b/src/api/schemas/investorEligibilityEntryDto.ts @@ -0,0 +1,13 @@ +import type { InvestorEligibilityEntryDtoTier } from "./investorEligibilityEntryDtoTier"; +import type { InvestorEligibilityEntryDtoVerificationLevel } from "./investorEligibilityEntryDtoVerificationLevel"; + +export interface InvestorEligibilityEntryDto { + /** ISO-3166-1 alpha-2 country code, "EEA", "GCC", or "*" for any jurisdiction */ + jurisdiction: string; + /** Investor tier required to participate in this jurisdiction */ + tier: InvestorEligibilityEntryDtoTier; + /** How the user's tier must be verified */ + verificationLevel: InvestorEligibilityEntryDtoVerificationLevel; + /** Re-verification interval in days, if required */ + expiresAfterDays?: number; +} diff --git a/src/api/schemas/investorEligibilityEntryDtoTier.ts b/src/api/schemas/investorEligibilityEntryDtoTier.ts new file mode 100644 index 0000000..4fbb9b1 --- /dev/null +++ b/src/api/schemas/investorEligibilityEntryDtoTier.ts @@ -0,0 +1,25 @@ +/** + * Investor tier required to participate in this jurisdiction + */ +export type InvestorEligibilityEntryDtoTier = + (typeof InvestorEligibilityEntryDtoTier)[keyof typeof InvestorEligibilityEntryDtoTier]; + +export const InvestorEligibilityEntryDtoTier = { + us_retail: "us_retail", + us_accredited: "us_accredited", + us_qualified_purchaser: "us_qualified_purchaser", + eu_retail: "eu_retail", + eu_professional: "eu_professional", + eu_professional_optup: "eu_professional_optup", + eu_eligible_counterparty: "eu_eligible_counterparty", + uk_retail: "uk_retail", + uk_professional: "uk_professional", + ch_qualified: "ch_qualified", + sg_ai: "sg_ai", + sg_ii: "sg_ii", + hk_pi: "hk_pi", + my_sophisticated: "my_sophisticated", + br_qi: "br_qi", + br_pi: "br_pi", + ae_professional: "ae_professional", +} as const; diff --git a/src/api/schemas/investorEligibilityEntryDtoVerificationLevel.ts b/src/api/schemas/investorEligibilityEntryDtoVerificationLevel.ts new file mode 100644 index 0000000..5ceec6c --- /dev/null +++ b/src/api/schemas/investorEligibilityEntryDtoVerificationLevel.ts @@ -0,0 +1,12 @@ +/** + * How the user's tier must be verified + */ +export type InvestorEligibilityEntryDtoVerificationLevel = + (typeof InvestorEligibilityEntryDtoVerificationLevel)[keyof typeof InvestorEligibilityEntryDtoVerificationLevel]; + +export const InvestorEligibilityEntryDtoVerificationLevel = { + self_attested: "self_attested", + verified_documentation: "verified_documentation", + letter: "letter", + third_party_attestation: "third_party_attestation", +} as const; diff --git a/src/api/schemas/kycControllerGetStatus401.ts b/src/api/schemas/kycControllerGetStatus401.ts new file mode 100644 index 0000000..f80d9d5 --- /dev/null +++ b/src/api/schemas/kycControllerGetStatus401.ts @@ -0,0 +1,5 @@ +export type KycControllerGetStatus401 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/kycControllerGetStatus429.ts b/src/api/schemas/kycControllerGetStatus429.ts new file mode 100644 index 0000000..80b75dc --- /dev/null +++ b/src/api/schemas/kycControllerGetStatus429.ts @@ -0,0 +1,6 @@ +export type KycControllerGetStatus429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; diff --git a/src/api/schemas/kycControllerGetStatusParams.ts b/src/api/schemas/kycControllerGetStatusParams.ts new file mode 100644 index 0000000..5a38b97 --- /dev/null +++ b/src/api/schemas/kycControllerGetStatusParams.ts @@ -0,0 +1,6 @@ +export type KycControllerGetStatusParams = { + /** + * Wallet address to check KYC status for + */ + address: string; +}; diff --git a/src/api/schemas/kycEligibilityDto.ts b/src/api/schemas/kycEligibilityDto.ts new file mode 100644 index 0000000..dc02025 --- /dev/null +++ b/src/api/schemas/kycEligibilityDto.ts @@ -0,0 +1,20 @@ +import type { InvestorEligibilityEntryDto } from "./investorEligibilityEntryDto"; +import type { KycEligibilityDtoDefaultPolicy } from "./kycEligibilityDtoDefaultPolicy"; +import type { KycEligibilityDtoSubjectTypesItem } from "./kycEligibilityDtoSubjectTypesItem"; + +export interface KycEligibilityDto { + /** Policy applied when the user jurisdiction is not explicitly listed */ + defaultPolicy: KycEligibilityDtoDefaultPolicy; + /** Jurisdictions where this opportunity is offered (ISO-3166-1 alpha-2, or "EEA"/"GCC"). May be empty. */ + countries: string[]; + /** Blocked jurisdictions (ISO-3166-1 alpha-2) */ + blockedCountries: string[]; + /** Blocked subdivisions (ISO-3166-2, e.g. "UA-43") */ + blockedSubdivisions: string[]; + /** Whether US persons are eligible */ + usPersonAllowed: boolean; + /** Investor-tier requirements per jurisdiction. Empty means no tier requirement. */ + investorEligibility: InvestorEligibilityEntryDto[]; + /** Acceptable subject types (individual KYC and/or business KYB) */ + subjectTypes: KycEligibilityDtoSubjectTypesItem[]; +} diff --git a/src/api/schemas/kycEligibilityDtoDefaultPolicy.ts b/src/api/schemas/kycEligibilityDtoDefaultPolicy.ts new file mode 100644 index 0000000..546b2de --- /dev/null +++ b/src/api/schemas/kycEligibilityDtoDefaultPolicy.ts @@ -0,0 +1,10 @@ +/** + * Policy applied when the user jurisdiction is not explicitly listed + */ +export type KycEligibilityDtoDefaultPolicy = + (typeof KycEligibilityDtoDefaultPolicy)[keyof typeof KycEligibilityDtoDefaultPolicy]; + +export const KycEligibilityDtoDefaultPolicy = { + deny: "deny", + allow: "allow", +} as const; diff --git a/src/api/schemas/kycEligibilityDtoSubjectTypesItem.ts b/src/api/schemas/kycEligibilityDtoSubjectTypesItem.ts new file mode 100644 index 0000000..6505754 --- /dev/null +++ b/src/api/schemas/kycEligibilityDtoSubjectTypesItem.ts @@ -0,0 +1,7 @@ +export type KycEligibilityDtoSubjectTypesItem = + (typeof KycEligibilityDtoSubjectTypesItem)[keyof typeof KycEligibilityDtoSubjectTypesItem]; + +export const KycEligibilityDtoSubjectTypesItem = { + KYC: "KYC", + KYB: "KYB", +} as const; diff --git a/src/api/schemas/kycMetadataDto.ts b/src/api/schemas/kycMetadataDto.ts new file mode 100644 index 0000000..8414d42 --- /dev/null +++ b/src/api/schemas/kycMetadataDto.ts @@ -0,0 +1,16 @@ +import type { KycEligibilityDto } from "./kycEligibilityDto"; +import type { KycMetadataDtoKycMode } from "./kycMetadataDtoKycMode"; + +export interface KycMetadataDto { + /** How the issuer KYC flow is delivered */ + kycMode: KycMetadataDtoKycMode; + /** Whether the issuer KYC page may be embedded in an iframe */ + iframeAllowed: boolean; + /** URL of the issuer-hosted KYC page (HTTPS) */ + authorizeUrl?: string; + /** Human-readable notes about the KYC requirement */ + notes?: string; + eligibility: KycEligibilityDto; + /** URL of a regulator-mandated disclosure document (HTTPS) */ + mandatoryDisclosureUrl?: string; +} diff --git a/src/api/schemas/kycMetadataDtoKycMode.ts b/src/api/schemas/kycMetadataDtoKycMode.ts new file mode 100644 index 0000000..87d2776 --- /dev/null +++ b/src/api/schemas/kycMetadataDtoKycMode.ts @@ -0,0 +1,14 @@ +/** + * How the issuer KYC flow is delivered + */ +export type KycMetadataDtoKycMode = + (typeof KycMetadataDtoKycMode)[keyof typeof KycMetadataDtoKycMode]; + +export const KycMetadataDtoKycMode = { + none: "none", + oauth_redirect: "oauth_redirect", + external_redirect: "external_redirect", + iframe: "iframe", + deeplink: "deeplink", + native_sdk: "native_sdk", +} as const; diff --git a/src/api/schemas/kycStatusResponseDto.ts b/src/api/schemas/kycStatusResponseDto.ts new file mode 100644 index 0000000..1daad0b --- /dev/null +++ b/src/api/schemas/kycStatusResponseDto.ts @@ -0,0 +1,8 @@ +import type { KycStatusResponseDtoKycStatus } from "./kycStatusResponseDtoKycStatus"; + +export interface KycStatusResponseDto { + /** Normalized KYC status for the address on this yield */ + kycStatus: KycStatusResponseDtoKycStatus; + /** Issuer's KYC portal URL, when applicable */ + authorizeUrl?: string; +} diff --git a/src/api/schemas/kycStatusResponseDtoKycStatus.ts b/src/api/schemas/kycStatusResponseDtoKycStatus.ts new file mode 100644 index 0000000..cdd569b --- /dev/null +++ b/src/api/schemas/kycStatusResponseDtoKycStatus.ts @@ -0,0 +1,13 @@ +/** + * Normalized KYC status for the address on this yield + */ +export type KycStatusResponseDtoKycStatus = + (typeof KycStatusResponseDtoKycStatus)[keyof typeof KycStatusResponseDtoKycStatus]; + +export const KycStatusResponseDtoKycStatus = { + not_required: "not_required", + not_started: "not_started", + pending: "pending", + approved: "approved", + rejected: "rejected", +} as const; diff --git a/src/api/schemas/networkDtoId.ts b/src/api/schemas/networkDtoId.ts index d666ed7..ff936f2 100644 --- a/src/api/schemas/networkDtoId.ts +++ b/src/api/schemas/networkDtoId.ts @@ -22,6 +22,8 @@ export const NetworkDtoId = { unichain: "unichain", "monad-testnet": "monad-testnet", monad: "monad", + robinhood: "robinhood", + "robinhood-testnet": "robinhood-testnet", "avalanche-c": "avalanche-c", "avalanche-c-atomic": "avalanche-c-atomic", "avalanche-p": "avalanche-p", @@ -37,6 +39,8 @@ export const NetworkDtoId = { plasma: "plasma", katana: "katana", hyperevm: "hyperevm", + tempo: "tempo", + pharos: "pharos", agoric: "agoric", akash: "akash", axelar: "axelar", diff --git a/src/api/schemas/networks.ts b/src/api/schemas/networks.ts index 3bf4421..464951f 100644 --- a/src/api/schemas/networks.ts +++ b/src/api/schemas/networks.ts @@ -1,3 +1,6 @@ +/** + * Network for this address + */ export type Networks = (typeof Networks)[keyof typeof Networks]; export const Networks = { @@ -19,6 +22,8 @@ export const Networks = { unichain: "unichain", "monad-testnet": "monad-testnet", monad: "monad", + robinhood: "robinhood", + "robinhood-testnet": "robinhood-testnet", "avalanche-c": "avalanche-c", "avalanche-c-atomic": "avalanche-c-atomic", "avalanche-p": "avalanche-p", @@ -34,6 +39,8 @@ export const Networks = { plasma: "plasma", katana: "katana", hyperevm: "hyperevm", + tempo: "tempo", + pharos: "pharos", agoric: "agoric", akash: "akash", axelar: "axelar", diff --git a/src/api/schemas/pathFeeDto.ts b/src/api/schemas/pathFeeDto.ts new file mode 100644 index 0000000..6d10acc --- /dev/null +++ b/src/api/schemas/pathFeeDto.ts @@ -0,0 +1,4 @@ +export interface PathFeeDto { + /** Fee charged on this path as a decimal fraction of the amount (0.0007 = 0.07%) */ + rate: number; +} diff --git a/src/api/schemas/pathLimitsDto.ts b/src/api/schemas/pathLimitsDto.ts new file mode 100644 index 0000000..1d06b69 --- /dev/null +++ b/src/api/schemas/pathLimitsDto.ts @@ -0,0 +1,16 @@ +export interface PathLimitsDto { + /** Per-investor cap per rolling 24h */ + individualPer24h?: string; + /** Protocol-wide cap per rolling 24h */ + globalPer24h?: string; + /** Live remaining protocol-wide capacity in the current rolling 24h window (globalPer24h minus used); computed at request time */ + globalRemainingPer24h?: string; + /** On-demand pool cap as a fraction of NAV (0-1) */ + maxFractionOfNav?: number; + /** Path depends on an on-chain liquidity buffer; live depth lives in state.liquidityState */ + liquidityBounded?: boolean; + /** Live liquidity available to this path right now, in the payout token; computed at request time */ + availableLiquidity?: string; + /** Per-path minimum when it differs from mechanics.entryLimits */ + minimumAmount?: string; +} diff --git a/src/api/schemas/pendingActionDtoType.ts b/src/api/schemas/pendingActionDtoType.ts index 2c8f724..76a6226 100644 --- a/src/api/schemas/pendingActionDtoType.ts +++ b/src/api/schemas/pendingActionDtoType.ts @@ -7,6 +7,8 @@ export type PendingActionDtoType = export const PendingActionDtoType = { STAKE: "STAKE", UNSTAKE: "UNSTAKE", + WITHDRAW_REQUEST: "WITHDRAW_REQUEST", + INSTANT_WITHDRAW: "INSTANT_WITHDRAW", CLAIM_REWARDS: "CLAIM_REWARDS", AUTO_SWEEP_UNSTAKE_REWARDS: "AUTO_SWEEP_UNSTAKE_REWARDS", AUTO_SWEEP_WITHDRAW_REWARDS: "AUTO_SWEEP_WITHDRAW_REWARDS", diff --git a/src/api/schemas/rewardDtoYieldSource.ts b/src/api/schemas/rewardDtoYieldSource.ts index 398493f..7838ff0 100644 --- a/src/api/schemas/rewardDtoYieldSource.ts +++ b/src/api/schemas/rewardDtoYieldSource.ts @@ -6,11 +6,12 @@ export type RewardDtoYieldSource = export const RewardDtoYieldSource = { staking: "staking", + liquid_staking: "liquid_staking", restaking: "restaking", protocol_incentive: "protocol_incentive", campaign_incentive: "campaign_incentive", points: "points", - lending_interest: "lending_interest", + lending: "lending", mev: "mev", real_world_asset_yield: "real_world_asset_yield", vault: "vault", diff --git a/src/api/schemas/rewardRateDto.ts b/src/api/schemas/rewardRateDto.ts index ff44757..1299d2b 100644 --- a/src/api/schemas/rewardRateDto.ts +++ b/src/api/schemas/rewardRateDto.ts @@ -1,7 +1,7 @@ import type { RewardDto } from "./rewardDto"; export interface RewardRateDto { - /** Estimated reward rate across all sources (e.g. staking, points) */ + /** Estimated underlying integration reward rate across all sources. May include an additional campaign component when an active campaign applies to this project. */ total: number; /** Whether this reward rate is APR or APY */ rateType: string; diff --git a/src/api/schemas/rewardRateHistoryResponseDto.ts b/src/api/schemas/rewardRateHistoryResponseDto.ts index ebf09e6..5d9bbc7 100644 --- a/src/api/schemas/rewardRateHistoryResponseDto.ts +++ b/src/api/schemas/rewardRateHistoryResponseDto.ts @@ -1,4 +1,5 @@ import type { RewardRateHistoryResponseDtoInterval } from "./rewardRateHistoryResponseDtoInterval"; +import type { RewardRateSnapshotDto } from "./rewardRateSnapshotDto"; export interface RewardRateHistoryResponseDto { /** Total number of items available */ @@ -7,6 +8,8 @@ export interface RewardRateHistoryResponseDto { offset: number; /** Limit of the current page */ limit: number; + /** Reward rate snapshots for the current page */ + items: RewardRateSnapshotDto[]; /** Unique identifier of the yield */ yieldId: string; /** Sampling interval used for this response */ diff --git a/src/api/schemas/riskParameterDto.ts b/src/api/schemas/riskParameterDto.ts deleted file mode 100644 index a9f15d2..0000000 --- a/src/api/schemas/riskParameterDto.ts +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index 9d66e94..0000000 --- a/src/api/schemas/riskParameterDtoAsset.ts +++ /dev/null @@ -1 +0,0 @@ -export type RiskParameterDtoAsset = { [key: string]: unknown }; diff --git a/src/api/schemas/riskParameterDtoIntegrationId.ts b/src/api/schemas/riskParameterDtoIntegrationId.ts deleted file mode 100644 index a99b57b..0000000 --- a/src/api/schemas/riskParameterDtoIntegrationId.ts +++ /dev/null @@ -1 +0,0 @@ -export type RiskParameterDtoIntegrationId = { [key: string]: unknown }; diff --git a/src/api/schemas/riskParameterDtoProtocol.ts b/src/api/schemas/riskParameterDtoProtocol.ts deleted file mode 100644 index 5bac87a..0000000 --- a/src/api/schemas/riskParameterDtoProtocol.ts +++ /dev/null @@ -1 +0,0 @@ -export type RiskParameterDtoProtocol = { [key: string]: unknown }; diff --git a/src/api/schemas/riskParameterDtoValue.ts b/src/api/schemas/riskParameterDtoValue.ts deleted file mode 100644 index 6f44c52..0000000 --- a/src/api/schemas/riskParameterDtoValue.ts +++ /dev/null @@ -1 +0,0 @@ -export type RiskParameterDtoValue = { [key: string]: unknown }; diff --git a/src/api/schemas/schedulePathDto.ts b/src/api/schemas/schedulePathDto.ts new file mode 100644 index 0000000..33c05e8 --- /dev/null +++ b/src/api/schemas/schedulePathDto.ts @@ -0,0 +1,33 @@ +import type { AccrualSpecDto } from "./accrualSpecDto"; +import type { PathFeeDto } from "./pathFeeDto"; +import type { PathLimitsDto } from "./pathLimitsDto"; +import type { SchedulePathDtoCadence } from "./schedulePathDtoCadence"; +import type { SchedulePathDtoKind } from "./schedulePathDtoKind"; +import type { SchedulePathDtoStatus } from "./schedulePathDtoStatus"; +import type { SettlementSpecDto } from "./settlementSpecDto"; +import type { WindowBoundsDto } from "./windowBoundsDto"; + +export interface SchedulePathDto { + /** instant = atomic same-tx, liquidity/limit-bounded; standard = windowed / off-chain settled */ + kind: SchedulePathDtoKind; + /** How the path recurs */ + cadence: SchedulePathDtoCadence; + /** Live status, refreshed by cron / on-chain read */ + status: SchedulePathDtoStatus; + /** false/omitted = 24/7/365 (instant DeFi paths); true = market days only */ + businessDaysOnly?: boolean; + /** For daily_cutoff: local cutoff time orders must be in by, e.g. "16:00" */ + cutoffTime?: string; + /** The window the user is acting into right now (null when continuous) */ + currentWindow?: WindowBoundsDto | null; + /** The next window after the current one closes; what a UI counts down to */ + nextWindow?: WindowBoundsDto | null; + /** When the order is actually processed */ + settlement: SettlementSpecDto; + /** When earning starts/stops relative to the order */ + accrual: AccrualSpecDto; + /** Caps that gate an instant path or an on-demand liquidity pool */ + limits?: PathLimitsDto; + /** Fee this path charges on the amount (e.g. instant redemption fee) */ + fee?: PathFeeDto; +} diff --git a/src/api/schemas/schedulePathDtoCadence.ts b/src/api/schemas/schedulePathDtoCadence.ts new file mode 100644 index 0000000..d2fe37c --- /dev/null +++ b/src/api/schemas/schedulePathDtoCadence.ts @@ -0,0 +1,12 @@ +/** + * How the path recurs + */ +export type SchedulePathDtoCadence = + (typeof SchedulePathDtoCadence)[keyof typeof SchedulePathDtoCadence]; + +export const SchedulePathDtoCadence = { + continuous: "continuous", + daily_cutoff: "daily_cutoff", + periodic: "periodic", + scheduled: "scheduled", +} as const; diff --git a/src/api/schemas/schedulePathDtoKind.ts b/src/api/schemas/schedulePathDtoKind.ts new file mode 100644 index 0000000..9730cba --- /dev/null +++ b/src/api/schemas/schedulePathDtoKind.ts @@ -0,0 +1,10 @@ +/** + * instant = atomic same-tx, liquidity/limit-bounded; standard = windowed / off-chain settled + */ +export type SchedulePathDtoKind = + (typeof SchedulePathDtoKind)[keyof typeof SchedulePathDtoKind]; + +export const SchedulePathDtoKind = { + instant: "instant", + standard: "standard", +} as const; diff --git a/src/api/schemas/schedulePathDtoStatus.ts b/src/api/schemas/schedulePathDtoStatus.ts new file mode 100644 index 0000000..8a8ba80 --- /dev/null +++ b/src/api/schemas/schedulePathDtoStatus.ts @@ -0,0 +1,11 @@ +/** + * Live status, refreshed by cron / on-chain read + */ +export type SchedulePathDtoStatus = + (typeof SchedulePathDtoStatus)[keyof typeof SchedulePathDtoStatus]; + +export const SchedulePathDtoStatus = { + open: "open", + closed: "closed", + settling: "settling", +} as const; diff --git a/src/api/schemas/settlementSpecDto.ts b/src/api/schemas/settlementSpecDto.ts new file mode 100644 index 0000000..a5d0a68 --- /dev/null +++ b/src/api/schemas/settlementSpecDto.ts @@ -0,0 +1,19 @@ +import type { SettlementSpecDtoType } from "./settlementSpecDtoType"; +import type { TimePeriodDto } from "./timePeriodDto"; + +export interface SettlementSpecDto { + /** How the order settles: atomic (same tx), next_business_day, cohort (batched off-chain), or cooldown (fixed delay) */ + type: SettlementSpecDtoType; + /** Settlement horizon in market days (T+N) when applicable */ + marketDays?: number; + /** Best estimate of full settlement when not atomic */ + estimatedDuration?: TimePeriodDto; + /** Concrete settlement date when known (ISO 8601, cohort/scheduled) */ + estimatedSettlementAt?: string; + /** User must submit a separate on-chain claim to receive settled funds (ERC-7540) */ + claimRequired?: boolean; + /** Split delivery: fraction (0-1) delivered instantly; the rest is deferred */ + instantPortion?: number; + /** Concrete date the deferred portion is delivered (ISO 8601) */ + deferredDeliveryAt?: string; +} diff --git a/src/api/schemas/settlementSpecDtoType.ts b/src/api/schemas/settlementSpecDtoType.ts new file mode 100644 index 0000000..744a5c7 --- /dev/null +++ b/src/api/schemas/settlementSpecDtoType.ts @@ -0,0 +1,12 @@ +/** + * How the order settles: atomic (same tx), next_business_day, cohort (batched off-chain), or cooldown (fixed delay) + */ +export type SettlementSpecDtoType = + (typeof SettlementSpecDtoType)[keyof typeof SettlementSpecDtoType]; + +export const SettlementSpecDtoType = { + atomic: "atomic", + next_business_day: "next_business_day", + cohort: "cohort", + cooldown: "cooldown", +} as const; diff --git a/src/api/schemas/sideScheduleDto.ts b/src/api/schemas/sideScheduleDto.ts new file mode 100644 index 0000000..f757980 --- /dev/null +++ b/src/api/schemas/sideScheduleDto.ts @@ -0,0 +1,6 @@ +import type { SchedulePathDto } from "./schedulePathDto"; + +export interface SideScheduleDto { + /** Ways to act on this side (e.g. instant + standard); paths[0] is the default */ + paths: SchedulePathDto[]; +} diff --git a/src/api/schemas/tokenDtoNetwork.ts b/src/api/schemas/tokenDtoNetwork.ts index 9f5f0c4..cc465cc 100644 --- a/src/api/schemas/tokenDtoNetwork.ts +++ b/src/api/schemas/tokenDtoNetwork.ts @@ -23,6 +23,8 @@ export const TokenDtoNetwork = { unichain: "unichain", "monad-testnet": "monad-testnet", monad: "monad", + robinhood: "robinhood", + "robinhood-testnet": "robinhood-testnet", "avalanche-c": "avalanche-c", "avalanche-c-atomic": "avalanche-c-atomic", "avalanche-p": "avalanche-p", @@ -38,6 +40,8 @@ export const TokenDtoNetwork = { plasma: "plasma", katana: "katana", hyperevm: "hyperevm", + tempo: "tempo", + pharos: "pharos", agoric: "agoric", akash: "akash", axelar: "axelar", diff --git a/src/api/schemas/tokenWithAvailableYieldsDto.ts b/src/api/schemas/tokenWithAvailableYieldsDto.ts new file mode 100644 index 0000000..2abca0b --- /dev/null +++ b/src/api/schemas/tokenWithAvailableYieldsDto.ts @@ -0,0 +1,8 @@ +import type { TokenDto } from "./tokenDto"; + +export interface TokenWithAvailableYieldsDto { + /** Token with one or more available enabled yields */ + token: TokenDto; + /** Enabled yield IDs available for this token */ + availableYields: string[]; +} diff --git a/src/api/schemas/tokensControllerGetTokens200.ts b/src/api/schemas/tokensControllerGetTokens200.ts new file mode 100644 index 0000000..922a5b3 --- /dev/null +++ b/src/api/schemas/tokensControllerGetTokens200.ts @@ -0,0 +1,6 @@ +import type { PaginatedResponseDto } from "./paginatedResponseDto"; +import type { TokenWithAvailableYieldsDto } from "./tokenWithAvailableYieldsDto"; + +export type TokensControllerGetTokens200 = PaginatedResponseDto & { + items?: TokenWithAvailableYieldsDto[]; +}; diff --git a/src/api/schemas/tokensControllerGetTokens400.ts b/src/api/schemas/tokensControllerGetTokens400.ts new file mode 100644 index 0000000..0352ea7 --- /dev/null +++ b/src/api/schemas/tokensControllerGetTokens400.ts @@ -0,0 +1,5 @@ +export type TokensControllerGetTokens400 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/tokensControllerGetTokens401.ts b/src/api/schemas/tokensControllerGetTokens401.ts new file mode 100644 index 0000000..c802be6 --- /dev/null +++ b/src/api/schemas/tokensControllerGetTokens401.ts @@ -0,0 +1,5 @@ +export type TokensControllerGetTokens401 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/tokensControllerGetTokens429.ts b/src/api/schemas/tokensControllerGetTokens429.ts new file mode 100644 index 0000000..2e1fa02 --- /dev/null +++ b/src/api/schemas/tokensControllerGetTokens429.ts @@ -0,0 +1,6 @@ +export type TokensControllerGetTokens429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; diff --git a/src/api/schemas/tokensControllerGetTokens500.ts b/src/api/schemas/tokensControllerGetTokens500.ts new file mode 100644 index 0000000..1118747 --- /dev/null +++ b/src/api/schemas/tokensControllerGetTokens500.ts @@ -0,0 +1,5 @@ +export type TokensControllerGetTokens500 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/tokensControllerGetTokensNetworksItem.ts b/src/api/schemas/tokensControllerGetTokensNetworksItem.ts new file mode 100644 index 0000000..26ecec5 --- /dev/null +++ b/src/api/schemas/tokensControllerGetTokensNetworksItem.ts @@ -0,0 +1,108 @@ +export type TokensControllerGetTokensNetworksItem = + (typeof TokensControllerGetTokensNetworksItem)[keyof typeof TokensControllerGetTokensNetworksItem]; + +export const TokensControllerGetTokensNetworksItem = { + 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", + robinhood: "robinhood", + "robinhood-testnet": "robinhood-testnet", + "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", + tempo: "tempo", + pharos: "pharos", + 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/tokensControllerGetTokensParams.ts b/src/api/schemas/tokensControllerGetTokensParams.ts new file mode 100644 index 0000000..1aa85d5 --- /dev/null +++ b/src/api/schemas/tokensControllerGetTokensParams.ts @@ -0,0 +1,23 @@ +import type { TokensControllerGetTokensNetworksItem } from "./tokensControllerGetTokensNetworksItem"; +import type { TokensControllerGetTokensYieldTypesItem } from "./tokensControllerGetTokensYieldTypesItem"; + +export type TokensControllerGetTokensParams = { + /** + * Filter by one or more networks. Supports repeated values or comma separated values. + */ + networks?: TokensControllerGetTokensNetworksItem[]; + /** + * Filter by one or more yield types. Supports repeated values or comma separated values. + */ + yieldTypes?: TokensControllerGetTokensYieldTypesItem[]; + /** + * Offset for pagination + * @minimum 0 + */ + offset?: number; + /** + * Maximum number of items to return. Omit to return the full list. + * @minimum 1 + */ + limit?: number; +}; diff --git a/src/api/schemas/tokensControllerGetTokensYieldTypesItem.ts b/src/api/schemas/tokensControllerGetTokensYieldTypesItem.ts new file mode 100644 index 0000000..3836677 --- /dev/null +++ b/src/api/schemas/tokensControllerGetTokensYieldTypesItem.ts @@ -0,0 +1,14 @@ +export type TokensControllerGetTokensYieldTypesItem = + (typeof TokensControllerGetTokensYieldTypesItem)[keyof typeof TokensControllerGetTokensYieldTypesItem]; + +export const TokensControllerGetTokensYieldTypesItem = { + staking: "staking", + restaking: "restaking", + lending: "lending", + vault: "vault", + fixed_yield: "fixed_yield", + real_world_asset: "real_world_asset", + concentrated_liquidity_pool: "concentrated_liquidity_pool", + liquidity_pool: "liquidity_pool", + liquid_staking: "liquid_staking", +} as const; diff --git a/src/api/schemas/transactionDtoNetwork.ts b/src/api/schemas/transactionDtoNetwork.ts index dc7344a..9a147f2 100644 --- a/src/api/schemas/transactionDtoNetwork.ts +++ b/src/api/schemas/transactionDtoNetwork.ts @@ -23,6 +23,8 @@ export const TransactionDtoNetwork = { unichain: "unichain", "monad-testnet": "monad-testnet", monad: "monad", + robinhood: "robinhood", + "robinhood-testnet": "robinhood-testnet", "avalanche-c": "avalanche-c", "avalanche-c-atomic": "avalanche-c-atomic", "avalanche-p": "avalanche-p", @@ -38,6 +40,8 @@ export const TransactionDtoNetwork = { plasma: "plasma", katana: "katana", hyperevm: "hyperevm", + tempo: "tempo", + pharos: "pharos", agoric: "agoric", akash: "akash", axelar: "axelar", diff --git a/src/api/schemas/transactionDtoType.ts b/src/api/schemas/transactionDtoType.ts index 57364b4..6e28050 100644 --- a/src/api/schemas/transactionDtoType.ts +++ b/src/api/schemas/transactionDtoType.ts @@ -9,6 +9,7 @@ export const TransactionDtoType = { DEPOSIT: "DEPOSIT", APPROVAL: "APPROVAL", STAKE: "STAKE", + SET_OPERATOR: "SET_OPERATOR", CLAIM_UNSTAKED: "CLAIM_UNSTAKED", CLAIM_REWARDS: "CLAIM_REWARDS", RESTAKE_REWARDS: "RESTAKE_REWARDS", diff --git a/src/api/schemas/validatorDto.ts b/src/api/schemas/validatorDto.ts index 034aebb..07146f8 100644 --- a/src/api/schemas/validatorDto.ts +++ b/src/api/schemas/validatorDto.ts @@ -1,5 +1,6 @@ import type { RewardRateDto } from "./rewardRateDto"; import type { ValidatorProviderDto } from "./validatorProviderDto"; +import type { ValidatorSubnetDto } from "./validatorSubnetDto"; export interface ValidatorDto { /** Validator address or ID */ @@ -38,14 +39,6 @@ export interface ValidatorDto { status?: string; /** ID of the provider backing this validator */ providerId?: string; - /** Price per share of the validator */ - pricePerShare?: string; - /** Subnet ID */ - subnetId?: number; - /** Subnet name */ - subnetName?: string; - /** Market cap of the subnet */ - marketCap?: string; - /** Token symbol of the subnet */ - tokenSymbol?: string; + /** Subnet metadata when the validator operates within a subnet (Bittensor) */ + subnet?: ValidatorSubnetDto; } diff --git a/src/api/schemas/validatorSubnetDto.ts b/src/api/schemas/validatorSubnetDto.ts new file mode 100644 index 0000000..eaf7084 --- /dev/null +++ b/src/api/schemas/validatorSubnetDto.ts @@ -0,0 +1,12 @@ +export interface ValidatorSubnetDto { + /** Subnet ID */ + id: number; + /** Subnet name */ + name?: string; + /** Subnet token symbol */ + tokenSymbol?: string; + /** TAO-side reserve of the subnet AMM pool (subnet-level TVL in TAO) */ + tvl?: string; + /** Spot price of the subnet alpha token in TAO */ + pricePerShare?: string; +} diff --git a/src/api/schemas/windowBoundsDto.ts b/src/api/schemas/windowBoundsDto.ts new file mode 100644 index 0000000..5989fdb --- /dev/null +++ b/src/api/schemas/windowBoundsDto.ts @@ -0,0 +1,10 @@ +import type { WindowBoundsDtoSource } from "./windowBoundsDtoSource"; + +export interface WindowBoundsDto { + /** Window open time (ISO 8601) */ + opensAt: string; + /** Window close / cutoff time (ISO 8601); orders after this roll to nextWindow */ + closesAt: string; + /** Provenance of this window (on-chain read, issuer API, or hardcoded config) */ + source?: WindowBoundsDtoSource; +} diff --git a/src/api/schemas/windowBoundsDtoSource.ts b/src/api/schemas/windowBoundsDtoSource.ts new file mode 100644 index 0000000..f860c80 --- /dev/null +++ b/src/api/schemas/windowBoundsDtoSource.ts @@ -0,0 +1,11 @@ +/** + * Provenance of this window (on-chain read, issuer API, or hardcoded config) + */ +export type WindowBoundsDtoSource = + (typeof WindowBoundsDtoSource)[keyof typeof WindowBoundsDtoSource]; + +export const WindowBoundsDtoSource = { + onchain: "onchain", + api: "api", + config: "config", +} as const; diff --git a/src/api/schemas/yieldCampaignDto.ts b/src/api/schemas/yieldCampaignDto.ts new file mode 100644 index 0000000..bd078de --- /dev/null +++ b/src/api/schemas/yieldCampaignDto.ts @@ -0,0 +1,46 @@ +import type { CampaignPayoutFrequency } from "./campaignPayoutFrequency"; +import type { CampaignQualificationConfigDto } from "./campaignQualificationConfigDto"; +import type { CampaignRewardMode } from "./campaignRewardMode"; +import type { CampaignStatus } from "./campaignStatus"; +import type { RewardRateDto } from "./rewardRateDto"; +import type { TokenDto } from "./tokenDto"; + +export interface YieldCampaignDto { + id: string; + /** @nullable */ + name?: string | null; + createdAt: string; + updatedAt: string; + yieldId: string; + status: CampaignStatus; + rewardMode: CampaignRewardMode; + /** Campaign reward rate in the same shape as yield reward rates. Null when TVL or emission data is unavailable. */ + rewardRate: RewardRateDto | null; + /** Total campaign reward budget. */ + totalBudget: string; + /** Amount of budget distributed so far. */ + distributedBudget: string; + /** Amount of budget remaining. */ + remainingBudget: string; + /** + * Configured hourly emission amount. + * @nullable + */ + configuredHourlyEmission?: string | null; + /** + * Optional APY ceiling as a decimal rate, where 0.125 = 12.5%. + * @nullable + */ + apyCeiling?: number | null; + /** Qualification configuration for the campaign. */ + qualificationConfig: CampaignQualificationConfigDto; + startTime: string; + endTime: string; + /** @nullable */ + lastProcessedHour?: string | null; + /** @nullable */ + nextPayoutDueAt?: string | null; + payoutFrequency: CampaignPayoutFrequency; + /** Reward token metadata. */ + rewardToken: TokenDto; +} diff --git a/src/api/schemas/yieldDto.ts b/src/api/schemas/yieldDto.ts index 3ce00a8..902bc8f 100644 --- a/src/api/schemas/yieldDto.ts +++ b/src/api/schemas/yieldDto.ts @@ -1,10 +1,13 @@ import type { CuratorDto } from "./curatorDto"; +import type { ExecutionContractsDto } from "./executionContractsDto"; +import type { InvestmentScheduleDto } from "./investmentScheduleDto"; import type { RewardRateDto } from "./rewardRateDto"; import type { TokenDto } from "./tokenDto"; import type { YieldDtoNetwork } from "./yieldDtoNetwork"; +import type { YieldFeeConfigurationDto } from "./yieldFeeConfigurationDto"; import type { YieldMechanicsDto } from "./yieldMechanicsDto"; import type { YieldMetadataDto } from "./yieldMetadataDto"; -import type { YieldRiskDto } from "./yieldRiskDto"; +import type { YieldRiskSummaryDto } from "./yieldRiskSummaryDto"; import type { YieldStateDto } from "./yieldStateDto"; import type { YieldStatisticsDto } from "./yieldStatisticsDto"; import type { YieldStatusDto } from "./yieldStatusDto"; @@ -26,10 +29,12 @@ export interface YieldDto { tokens: TokenDto[]; /** Total effective yield broken down by source and token. */ rewardRate: RewardRateDto; - /** Key statistics and analytics for this yield opportunity */ + /** Live partner fee configurations for this yield. Each entry includes partner-scoped statistics for the allocator vault when available. */ + feeConfigurations?: YieldFeeConfigurationDto[]; + /** Underlying yield opportunity metrics (protocol-level TVL and base-vault holder counts). For partner-scoped metrics, see feeConfigurations. */ statistics?: YieldStatisticsDto; - /** Risk scores and provider ratings for this yield */ - risk?: YieldRiskDto; + /** Top-level provider risk ratings for this yield. */ + risk?: YieldRiskSummaryDto; /** Current availability of user actions like enter, exit, claim */ status: YieldStatusDto; /** Descriptive metadata including name, logo, description, and documentation */ @@ -38,10 +43,16 @@ export interface YieldDto { mechanics: YieldMechanicsDto; /** The provider ID this yield belongs to */ providerId: string; + /** Whether this yield meets the Prime quality criteria. Evaluated globally by a scheduled job, so the value is the same for every consumer. Use `?prime=true` to filter the catalog to Prime yields only. Prime is true only when a yield passes every applicable v1 gate: (1) TVL — at least $100M, reduced to $50M for staking, liquid-staking, restaking and real-world-asset yields; (2) Risk — the provider risk grade is no worse than B, enforced only for providers that report a letter grade (missing or numeric-only ratings skip this gate); (3) APY outlier (vault and lending yields only) — the spot rate is between 0% and 40% and within 3x of the yield’s own 30-day trailing average. */ + prime: boolean; /** 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) */ state?: YieldStateDto; + /** Deposit/redemption schedule for fund-style RWAs: subscription and redemption sides, each a list of paths (cadence, window, settlement, accrual, limits). Additive to cooldownPeriod/status. Static rules are merged with cron-hydrated live fields (status, windows, concrete dates). */ + investmentSchedule?: InvestmentScheduleDto; + /** Per-action set of on-chain contract addresses that transactions may target (tx.to). Used by policy-enforced custody providers to whitelist execution destinations. */ + executionContracts?: ExecutionContractsDto; } diff --git a/src/api/schemas/yieldDtoNetwork.ts b/src/api/schemas/yieldDtoNetwork.ts index 8e5b667..5f5ae53 100644 --- a/src/api/schemas/yieldDtoNetwork.ts +++ b/src/api/schemas/yieldDtoNetwork.ts @@ -23,6 +23,8 @@ export const YieldDtoNetwork = { unichain: "unichain", "monad-testnet": "monad-testnet", monad: "monad", + robinhood: "robinhood", + "robinhood-testnet": "robinhood-testnet", "avalanche-c": "avalanche-c", "avalanche-c-atomic": "avalanche-c-atomic", "avalanche-p": "avalanche-p", @@ -38,6 +40,8 @@ export const YieldDtoNetwork = { plasma: "plasma", katana: "katana", hyperevm: "hyperevm", + tempo: "tempo", + pharos: "pharos", agoric: "agoric", akash: "akash", axelar: "axelar", diff --git a/src/api/schemas/yieldEntryLimitsDto.ts b/src/api/schemas/yieldEntryLimitsDto.ts index 11f341e..41c7e63 100644 --- a/src/api/schemas/yieldEntryLimitsDto.ts +++ b/src/api/schemas/yieldEntryLimitsDto.ts @@ -9,4 +9,9 @@ export interface YieldEntryLimitsDto { * @nullable */ maximum: string | null; + /** + * Minimum amount for deposits after the user already holds the asset, in token units (null falls back to minimum) + * @nullable + */ + subsequentMinimum: string | null; } diff --git a/src/api/schemas/yieldFeeConfigurationDto.ts b/src/api/schemas/yieldFeeConfigurationDto.ts new file mode 100644 index 0000000..9c6088b --- /dev/null +++ b/src/api/schemas/yieldFeeConfigurationDto.ts @@ -0,0 +1,34 @@ +import type { YieldFeeConfigurationDtoAllocatorVaultContractAddress } from "./yieldFeeConfigurationDtoAllocatorVaultContractAddress"; +import type { YieldFeeConfigurationDtoDepositFeeBps } from "./yieldFeeConfigurationDtoDepositFeeBps"; +import type { YieldFeeConfigurationDtoManagementFeeBps } from "./yieldFeeConfigurationDtoManagementFeeBps"; +import type { YieldFeeConfigurationDtoPerformanceFeeBps } from "./yieldFeeConfigurationDtoPerformanceFeeBps"; +import type { YieldStatisticsDto } from "./yieldStatisticsDto"; + +export interface YieldFeeConfigurationDto { + /** Fee configuration identifier */ + id: string; + /** Whether this is the default fee configuration for the integration */ + default: boolean; + /** + * Management fee in basis points + * @nullable + */ + managementFeeBps?: YieldFeeConfigurationDtoManagementFeeBps; + /** + * Performance fee in basis points + * @nullable + */ + performanceFeeBps?: YieldFeeConfigurationDtoPerformanceFeeBps; + /** + * Deposit fee in basis points + * @nullable + */ + depositFeeBps?: YieldFeeConfigurationDtoDepositFeeBps; + /** + * Partner allocator vault contract address + * @nullable + */ + allocatorVaultContractAddress?: YieldFeeConfigurationDtoAllocatorVaultContractAddress; + /** Partner-scoped metrics for assets that entered through this fee configuration allocator vault */ + statistics?: YieldStatisticsDto; +} diff --git a/src/api/schemas/yieldFeeConfigurationDtoAllocatorVaultContractAddress.ts b/src/api/schemas/yieldFeeConfigurationDtoAllocatorVaultContractAddress.ts new file mode 100644 index 0000000..c0aaab7 --- /dev/null +++ b/src/api/schemas/yieldFeeConfigurationDtoAllocatorVaultContractAddress.ts @@ -0,0 +1,7 @@ +/** + * Partner allocator vault contract address + * @nullable + */ +export type YieldFeeConfigurationDtoAllocatorVaultContractAddress = { + [key: string]: unknown; +} | null; diff --git a/src/api/schemas/yieldFeeConfigurationDtoDepositFeeBps.ts b/src/api/schemas/yieldFeeConfigurationDtoDepositFeeBps.ts new file mode 100644 index 0000000..2a16539 --- /dev/null +++ b/src/api/schemas/yieldFeeConfigurationDtoDepositFeeBps.ts @@ -0,0 +1,7 @@ +/** + * Deposit fee in basis points + * @nullable + */ +export type YieldFeeConfigurationDtoDepositFeeBps = { + [key: string]: unknown; +} | null; diff --git a/src/api/schemas/yieldFeeConfigurationDtoManagementFeeBps.ts b/src/api/schemas/yieldFeeConfigurationDtoManagementFeeBps.ts new file mode 100644 index 0000000..ab7ea74 --- /dev/null +++ b/src/api/schemas/yieldFeeConfigurationDtoManagementFeeBps.ts @@ -0,0 +1,7 @@ +/** + * Management fee in basis points + * @nullable + */ +export type YieldFeeConfigurationDtoManagementFeeBps = { + [key: string]: unknown; +} | null; diff --git a/src/api/schemas/yieldFeeConfigurationDtoPerformanceFeeBps.ts b/src/api/schemas/yieldFeeConfigurationDtoPerformanceFeeBps.ts new file mode 100644 index 0000000..a43c1cc --- /dev/null +++ b/src/api/schemas/yieldFeeConfigurationDtoPerformanceFeeBps.ts @@ -0,0 +1,7 @@ +/** + * Performance fee in basis points + * @nullable + */ +export type YieldFeeConfigurationDtoPerformanceFeeBps = { + [key: string]: unknown; +} | null; diff --git a/src/api/schemas/yieldMetadataDto.ts b/src/api/schemas/yieldMetadataDto.ts index f390174..5b51bd5 100644 --- a/src/api/schemas/yieldMetadataDto.ts +++ b/src/api/schemas/yieldMetadataDto.ts @@ -14,4 +14,6 @@ export interface YieldMetadataDto { /** Whether this yield is deprecated and will be discontinued */ deprecated: boolean; supportedStandards: ERCStandards[]; + /** Whether this yield supports campaign creation */ + supportsCampaigns: boolean; } diff --git a/src/api/schemas/yieldQueryDto.ts b/src/api/schemas/yieldQueryDto.ts index 5e177f2..ff272f8 100644 --- a/src/api/schemas/yieldQueryDto.ts +++ b/src/api/schemas/yieldQueryDto.ts @@ -45,6 +45,8 @@ export interface YieldQueryDto { providers?: string[]; /** Search by yield name */ search?: string; + /** Filter by the Prime quality flag. `true` returns only Prime yields; `false` returns only non-Prime yields; omitting the parameter returns the full catalog. */ + prime?: boolean; /** Sort by yield status or reward rate */ sort?: YieldQueryDtoSort; } diff --git a/src/api/schemas/yieldQueryDtoNetwork.ts b/src/api/schemas/yieldQueryDtoNetwork.ts index 254595a..15cd71e 100644 --- a/src/api/schemas/yieldQueryDtoNetwork.ts +++ b/src/api/schemas/yieldQueryDtoNetwork.ts @@ -23,6 +23,8 @@ export const YieldQueryDtoNetwork = { unichain: "unichain", "monad-testnet": "monad-testnet", monad: "monad", + robinhood: "robinhood", + "robinhood-testnet": "robinhood-testnet", "avalanche-c": "avalanche-c", "avalanche-c-atomic": "avalanche-c-atomic", "avalanche-p": "avalanche-p", @@ -38,6 +40,8 @@ export const YieldQueryDtoNetwork = { plasma: "plasma", katana: "katana", hyperevm: "hyperevm", + tempo: "tempo", + pharos: "pharos", agoric: "agoric", akash: "akash", axelar: "axelar", diff --git a/src/api/schemas/yieldQueryDtoType.ts b/src/api/schemas/yieldQueryDtoType.ts index d199729..f338480 100644 --- a/src/api/schemas/yieldQueryDtoType.ts +++ b/src/api/schemas/yieldQueryDtoType.ts @@ -13,4 +13,5 @@ export const YieldQueryDtoType = { real_world_asset: "real_world_asset", concentrated_liquidity_pool: "concentrated_liquidity_pool", liquidity_pool: "liquidity_pool", + liquid_staking: "liquid_staking", } as const; diff --git a/src/api/schemas/yieldQueryDtoTypesItem.ts b/src/api/schemas/yieldQueryDtoTypesItem.ts index c83e1b7..cfcc606 100644 --- a/src/api/schemas/yieldQueryDtoTypesItem.ts +++ b/src/api/schemas/yieldQueryDtoTypesItem.ts @@ -10,4 +10,5 @@ export const YieldQueryDtoTypesItem = { real_world_asset: "real_world_asset", concentrated_liquidity_pool: "concentrated_liquidity_pool", liquidity_pool: "liquidity_pool", + liquid_staking: "liquid_staking", } as const; diff --git a/src/api/schemas/yieldRequirementsDto.ts b/src/api/schemas/yieldRequirementsDto.ts index d301379..86af7f1 100644 --- a/src/api/schemas/yieldRequirementsDto.ts +++ b/src/api/schemas/yieldRequirementsDto.ts @@ -1,6 +1,8 @@ +import type { KycMetadataDto } from "./kycMetadataDto"; + export interface YieldRequirementsDto { /** Whether off-chain KYC is required before transacting */ kycRequired: boolean; - /** Issuer's KYC portal URL */ - kycUrl?: string; + /** Public KYC criteria for rendering verification UI per opportunity */ + kyc?: KycMetadataDto; } diff --git a/src/api/schemas/yieldRiskDto.ts b/src/api/schemas/yieldRiskDto.ts index 798d5c7..d175cf0 100644 --- a/src/api/schemas/yieldRiskDto.ts +++ b/src/api/schemas/yieldRiskDto.ts @@ -1,9 +1,9 @@ import type { YieldRiskCredoraDto } from "./yieldRiskCredoraDto"; -import type { YieldRiskExponentialDto } from "./yieldRiskExponentialDto"; +import type { YieldRiskStakingRewardsDto } from "./yieldRiskStakingRewardsDto"; export interface YieldRiskDto { - /** Risk data last update timestamp */ + /** Timestamp of when StakeKit last computed risk data for this yield (ISO 8601) */ updatedAt: string; - exponentialFi?: YieldRiskExponentialDto; credora?: YieldRiskCredoraDto; + stakingRewards?: YieldRiskStakingRewardsDto; } diff --git a/src/api/schemas/yieldRiskEntryDto.ts b/src/api/schemas/yieldRiskEntryDto.ts new file mode 100644 index 0000000..3a044c4 --- /dev/null +++ b/src/api/schemas/yieldRiskEntryDto.ts @@ -0,0 +1,8 @@ +import type { YieldRiskEntryDtoSource } from "./yieldRiskEntryDtoSource"; + +export interface YieldRiskEntryDto { + /** Provider top-level rating value */ + rating: string; + /** Provider source label */ + source: YieldRiskEntryDtoSource; +} diff --git a/src/api/schemas/yieldRiskEntryDtoSource.ts b/src/api/schemas/yieldRiskEntryDtoSource.ts new file mode 100644 index 0000000..10e62d8 --- /dev/null +++ b/src/api/schemas/yieldRiskEntryDtoSource.ts @@ -0,0 +1,10 @@ +/** + * Provider source label + */ +export type YieldRiskEntryDtoSource = + (typeof YieldRiskEntryDtoSource)[keyof typeof YieldRiskEntryDtoSource]; + +export const YieldRiskEntryDtoSource = { + credora: "credora", + stakingRewards: "stakingRewards", +} as const; diff --git a/src/api/schemas/yieldRiskExponentialDto.ts b/src/api/schemas/yieldRiskExponentialDto.ts deleted file mode 100644 index aa6af82..0000000 --- a/src/api/schemas/yieldRiskExponentialDto.ts +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index a3efe6a..0000000 --- a/src/api/schemas/yieldRiskExponentialDtoPoolRating.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Exponential pool rating - */ -export type YieldRiskExponentialDtoPoolRating = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskExponentialDtoPoolScore.ts b/src/api/schemas/yieldRiskExponentialDtoPoolScore.ts deleted file mode 100644 index c9b40ec..0000000 --- a/src/api/schemas/yieldRiskExponentialDtoPoolScore.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * 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 deleted file mode 100644 index 11769d0..0000000 --- a/src/api/schemas/yieldRiskExponentialDtoRatingDescription.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Exponential rating description - */ -export type YieldRiskExponentialDtoRatingDescription = { - [key: string]: unknown; -}; diff --git a/src/api/schemas/yieldRiskExponentialDtoUrl.ts b/src/api/schemas/yieldRiskExponentialDtoUrl.ts deleted file mode 100644 index ab035d2..0000000 --- a/src/api/schemas/yieldRiskExponentialDtoUrl.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Exponential pool URL - */ -export type YieldRiskExponentialDtoUrl = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskStakingRewardsDto.ts b/src/api/schemas/yieldRiskStakingRewardsDto.ts new file mode 100644 index 0000000..e14de9d --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsDto.ts @@ -0,0 +1,44 @@ +import type { YieldRiskStakingRewardsDtoChain } from "./yieldRiskStakingRewardsDtoChain"; +import type { YieldRiskStakingRewardsDtoContractAddress } from "./yieldRiskStakingRewardsDtoContractAddress"; +import type { YieldRiskStakingRewardsDtoPotentialRating } from "./yieldRiskStakingRewardsDtoPotentialRating"; +import type { YieldRiskStakingRewardsDtoPotentialScore } from "./yieldRiskStakingRewardsDtoPotentialScore"; +import type { YieldRiskStakingRewardsDtoProfileUrl } from "./yieldRiskStakingRewardsDtoProfileUrl"; +import type { YieldRiskStakingRewardsDtoProviderName } from "./yieldRiskStakingRewardsDtoProviderName"; +import type { YieldRiskStakingRewardsDtoRatedAt } from "./yieldRiskStakingRewardsDtoRatedAt"; +import type { YieldRiskStakingRewardsDtoRatedSince } from "./yieldRiskStakingRewardsDtoRatedSince"; +import type { YieldRiskStakingRewardsDtoRating } from "./yieldRiskStakingRewardsDtoRating"; +import type { YieldRiskStakingRewardsDtoReportUrl } from "./yieldRiskStakingRewardsDtoReportUrl"; +import type { YieldRiskStakingRewardsDtoScore } from "./yieldRiskStakingRewardsDtoScore"; +import type { YieldRiskStakingRewardsDtoType } from "./yieldRiskStakingRewardsDtoType"; +import type { YieldRiskStakingRewardsDtoVersion } from "./yieldRiskStakingRewardsDtoVersion"; +import type { YieldRiskStakingRewardsMetricsDto } from "./yieldRiskStakingRewardsMetricsDto"; + +export interface YieldRiskStakingRewardsDto { + /** Staking Rewards rating */ + rating?: YieldRiskStakingRewardsDtoRating; + /** Staking Rewards score (1-5) */ + score?: YieldRiskStakingRewardsDtoScore; + /** Staking Rewards potential rating */ + potentialRating?: YieldRiskStakingRewardsDtoPotentialRating; + /** Staking Rewards potential score (1-5) */ + potentialScore?: YieldRiskStakingRewardsDtoPotentialScore; + /** Date when rating was assessed */ + ratedAt?: YieldRiskStakingRewardsDtoRatedAt; + /** Date since product has been rated */ + ratedSince?: YieldRiskStakingRewardsDtoRatedSince; + /** Staking Rewards product profile URL */ + profileUrl?: YieldRiskStakingRewardsDtoProfileUrl; + /** Staking Rewards full report URL */ + reportUrl?: YieldRiskStakingRewardsDtoReportUrl; + /** Staking Rewards provider name */ + providerName?: YieldRiskStakingRewardsDtoProviderName; + /** Staking Rewards methodology version */ + version?: YieldRiskStakingRewardsDtoVersion; + /** Staking Rewards product type */ + type?: YieldRiskStakingRewardsDtoType; + /** Chain label returned by Staking Rewards */ + chain?: YieldRiskStakingRewardsDtoChain; + /** Contract address returned by Staking Rewards */ + contractAddress?: YieldRiskStakingRewardsDtoContractAddress; + riskMetrics?: YieldRiskStakingRewardsMetricsDto; +} diff --git a/src/api/schemas/yieldRiskStakingRewardsDtoChain.ts b/src/api/schemas/yieldRiskStakingRewardsDtoChain.ts new file mode 100644 index 0000000..45ea14e --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsDtoChain.ts @@ -0,0 +1,4 @@ +/** + * Chain label returned by Staking Rewards + */ +export type YieldRiskStakingRewardsDtoChain = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskStakingRewardsDtoContractAddress.ts b/src/api/schemas/yieldRiskStakingRewardsDtoContractAddress.ts new file mode 100644 index 0000000..f143c5d --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsDtoContractAddress.ts @@ -0,0 +1,6 @@ +/** + * Contract address returned by Staking Rewards + */ +export type YieldRiskStakingRewardsDtoContractAddress = { + [key: string]: unknown; +}; diff --git a/src/api/schemas/yieldRiskStakingRewardsDtoPotentialRating.ts b/src/api/schemas/yieldRiskStakingRewardsDtoPotentialRating.ts new file mode 100644 index 0000000..2904e99 --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsDtoPotentialRating.ts @@ -0,0 +1,6 @@ +/** + * Staking Rewards potential rating + */ +export type YieldRiskStakingRewardsDtoPotentialRating = { + [key: string]: unknown; +}; diff --git a/src/api/schemas/yieldRiskStakingRewardsDtoPotentialScore.ts b/src/api/schemas/yieldRiskStakingRewardsDtoPotentialScore.ts new file mode 100644 index 0000000..7a19e9c --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsDtoPotentialScore.ts @@ -0,0 +1,6 @@ +/** + * Staking Rewards potential score (1-5) + */ +export type YieldRiskStakingRewardsDtoPotentialScore = { + [key: string]: unknown; +}; diff --git a/src/api/schemas/yieldRiskStakingRewardsDtoProfileUrl.ts b/src/api/schemas/yieldRiskStakingRewardsDtoProfileUrl.ts new file mode 100644 index 0000000..7802f13 --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsDtoProfileUrl.ts @@ -0,0 +1,4 @@ +/** + * Staking Rewards product profile URL + */ +export type YieldRiskStakingRewardsDtoProfileUrl = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskStakingRewardsDtoProviderName.ts b/src/api/schemas/yieldRiskStakingRewardsDtoProviderName.ts new file mode 100644 index 0000000..6523d89 --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsDtoProviderName.ts @@ -0,0 +1,4 @@ +/** + * Staking Rewards provider name + */ +export type YieldRiskStakingRewardsDtoProviderName = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskStakingRewardsDtoRatedAt.ts b/src/api/schemas/yieldRiskStakingRewardsDtoRatedAt.ts new file mode 100644 index 0000000..e25b06a --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsDtoRatedAt.ts @@ -0,0 +1,4 @@ +/** + * Date when rating was assessed + */ +export type YieldRiskStakingRewardsDtoRatedAt = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskStakingRewardsDtoRatedSince.ts b/src/api/schemas/yieldRiskStakingRewardsDtoRatedSince.ts new file mode 100644 index 0000000..214e70b --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsDtoRatedSince.ts @@ -0,0 +1,4 @@ +/** + * Date since product has been rated + */ +export type YieldRiskStakingRewardsDtoRatedSince = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskStakingRewardsDtoRating.ts b/src/api/schemas/yieldRiskStakingRewardsDtoRating.ts new file mode 100644 index 0000000..a6b9a1e --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsDtoRating.ts @@ -0,0 +1,4 @@ +/** + * Staking Rewards rating + */ +export type YieldRiskStakingRewardsDtoRating = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskStakingRewardsDtoReportUrl.ts b/src/api/schemas/yieldRiskStakingRewardsDtoReportUrl.ts new file mode 100644 index 0000000..8db03f9 --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsDtoReportUrl.ts @@ -0,0 +1,4 @@ +/** + * Staking Rewards full report URL + */ +export type YieldRiskStakingRewardsDtoReportUrl = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskStakingRewardsDtoScore.ts b/src/api/schemas/yieldRiskStakingRewardsDtoScore.ts new file mode 100644 index 0000000..9878935 --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsDtoScore.ts @@ -0,0 +1,4 @@ +/** + * Staking Rewards score (1-5) + */ +export type YieldRiskStakingRewardsDtoScore = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskStakingRewardsDtoType.ts b/src/api/schemas/yieldRiskStakingRewardsDtoType.ts new file mode 100644 index 0000000..b0c0881 --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsDtoType.ts @@ -0,0 +1,4 @@ +/** + * Staking Rewards product type + */ +export type YieldRiskStakingRewardsDtoType = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskStakingRewardsDtoVersion.ts b/src/api/schemas/yieldRiskStakingRewardsDtoVersion.ts new file mode 100644 index 0000000..8f3cabf --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsDtoVersion.ts @@ -0,0 +1,4 @@ +/** + * Staking Rewards methodology version + */ +export type YieldRiskStakingRewardsDtoVersion = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskStakingRewardsMetricsDto.ts b/src/api/schemas/yieldRiskStakingRewardsMetricsDto.ts new file mode 100644 index 0000000..e16cf15 --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsMetricsDto.ts @@ -0,0 +1,6 @@ +import type { YieldRiskStakingRewardsMetricsDtoUsers } from "./yieldRiskStakingRewardsMetricsDtoUsers"; + +export interface YieldRiskStakingRewardsMetricsDto { + /** Users count from Staking Rewards risk metrics */ + users?: YieldRiskStakingRewardsMetricsDtoUsers; +} diff --git a/src/api/schemas/yieldRiskStakingRewardsMetricsDtoUsers.ts b/src/api/schemas/yieldRiskStakingRewardsMetricsDtoUsers.ts new file mode 100644 index 0000000..7ffc8cb --- /dev/null +++ b/src/api/schemas/yieldRiskStakingRewardsMetricsDtoUsers.ts @@ -0,0 +1,4 @@ +/** + * Users count from Staking Rewards risk metrics + */ +export type YieldRiskStakingRewardsMetricsDtoUsers = { [key: string]: unknown }; diff --git a/src/api/schemas/yieldRiskSummaryDto.ts b/src/api/schemas/yieldRiskSummaryDto.ts new file mode 100644 index 0000000..7425309 --- /dev/null +++ b/src/api/schemas/yieldRiskSummaryDto.ts @@ -0,0 +1,6 @@ +import type { YieldRiskEntryDto } from "./yieldRiskEntryDto"; + +export interface YieldRiskSummaryDto { + /** Top-level rating entries by provider */ + ratings: YieldRiskEntryDto[]; +} diff --git a/src/api/schemas/yieldStatisticsDto.ts b/src/api/schemas/yieldStatisticsDto.ts index 0b5072a..0fb7624 100644 --- a/src/api/schemas/yieldStatisticsDto.ts +++ b/src/api/schemas/yieldStatisticsDto.ts @@ -1,31 +1,31 @@ export interface YieldStatisticsDto { /** - * Total value locked in USD + * Total value locked in USD for this statistics scope * @nullable */ tvlUsd?: string | null; /** - * Total value locked in primary underlying token + * Total value locked in primary underlying token for this statistics scope * @nullable */ tvl?: string | null; /** - * Raw total value locked (full precision) + * Raw total value locked in smallest token units for this statistics scope * @nullable */ tvlRaw?: string | null; /** - * Number of users with active positions in the yield + * Number of wallets with an active position on the underlying vault share token. Null when the yield is not ERC4626, no precomputed data exists, or indexing has not run yet. Partner-specific stats are not included. * @nullable */ uniqueUsers?: number | null; /** - * Average position size in USD + * Average position size in USD for the underlying vault (TVL USD divided by base-vault unique holders). Not partner-scoped. * @nullable */ averagePositionSizeUsd?: string | null; /** - * Average position size in primary underlying token + * Average position size in primary underlying token for the underlying vault (TVL divided by base-vault unique holders). Not partner-scoped. * @nullable */ averagePositionSize?: string | null; diff --git a/src/api/schemas/yieldTokensQueryDto.ts b/src/api/schemas/yieldTokensQueryDto.ts new file mode 100644 index 0000000..f8bb983 --- /dev/null +++ b/src/api/schemas/yieldTokensQueryDto.ts @@ -0,0 +1,19 @@ +import type { YieldTokensQueryDtoNetworksItem } from "./yieldTokensQueryDtoNetworksItem"; +import type { YieldTokensQueryDtoYieldTypesItem } from "./yieldTokensQueryDtoYieldTypesItem"; + +export interface YieldTokensQueryDto { + /** Filter by one or more networks */ + networks?: YieldTokensQueryDtoNetworksItem[]; + /** Filter by one or more yield types */ + yieldTypes?: YieldTokensQueryDtoYieldTypesItem[]; + /** + * Offset for pagination + * @minimum 0 + */ + offset?: number; + /** + * Maximum number of items to return. Omit to return the full list — a default page size may be introduced in future, so callers should respect `total` and paginate. + * @minimum 1 + */ + limit?: number; +} diff --git a/src/api/schemas/yieldTokensQueryDtoNetworksItem.ts b/src/api/schemas/yieldTokensQueryDtoNetworksItem.ts new file mode 100644 index 0000000..ded473e --- /dev/null +++ b/src/api/schemas/yieldTokensQueryDtoNetworksItem.ts @@ -0,0 +1,108 @@ +export type YieldTokensQueryDtoNetworksItem = + (typeof YieldTokensQueryDtoNetworksItem)[keyof typeof YieldTokensQueryDtoNetworksItem]; + +export const YieldTokensQueryDtoNetworksItem = { + 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", + robinhood: "robinhood", + "robinhood-testnet": "robinhood-testnet", + "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", + tempo: "tempo", + pharos: "pharos", + 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/yieldTokensQueryDtoYieldTypesItem.ts b/src/api/schemas/yieldTokensQueryDtoYieldTypesItem.ts new file mode 100644 index 0000000..de41e01 --- /dev/null +++ b/src/api/schemas/yieldTokensQueryDtoYieldTypesItem.ts @@ -0,0 +1,14 @@ +export type YieldTokensQueryDtoYieldTypesItem = + (typeof YieldTokensQueryDtoYieldTypesItem)[keyof typeof YieldTokensQueryDtoYieldTypesItem]; + +export const YieldTokensQueryDtoYieldTypesItem = { + staking: "staking", + restaking: "restaking", + lending: "lending", + vault: "vault", + fixed_yield: "fixed_yield", + real_world_asset: "real_world_asset", + concentrated_liquidity_pool: "concentrated_liquidity_pool", + liquidity_pool: "liquidity_pool", + liquid_staking: "liquid_staking", +} as const; diff --git a/src/api/schemas/yieldType.ts b/src/api/schemas/yieldType.ts index fd16d01..e7a5c64 100644 --- a/src/api/schemas/yieldType.ts +++ b/src/api/schemas/yieldType.ts @@ -12,4 +12,5 @@ export const YieldType = { real_world_asset: "real_world_asset", concentrated_liquidity_pool: "concentrated_liquidity_pool", liquidity_pool: "liquidity_pool", + liquid_staking: "liquid_staking", } as const; diff --git a/src/api/schemas/yieldsControllerGetBalanceHistoryParams.ts b/src/api/schemas/yieldsControllerGetBalanceHistoryParams.ts index c194658..0c5dd54 100644 --- a/src/api/schemas/yieldsControllerGetBalanceHistoryParams.ts +++ b/src/api/schemas/yieldsControllerGetBalanceHistoryParams.ts @@ -18,6 +18,10 @@ export type YieldsControllerGetBalanceHistoryParams = { * Block number for a point-in-time snapshot. When provided, from/to/interval are ignored. */ blockNumber?: number; + /** + * Fee configuration ID used to select allocator vault contract history. Falls back to default fee configuration. + */ + feeConfigurationId?: string; /** * Sampling resolution for the time series */ diff --git a/src/api/schemas/yieldsControllerGetYieldCampaigns200.ts b/src/api/schemas/yieldsControllerGetYieldCampaigns200.ts new file mode 100644 index 0000000..d8fd01f --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldCampaigns200.ts @@ -0,0 +1,6 @@ +import type { PaginatedResponseDto } from "./paginatedResponseDto"; +import type { YieldCampaignDto } from "./yieldCampaignDto"; + +export type YieldsControllerGetYieldCampaigns200 = PaginatedResponseDto & { + items?: YieldCampaignDto[]; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldCampaigns400.ts b/src/api/schemas/yieldsControllerGetYieldCampaigns400.ts new file mode 100644 index 0000000..492bf27 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldCampaigns400.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldCampaigns400 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldCampaigns401.ts b/src/api/schemas/yieldsControllerGetYieldCampaigns401.ts new file mode 100644 index 0000000..f0292b4 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldCampaigns401.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldCampaigns401 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldCampaigns429.ts b/src/api/schemas/yieldsControllerGetYieldCampaigns429.ts new file mode 100644 index 0000000..7a5e456 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldCampaigns429.ts @@ -0,0 +1,6 @@ +export type YieldsControllerGetYieldCampaigns429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldCampaigns500.ts b/src/api/schemas/yieldsControllerGetYieldCampaigns500.ts new file mode 100644 index 0000000..995f4ac --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldCampaigns500.ts @@ -0,0 +1,5 @@ +export type YieldsControllerGetYieldCampaigns500 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldCampaignsParams.ts b/src/api/schemas/yieldsControllerGetYieldCampaignsParams.ts new file mode 100644 index 0000000..47866b3 --- /dev/null +++ b/src/api/schemas/yieldsControllerGetYieldCampaignsParams.ts @@ -0,0 +1,19 @@ +import type { CampaignStatus } from "./campaignStatus"; + +export type YieldsControllerGetYieldCampaignsParams = { + /** + * Offset for pagination + * @minimum 0 + */ + offset?: number; + /** + * Maximum number of items to return + * @minimum 1 + * @maximum 100 + */ + limit?: number; + /** + * Campaign status filter. Defaults to active. + */ + status?: CampaignStatus; +}; diff --git a/src/api/schemas/yieldsControllerGetYieldTvlHistoryParams.ts b/src/api/schemas/yieldsControllerGetYieldTvlHistoryParams.ts index 67e37c8..ecf4953 100644 --- a/src/api/schemas/yieldsControllerGetYieldTvlHistoryParams.ts +++ b/src/api/schemas/yieldsControllerGetYieldTvlHistoryParams.ts @@ -29,4 +29,8 @@ export type YieldsControllerGetYieldTvlHistoryParams = { * Sampling resolution (day/week/month). Default: day. */ interval?: YieldsControllerGetYieldTvlHistoryInterval; + /** + * Fee configuration ID used to resolve partner allocator vault TVL history. Omit for underlying yield TVL history. + */ + feeConfigurationId?: string; }; diff --git a/src/api/schemas/yieldsControllerGetYieldsNetwork.ts b/src/api/schemas/yieldsControllerGetYieldsNetwork.ts index 20c4625..64cc084 100644 --- a/src/api/schemas/yieldsControllerGetYieldsNetwork.ts +++ b/src/api/schemas/yieldsControllerGetYieldsNetwork.ts @@ -20,6 +20,8 @@ export const YieldsControllerGetYieldsNetwork = { unichain: "unichain", "monad-testnet": "monad-testnet", monad: "monad", + robinhood: "robinhood", + "robinhood-testnet": "robinhood-testnet", "avalanche-c": "avalanche-c", "avalanche-c-atomic": "avalanche-c-atomic", "avalanche-p": "avalanche-p", @@ -35,6 +37,8 @@ export const YieldsControllerGetYieldsNetwork = { plasma: "plasma", katana: "katana", hyperevm: "hyperevm", + tempo: "tempo", + pharos: "pharos", agoric: "agoric", akash: "akash", axelar: "axelar", diff --git a/src/api/schemas/yieldsControllerGetYieldsParams.ts b/src/api/schemas/yieldsControllerGetYieldsParams.ts index 76f0b6f..2f4f87b 100644 --- a/src/api/schemas/yieldsControllerGetYieldsParams.ts +++ b/src/api/schemas/yieldsControllerGetYieldsParams.ts @@ -76,6 +76,10 @@ export type YieldsControllerGetYieldsParams = { * Search by yield name */ search?: string; + /** + * Filter by the Prime quality flag. `true` returns only Prime yields; `false` returns only non-Prime yields; omitting the parameter returns the full catalog. Composable with all other filters. + */ + prime?: boolean; /** * Sort by yield status or reward rate */ diff --git a/src/api/schemas/yieldsControllerGetYieldsType.ts b/src/api/schemas/yieldsControllerGetYieldsType.ts index 1aca9a1..f4e8e9d 100644 --- a/src/api/schemas/yieldsControllerGetYieldsType.ts +++ b/src/api/schemas/yieldsControllerGetYieldsType.ts @@ -10,4 +10,5 @@ export const YieldsControllerGetYieldsType = { real_world_asset: "real_world_asset", concentrated_liquidity_pool: "concentrated_liquidity_pool", liquidity_pool: "liquidity_pool", + liquid_staking: "liquid_staking", } as const; diff --git a/src/api/schemas/yieldsControllerGetYieldsTypesItem.ts b/src/api/schemas/yieldsControllerGetYieldsTypesItem.ts index 62d541d..cb8da54 100644 --- a/src/api/schemas/yieldsControllerGetYieldsTypesItem.ts +++ b/src/api/schemas/yieldsControllerGetYieldsTypesItem.ts @@ -10,4 +10,5 @@ export const YieldsControllerGetYieldsTypesItem = { real_world_asset: "real_world_asset", concentrated_liquidity_pool: "concentrated_liquidity_pool", liquidity_pool: "liquidity_pool", + liquid_staking: "liquid_staking", } as const;