diff --git a/.yarnrc.yml b/.yarnrc.yml index 017de00f74..15d5ce9cde 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -14,6 +14,8 @@ npmMinimalAgeGate: 20160 npmPreapprovedPackages: - "@evolu/*" - "@types/invity-api@*" + # orval@8.2.0 actually include fix of an vulnerability introduced in prev. versions https://github.com/orval-labs/orval/releases/tag/v8.2.0 + - "orval@8.2.0" plugins: - checksum: 5e73a1acbb9741fce1e8335e243c9480ea2107b9b4b65ed7643785ddea9e3019aee254a92a853b1cd71023b16fff5b7d3afd5256fe57cd35a54f8785b8c30281 diff --git a/scripts/list-outdated-dependencies/wallet-dependencies.txt b/scripts/list-outdated-dependencies/wallet-dependencies.txt index 627e4ae8db..9b6bacecdf 100644 --- a/scripts/list-outdated-dependencies/wallet-dependencies.txt +++ b/scripts/list-outdated-dependencies/wallet-dependencies.txt @@ -77,3 +77,4 @@ yup viem @tanstack/react-query-devtools @tanstack/react-query +orval \ No newline at end of file diff --git a/suite-common/earn-api/README.md b/suite-common/earn-api/README.md new file mode 100644 index 0000000000..1f4dfca532 --- /dev/null +++ b/suite-common/earn-api/README.md @@ -0,0 +1,18 @@ +# Earn API + +## Yield XYZ API + +1. OpenAPI spec is fetched by `scripts/fetchSpec.mjs` +2. Orval generates types and methods to `src/api` +3. A Trezor proxy service is deployed at `YIELD_XYZ_BASE_URL` (`config/index.ts`). So no need to manually provide API key. + +## Yield opportunities + +`useGetYieldOpportunities`: Fetch all enabled Yield XYZ opportunities. + +## Enter a yield opportunity + +1. Let Yield XYZ to generate transaction payloads: `useEnterYieldOpportunity` +2. Sign TX: handled without Yield XYZ +3. Broadcast TX: handle without Yield XYZ +4. Submit TX hash: `useSubmitTxHash` diff --git a/suite-common/earn-api/openapi.yaml b/suite-common/earn-api/openapi.yaml new file mode 100644 index 0000000000..f74e06241a --- /dev/null +++ b/suite-common/earn-api/openapi.yaml @@ -0,0 +1,5481 @@ +openapi: 3.0.0 +paths: + /v1/yields: + get: + operationId: YieldsController_getYields + summary: List all yield opportunities + description: >- + Retrieve a paginated list of available yield opportunities across all + supported networks and protocols. + parameters: + - name: offset + required: false + in: query + description: Offset for pagination + example: 0 + schema: + minimum: 0 + default: 0 + type: number + - name: limit + required: false + in: query + description: Number of items per page + example: 20 + schema: + minimum: 1 + maximum: 100 + default: 20 + type: number + - name: network + required: false + in: query + description: Filter by network + schema: + enum: + - ethereum + - ethereum-goerli + - ethereum-holesky + - ethereum-sepolia + - ethereum-hoodi + - arbitrum + - base + - base-sepolia + - gnosis + - optimism + - polygon + - polygon-amoy + - starknet + - zksync + - linea + - unichain + - monad-testnet + - monad + - avalanche-c + - avalanche-c-atomic + - avalanche-p + - binance + - celo + - fantom + - harmony + - moonriver + - okc + - viction + - core + - sonic + - plasma + - katana + - hyperevm + - agoric + - akash + - axelar + - band-protocol + - bitsong + - canto + - chihuahua + - comdex + - coreum + - cosmos + - crescent + - cronos + - cudos + - desmos + - dydx + - evmos + - fetch-ai + - gravity-bridge + - injective + - irisnet + - juno + - kava + - ki-network + - mars-protocol + - nym + - okex-chain + - onomy + - osmosis + - persistence + - quicksilver + - regen + - secret + - sentinel + - sommelier + - stafi + - stargaze + - stride + - teritori + - tgrade + - umee + - sei + - mantra + - celestia + - saga + - zetachain + - dymension + - humansai + - neutron + - polkadot + - kusama + - westend + - bittensor + - aptos + - binancebeacon + - cardano + - near + - solana + - solana-devnet + - stellar + - stellar-testnet + - sui + - tezos + - tron + - ton + - ton-testnet + - hyperliquid + type: string + - name: chainId + required: false + in: query + description: 'Filter by EVM chain ID (Ethereum: 1, Polygon: 137)' + example: '1' + schema: + type: string + - name: networks + required: false + in: query + description: Filter by multiple networks (comma separated) + schema: + type: string + - name: yieldId + required: false + in: query + example: optimism-usdt-aave-v3-lending + schema: + maxLength: 200 + type: string + - name: yieldIds + required: false + in: query + example: + - optimism-usdt-aave-v3-lending + schema: + maxItems: 100 + maxLength: 200 + type: array + items: + type: string + - name: type + required: false + in: query + description: Filter by yield type + schema: + enum: + - staking + - restaking + - lending + - vault + - fixed_yield + - real_world_asset + - concentrated_liquidity_pool + - liquidity_pool + type: string + - name: types + required: false + in: query + description: Filter by multiple yield types (comma separated) + schema: + type: array + items: + type: string + enum: + - staking + - restaking + - lending + - vault + - fixed_yield + - real_world_asset + - concentrated_liquidity_pool + - liquidity_pool + - name: hasCooldownPeriod + required: false + in: query + description: Filter by cooldown period + example: true + schema: + type: boolean + - name: hasWarmupPeriod + required: false + in: query + description: Filter by warmup period + example: true + schema: + type: boolean + - name: token + required: false + in: query + description: Filter by token symbol or address + schema: + type: string + - name: inputToken + required: false + in: query + description: Filter by input token symbol or address + schema: + type: string + - name: inputTokens + required: false + in: query + description: Filter by multiple input token symbol or address (comma separated) + schema: + type: array + items: + type: string + - name: provider + required: false + in: query + description: Filter by provider ID + schema: + type: string + - name: providers + required: false + in: query + description: Filter by multiple provider IDs (comma separated) + schema: + type: array + items: + type: string + - name: search + required: false + in: query + description: Search by yield name + schema: + type: string + - name: sort + required: false + in: query + description: Sort by yield status + schema: + enum: + - statusEnterAsc + - statusEnterDesc + - statusExitAsc + - statusExitDesc + type: string + responses: + '200': + description: Returns a paginated list of yield opportunities + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PaginatedResponseDto' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/YieldDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Discovery + /v1/yields/balances: + post: + operationId: YieldsController_getAggregateBalances + summary: Get balances across multiple yields and networks + description: >- + Retrieve balances for multiple wallet addresses across different + networks and yield opportunities. Send an array of balance requests - + each request can specify a yieldId (optional for chain scanning), + address, network, and custom arguments. This is the same format as the + single yield balance endpoint but in array form. Duplicate requests + (same yieldId + address + network) are automatically deduplicated, with + specific yield requests taking precedence over chain scans. + parameters: [] + requestBody: + required: true + description: >- + Request containing an array of balance queries. Each query contains: + yieldId (optional), address (required), network (required), and + arguments (optional). When yieldId is omitted, all yields for that + network will be scanned. You can mix chain scans with specific yield + queries - duplicates are automatically deduplicated with specific + queries taking precedence. + content: + application/json: + schema: + $ref: '#/components/schemas/BalancesRequestDto' + responses: + '200': + description: >- + Returns balances grouped by yield with detailed error information + for failed yields. Only yields with non-zero balances are included + in the response. + content: + application/json: + schema: + $ref: '#/components/schemas/BalancesResponseDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Portfolio + /v1/yields/{yieldId}: + get: + operationId: YieldsController_getYield + summary: Get yield metadata + description: >- + Retrieve detailed information about a specific yield opportunity + including APY, tokens, protocol details, and more. + parameters: + - name: yieldId + required: true + in: path + description: The unique identifier of the yield + example: ethereum-eth-lido-staking + schema: + type: string + responses: + '200': + description: >- + Returns yield metadata including network, APR, TVL, and token + information + content: + application/json: + schema: + $ref: '#/components/schemas/YieldDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '404': + description: Yield not found with the specified ID + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Discovery + /v1/yields/{yieldId}/risk: + get: + operationId: YieldsController_getYieldRisk + summary: Get risk metadata for a yield + description: Retrieve risk metadata associated with a specific yield. + parameters: + - name: yieldId + required: true + in: path + description: The unique identifier of the yield + example: ethereum-eth-lido-staking + schema: + type: string + responses: + '200': + description: Risk metadata retrieved successfully + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RiskParameterDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '404': + description: Yield not found with the specified ID + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Risk + /v1/yields/{yieldId}/balances: + post: + operationId: YieldsController_getYieldBalances + summary: Get balances for a specific yield + description: >- + Retrieve all balances associated with a yield opportunity for a specific + wallet address, including active, pending, claimable, and withdrawable + balances. The network is automatically determined from the yield + configuration. + parameters: + - name: yieldId + required: true + in: path + description: The unique identifier of the yield opportunity + example: ethereum-eth-lido-staking + schema: + type: string + requestBody: + required: true + description: >- + Balance request with address and optional arguments for advanced + balance queries + content: + application/json: + schema: + $ref: '#/components/schemas/YieldBalancesRequestDto' + responses: + '200': + description: >- + Returns balance information including different balance types + (active, entering, exiting, withdrawable, claimable, locked) with + amounts and available actions + content: + application/json: + schema: + $ref: '#/components/schemas/YieldBalancesDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '404': + description: Yield not found with the specified ID + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Portfolio + /v1/yields/{yieldId}/validators: + get: + operationId: YieldsController_getYieldValidators + summary: Get yield validators + description: >- + Retrieve a paginated list of validators available for staking or + delegation for this yield opportunity. + parameters: + - name: yieldId + required: true + in: path + description: The unique identifier of the yield + example: cosmos-staking + schema: + type: string + - name: offset + required: false + in: query + description: Offset for pagination + example: 0 + schema: + minimum: 0 + default: 0 + type: number + - name: limit + required: false + in: query + description: Number of items per page + example: 20 + schema: + minimum: 1 + maximum: 100 + default: 20 + type: number + - name: name + required: false + in: query + description: Filter by validator name (case-insensitive, partial match) + schema: + type: string + - name: address + required: false + in: query + description: Filter by validator address + schema: + type: string + - name: provider + required: false + in: query + description: Filter by provider ID + schema: + type: string + - name: status + required: false + in: query + description: Filter by validator status + schema: + type: string + - name: preferred + required: false + in: query + description: Filter by preferred flag + schema: + type: boolean + responses: + '200': + description: >- + Returns paginated list of available validators with detailed + information + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PaginatedResponseDto' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/ValidatorDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '404': + description: Yield not found with the specified ID + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Discovery + /v1/actions: + get: + operationId: ActionsController_getActions + summary: Get user actions + description: >- + Retrieve all actions performed by a user, with optional filtering by + yield, status, category, etc. In the future, this may include + personalized action recommendations. + parameters: + - name: offset + required: false + in: query + description: Offset for pagination + example: 0 + schema: + minimum: 0 + default: 0 + type: number + - name: limit + required: false + in: query + description: Maximum number of items to return + example: 20 + schema: + minimum: 1 + maximum: 100 + default: 20 + type: number + - name: address + required: true + in: query + description: User wallet address to get actions for + example: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e' + schema: + type: string + - name: status + required: false + in: query + description: Filter actions by status + schema: + enum: + - pending + - completed + - failed + type: string + - name: intent + required: false + in: query + description: Filter actions by intent + schema: + enum: + - enter + - exit + - manage + type: string + - name: type + required: false + in: query + description: Filter by action type + schema: + enum: + - STAKE + - UNSTAKE + - CLAIM_REWARDS + - RESTAKE_REWARDS + - WITHDRAW + - WITHDRAW_ALL + - RESTAKE + - CLAIM_UNSTAKED + - UNLOCK_LOCKED + - STAKE_LOCKED + - VOTE + - REVOKE + - VOTE_LOCKED + - REVOTE + - REBOND + - MIGRATE + - VERIFY_WITHDRAW_CREDENTIALS + - DELEGATE + type: string + - name: yieldId + required: false + in: query + description: Filter actions by specific yield + example: ethereum-eth-lido-staking + schema: + type: string + responses: + '200': + description: Returns a paginated list of user actions + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PaginatedResponseDto' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/ActionDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Actions + /v1/actions/{actionId}: + get: + operationId: ActionsController_getAction + summary: Get action details + description: >- + Retrieve detailed information about a specific action including current + status, transactions, and execution details. + parameters: + - name: actionId + required: true + in: path + description: The unique identifier of the action + example: action_123abc + schema: + type: string + responses: + '200': + description: Action details retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/ActionDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '404': + description: Action not found with the specified ID + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Actions + /v1/actions/enter: + post: + operationId: ActionsController_enterYield + summary: Enter a yield + description: >- + Generate the transactions needed to enter a yield position with the + provided parameters. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateActionDto' + responses: + '201': + description: Returns action with array of transactions to execute + content: + application/json: + schema: + $ref: '#/components/schemas/ActionDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '403': + description: Access denied due to geolocation restrictions + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Access denied from US (US-CA) + error: + type: string + example: Forbidden + statusCode: + type: number + example: 403 + '404': + description: Yield not found with the specified ID + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Actions + /v1/actions/exit: + post: + operationId: ActionsController_exitYield + summary: Exit a yield + description: >- + Generate the transactions needed to exit a yield position with the + provided parameters. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateActionDto' + responses: + '201': + description: Returns action with array of transactions to execute + content: + application/json: + schema: + $ref: '#/components/schemas/ActionDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '403': + description: Access denied due to geolocation restrictions + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Access denied from US (US-CA) + error: + type: string + example: Forbidden + statusCode: + type: number + example: 403 + '404': + description: Yield not found with the specified ID + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Actions + /v1/actions/manage: + post: + operationId: ActionsController_manageYield + summary: Manage a yield + description: >- + Generate the transactions needed to perform management actions on a + yield position. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateManageActionDto' + responses: + '201': + description: Returns action with array of transactions to execute + content: + application/json: + schema: + $ref: '#/components/schemas/ActionDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '403': + description: Access denied due to geolocation restrictions + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Access denied from US (US-CA) + error: + type: string + example: Forbidden + statusCode: + type: number + example: 403 + '404': + description: Yield not found with the specified ID + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Actions + /v1/transactions/{transactionId}/submit-hash: + put: + operationId: TransactionsController_submitTransactionHash + summary: Submit transaction hash + description: >- + Submit the transaction hash after broadcasting a transaction to the + blockchain. This updates the transaction status and enables tracking. + parameters: + - name: transactionId + required: true + in: path + description: The unique identifier of the transaction + example: 21f5fd15-cf80-4b9a-804f-062c40dc3740 + schema: {} + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SubmitHashDto' + responses: + '200': + description: Transaction successfully updated with hash + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionDto' + '400': + description: Invalid transaction hash format + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '404': + description: Transaction not found with the specified ID + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Actions + /v1/transactions/{transactionId}/submit: + post: + operationId: TransactionsController_submitTransaction + summary: Submit transaction + description: Submit the transaction to the blockchain. + parameters: + - name: transactionId + required: true + in: path + description: The unique identifier of the transaction + example: 21f5fd15-cf80-4b9a-804f-062c40dc3740 + schema: {} + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SubmitTransactionDto' + responses: + '200': + description: Transaction successfully submitted + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionDto' + '400': + description: Invalid transaction format + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '404': + description: Transaction not found with the specified ID + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Actions + /v1/transactions/{transactionId}: + get: + operationId: TransactionsController_getTransaction + summary: Get transaction details + description: >- + Retrieve detailed information about a specific transaction including + current status, hash, and execution details. + parameters: + - name: transactionId + required: true + in: path + description: The unique identifier of the transaction + example: 21f5fd15-cf80-4b9a-804f-062c40dc3740 + schema: {} + responses: + '200': + description: Transaction details retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '404': + description: Transaction not found with the specified ID + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Actions + /v1/networks: + get: + operationId: NetworksController_getNetworks + summary: List all available networks + description: >- + Retrieve a list of all supported networks that can be used for filtering + yields and other operations. + parameters: [] + responses: + '200': + description: Returns a list of all available networks + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NetworkDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Discovery + /v1/providers: + get: + operationId: ProvidersController_getProviders + summary: Get all providers + description: >- + Returns a paginated list of all providers, including both protocol and + validator providers. + parameters: + - name: offset + required: false + in: query + description: Offset for pagination + example: 0 + schema: + minimum: 0 + default: 0 + type: number + - name: limit + required: false + in: query + description: Number of items per page + example: 20 + schema: + minimum: 1 + maximum: 100 + default: 20 + type: number + responses: + '200': + description: List of providers + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PaginatedResponseDto' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/ProviderDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Discovery + /v1/providers/{providerId}: + get: + operationId: ProvidersController_getProvider + summary: Get provider by ID + description: Returns detailed information about a specific provider. + parameters: + - name: providerId + required: true + in: path + schema: + type: string + responses: + '200': + description: Provider details + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderDto' + '400': + description: Invalid request parameters + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Validation failed + error: + type: string + example: Bad Request + statusCode: + type: number + example: 400 + '401': + description: Invalid or missing API key + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Invalid API key + error: + type: string + example: Unauthorized + statusCode: + type: number + example: 401 + '429': + description: Rate limit exceeded + headers: + x-ratelimit-limit: + description: Request limit per window + schema: + type: string + x-ratelimit-remaining: + description: Remaining requests (will be 0) + schema: + type: string + x-ratelimit-reset: + description: Unix timestamp when window resets + schema: + type: string + retry-after: + description: Seconds to wait before retrying + schema: + type: string + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Rate limit exceeded + error: + type: string + example: Too Many Requests + statusCode: + type: number + example: 429 + retryAfter: + type: number + example: 30 + '500': + description: Internal server error + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Internal server error + error: + type: string + example: Internal Server Error + statusCode: + type: number + example: 500 + security: + - ApiKey: [] + tags: + - Discovery + /health: + get: + operationId: HealthController_health + summary: Health check + description: Get the health status of the yield API with current timestamp + parameters: [] + responses: + '200': + description: Health check status with timestamp + content: + application/json: + schema: + $ref: '#/components/schemas/HealthStatusDto' + tags: + - Health +info: + title: Yield.xyz API + description: API Documentation + version: '1.0' + contact: {} +tags: + - name: Discovery + description: Browse and discover yield opportunities, networks, and providers + - name: Portfolio + description: User-specific balances, activity, and rewards + - name: Actions + description: Generate transactions to enter, exit, and manage yields +servers: + - url: https://api.yield.xyz + description: Production environment +components: + securitySchemes: + ApiKey: + type: apiKey + in: header + name: x-api-key + schemas: + TokenDto: + type: object + properties: + symbol: + type: string + description: Token symbol + example: ETH + name: + type: string + description: Token name + example: Ethereum + decimals: + type: number + description: Token decimal places + example: 18 + network: + type: string + description: Token network + enum: + - ethereum + - ethereum-goerli + - ethereum-holesky + - ethereum-sepolia + - ethereum-hoodi + - arbitrum + - base + - base-sepolia + - gnosis + - optimism + - polygon + - polygon-amoy + - starknet + - zksync + - linea + - unichain + - monad-testnet + - monad + - avalanche-c + - avalanche-c-atomic + - avalanche-p + - binance + - celo + - fantom + - harmony + - moonriver + - okc + - viction + - core + - sonic + - plasma + - katana + - hyperevm + - agoric + - akash + - axelar + - band-protocol + - bitsong + - canto + - chihuahua + - comdex + - coreum + - cosmos + - crescent + - cronos + - cudos + - desmos + - dydx + - evmos + - fetch-ai + - gravity-bridge + - injective + - irisnet + - juno + - kava + - ki-network + - mars-protocol + - nym + - okex-chain + - onomy + - osmosis + - persistence + - quicksilver + - regen + - secret + - sentinel + - sommelier + - stafi + - stargaze + - stride + - teritori + - tgrade + - umee + - sei + - mantra + - celestia + - saga + - zetachain + - dymension + - humansai + - neutron + - polkadot + - kusama + - westend + - bittensor + - aptos + - binancebeacon + - cardano + - near + - solana + - solana-devnet + - stellar + - stellar-testnet + - sui + - tezos + - tron + - ton + - ton-testnet + - hyperliquid + example: Ethereum + address: + type: string + description: Token address (if applicable) + example: 0x... + logoURI: + type: string + description: Token logo URI + example: https://... + isPoints: + type: boolean + description: Token is points + example: true + coinGeckoId: + type: string + description: Token CoinGecko ID + example: ethereum + required: + - symbol + - name + - decimals + - network + RewardDto: + type: object + properties: + rate: + type: number + description: Reward rate as a decimal (e.g. 0.04 = 4%) + example: 0.04 + rateType: + type: string + description: Whether this rate is APR or APY + example: APR + token: + description: Token received as reward + allOf: + - $ref: '#/components/schemas/TokenDto' + yieldSource: + type: string + description: Structured source of yield (e.g. staking, protocol incentive) + enum: + - staking + - restaking + - protocol_incentive + - points + - lending_interest + - mev + - real_world_asset_yield + - vault + example: protocol_incentive + description: + type: string + description: Optional human-readable description of this reward + example: LDO distributed to incentivize stETH adoption via Lido Boost + required: + - rate + - rateType + - token + - yieldSource + RewardRateDto: + type: object + properties: + total: + type: number + description: Estimated reward rate across all sources (e.g. staking, points) + example: 6.5 + rateType: + type: string + description: Whether this reward rate is APR or APY + example: APR + components: + description: Breakdown of reward rates by source + type: array + items: + $ref: '#/components/schemas/RewardDto' + required: + - total + - rateType + - components + YieldStatisticsDto: + type: object + properties: + tvlUsd: + type: string + description: Total value locked in USD + example: 1,200,000 + nullable: true + tvl: + type: string + description: Total value locked in primary underlying token + example: '500.25' + nullable: true + tvlRaw: + type: string + description: Raw total value locked (full precision) + example: '500250000000000000000' + nullable: true + uniqueUsers: + type: number + description: Number of users with active positions in the yield + example: 348 + nullable: true + averagePositionSizeUsd: + type: string + description: Average position size in USD + example: 3,448.27 + nullable: true + averagePositionSize: + type: string + description: Average position size in primary underlying token + example: '1.44' + nullable: true + YieldRiskExponentialDto: + type: object + properties: + poolRating: + type: object + description: Exponential pool rating + poolScore: + type: object + description: Exponential pool score (1-5) + ratingDescription: + type: object + description: Exponential rating description + url: + type: object + description: Exponential pool URL + YieldRiskCredoraDto: + type: object + properties: + rating: + type: object + description: Credora rating + score: + type: object + description: Credora score (1-5) + psl: + type: object + description: Probability of Significant Loss (annualized) + publishDate: + type: object + description: Credora publish date + curator: + type: object + description: Credora curator name + YieldRiskDto: + type: object + properties: + updatedAt: + type: string + description: Risk data last update timestamp + exponentialFi: + $ref: '#/components/schemas/YieldRiskExponentialDto' + credora: + $ref: '#/components/schemas/YieldRiskCredoraDto' + required: + - updatedAt + YieldStatusDto: + type: object + properties: + enter: + type: boolean + description: Whether the user can currently enter this yield + example: true + exit: + type: boolean + description: Whether the user can currently exit this yield + example: true + required: + - enter + - exit + ERCStandards: + type: string + description: Supported standards for this yield + enum: + - ERC20 + - ERC4626 + - ERC721 + - ERC1155 + YieldMetadataDto: + type: object + properties: + name: + type: string + description: Display name of the yield opportunity + example: Lido Staking + logoURI: + type: string + description: Yield opportunity logo URI + example: https://lido.fi/logo.png + description: + type: string + description: >- + Markdown-supported short description of this yield opportunity, + including where rewards come from. + example: >- + Stake ETH with Lido to earn auto-compounding validator rewards via + stETH. + documentation: + type: string + description: Link to documentation or integration guide + example: https://docs.lido.fi + underMaintenance: + type: boolean + description: Whether this yield is currently under maintenance + example: false + deprecated: + type: boolean + description: Whether this yield is deprecated and will be discontinued + example: false + supportedStandards: + type: array + items: + $ref: '#/components/schemas/ERCStandards' + required: + - name + - logoURI + - description + - documentation + - underMaintenance + - deprecated + - supportedStandards + YieldType: + type: string + description: Type of yield mechanism (staking, restaking, LP, vault, etc.) + enum: + - staking + - restaking + - lending + - vault + - fixed_yield + - real_world_asset + - concentrated_liquidity_pool + - liquidity_pool + RewardSchedule: + type: string + description: How often rewards are distributed (e.g. continuously, epoch-based) + enum: + - block + - hour + - day + - week + - month + - era + - epoch + - campaign + RewardClaiming: + type: string + description: 'How rewards are claimed: auto, manual, or mixed' + enum: + - auto + - manual + TimePeriodDto: + type: object + properties: + seconds: + type: number + description: Duration in seconds + example: 86400 + required: + - seconds + YieldFeeDto: + type: object + properties: + deposit: + type: string + description: Deposit fee percentage + example: '0.00' + withdrawal: + type: string + description: Withdrawal fee percentage + example: '0.00' + management: + type: string + description: Management fee percentage (annual) + example: '2.00' + performance: + type: string + description: Performance fee percentage + example: '20.00' + YieldEntryLimitsDto: + type: object + properties: + minimum: + type: string + description: >- + Minimum amount required to enter this yield in token units (null if + no minimum) + example: '0.01' + nullable: true + maximum: + type: string + description: >- + Maximum amount allowed to enter this yield in token units (null if + no limit) + example: '1000.0' + nullable: true + required: + - minimum + - maximum + ArgumentFieldDto: + type: object + properties: + name: + type: string + description: Field name + enum: + - 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 + example: amount + type: + type: string + description: Field type + example: string + enum: + - string + - number + - address + - enum + - boolean + label: + type: string + description: Field label + example: Amount to Enter + description: + type: string + description: Field description + required: + type: boolean + description: Whether the field is required + example: true + options: + description: Options for enum fields + example: + - individual + - batched + type: array + items: + type: string + optionsRef: + type: string + description: Reference to API endpoint that provides options dynamically + example: /api/v1/validators?integrationId=eth-lido + default: + type: object + description: Default value for the field + placeholder: + type: string + description: Placeholder text for the field + minimum: + type: string + description: Minimum allowed value for number fields (null if no minimum) + example: '1.0' + nullable: true + maximum: + type: string + description: Maximum allowed value for number fields (null if no maximum) + example: '100.0' + nullable: true + isArray: + type: boolean + description: Whether the field is an array + example: false + required: + - name + - type + - label + ArgumentSchemaDto: + type: object + properties: + fields: + description: List of argument fields + type: array + items: + $ref: '#/components/schemas/ArgumentFieldDto' + notes: + type: string + description: Notes or instructions for these arguments + required: + - fields + YieldMechanicsArgumentsDto: + type: object + properties: + enter: + $ref: '#/components/schemas/ArgumentSchemaDto' + exit: + $ref: '#/components/schemas/ArgumentSchemaDto' + manage: + type: object + description: >- + Manage action schemas. Each yield supports different ActionTypes + (CLAIM_UNSTAKED, CLAIM_REWARDS, etc.). Keys are ActionTypes enum + values. + additionalProperties: + $ref: '#/components/schemas/ArgumentSchemaDto' + balance: + description: >- + Arguments for the balances endpoint (e.g., alternative addresses, + chain-specific fields) + allOf: + - $ref: '#/components/schemas/ArgumentSchemaDto' + PossibleFeeTakingMechanismsDto: + type: object + properties: + depositFee: + type: boolean + description: User can take (earn) a deposit fee + example: false + managementFee: + type: boolean + description: User can take (earn) a management fee + example: false + performanceFee: + type: boolean + description: User can take (earn) a performance fee + example: false + validatorRebates: + type: boolean + description: User can take (earn) validator rebates + example: false + required: + - depositFee + - managementFee + - performanceFee + - validatorRebates + YieldMechanicsDto: + type: object + properties: + type: + $ref: '#/components/schemas/YieldType' + requiresValidatorSelection: + type: boolean + description: Indicates whether this yield requires validator selection + example: true + rewardSchedule: + $ref: '#/components/schemas/RewardSchedule' + rewardClaiming: + $ref: '#/components/schemas/RewardClaiming' + gasFeeToken: + description: Token used for gas fees (typically native) + allOf: + - $ref: '#/components/schemas/TokenDto' + lockupPeriod: + description: Lockup period - minimum time before exit can be initiated + allOf: + - $ref: '#/components/schemas/TimePeriodDto' + cooldownPeriod: + description: Cooldown period required before exit is allowed + allOf: + - $ref: '#/components/schemas/TimePeriodDto' + warmupPeriod: + description: Warmup period before rewards start accruing + allOf: + - $ref: '#/components/schemas/TimePeriodDto' + fee: + description: >- + Fees charged to the user for this yield (e.g., deposit, management, + performance). + allOf: + - $ref: '#/components/schemas/YieldFeeDto' + entryLimits: + description: Entry amount limits for this yield + allOf: + - $ref: '#/components/schemas/YieldEntryLimitsDto' + supportsLedgerWalletApi: + type: boolean + description: Supports Ledger Wallet API (connect via Ledger Live) + extraTransactionFormatsSupported: + type: array + description: Additional transaction formats supported (e.g. safe, batch) + items: + type: string + enum: + - raw + - default + arguments: + description: Arguments required for each action (enter, exit, manage, etc.) + allOf: + - $ref: '#/components/schemas/YieldMechanicsArgumentsDto' + possibleFeeTakingMechanisms: + description: >- + Possible fee-taking mechanisms for the user or integrator (i.e., + what fees the user/integrator can potentially earn from this yield). + allOf: + - $ref: '#/components/schemas/PossibleFeeTakingMechanismsDto' + required: + - type + - rewardSchedule + - rewardClaiming + - gasFeeToken + PricePerShareStateDto: + type: object + properties: + price: + type: number + description: >- + Price per share for the yield (e.g., LP token price, vault share + price) + example: 1.05 + shareToken: + description: Share token (the token you own shares of) + allOf: + - $ref: '#/components/schemas/TokenDto' + quoteToken: + description: Quote token (the token the price is denominated in) + allOf: + - $ref: '#/components/schemas/TokenDto' + required: + - price + - shareToken + - quoteToken + ConcentratedLiquidityPoolStateDto: + type: object + properties: + baseApr: + type: number + description: Full-range trading APR (24h or rolling) + example: 0.12 + price: + type: number + description: Current mid-price from the AMM (token1 per token0) + example: 3950.42 + tickSpacing: + type: number + description: Tick spacing required so UI can snap ranges + example: 50 + minTick: + type: number + description: Minimum tick bound for the pool + example: -887272 + maxTick: + type: number + description: Maximum tick bound for the pool + example: 887272 + volume24hUsd: + type: number + description: 24-hour trading volume in USD + example: 149550871.99 + nullable: true + fee24hUsd: + type: number + description: 24-hour fees earned by LPs in USD + example: 14955.09 + nullable: true + tvlUsd: + type: number + description: Total value locked in USD + example: 9213550.2 + nullable: true + feeTier: + type: number + description: Pool fee tier as a decimal (e.g., 0.0005 for 0.05%) + example: 0.0005 + baseToken: + description: Base token (token0) + allOf: + - $ref: '#/components/schemas/TokenDto' + quoteToken: + description: Quote token (token1) + allOf: + - $ref: '#/components/schemas/TokenDto' + required: + - baseApr + - price + - tickSpacing + - minTick + - maxTick + - volume24hUsd + - fee24hUsd + - tvlUsd + - feeTier + - baseToken + - quoteToken + CapacityDto: + type: object + properties: + current: + type: string + description: Current total assets in the yield + max: + type: string + nullable: true + description: Maximum capacity of the yield + remaining: + type: string + nullable: true + description: Remaining capacity available for deposits + required: + - current + AllocationRewardRateDto: + type: object + properties: + total: + type: number + description: Total reward rate + example: 5.25 + rateType: + type: string + description: Whether this rate is APR or APY + example: APY + required: + - total + - rateType + AllocationDto: + type: object + properties: + address: + type: string + description: Contract address of the underlying strategy + example: '0x1234567890abcdef1234567890abcdef12345678' + network: + type: string + description: Network the underlying strategy is on + enum: + - ethereum + - ethereum-goerli + - ethereum-holesky + - ethereum-sepolia + - ethereum-hoodi + - arbitrum + - base + - base-sepolia + - gnosis + - optimism + - polygon + - polygon-amoy + - starknet + - zksync + - linea + - unichain + - monad-testnet + - monad + - avalanche-c + - avalanche-c-atomic + - avalanche-p + - binance + - celo + - fantom + - harmony + - moonriver + - okc + - viction + - core + - sonic + - plasma + - katana + - hyperevm + - agoric + - akash + - axelar + - band-protocol + - bitsong + - canto + - chihuahua + - comdex + - coreum + - cosmos + - crescent + - cronos + - cudos + - desmos + - dydx + - evmos + - fetch-ai + - gravity-bridge + - injective + - irisnet + - juno + - kava + - ki-network + - mars-protocol + - nym + - okex-chain + - onomy + - osmosis + - persistence + - quicksilver + - regen + - secret + - sentinel + - sommelier + - stafi + - stargaze + - stride + - teritori + - tgrade + - umee + - sei + - mantra + - celestia + - saga + - zetachain + - dymension + - humansai + - neutron + - polkadot + - kusama + - westend + - bittensor + - aptos + - binancebeacon + - cardano + - near + - solana + - solana-devnet + - stellar + - stellar-testnet + - sui + - tezos + - tron + - ton + - ton-testnet + - hyperliquid + example: base + name: + type: string + description: Display name of the underlying strategy + example: Morpho Moonwell USDC + yieldId: + type: string + description: >- + Yield ID if this strategy is supported as a separate yield + opportunity + example: base-usdc-morpho-moonwell-usdc + providerId: + type: string + description: Provider ID for this strategy (e.g., morpho, aave, lido) + example: morpho + allocation: + type: string + description: Amount allocated to this strategy in input token units + example: '50000.00' + allocationUsd: + type: string + description: USD value of the allocation + example: '50000.00' + nullable: true + weight: + type: number + description: Current weight of this strategy as a percentage (0-100) + example: 50.5 + targetWeight: + type: number + description: Target weight of this strategy as a percentage (0-100) + example: 50 + rewardRate: + description: Reward rate of the underlying strategy + nullable: true + allOf: + - $ref: '#/components/schemas/AllocationRewardRateDto' + tvl: + type: string + description: Total value locked in the underlying strategy in input token units + example: '500.25' + nullable: true + tvlUsd: + type: string + description: Total value locked in USD for the underlying strategy + example: '10000000.00' + nullable: true + maxCapacity: + type: string + description: Maximum capacity of the underlying strategy + example: '1000000.00' + nullable: true + remainingCapacity: + type: string + description: Remaining capacity in the underlying strategy + example: '500000.00' + nullable: true + required: + - address + - network + - name + - allocation + - allocationUsd + - weight + - targetWeight + - rewardRate + - tvl + - tvlUsd + - maxCapacity + - remainingCapacity + YieldStateDto: + type: object + properties: + pricePerShareState: + description: Price per share state metadata + allOf: + - $ref: '#/components/schemas/PricePerShareStateDto' + concentratedLiquidityPoolState: + description: Concentrated liquidity pool state metadata + allOf: + - $ref: '#/components/schemas/ConcentratedLiquidityPoolStateDto' + capacityState: + description: Capacity state metadata + allOf: + - $ref: '#/components/schemas/CapacityDto' + allocations: + description: >- + Allocations to underlying strategies for vault yields (e.g., OAV, + Morpho). Includes allocation, APY, TVL, and capacity per strategy. + type: array + items: + $ref: '#/components/schemas/AllocationDto' + YieldDto: + type: object + properties: + id: + type: string + description: Unique identifier for this yield opportunity + example: ethereum-eth-lido-staking + network: + type: string + description: Network this yield opportunity is on + enum: + - ethereum + - ethereum-goerli + - ethereum-holesky + - ethereum-sepolia + - ethereum-hoodi + - arbitrum + - base + - base-sepolia + - gnosis + - optimism + - polygon + - polygon-amoy + - starknet + - zksync + - linea + - unichain + - monad-testnet + - monad + - avalanche-c + - avalanche-c-atomic + - avalanche-p + - binance + - celo + - fantom + - harmony + - moonriver + - okc + - viction + - core + - sonic + - plasma + - katana + - hyperevm + - agoric + - akash + - axelar + - band-protocol + - bitsong + - canto + - chihuahua + - comdex + - coreum + - cosmos + - crescent + - cronos + - cudos + - desmos + - dydx + - evmos + - fetch-ai + - gravity-bridge + - injective + - irisnet + - juno + - kava + - ki-network + - mars-protocol + - nym + - okex-chain + - onomy + - osmosis + - persistence + - quicksilver + - regen + - secret + - sentinel + - sommelier + - stafi + - stargaze + - stride + - teritori + - tgrade + - umee + - sei + - mantra + - celestia + - saga + - zetachain + - dymension + - humansai + - neutron + - polkadot + - kusama + - westend + - bittensor + - aptos + - binancebeacon + - cardano + - near + - solana + - solana-devnet + - stellar + - stellar-testnet + - sui + - tezos + - tron + - ton + - ton-testnet + - hyperliquid + chainId: + type: string + description: EVM chain ID for this network (only for EVM networks) + example: '1' + inputTokens: + description: Accepted input tokens (auto-converted as needed) + type: array + items: + $ref: '#/components/schemas/TokenDto' + outputToken: + description: Token received from the protocol + allOf: + - $ref: '#/components/schemas/TokenDto' + token: + description: Canonical deposit token - used for balances + allOf: + - $ref: '#/components/schemas/TokenDto' + tokens: + description: Canonical deposit tokens - used for balances + type: array + items: + $ref: '#/components/schemas/TokenDto' + rewardRate: + description: Total effective yield broken down by source and token. + allOf: + - $ref: '#/components/schemas/RewardRateDto' + statistics: + description: Key statistics and analytics for this yield opportunity + allOf: + - $ref: '#/components/schemas/YieldStatisticsDto' + risk: + description: Risk scores and provider ratings for this yield + allOf: + - $ref: '#/components/schemas/YieldRiskDto' + status: + description: Current availability of user actions like enter, exit, claim + allOf: + - $ref: '#/components/schemas/YieldStatusDto' + metadata: + description: >- + Descriptive metadata including name, logo, description, and + documentation + allOf: + - $ref: '#/components/schemas/YieldMetadataDto' + mechanics: + description: Operational mechanics including constraints, fees, and capabilities + allOf: + - $ref: '#/components/schemas/YieldMechanicsDto' + providerId: + type: string + description: The provider ID this yield belongs to + example: lido + tags: + description: Optional tags for filtering or categorization + example: + - restaking + - ETH + - LST + type: array + items: + type: string + state: + description: >- + 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) + allOf: + - $ref: '#/components/schemas/YieldStateDto' + required: + - id + - network + - inputTokens + - token + - tokens + - rewardRate + - status + - metadata + - mechanics + - providerId + BalanceType: + type: string + description: Type of balance + enum: + - active + - entering + - exiting + - withdrawable + - claimable + - locked + PendingActionDto: + type: object + properties: + intent: + type: string + description: High-level action intent + enum: + - enter + - manage + - exit + example: manage + type: + type: string + description: Specific action type + enum: + - STAKE + - UNSTAKE + - CLAIM_REWARDS + - RESTAKE_REWARDS + - WITHDRAW + - WITHDRAW_ALL + - RESTAKE + - CLAIM_UNSTAKED + - UNLOCK_LOCKED + - STAKE_LOCKED + - VOTE + - REVOKE + - VOTE_LOCKED + - REVOTE + - REBOND + - MIGRATE + - VERIFY_WITHDRAW_CREDENTIALS + - DELEGATE + example: CLAIM_REWARDS + passthrough: + type: string + description: >- + Server-generated passthrough that must be included when executing + the action + example: eyJhZGRyZXNzZXMiOnsiYWRkcmVzcyI6ImNvc21vczF5ZXk... + arguments: + description: Argument schema required to execute this action + nullable: true + allOf: + - $ref: '#/components/schemas/ArgumentSchemaDto' + amount: + type: string + description: Amount involved in the action + example: '0.1' + nullable: true + required: + - intent + - type + - passthrough + RevShareDetailsDto: + type: object + properties: + minRevShare: + type: number + description: Minimum revenue share percentage (0-1) + example: 0.3 + maxRevShare: + type: number + description: Maximum revenue share percentage (0-1) + example: 0.7 + required: + - minRevShare + - maxRevShare + RevShareTiersDto: + type: object + properties: + trial: + description: Trial tier revenue share details + allOf: + - $ref: '#/components/schemas/RevShareDetailsDto' + standard: + description: Standard tier revenue share details + allOf: + - $ref: '#/components/schemas/RevShareDetailsDto' + pro: + description: Pro tier revenue share details + allOf: + - $ref: '#/components/schemas/RevShareDetailsDto' + ValidatorProviderDto: + type: object + properties: + name: + type: string + description: Provider name + example: Morpho + id: + type: string + description: Provider ID + example: morpho + logoURI: + type: string + description: Provider logo URI + example: https://morpho.xyz/logo.png + description: + type: string + description: Short description of the provider + example: A peer-to-peer DeFi lending protocol + website: + type: string + description: Provider website + example: https://morpho.xyz + tvlUsd: + type: object + description: Total TVL across the entire provider in USD + example: 10,200,000 + nullable: true + type: + type: string + description: Type of provider (protocol or validator provider) + enum: + - protocol + - validator_provider + example: protocol + references: + description: Optional social/media references or audit links + nullable: true + type: array + items: + type: string + rank: + type: number + description: Provider ranking (lower numbers indicate higher preference) + example: 1 + preferred: + type: boolean + description: Whether this provider is marked as preferred + example: true + revshare: + description: Revenue sharing details by tier + example: + standard: + minRevShare: 0.3 + maxRevShare: 0.7 + pro: + minRevShare: 0.4 + maxRevShare: 0.8 + allOf: + - $ref: '#/components/schemas/RevShareTiersDto' + uniqueId: + type: string + description: Provider ID (deprecated, use `id` instead) + example: luganodes + deprecated: true + createdAt: + format: date-time + type: string + description: Creation timestamp (deprecated) + deprecated: true + updatedAt: + format: date-time + type: string + description: Last update timestamp (deprecated) + deprecated: true + required: + - name + - id + - logoURI + - description + - website + - tvlUsd + - type + - rank + - preferred + ValidatorDto: + type: object + properties: + address: + type: string + description: Validator address or ID + example: cosmosvaloper1abc... + name: + type: string + description: Validator display name + example: StakeKit Validator + logoURI: + type: string + description: Validator logo URI + example: https://stakekit.com/logo.png + website: + type: string + description: Link to validator website + example: https://stakekit.com + rewardRate: + description: >- + Detailed reward rate breakdown by source (emissions, MEV, fees, + etc.) + example: + total: 8.4 + rateType: APR + components: + - rate: 6.8 + rateType: APR + token: + symbol: SOL + name: Solana + yieldSource: staking + description: Solana network inflation rewards + - rate: 1.2 + rateType: APR + token: + symbol: SOL + name: Solana + yieldSource: validator_commission + description: Transaction fees from processed transactions + - rate: 0.4 + rateType: APR + token: + symbol: SOL + name: Solana + yieldSource: mev + description: MEV from Jito block space auctions + allOf: + - $ref: '#/components/schemas/RewardRateDto' + provider: + description: Provider information for this validator + allOf: + - $ref: '#/components/schemas/ValidatorProviderDto' + commission: + type: number + description: Commission rate charged by validator + example: 0.05 + tvlUsd: + type: string + description: Total value locked with this validator in USD + example: 18,340,000 + tvl: + type: string + description: Total value locked with this validator in native token + example: '8250.45' + tvlRaw: + type: string + description: Raw total value locked with this validator (full precision) + example: '8250450000000000000000' + votingPower: + type: number + description: Validator's voting power share (0–1) + example: 0.013 + preferred: + type: boolean + description: Whether this validator is flagged as preferred + example: true + minimumStake: + type: string + description: Minimum stake allowed in native token + example: '1.0' + remainingPossibleStake: + type: string + description: Maximum available stake before hitting cap in native token + example: 285,714.28 + remainingSlots: + type: number + description: Number of remaining nominator/delegator slots (for capped chains) + example: 8 + nominatorCount: + type: number + description: Number of current nominators + example: 321 + status: + type: string + description: Validator status description (active, jailed, unbonding, etc.) + example: active + providerId: + type: string + description: ID of the provider backing this validator + example: provider-1 + pricePerShare: + type: string + description: Price per share of the validator + example: '1.0' + subnetId: + type: number + description: Subnet ID + example: 1 + subnetName: + type: string + description: Subnet name + example: Apex + marketCap: + type: string + description: Market cap of the subnet + example: '1000000' + tokenSymbol: + type: string + description: Token symbol of the subnet + example: α + required: + - address + BalanceDto: + type: object + properties: + address: + type: string + description: User wallet address that owns this balance + example: 0x1234... + type: + $ref: '#/components/schemas/BalanceType' + amount: + type: string + description: Balance amount in underlying token + example: '2.625' + amountRaw: + type: string + description: Raw balance amount (full precision) + example: '2625000000000000000' + date: + format: date-time + type: string + description: Date relevant to this balance state + nullable: true + example: '2025-04-23T08:00:00Z' + feeConfigurationId: + type: string + description: Fee configuration ID (if applicable) + example: fee-config-1 + pendingActions: + description: Pending actions for this balance + type: array + items: + $ref: '#/components/schemas/PendingActionDto' + token: + description: Token used for balance amounts + allOf: + - $ref: '#/components/schemas/TokenDto' + validator: + description: Validator information (if applicable) + nullable: true + allOf: + - $ref: '#/components/schemas/ValidatorDto' + validators: + description: >- + Multiple validators information (when balance is distributed across + multiple validators) + nullable: true + type: array + items: + $ref: '#/components/schemas/ValidatorDto' + amountUsd: + type: string + description: Value of the balance in USD + example: 2,500.00 + nullable: true + isEarning: + type: boolean + description: Whether this balance is currently earning rewards + example: true + priceRange: + type: object + description: >- + Price range for concentrated liquidity positions in + tokens[1]/tokens[0] format (e.g., if tokens[0]=WETH and + tokens[1]=USDC, then priceRange represents USDC/WETH) + example: + min: '2700' + max: '3310' + tokenId: + type: string + description: >- + NFT token ID for liquidity positions (e.g., PancakeSwap V3 position + NFT ID) + example: '12345' + required: + - address + - type + - amount + - amountRaw + - pendingActions + - token + - isEarning + YieldBalancesDto: + type: object + properties: + yieldId: + type: string + description: Unique identifier of the yield + example: ethereum-eth-lido-staking + balances: + description: List of balances for this yield + type: array + items: + $ref: '#/components/schemas/BalanceDto' + outputTokenBalance: + description: Balance for the output token + nullable: true + allOf: + - $ref: '#/components/schemas/BalanceDto' + required: + - yieldId + - balances + YieldErrorDto: + type: object + properties: + yieldId: + type: string + description: Unique identifier of the yield that failed + example: ethereum-compound-usdc + error: + type: string + description: Error message describing what went wrong + example: 'Failed to fetch data from blockchain: RPC timeout' + required: + - yieldId + - error + BalancesResponseDto: + type: object + properties: + items: + description: Successful yield balance results + type: array + items: + $ref: '#/components/schemas/YieldBalancesDto' + errors: + description: Errors encountered while fetching balances + type: array + items: + $ref: '#/components/schemas/YieldErrorDto' + required: + - items + - errors + Networks: + type: string + enum: + - ethereum + - ethereum-goerli + - ethereum-holesky + - ethereum-sepolia + - ethereum-hoodi + - arbitrum + - base + - base-sepolia + - gnosis + - optimism + - polygon + - polygon-amoy + - starknet + - zksync + - linea + - unichain + - monad-testnet + - monad + - avalanche-c + - avalanche-c-atomic + - avalanche-p + - binance + - celo + - fantom + - harmony + - moonriver + - okc + - viction + - core + - sonic + - plasma + - katana + - hyperevm + - agoric + - akash + - axelar + - band-protocol + - bitsong + - canto + - chihuahua + - comdex + - coreum + - cosmos + - crescent + - cronos + - cudos + - desmos + - dydx + - evmos + - fetch-ai + - gravity-bridge + - injective + - irisnet + - juno + - kava + - ki-network + - mars-protocol + - nym + - okex-chain + - onomy + - osmosis + - persistence + - quicksilver + - regen + - secret + - sentinel + - sommelier + - stafi + - stargaze + - stride + - teritori + - tgrade + - umee + - sei + - mantra + - celestia + - saga + - zetachain + - dymension + - humansai + - neutron + - polkadot + - kusama + - westend + - bittensor + - aptos + - binancebeacon + - cardano + - near + - solana + - solana-devnet + - stellar + - stellar-testnet + - sui + - tezos + - tron + - ton + - ton-testnet + - hyperliquid + GetBalancesArgumentsDto: + type: object + properties: + cAddressBech: + type: string + description: Avalanche C-chain address + example: 0x123... + pAddressBech: + type: string + description: Avalanche P-chain address + example: P-avax1... + BalancesQueryDto: + type: object + properties: + yieldId: + type: string + description: The unique identifier of the yield (optional for chain scanning) + example: ethereum-eth-lido-staking + address: + type: string + description: User wallet address to check balances for + example: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e' + network: + example: ethereum + $ref: '#/components/schemas/Networks' + arguments: + description: Arguments for balance queries + allOf: + - $ref: '#/components/schemas/GetBalancesArgumentsDto' + required: + - address + - network + BalancesRequestDto: + type: object + properties: + queries: + description: Array of balance queries + example: + - yieldId: ethereum-eth-lido-staking + address: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e' + network: ethereum + type: array + items: + $ref: '#/components/schemas/BalancesQueryDto' + required: + - queries + YieldBalancesRequestDto: + type: object + properties: + address: + type: string + description: User wallet address to check balances for + example: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e' + arguments: + description: Optional arguments for advanced or protocol-specific balance queries + allOf: + - $ref: '#/components/schemas/GetBalancesArgumentsDto' + required: + - address + ValidatorQueryDto: + type: object + properties: + offset: + type: number + description: Offset for pagination + default: 0 + minimum: 0 + example: 0 + limit: + type: number + description: Maximum number of items to return + default: 20 + minimum: 1 + maximum: 100 + example: 20 + name: + type: string + description: Filter by validator name (case-insensitive, partial match) + address: + type: string + description: Filter by validator address + provider: + type: string + description: Filter by provider ID + status: + type: string + description: Filter by validator status + preferred: + type: boolean + description: Filter by preferred flag + TransactionDto: + type: object + properties: + id: + type: string + description: Unique transaction identifier + example: tx_123abc + title: + type: string + description: Display title for the transaction + example: Approve USDC + network: + type: string + description: Network this transaction is for + enum: + - ethereum + - ethereum-goerli + - ethereum-holesky + - ethereum-sepolia + - ethereum-hoodi + - arbitrum + - base + - base-sepolia + - gnosis + - optimism + - polygon + - polygon-amoy + - starknet + - zksync + - linea + - unichain + - monad-testnet + - monad + - avalanche-c + - avalanche-c-atomic + - avalanche-p + - binance + - celo + - fantom + - harmony + - moonriver + - okc + - viction + - core + - sonic + - plasma + - katana + - hyperevm + - agoric + - akash + - axelar + - band-protocol + - bitsong + - canto + - chihuahua + - comdex + - coreum + - cosmos + - crescent + - cronos + - cudos + - desmos + - dydx + - evmos + - fetch-ai + - gravity-bridge + - injective + - irisnet + - juno + - kava + - ki-network + - mars-protocol + - nym + - okex-chain + - onomy + - osmosis + - persistence + - quicksilver + - regen + - secret + - sentinel + - sommelier + - stafi + - stargaze + - stride + - teritori + - tgrade + - umee + - sei + - mantra + - celestia + - saga + - zetachain + - dymension + - humansai + - neutron + - polkadot + - kusama + - westend + - bittensor + - aptos + - binancebeacon + - cardano + - near + - solana + - solana-devnet + - stellar + - stellar-testnet + - sui + - tezos + - tron + - ton + - ton-testnet + - hyperliquid + example: ethereum + status: + type: string + description: Current status of the transaction + enum: + - NOT_FOUND + - CREATED + - BLOCKED + - WAITING_FOR_SIGNATURE + - SIGNED + - BROADCASTED + - PENDING + - CONFIRMED + - FAILED + - SKIPPED + example: PENDING + type: + type: string + description: Type of transaction operation + enum: + - SWAP + - DEPOSIT + - APPROVAL + - STAKE + - CLAIM_UNSTAKED + - CLAIM_REWARDS + - RESTAKE_REWARDS + - UNSTAKE + - SPLIT + - MERGE + - LOCK + - UNLOCK + - SUPPLY + - ADD_LIQUIDITY + - REMOVE_LIQUIDITY + - BRIDGE + - VOTE + - REVOKE + - RESTAKE + - REBOND + - WITHDRAW + - WITHDRAW_ALL + - CREATE_ACCOUNT + - REVEAL + - MIGRATE + - DELEGATE + - UNDELEGATE + - UTXO_P_TO_C_IMPORT + - UTXO_C_TO_P_IMPORT + - WRAP + - UNWRAP + - UNFREEZE_LEGACY + - UNFREEZE_LEGACY_BANDWIDTH + - UNFREEZE_LEGACY_ENERGY + - UNFREEZE_BANDWIDTH + - UNFREEZE_ENERGY + - FREEZE_BANDWIDTH + - FREEZE_ENERGY + - UNDELEGATE_BANDWIDTH + - UNDELEGATE_ENERGY + - P2P_NODE_REQUEST + - CREATE_EIGENPOD + - VERIFY_WITHDRAW_CREDENTIALS + - START_CHECKPOINT + - VERIFY_CHECKPOINT_PROOFS + - QUEUE_WITHDRAWALS + - COMPLETE_QUEUED_WITHDRAWALS + - LZ_DEPOSIT + - LZ_WITHDRAW + - LUGANODES_PROVISION + - LUGANODES_EXIT_REQUEST + - INFSTONES_PROVISION + - INFSTONES_EXIT_REQUEST + - INFSTONES_CLAIM_REQUEST + example: STAKE + hash: + type: string + description: Transaction hash (available after broadcast) + nullable: true + example: 0x1234567890abcdef... + createdAt: + format: date-time + type: string + description: When the transaction was created + broadcastedAt: + format: date-time + type: string + description: When the transaction was broadcasted to the network + nullable: true + signedTransaction: + type: string + description: Signed transaction data (ready for broadcast) + nullable: true + unsignedTransaction: + description: The unsigned transaction data to be signed by the wallet + oneOf: + - type: string + description: Serialized transaction data + - type: object + description: Transaction object (for non-EVM chains) + nullable: true + example: >- + 0x02f87082012a022f2f83018000947a250d5630b4cf539739df2c5dacb4c659f2488d880de0b6b3a764000080c080a0ef0de6c7b46fc75dd6cb86dccc3cfd731c2bdf6f3d736557240c3646c6fe01a6a07cd60b58dfe01847249dfdd7950ba0d045dded5bbe410b07a015a0ed34e5e00d + annotatedTransaction: + type: object + description: Human-readable breakdown of the transaction for display purposes + nullable: true + example: + method: stake + inputs: + amount: '1000000000000000000' + structuredTransaction: + type: object + description: Detailed transaction data for client-side validation or simulation + nullable: true + stepIndex: + type: number + description: Zero-based index of the step in the action flow + example: 0 + description: + type: string + description: User-friendly description of what this transaction does + example: Approve USDC for staking + error: + type: string + description: Error message if the transaction failed + nullable: true + gasEstimate: + type: string + description: Estimated gas cost for the transaction + example: '21000' + explorerUrl: + type: string + description: Link to the blockchain explorer for this transaction + nullable: true + example: https://etherscan.io/tx/0x1234... + isMessage: + type: boolean + description: Whether this transaction is a message rather than a value transfer + example: false + required: + - id + - title + - network + - status + - type + - hash + - createdAt + - broadcastedAt + - signedTransaction + - unsignedTransaction + ActionArgumentsDto: + type: object + properties: + amount: + type: string + description: Amount to stake/unstake + example: '1000000000000000000' + amounts: + description: Amounts to stake/unstake + example: + - '1000000000000000000' + - '2000000000000000000' + type: array + items: + type: string + validatorAddress: + type: string + description: Validator address for single validator selection + example: cosmosvaloper1... + validatorAddresses: + description: Multiple validator addresses + example: + - cosmosvaloper1... + - cosmosvaloper2... + type: array + items: + type: string + providerId: + type: string + description: Provider ID for Ethereum native staking + example: kiln + duration: + type: number + description: Duration for Avalanche native staking (in seconds) + example: 1209600 + inputToken: + type: string + description: >- + Token for deposits. Use "0x" for native token or provide the token + address. For cross-chain deposits, also provide inputTokenNetwork. + example: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' + inputTokenNetwork: + type: string + description: >- + Network for the input token. Required for cross-chain deposits when + the token is on a different network than the vault. + enum: + - ethereum + - ethereum-goerli + - ethereum-holesky + - ethereum-sepolia + - ethereum-hoodi + - arbitrum + - base + - base-sepolia + - gnosis + - optimism + - polygon + - polygon-amoy + - starknet + - zksync + - linea + - unichain + - monad-testnet + - monad + - avalanche-c + - avalanche-c-atomic + - avalanche-p + - binance + - celo + - fantom + - harmony + - moonriver + - okc + - viction + - core + - sonic + - plasma + - katana + - hyperevm + - agoric + - akash + - axelar + - band-protocol + - bitsong + - canto + - chihuahua + - comdex + - coreum + - cosmos + - crescent + - cronos + - cudos + - desmos + - dydx + - evmos + - fetch-ai + - gravity-bridge + - injective + - irisnet + - juno + - kava + - ki-network + - mars-protocol + - nym + - okex-chain + - onomy + - osmosis + - persistence + - quicksilver + - regen + - secret + - sentinel + - sommelier + - stafi + - stargaze + - stride + - teritori + - tgrade + - umee + - sei + - mantra + - celestia + - saga + - zetachain + - dymension + - humansai + - neutron + - polkadot + - kusama + - westend + - bittensor + - aptos + - binancebeacon + - cardano + - near + - solana + - solana-devnet + - stellar + - stellar-testnet + - sui + - tezos + - tron + - ton + - ton-testnet + - hyperliquid + outputToken: + type: string + description: >- + Token for withdrawals. Use "0x" for native token or provide the + token address. For cross-chain withdrawals, also provide + outputTokenNetwork. + example: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' + outputTokenNetwork: + type: string + description: >- + Network for the output token. Required for cross-chain withdrawals + when the destination is on a different network than the vault. + enum: + - ethereum + - ethereum-goerli + - ethereum-holesky + - ethereum-sepolia + - ethereum-hoodi + - arbitrum + - base + - base-sepolia + - gnosis + - optimism + - polygon + - polygon-amoy + - starknet + - zksync + - linea + - unichain + - monad-testnet + - monad + - avalanche-c + - avalanche-c-atomic + - avalanche-p + - binance + - celo + - fantom + - harmony + - moonriver + - okc + - viction + - core + - sonic + - plasma + - katana + - hyperevm + - agoric + - akash + - axelar + - band-protocol + - bitsong + - canto + - chihuahua + - comdex + - coreum + - cosmos + - crescent + - cronos + - cudos + - desmos + - dydx + - evmos + - fetch-ai + - gravity-bridge + - injective + - irisnet + - juno + - kava + - ki-network + - mars-protocol + - nym + - okex-chain + - onomy + - osmosis + - persistence + - quicksilver + - regen + - secret + - sentinel + - sommelier + - stafi + - stargaze + - stride + - teritori + - tgrade + - umee + - sei + - mantra + - celestia + - saga + - zetachain + - dymension + - humansai + - neutron + - polkadot + - kusama + - westend + - bittensor + - aptos + - binancebeacon + - cardano + - near + - solana + - solana-devnet + - stellar + - stellar-testnet + - sui + - tezos + - tron + - ton + - ton-testnet + - hyperliquid + subnetId: + type: number + description: Subnet ID for Bittensor staking + example: 1 + tronResource: + type: string + description: Tron resource type for Tron staking + enum: + - BANDWIDTH + - ENERGY + feeConfigurationId: + type: string + description: Fee configuration ID for custom fee settings + example: custom-fee-config-1 + cosmosPubKey: + type: string + description: Cosmos public key for Cosmos staking + example: cosmospub1... + tezosPubKey: + type: string + description: Tezos public key for Tezos staking + example: edpk... + cAddressBech: + type: string + description: Avalanche C-chain address + example: 0x123... + pAddressBech: + type: string + description: Avalanche P-chain address + example: P-avax1... + executionMode: + type: string + description: Transaction execution mode + enum: + - individual + - batched + example: individual + ledgerWalletApiCompatible: + type: boolean + description: >- + Transactions should have Ledger wallet API compatibility for + hardware wallet users + example: true + useMaxAmount: + type: boolean + description: Use max amount for ERC4626 withdraw + example: true + useInstantExecution: + type: boolean + description: Use instant execution for exit (faster but may have fees) + example: true + rangeMin: + type: string + description: >- + Minimum price bound for concentrated liquidity pools (as decimal + string). Must be non-negative (can be 0) and less than rangeMax. + example: '0.0' + rangeMax: + type: string + description: >- + Maximum price bound for concentrated liquidity pools (as decimal + string). Must be positive and greater than rangeMin. + example: '1.0' + percentage: + type: number + description: >- + Percentage of liquidity to exit (0-100). Required for partial exits + from liquidity positions. + example: 50 + minimum: 0 + maximum: 100 + tokenId: + type: string + description: >- + NFT token ID for concentrated liquidity positions. Required for + exiting specific positions. + example: '12345' + ActionDto: + type: object + properties: + id: + type: string + description: Unique action identifier + example: action_123abc + intent: + type: string + description: High-level action intent + enum: + - enter + - manage + - exit + example: manage + type: + type: string + description: Specific action type + enum: + - STAKE + - UNSTAKE + - CLAIM_REWARDS + - RESTAKE_REWARDS + - WITHDRAW + - WITHDRAW_ALL + - RESTAKE + - CLAIM_UNSTAKED + - UNLOCK_LOCKED + - STAKE_LOCKED + - VOTE + - REVOKE + - VOTE_LOCKED + - REVOTE + - REBOND + - MIGRATE + - VERIFY_WITHDRAW_CREDENTIALS + - DELEGATE + example: CLAIM_REWARDS + yieldId: + type: string + description: Yield ID this action belongs to + example: ethereum-eth-lido-staking + address: + type: string + description: User wallet address + example: 0x1234... + amount: + type: string + description: Amount involved in the action + example: '1000000000000000000' + nullable: true + amountRaw: + type: string + description: Raw wei amount (full precision) + example: '1000000000000000000' + nullable: true + amountUsd: + type: string + description: USD value of the amount + example: '1500.50' + nullable: true + transactions: + description: Array of transactions for this action + type: array + items: + $ref: '#/components/schemas/TransactionDto' + executionPattern: + type: string + description: >- + Transaction execution pattern - synchronous (submit one by one, wait + for each), asynchronous (submit all at once), or batch (single + transaction with multiple operations) + enum: + - synchronous + - asynchronous + - batch + example: synchronous + rawArguments: + description: Raw arguments exactly as submitted by the user for this action + nullable: true + allOf: + - $ref: '#/components/schemas/ActionArgumentsDto' + createdAt: + format: date-time + type: string + description: When the action was created + completedAt: + format: date-time + type: string + description: When the action was completed + nullable: true + status: + type: string + description: Current status of the action + enum: + - CANCELED + - CREATED + - WAITING_FOR_NEXT + - PROCESSING + - FAILED + - SUCCESS + - STALE + required: + - id + - intent + - type + - yieldId + - address + - amount + - amountRaw + - amountUsd + - transactions + - executionPattern + - rawArguments + - createdAt + - completedAt + - status + PaginatedResponseDto: + type: object + properties: + total: + type: number + description: Total number of items available + example: 100 + offset: + type: number + description: Offset of the current page + example: 0 + limit: + type: number + description: Limit of the current page + example: 20 + required: + - total + - offset + - limit + YieldQueryDto: + type: object + properties: + offset: + type: number + description: Offset for pagination + default: 0 + minimum: 0 + example: 0 + limit: + type: number + description: Maximum number of items to return + default: 20 + minimum: 1 + maximum: 100 + example: 20 + network: + type: string + description: Filter by network + enum: + - ethereum + - ethereum-goerli + - ethereum-holesky + - ethereum-sepolia + - ethereum-hoodi + - arbitrum + - base + - base-sepolia + - gnosis + - optimism + - polygon + - polygon-amoy + - starknet + - zksync + - linea + - unichain + - monad-testnet + - monad + - avalanche-c + - avalanche-c-atomic + - avalanche-p + - binance + - celo + - fantom + - harmony + - moonriver + - okc + - viction + - core + - sonic + - plasma + - katana + - hyperevm + - agoric + - akash + - axelar + - band-protocol + - bitsong + - canto + - chihuahua + - comdex + - coreum + - cosmos + - crescent + - cronos + - cudos + - desmos + - dydx + - evmos + - fetch-ai + - gravity-bridge + - injective + - irisnet + - juno + - kava + - ki-network + - mars-protocol + - nym + - okex-chain + - onomy + - osmosis + - persistence + - quicksilver + - regen + - secret + - sentinel + - sommelier + - stafi + - stargaze + - stride + - teritori + - tgrade + - umee + - sei + - mantra + - celestia + - saga + - zetachain + - dymension + - humansai + - neutron + - polkadot + - kusama + - westend + - bittensor + - aptos + - binancebeacon + - cardano + - near + - solana + - solana-devnet + - stellar + - stellar-testnet + - sui + - tezos + - tron + - ton + - ton-testnet + - hyperliquid + chainId: + type: string + description: 'Filter by EVM chain ID (Ethereum: 1, Polygon: 137, etc)' + example: '1' + networks: + type: string + description: Filter by multiple networks (comma separated) + yieldId: + type: string + example: optimism-usdt-aave-v3-lending + maxLength: 200 + yieldIds: + example: + - optimism-usdt-aave-v3-lending + maxItems: 100 + type: array + items: + type: string + maxLength: 200 + type: + type: string + description: Filter by yield type + enum: + - staking + - restaking + - lending + - vault + - fixed_yield + - real_world_asset + - concentrated_liquidity_pool + - liquidity_pool + types: + type: array + description: Filter by multiple yield types (comma separated) + items: + type: string + enum: + - staking + - restaking + - lending + - vault + - fixed_yield + - real_world_asset + - concentrated_liquidity_pool + - liquidity_pool + hasCooldownPeriod: + type: boolean + description: Filter by cooldown period + hasWarmupPeriod: + type: boolean + description: Filter by warmup period + token: + type: string + description: Filter by token symbol or address + inputToken: + type: string + description: Filter by input token symbol or address + inputTokens: + description: Filter by multiple input token symbol or address (comma separated) + type: array + items: + type: string + provider: + type: string + description: Filter by provider ID + providers: + description: Filter by multiple provider IDs (comma separated) + type: array + items: + type: string + search: + type: string + description: Search by yield name + sort: + type: string + description: Sort by yield status + enum: + - statusEnterAsc + - statusEnterDesc + - statusExitAsc + - statusExitDesc + PaginationQueryDto: + type: object + properties: + offset: + type: number + description: Offset for pagination + default: 0 + minimum: 0 + example: 0 + limit: + type: number + description: Maximum number of items to return + default: 20 + minimum: 1 + maximum: 100 + example: 20 + RiskParameterDto: + type: object + properties: + id: + type: string + category: + type: string + item: + type: string + isDynamic: + type: boolean + value: + type: object + network: + $ref: '#/components/schemas/Networks' + asset: + type: object + protocol: + type: object + integrationId: + type: object + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + required: + - id + - category + - item + - isDynamic + - createdAt + - updatedAt + CreateActionDto: + type: object + properties: + yieldId: + type: string + description: Yield ID to perform the action on + example: ethereum-eth-lido-staking + address: + type: string + description: User wallet address + example: 0x1234... + arguments: + description: Arguments for the action + allOf: + - $ref: '#/components/schemas/ActionArgumentsDto' + required: + - yieldId + - address + CreateManageActionDto: + type: object + properties: + yieldId: + type: string + description: Yield ID to perform the action on + example: ethereum-eth-lido-staking + address: + type: string + description: User wallet address + example: 0x1234... + arguments: + description: Arguments for the action + allOf: + - $ref: '#/components/schemas/ActionArgumentsDto' + action: + type: string + description: Pending action type (required for manage actions) + enum: + - STAKE + - UNSTAKE + - CLAIM_REWARDS + - RESTAKE_REWARDS + - WITHDRAW + - WITHDRAW_ALL + - RESTAKE + - CLAIM_UNSTAKED + - UNLOCK_LOCKED + - STAKE_LOCKED + - VOTE + - REVOKE + - VOTE_LOCKED + - REVOTE + - REBOND + - MIGRATE + - VERIFY_WITHDRAW_CREDENTIALS + - DELEGATE + example: CLAIM_REWARDS + passthrough: + type: string + description: >- + Server-generated passthrough from the balances endpoint (required + for manage actions) + example: eyJhZGRyZXNzZXMiOnsiYWRkcmVzcyI6ImNvc21vczF5ZXk... + required: + - yieldId + - address + - action + - passthrough + ActionsQueryDto: + type: object + properties: + offset: + type: number + description: Offset for pagination + default: 0 + minimum: 0 + example: 0 + limit: + type: number + description: Maximum number of items to return + default: 20 + minimum: 1 + maximum: 100 + example: 20 + address: + type: string + description: User wallet address to filter actions for + example: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e' + status: + type: string + description: Filter by action status + enum: + - CANCELED + - CREATED + - WAITING_FOR_NEXT + - PROCESSING + - FAILED + - SUCCESS + - STALE + intent: + type: string + description: Filter by action intent + enum: + - enter + - manage + - exit + type: + type: string + description: Filter by action type + enum: + - STAKE + - UNSTAKE + - CLAIM_REWARDS + - RESTAKE_REWARDS + - WITHDRAW + - WITHDRAW_ALL + - RESTAKE + - CLAIM_UNSTAKED + - UNLOCK_LOCKED + - STAKE_LOCKED + - VOTE + - REVOKE + - VOTE_LOCKED + - REVOTE + - REBOND + - MIGRATE + - VERIFY_WITHDRAW_CREDENTIALS + - DELEGATE + yieldId: + type: string + description: Filter by yield ID + example: ethereum-eth-lido-staking + required: + - address + SubmitHashDto: + type: object + properties: + hash: + type: string + description: Transaction hash from the blockchain + example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef' + required: + - hash + SubmitTransactionDto: + type: object + properties: + signedTransaction: + type: string + description: Encoded signed transaction to submit to the blockchain + example: >- + 0aba010aa0010a232f636f736d6f732e7374616b696e672e763162657461312e4d736744656c656761746512790a2a696e6a316a61366664646e6e33727272677137646d6a757a6b71363279376d68346675346b6e656d37791231696e6a76616c6f7065723167346436646d766e706737773779756779366b706c6e6470376a70666d66336b7274736368701a180a03696e6a121131303030303030303030303030303030301215766961205374616b654b6974204349442d31303039129e010a7e0a740a2d2f696e6a6563746976652e63727970746f2e763162657461312e657468736563703235366b312e5075624b657912430a41042aec99dce37ea3d8f11b44da62bce0e885f0ba5b309382954babec76eb138cb0bb84f4f24b9f63143f2ce66923b2dd3ee55475e680a7b992b9cbc17941f6486312040a0208011802121c0a160a03696e6a120f31383732303030303030303030303010d0b4471a0b696e6a6563746976652d312092c35b + required: + - signedTransaction + NetworkDto: + type: object + properties: + id: + type: string + description: The network identifier + example: ethereum + enum: + - ethereum + - ethereum-goerli + - ethereum-holesky + - ethereum-sepolia + - ethereum-hoodi + - arbitrum + - base + - base-sepolia + - gnosis + - optimism + - polygon + - polygon-amoy + - starknet + - zksync + - linea + - unichain + - monad-testnet + - monad + - avalanche-c + - avalanche-c-atomic + - avalanche-p + - binance + - celo + - fantom + - harmony + - moonriver + - okc + - viction + - core + - sonic + - plasma + - katana + - hyperevm + - agoric + - akash + - axelar + - band-protocol + - bitsong + - canto + - chihuahua + - comdex + - coreum + - cosmos + - crescent + - cronos + - cudos + - desmos + - dydx + - evmos + - fetch-ai + - gravity-bridge + - injective + - irisnet + - juno + - kava + - ki-network + - mars-protocol + - nym + - okex-chain + - onomy + - osmosis + - persistence + - quicksilver + - regen + - secret + - sentinel + - sommelier + - stafi + - stargaze + - stride + - teritori + - tgrade + - umee + - sei + - mantra + - celestia + - saga + - zetachain + - dymension + - humansai + - neutron + - polkadot + - kusama + - westend + - bittensor + - aptos + - binancebeacon + - cardano + - near + - solana + - solana-devnet + - stellar + - stellar-testnet + - sui + - tezos + - tron + - ton + - ton-testnet + - hyperliquid + name: + type: string + description: Human-readable display name of the network + example: Ethereum + category: + type: string + description: The category of the network + example: evm + enum: + - evm + - cosmos + - substrate + - misc + logoURI: + type: string + description: Logo URI for the network + example: https://assets.stakek.it/networks/ethereum.svg + required: + - id + - name + - category + - logoURI + ProviderDto: + type: object + properties: + name: + type: string + description: Provider name + example: Morpho + id: + type: string + description: Provider ID + example: morpho + logoURI: + type: string + description: Provider logo URI + example: https://morpho.xyz/logo.png + description: + type: string + description: Short description of the provider + example: A peer-to-peer DeFi lending protocol + website: + type: string + description: Provider website + example: https://morpho.xyz + tvlUsd: + type: object + description: Total TVL across the entire provider in USD + example: 10,200,000 + nullable: true + type: + type: string + description: Type of provider (protocol or validator provider) + enum: + - protocol + - validator_provider + example: protocol + references: + description: Optional social/media references or audit links + nullable: true + type: array + items: + type: string + required: + - name + - id + - logoURI + - description + - website + - tvlUsd + - type + HealthStatus: + type: string + description: The health status of the service + enum: + - OK + - FAIL + HealthStatusDto: + type: object + properties: + status: + example: OK + $ref: '#/components/schemas/HealthStatus' + timestamp: + type: string + format: date-time + example: '2024-01-15T10:30:00.000Z' + description: Timestamp when the health check was performed + required: + - status + - timestamp +externalDocs: + description: For more information + url: https://docs.yield.xyz diff --git a/suite-common/earn-api/orval.config.ts b/suite-common/earn-api/orval.config.ts new file mode 100644 index 0000000000..658985c69f --- /dev/null +++ b/suite-common/earn-api/orval.config.ts @@ -0,0 +1,80 @@ +import { ClientGeneratorsBuilder, defineConfig } from 'orval'; +import { resolve } from 'path'; + +const pascalCase = (value: string) => + value + .replace(/[_-]+([a-z0-9])/g, (_, char: string) => char.toUpperCase()) + .replace(/^[a-z]/, char => char.toUpperCase()); + +const camelCase = (value: string) => value.replace(/^[A-Z]/, char => char.toLowerCase()); + +const OUTPUT_DIR = resolve(import.meta.dirname, './src/api'); + +// eslint-disable-next-line import/no-default-export +export default defineConfig({ + worker: { + input: { + target: resolve(import.meta.dirname, './openapi.yaml'), + }, + output: { + mode: 'tags', + target: resolve(OUTPUT_DIR, 'index.ts'), + mock: false, + // Use our custom Prettier config + prettier: false, + clean: true, + tsconfig: './tsconfig.json', + packageJson: './package.json', + propertySortOrder: 'Specification', + client: clients => { + const fetchClient = clients.fetch; + + return { + ...fetchClient, + client: async (verbOptions, options, output) => { + const result = await fetchClient.client(verbOptions, options, output); + const methodName = camelCase(verbOptions.operationName); + + return { + ...result, + // Make sure the exported methods are in camelCase + implementation: result.implementation.replace( + // Exclude `async` too because there's some Eslint requiring await in async functions ignoring the given fn can return a promise + `export const ${verbOptions.operationName} = async`, + `export const ${methodName} =`, + ), + }; + }, + } satisfies ClientGeneratorsBuilder; + }, + // Prefer `fetch` over `axios` + httpClient: 'fetch', + indexFiles: true, + // Include response headers in the generated types and method results + headers: true, + workspace: OUTPUT_DIR, + override: { + useNamedParameters: true, + useTypeOverInterfaces: true, + enumGenerationType: 'const', + + transformer: verb => { + const [prefix] = verb.operationId.split('_'); + + return { + ...verb, + // Make TS types PascalCase and remove the group prefix + operationName: pascalCase(verb.operationName).replace(prefix, ''), + }; + }, + mutator: { + name: 'httpClient', + path: resolve(import.meta.dirname, './src/httpClient.ts'), + }, + fetch: { + forceSuccessResponse: true, + }, + }, + }, + }, +}); diff --git a/suite-common/earn-api/package.json b/suite-common/earn-api/package.json new file mode 100644 index 0000000000..0500e3fd41 --- /dev/null +++ b/suite-common/earn-api/package.json @@ -0,0 +1,25 @@ +{ + "name": "@suite-common/earn-api", + "version": "1.0.0", + "private": true, + "license": "See LICENSE.md in repo root", + "sideEffects": false, + "main": "src/index", + "scripts": { + "depcheck": "yarn g:depcheck", + "lint:js": "yarn g:eslint './**/*.{ts,mjs}'", + "type-check": "yarn g:tsc --build", + "format": "prettier --write \"**/*.{ts,yaml}\"", + "orval": "orval --config ./orval.config.ts", + "api:fetch": "node ./scripts/fetchSpec.mjs", + "api:generate": "yarn orval", + "api:update": "yarn api:fetch && yarn api:generate && yarn lint:js --fix && yarn format" + }, + "devDependencies": { + "orval": "8.2.0", + "prettier": "3.7.4" + }, + "dependencies": { + "@suite-common/react-query": "workspace:^" + } +} diff --git a/suite-common/earn-api/scripts/fetchSpec.mjs b/suite-common/earn-api/scripts/fetchSpec.mjs new file mode 100644 index 0000000000..67cc55c978 --- /dev/null +++ b/suite-common/earn-api/scripts/fetchSpec.mjs @@ -0,0 +1,30 @@ +/* eslint-disable no-console */ +// @ts-check +import { writeFile } from 'fs/promises'; +import { join } from 'path'; + +async function fetchSpec() { + const response = await fetch('https://api.yield.xyz/docs.yaml', { + headers: { + Accept: 'application/yaml', + }, + }); + + if (!response.ok) { + throw new Error(`Failed to fetch spec: ${response.statusText}`); + } + + return await response.text(); +} + +async function updateSpec() { + console.log('⏳ Fetching Yield XYZ API spec...'); + const specPath = join(process.cwd(), 'openapi.yaml'); + const spec = await fetchSpec(); + + console.log('⏳ Saving Yield XYZ API spec to ', specPath); + await writeFile(specPath, spec, 'utf-8'); + console.log('✅ Yield XYZ API spec updated successfully'); +} + +updateSpec().catch(console.error); diff --git a/suite-common/earn-api/src/api/actions.ts b/suite-common/earn-api/src/api/actions.ts new file mode 100644 index 0000000000..dd84a4915c --- /dev/null +++ b/suite-common/earn-api/src/api/actions.ts @@ -0,0 +1,567 @@ +/** + * Generated by orval v7.17.2 🍺 + * Do not edit manually. + * Yield.xyz API + * API Documentation + * OpenAPI spec version: 1.0 + */ +import type { + ActionDto, + ActionsControllerEnterYield400, + ActionsControllerEnterYield401, + ActionsControllerEnterYield403, + ActionsControllerEnterYield429, + ActionsControllerEnterYield500, + ActionsControllerExitYield400, + ActionsControllerExitYield401, + ActionsControllerExitYield403, + ActionsControllerExitYield429, + ActionsControllerExitYield500, + ActionsControllerGetAction400, + ActionsControllerGetAction401, + ActionsControllerGetAction429, + ActionsControllerGetAction500, + ActionsControllerGetActionPathParameters, + ActionsControllerGetActions200, + ActionsControllerGetActions400, + ActionsControllerGetActions401, + ActionsControllerGetActions429, + ActionsControllerGetActions500, + ActionsControllerGetActionsParams, + ActionsControllerManageYield400, + ActionsControllerManageYield401, + ActionsControllerManageYield403, + ActionsControllerManageYield429, + ActionsControllerManageYield500, + CreateActionDto, + CreateManageActionDto, + SubmitHashDto, + SubmitTransactionDto, + TransactionDto, + TransactionsControllerGetTransaction400, + TransactionsControllerGetTransaction401, + TransactionsControllerGetTransaction429, + TransactionsControllerGetTransaction500, + TransactionsControllerGetTransactionPathParameters, + TransactionsControllerSubmitTransaction401, + TransactionsControllerSubmitTransaction429, + TransactionsControllerSubmitTransaction500, + TransactionsControllerSubmitTransactionHash401, + TransactionsControllerSubmitTransactionHash429, + TransactionsControllerSubmitTransactionHash500, + TransactionsControllerSubmitTransactionHashPathParameters, + TransactionsControllerSubmitTransactionPathParameters, +} from './index.schemas'; +import { httpClient } from '../httpClient'; + +/** + * 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 + */ +export type GetActionsResponse200 = { + data: ActionsControllerGetActions200; + status: 200; +}; + +export type GetActionsResponse400 = { + data: ActionsControllerGetActions400; + status: 400; +}; + +export type GetActionsResponse401 = { + data: ActionsControllerGetActions401; + status: 401; +}; + +export type GetActionsResponse429 = { + data: ActionsControllerGetActions429; + status: 429; +}; + +export type GetActionsResponse500 = { + data: ActionsControllerGetActions500; + status: 500; +}; + +export type GetActionsResponseSuccess = GetActionsResponse200 & { + headers: Headers; +}; +export type GetActionsResponseError = ( + | GetActionsResponse400 + | GetActionsResponse401 + | GetActionsResponse429 + | GetActionsResponse500 +) & { + headers: Headers; +}; + +export const getGetActionsUrl = (params: ActionsControllerGetActionsParams) => { + const normalizedParams = new URLSearchParams(); + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()); + } + }); + + const stringifiedParams = normalizedParams.toString(); + + return stringifiedParams.length > 0 ? `/v1/actions?${stringifiedParams}` : `/v1/actions`; +}; + +export const getActions = ( + params: ActionsControllerGetActionsParams, + options?: RequestInit, +): Promise => + httpClient(getGetActionsUrl(params), { + ...options, + method: 'GET', + }); + +/** + * Retrieve detailed information about a specific action including current status, transactions, and execution details. + * @summary Get action details + */ +export type GetActionResponse200 = { + data: ActionDto; + status: 200; +}; + +export type GetActionResponse400 = { + data: ActionsControllerGetAction400; + status: 400; +}; + +export type GetActionResponse401 = { + data: ActionsControllerGetAction401; + status: 401; +}; + +export type GetActionResponse404 = { + data: void; + status: 404; +}; + +export type GetActionResponse429 = { + data: ActionsControllerGetAction429; + status: 429; +}; + +export type GetActionResponse500 = { + data: ActionsControllerGetAction500; + status: 500; +}; + +export type GetActionResponseSuccess = GetActionResponse200 & { + headers: Headers; +}; +export type GetActionResponseError = ( + | GetActionResponse400 + | GetActionResponse401 + | GetActionResponse404 + | GetActionResponse429 + | GetActionResponse500 +) & { + headers: Headers; +}; + +export const getGetActionUrl = ({ actionId }: ActionsControllerGetActionPathParameters) => + `/v1/actions/${actionId}`; + +export const getAction = ( + { actionId }: ActionsControllerGetActionPathParameters, + options?: RequestInit, +): Promise => + httpClient(getGetActionUrl({ actionId }), { + ...options, + method: 'GET', + }); + +/** + * Generate the transactions needed to enter a yield position with the provided parameters. + * @summary Enter a yield + */ +export type EnterYieldResponse201 = { + data: ActionDto; + status: 201; +}; + +export type EnterYieldResponse400 = { + data: ActionsControllerEnterYield400; + status: 400; +}; + +export type EnterYieldResponse401 = { + data: ActionsControllerEnterYield401; + status: 401; +}; + +export type EnterYieldResponse403 = { + data: ActionsControllerEnterYield403; + status: 403; +}; + +export type EnterYieldResponse404 = { + data: void; + status: 404; +}; + +export type EnterYieldResponse429 = { + data: ActionsControllerEnterYield429; + status: 429; +}; + +export type EnterYieldResponse500 = { + data: ActionsControllerEnterYield500; + status: 500; +}; + +export type EnterYieldResponseSuccess = EnterYieldResponse201 & { + headers: Headers; +}; +export type EnterYieldResponseError = ( + | EnterYieldResponse400 + | EnterYieldResponse401 + | EnterYieldResponse403 + | EnterYieldResponse404 + | EnterYieldResponse429 + | EnterYieldResponse500 +) & { + headers: Headers; +}; + +export const getEnterYieldUrl = () => `/v1/actions/enter`; + +export const enterYield = ( + createActionDto: CreateActionDto, + options?: RequestInit, +): Promise => + httpClient(getEnterYieldUrl(), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(createActionDto), + }); + +/** + * Generate the transactions needed to exit a yield position with the provided parameters. + * @summary Exit a yield + */ +export type ExitYieldResponse201 = { + data: ActionDto; + status: 201; +}; + +export type ExitYieldResponse400 = { + data: ActionsControllerExitYield400; + status: 400; +}; + +export type ExitYieldResponse401 = { + data: ActionsControllerExitYield401; + status: 401; +}; + +export type ExitYieldResponse403 = { + data: ActionsControllerExitYield403; + status: 403; +}; + +export type ExitYieldResponse404 = { + data: void; + status: 404; +}; + +export type ExitYieldResponse429 = { + data: ActionsControllerExitYield429; + status: 429; +}; + +export type ExitYieldResponse500 = { + data: ActionsControllerExitYield500; + status: 500; +}; + +export type ExitYieldResponseSuccess = ExitYieldResponse201 & { + headers: Headers; +}; +export type ExitYieldResponseError = ( + | ExitYieldResponse400 + | ExitYieldResponse401 + | ExitYieldResponse403 + | ExitYieldResponse404 + | ExitYieldResponse429 + | ExitYieldResponse500 +) & { + headers: Headers; +}; + +export const getExitYieldUrl = () => `/v1/actions/exit`; + +export const exitYield = ( + createActionDto: CreateActionDto, + options?: RequestInit, +): Promise => + httpClient(getExitYieldUrl(), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(createActionDto), + }); + +/** + * Generate the transactions needed to perform management actions on a yield position. + * @summary Manage a yield + */ +export type ManageYieldResponse201 = { + data: ActionDto; + status: 201; +}; + +export type ManageYieldResponse400 = { + data: ActionsControllerManageYield400; + status: 400; +}; + +export type ManageYieldResponse401 = { + data: ActionsControllerManageYield401; + status: 401; +}; + +export type ManageYieldResponse403 = { + data: ActionsControllerManageYield403; + status: 403; +}; + +export type ManageYieldResponse404 = { + data: void; + status: 404; +}; + +export type ManageYieldResponse429 = { + data: ActionsControllerManageYield429; + status: 429; +}; + +export type ManageYieldResponse500 = { + data: ActionsControllerManageYield500; + status: 500; +}; + +export type ManageYieldResponseSuccess = ManageYieldResponse201 & { + headers: Headers; +}; +export type ManageYieldResponseError = ( + | ManageYieldResponse400 + | ManageYieldResponse401 + | ManageYieldResponse403 + | ManageYieldResponse404 + | ManageYieldResponse429 + | ManageYieldResponse500 +) & { + headers: Headers; +}; + +export const getManageYieldUrl = () => `/v1/actions/manage`; + +export const manageYield = ( + createManageActionDto: CreateManageActionDto, + options?: RequestInit, +): Promise => + httpClient(getManageYieldUrl(), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(createManageActionDto), + }); + +/** + * Submit the transaction hash after broadcasting a transaction to the blockchain. This updates the transaction status and enables tracking. + * @summary Submit transaction hash + */ +export type SubmitTransactionHashResponse200 = { + data: TransactionDto; + status: 200; +}; + +export type SubmitTransactionHashResponse400 = { + data: void; + status: 400; +}; + +export type SubmitTransactionHashResponse401 = { + data: TransactionsControllerSubmitTransactionHash401; + status: 401; +}; + +export type SubmitTransactionHashResponse404 = { + data: void; + status: 404; +}; + +export type SubmitTransactionHashResponse429 = { + data: TransactionsControllerSubmitTransactionHash429; + status: 429; +}; + +export type SubmitTransactionHashResponse500 = { + data: TransactionsControllerSubmitTransactionHash500; + status: 500; +}; + +export type SubmitTransactionHashResponseSuccess = SubmitTransactionHashResponse200 & { + headers: Headers; +}; +export type SubmitTransactionHashResponseError = ( + | SubmitTransactionHashResponse400 + | SubmitTransactionHashResponse401 + | SubmitTransactionHashResponse404 + | SubmitTransactionHashResponse429 + | SubmitTransactionHashResponse500 +) & { + headers: Headers; +}; + +export const getSubmitTransactionHashUrl = ({ + transactionId, +}: TransactionsControllerSubmitTransactionHashPathParameters) => + `/v1/transactions/${transactionId}/submit-hash`; + +export const submitTransactionHash = ( + { transactionId }: TransactionsControllerSubmitTransactionHashPathParameters, + submitHashDto: SubmitHashDto, + options?: RequestInit, +): Promise => + httpClient( + getSubmitTransactionHashUrl({ transactionId }), + { + ...options, + method: 'PUT', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(submitHashDto), + }, + ); + +/** + * Submit the transaction to the blockchain. + * @summary Submit transaction + */ +export type SubmitTransactionResponse200 = { + data: TransactionDto; + status: 200; +}; + +export type SubmitTransactionResponse400 = { + data: void; + status: 400; +}; + +export type SubmitTransactionResponse401 = { + data: TransactionsControllerSubmitTransaction401; + status: 401; +}; + +export type SubmitTransactionResponse404 = { + data: void; + status: 404; +}; + +export type SubmitTransactionResponse429 = { + data: TransactionsControllerSubmitTransaction429; + status: 429; +}; + +export type SubmitTransactionResponse500 = { + data: TransactionsControllerSubmitTransaction500; + status: 500; +}; + +export type SubmitTransactionResponseSuccess = SubmitTransactionResponse200 & { + headers: Headers; +}; +export type SubmitTransactionResponseError = ( + | SubmitTransactionResponse400 + | SubmitTransactionResponse401 + | SubmitTransactionResponse404 + | SubmitTransactionResponse429 + | SubmitTransactionResponse500 +) & { + headers: Headers; +}; + +export const getSubmitTransactionUrl = ({ + transactionId, +}: TransactionsControllerSubmitTransactionPathParameters) => + `/v1/transactions/${transactionId}/submit`; + +export const submitTransaction = ( + { transactionId }: TransactionsControllerSubmitTransactionPathParameters, + submitTransactionDto: SubmitTransactionDto, + options?: RequestInit, +): Promise => + httpClient(getSubmitTransactionUrl({ transactionId }), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(submitTransactionDto), + }); + +/** + * Retrieve detailed information about a specific transaction including current status, hash, and execution details. + * @summary Get transaction details + */ +export type GetTransactionResponse200 = { + data: TransactionDto; + status: 200; +}; + +export type GetTransactionResponse400 = { + data: TransactionsControllerGetTransaction400; + status: 400; +}; + +export type GetTransactionResponse401 = { + data: TransactionsControllerGetTransaction401; + status: 401; +}; + +export type GetTransactionResponse404 = { + data: void; + status: 404; +}; + +export type GetTransactionResponse429 = { + data: TransactionsControllerGetTransaction429; + status: 429; +}; + +export type GetTransactionResponse500 = { + data: TransactionsControllerGetTransaction500; + status: 500; +}; + +export type GetTransactionResponseSuccess = GetTransactionResponse200 & { + headers: Headers; +}; +export type GetTransactionResponseError = ( + | GetTransactionResponse400 + | GetTransactionResponse401 + | GetTransactionResponse404 + | GetTransactionResponse429 + | GetTransactionResponse500 +) & { + headers: Headers; +}; + +export const getGetTransactionUrl = ({ + transactionId, +}: TransactionsControllerGetTransactionPathParameters) => `/v1/transactions/${transactionId}`; + +export const getTransaction = ( + { transactionId }: TransactionsControllerGetTransactionPathParameters, + options?: RequestInit, +): Promise => + httpClient(getGetTransactionUrl({ transactionId }), { + ...options, + method: 'GET', + }); diff --git a/suite-common/earn-api/src/api/discovery.ts b/suite-common/earn-api/src/api/discovery.ts new file mode 100644 index 0000000000..59b146c4a3 --- /dev/null +++ b/suite-common/earn-api/src/api/discovery.ts @@ -0,0 +1,421 @@ +/** + * Generated by orval v7.17.2 🍺 + * Do not edit manually. + * Yield.xyz API + * API Documentation + * OpenAPI spec version: 1.0 + */ +import type { + NetworkDto, + NetworksControllerGetNetworks400, + NetworksControllerGetNetworks401, + NetworksControllerGetNetworks429, + NetworksControllerGetNetworks500, + ProviderDto, + ProvidersControllerGetProvider400, + ProvidersControllerGetProvider401, + ProvidersControllerGetProvider429, + ProvidersControllerGetProvider500, + ProvidersControllerGetProviderPathParameters, + ProvidersControllerGetProviders200, + ProvidersControllerGetProviders400, + ProvidersControllerGetProviders401, + ProvidersControllerGetProviders429, + ProvidersControllerGetProviders500, + ProvidersControllerGetProvidersParams, + YieldDto, + YieldsControllerGetYield400, + YieldsControllerGetYield401, + YieldsControllerGetYield429, + YieldsControllerGetYield500, + YieldsControllerGetYieldPathParameters, + YieldsControllerGetYieldValidators200, + YieldsControllerGetYieldValidators400, + YieldsControllerGetYieldValidators401, + YieldsControllerGetYieldValidators429, + YieldsControllerGetYieldValidators500, + YieldsControllerGetYieldValidatorsParams, + YieldsControllerGetYieldValidatorsPathParameters, + YieldsControllerGetYields200, + YieldsControllerGetYields400, + YieldsControllerGetYields401, + YieldsControllerGetYields429, + YieldsControllerGetYields500, + YieldsControllerGetYieldsParams, +} from './index.schemas'; +import { httpClient } from '../httpClient'; + +/** + * Retrieve a paginated list of available yield opportunities across all supported networks and protocols. + * @summary List all yield opportunities + */ +export type GetYieldsResponse200 = { + data: YieldsControllerGetYields200; + status: 200; +}; + +export type GetYieldsResponse400 = { + data: YieldsControllerGetYields400; + status: 400; +}; + +export type GetYieldsResponse401 = { + data: YieldsControllerGetYields401; + status: 401; +}; + +export type GetYieldsResponse429 = { + data: YieldsControllerGetYields429; + status: 429; +}; + +export type GetYieldsResponse500 = { + data: YieldsControllerGetYields500; + status: 500; +}; + +export type GetYieldsResponseSuccess = GetYieldsResponse200 & { + headers: Headers; +}; +export type GetYieldsResponseError = ( + | GetYieldsResponse400 + | GetYieldsResponse401 + | GetYieldsResponse429 + | GetYieldsResponse500 +) & { + headers: Headers; +}; + +export const getGetYieldsUrl = (params?: YieldsControllerGetYieldsParams) => { + const normalizedParams = new URLSearchParams(); + + Object.entries(params || {}).forEach(([key, value]) => { + const explodeParameters = ['yieldIds', 'types', 'inputTokens', 'providers']; + + if (Array.isArray(value) && explodeParameters.includes(key)) { + value.forEach(v => { + normalizedParams.append(key, v === null ? 'null' : v.toString()); + }); + + return; + } + + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()); + } + }); + + const stringifiedParams = normalizedParams.toString(); + + return stringifiedParams.length > 0 ? `/v1/yields?${stringifiedParams}` : `/v1/yields`; +}; + +export const getYields = ( + params?: YieldsControllerGetYieldsParams, + options?: RequestInit, +): Promise => + httpClient(getGetYieldsUrl(params), { + ...options, + method: 'GET', + }); + +/** + * Retrieve detailed information about a specific yield opportunity including APY, tokens, protocol details, and more. + * @summary Get yield metadata + */ +export type GetYieldResponse200 = { + data: YieldDto; + status: 200; +}; + +export type GetYieldResponse400 = { + data: YieldsControllerGetYield400; + status: 400; +}; + +export type GetYieldResponse401 = { + data: YieldsControllerGetYield401; + status: 401; +}; + +export type GetYieldResponse404 = { + data: void; + status: 404; +}; + +export type GetYieldResponse429 = { + data: YieldsControllerGetYield429; + status: 429; +}; + +export type GetYieldResponse500 = { + data: YieldsControllerGetYield500; + status: 500; +}; + +export type GetYieldResponseSuccess = GetYieldResponse200 & { + headers: Headers; +}; +export type GetYieldResponseError = ( + | GetYieldResponse400 + | GetYieldResponse401 + | GetYieldResponse404 + | GetYieldResponse429 + | GetYieldResponse500 +) & { + headers: Headers; +}; + +export const getGetYieldUrl = ({ yieldId }: YieldsControllerGetYieldPathParameters) => + `/v1/yields/${yieldId}`; + +export const getYield = ( + { yieldId }: YieldsControllerGetYieldPathParameters, + options?: RequestInit, +): Promise => + httpClient(getGetYieldUrl({ yieldId }), { + ...options, + method: 'GET', + }); + +/** + * Retrieve a paginated list of validators available for staking or delegation for this yield opportunity. + * @summary Get yield validators + */ +export type GetYieldValidatorsResponse200 = { + data: YieldsControllerGetYieldValidators200; + status: 200; +}; + +export type GetYieldValidatorsResponse400 = { + data: YieldsControllerGetYieldValidators400; + status: 400; +}; + +export type GetYieldValidatorsResponse401 = { + data: YieldsControllerGetYieldValidators401; + status: 401; +}; + +export type GetYieldValidatorsResponse404 = { + data: void; + status: 404; +}; + +export type GetYieldValidatorsResponse429 = { + data: YieldsControllerGetYieldValidators429; + status: 429; +}; + +export type GetYieldValidatorsResponse500 = { + data: YieldsControllerGetYieldValidators500; + status: 500; +}; + +export type GetYieldValidatorsResponseSuccess = GetYieldValidatorsResponse200 & { + headers: Headers; +}; +export type GetYieldValidatorsResponseError = ( + | GetYieldValidatorsResponse400 + | GetYieldValidatorsResponse401 + | GetYieldValidatorsResponse404 + | GetYieldValidatorsResponse429 + | GetYieldValidatorsResponse500 +) & { + headers: Headers; +}; + +export const getGetYieldValidatorsUrl = ( + { yieldId }: YieldsControllerGetYieldValidatorsPathParameters, + params?: YieldsControllerGetYieldValidatorsParams, +) => { + const normalizedParams = new URLSearchParams(); + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()); + } + }); + + const stringifiedParams = normalizedParams.toString(); + + return stringifiedParams.length > 0 + ? `/v1/yields/${yieldId}/validators?${stringifiedParams}` + : `/v1/yields/${yieldId}/validators`; +}; + +export const getYieldValidators = ( + { yieldId }: YieldsControllerGetYieldValidatorsPathParameters, + params?: YieldsControllerGetYieldValidatorsParams, + options?: RequestInit, +): Promise => + httpClient(getGetYieldValidatorsUrl({ yieldId }, params), { + ...options, + method: 'GET', + }); + +/** + * Retrieve a list of all supported networks that can be used for filtering yields and other operations. + * @summary List all available networks + */ +export type GetNetworksResponse200 = { + data: NetworkDto[]; + status: 200; +}; + +export type GetNetworksResponse400 = { + data: NetworksControllerGetNetworks400; + status: 400; +}; + +export type GetNetworksResponse401 = { + data: NetworksControllerGetNetworks401; + status: 401; +}; + +export type GetNetworksResponse429 = { + data: NetworksControllerGetNetworks429; + status: 429; +}; + +export type GetNetworksResponse500 = { + data: NetworksControllerGetNetworks500; + status: 500; +}; + +export type GetNetworksResponseSuccess = GetNetworksResponse200 & { + headers: Headers; +}; +export type GetNetworksResponseError = ( + | GetNetworksResponse400 + | GetNetworksResponse401 + | GetNetworksResponse429 + | GetNetworksResponse500 +) & { + headers: Headers; +}; + +export const getGetNetworksUrl = () => `/v1/networks`; + +export const getNetworks = (options?: RequestInit): Promise => + httpClient(getGetNetworksUrl(), { + ...options, + method: 'GET', + }); + +/** + * Returns a paginated list of all providers, including both protocol and validator providers. + * @summary Get all providers + */ +export type GetProvidersResponse200 = { + data: ProvidersControllerGetProviders200; + status: 200; +}; + +export type GetProvidersResponse400 = { + data: ProvidersControllerGetProviders400; + status: 400; +}; + +export type GetProvidersResponse401 = { + data: ProvidersControllerGetProviders401; + status: 401; +}; + +export type GetProvidersResponse429 = { + data: ProvidersControllerGetProviders429; + status: 429; +}; + +export type GetProvidersResponse500 = { + data: ProvidersControllerGetProviders500; + status: 500; +}; + +export type GetProvidersResponseSuccess = GetProvidersResponse200 & { + headers: Headers; +}; +export type GetProvidersResponseError = ( + | GetProvidersResponse400 + | GetProvidersResponse401 + | GetProvidersResponse429 + | GetProvidersResponse500 +) & { + headers: Headers; +}; + +export const getGetProvidersUrl = (params?: ProvidersControllerGetProvidersParams) => { + const normalizedParams = new URLSearchParams(); + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()); + } + }); + + const stringifiedParams = normalizedParams.toString(); + + return stringifiedParams.length > 0 ? `/v1/providers?${stringifiedParams}` : `/v1/providers`; +}; + +export const getProviders = ( + params?: ProvidersControllerGetProvidersParams, + options?: RequestInit, +): Promise => + httpClient(getGetProvidersUrl(params), { + ...options, + method: 'GET', + }); + +/** + * Returns detailed information about a specific provider. + * @summary Get provider by ID + */ +export type GetProviderResponse200 = { + data: ProviderDto; + status: 200; +}; + +export type GetProviderResponse400 = { + data: ProvidersControllerGetProvider400; + status: 400; +}; + +export type GetProviderResponse401 = { + data: ProvidersControllerGetProvider401; + status: 401; +}; + +export type GetProviderResponse429 = { + data: ProvidersControllerGetProvider429; + status: 429; +}; + +export type GetProviderResponse500 = { + data: ProvidersControllerGetProvider500; + status: 500; +}; + +export type GetProviderResponseSuccess = GetProviderResponse200 & { + headers: Headers; +}; +export type GetProviderResponseError = ( + | GetProviderResponse400 + | GetProviderResponse401 + | GetProviderResponse429 + | GetProviderResponse500 +) & { + headers: Headers; +}; + +export const getGetProviderUrl = ({ providerId }: ProvidersControllerGetProviderPathParameters) => + `/v1/providers/${providerId}`; + +export const getProvider = ( + { providerId }: ProvidersControllerGetProviderPathParameters, + options?: RequestInit, +): Promise => + httpClient(getGetProviderUrl({ providerId }), { + ...options, + method: 'GET', + }); diff --git a/suite-common/earn-api/src/api/health.ts b/suite-common/earn-api/src/api/health.ts new file mode 100644 index 0000000000..f39b808268 --- /dev/null +++ b/suite-common/earn-api/src/api/health.ts @@ -0,0 +1,29 @@ +/** + * Generated by orval v7.17.2 🍺 + * Do not edit manually. + * Yield.xyz API + * API Documentation + * OpenAPI spec version: 1.0 + */ +import type { HealthStatusDto } from './index.schemas'; +import { httpClient } from '../httpClient'; + +/** + * Get the health status of the yield API with current timestamp + * @summary Health check + */ +export type HealthResponse200 = { + data: HealthStatusDto; + status: 200; +}; + +export type HealthResponseSuccess = HealthResponse200 & { + headers: Headers; +}; +export const getHealthUrl = () => `/health`; + +export const health = (options?: RequestInit): Promise => + httpClient(getHealthUrl(), { + ...options, + method: 'GET', + }); diff --git a/suite-common/earn-api/src/api/index.schemas.ts b/suite-common/earn-api/src/api/index.schemas.ts new file mode 100644 index 0000000000..f5311b4b6e --- /dev/null +++ b/suite-common/earn-api/src/api/index.schemas.ts @@ -0,0 +1,3448 @@ +/** + * Generated by orval v7.17.2 🍺 + * Do not edit manually. + * Yield.xyz API + * API Documentation + * OpenAPI spec version: 1.0 + */ +/** + * Token network + */ +export type TokenDtoNetwork = (typeof TokenDtoNetwork)[keyof typeof TokenDtoNetwork]; + +export const TokenDtoNetwork = { + ethereum: 'ethereum', + 'ethereum-goerli': 'ethereum-goerli', + 'ethereum-holesky': 'ethereum-holesky', + 'ethereum-sepolia': 'ethereum-sepolia', + 'ethereum-hoodi': 'ethereum-hoodi', + arbitrum: 'arbitrum', + base: 'base', + 'base-sepolia': 'base-sepolia', + gnosis: 'gnosis', + optimism: 'optimism', + polygon: 'polygon', + 'polygon-amoy': 'polygon-amoy', + starknet: 'starknet', + zksync: 'zksync', + linea: 'linea', + unichain: 'unichain', + 'monad-testnet': 'monad-testnet', + monad: 'monad', + 'avalanche-c': 'avalanche-c', + 'avalanche-c-atomic': 'avalanche-c-atomic', + 'avalanche-p': 'avalanche-p', + binance: 'binance', + celo: 'celo', + fantom: 'fantom', + harmony: 'harmony', + moonriver: 'moonriver', + okc: 'okc', + viction: 'viction', + core: 'core', + sonic: 'sonic', + plasma: 'plasma', + katana: 'katana', + hyperevm: 'hyperevm', + agoric: 'agoric', + akash: 'akash', + axelar: 'axelar', + 'band-protocol': 'band-protocol', + bitsong: 'bitsong', + canto: 'canto', + chihuahua: 'chihuahua', + comdex: 'comdex', + coreum: 'coreum', + cosmos: 'cosmos', + crescent: 'crescent', + cronos: 'cronos', + cudos: 'cudos', + desmos: 'desmos', + dydx: 'dydx', + evmos: 'evmos', + 'fetch-ai': 'fetch-ai', + 'gravity-bridge': 'gravity-bridge', + injective: 'injective', + irisnet: 'irisnet', + juno: 'juno', + kava: 'kava', + 'ki-network': 'ki-network', + 'mars-protocol': 'mars-protocol', + nym: 'nym', + 'okex-chain': 'okex-chain', + onomy: 'onomy', + osmosis: 'osmosis', + persistence: 'persistence', + quicksilver: 'quicksilver', + regen: 'regen', + secret: 'secret', + sentinel: 'sentinel', + sommelier: 'sommelier', + stafi: 'stafi', + stargaze: 'stargaze', + stride: 'stride', + teritori: 'teritori', + tgrade: 'tgrade', + umee: 'umee', + sei: 'sei', + mantra: 'mantra', + celestia: 'celestia', + saga: 'saga', + zetachain: 'zetachain', + dymension: 'dymension', + humansai: 'humansai', + neutron: 'neutron', + polkadot: 'polkadot', + kusama: 'kusama', + westend: 'westend', + bittensor: 'bittensor', + aptos: 'aptos', + binancebeacon: 'binancebeacon', + cardano: 'cardano', + near: 'near', + solana: 'solana', + 'solana-devnet': 'solana-devnet', + stellar: 'stellar', + 'stellar-testnet': 'stellar-testnet', + sui: 'sui', + tezos: 'tezos', + tron: 'tron', + ton: 'ton', + 'ton-testnet': 'ton-testnet', + hyperliquid: 'hyperliquid', +} as const; + +export type TokenDto = { + /** Token symbol */ + symbol: string; + /** Token name */ + name: string; + /** Token decimal places */ + decimals: number; + /** Token network */ + network: TokenDtoNetwork; + /** Token address (if applicable) */ + address?: string; + /** Token logo URI */ + logoURI?: string; + /** Token is points */ + isPoints?: boolean; + /** Token CoinGecko ID */ + coinGeckoId?: string; +}; + +/** + * Structured source of yield (e.g. staking, protocol incentive) + */ +export type RewardDtoYieldSource = (typeof RewardDtoYieldSource)[keyof typeof RewardDtoYieldSource]; + +export const RewardDtoYieldSource = { + staking: 'staking', + restaking: 'restaking', + protocol_incentive: 'protocol_incentive', + points: 'points', + lending_interest: 'lending_interest', + mev: 'mev', + real_world_asset_yield: 'real_world_asset_yield', + vault: 'vault', +} as const; + +export type RewardDto = { + /** Reward rate as a decimal (e.g. 0.04 = 4%) */ + rate: number; + /** Whether this rate is APR or APY */ + rateType: string; + /** Token received as reward */ + token: TokenDto; + /** Structured source of yield (e.g. staking, protocol incentive) */ + yieldSource: RewardDtoYieldSource; + /** Optional human-readable description of this reward */ + description?: string; +}; + +export type RewardRateDto = { + /** Estimated reward rate across all sources (e.g. staking, points) */ + total: number; + /** Whether this reward rate is APR or APY */ + rateType: string; + /** Breakdown of reward rates by source */ + components: RewardDto[]; +}; + +export type YieldStatisticsDto = { + /** + * Total value locked in USD + * @nullable + */ + tvlUsd?: string | null; + /** + * Total value locked in primary underlying token + * @nullable + */ + tvl?: string | null; + /** + * Raw total value locked (full precision) + * @nullable + */ + tvlRaw?: string | null; + /** + * Number of users with active positions in the yield + * @nullable + */ + uniqueUsers?: number | null; + /** + * Average position size in USD + * @nullable + */ + averagePositionSizeUsd?: string | null; + /** + * Average position size in primary underlying token + * @nullable + */ + averagePositionSize?: string | null; +}; + +/** + * Exponential pool rating + */ +export type YieldRiskExponentialDtoPoolRating = { [key: string]: unknown }; + +/** + * Exponential pool score (1-5) + */ +export type YieldRiskExponentialDtoPoolScore = { [key: string]: unknown }; + +/** + * Exponential rating description + */ +export type YieldRiskExponentialDtoRatingDescription = { [key: string]: unknown }; + +/** + * Exponential pool URL + */ +export type YieldRiskExponentialDtoUrl = { [key: string]: unknown }; + +export type YieldRiskExponentialDto = { + /** Exponential pool rating */ + poolRating?: YieldRiskExponentialDtoPoolRating; + /** Exponential pool score (1-5) */ + poolScore?: YieldRiskExponentialDtoPoolScore; + /** Exponential rating description */ + ratingDescription?: YieldRiskExponentialDtoRatingDescription; + /** Exponential pool URL */ + url?: YieldRiskExponentialDtoUrl; +}; + +/** + * Credora rating + */ +export type YieldRiskCredoraDtoRating = { [key: string]: unknown }; + +/** + * Credora score (1-5) + */ +export type YieldRiskCredoraDtoScore = { [key: string]: unknown }; + +/** + * Probability of Significant Loss (annualized) + */ +export type YieldRiskCredoraDtoPsl = { [key: string]: unknown }; + +/** + * Credora publish date + */ +export type YieldRiskCredoraDtoPublishDate = { [key: string]: unknown }; + +/** + * Credora curator name + */ +export type YieldRiskCredoraDtoCurator = { [key: string]: unknown }; + +export type YieldRiskCredoraDto = { + /** Credora rating */ + rating?: YieldRiskCredoraDtoRating; + /** Credora score (1-5) */ + score?: YieldRiskCredoraDtoScore; + /** Probability of Significant Loss (annualized) */ + psl?: YieldRiskCredoraDtoPsl; + /** Credora publish date */ + publishDate?: YieldRiskCredoraDtoPublishDate; + /** Credora curator name */ + curator?: YieldRiskCredoraDtoCurator; +}; + +export type YieldRiskDto = { + /** Risk data last update timestamp */ + updatedAt: string; + exponentialFi?: YieldRiskExponentialDto; + credora?: YieldRiskCredoraDto; +}; + +export type YieldStatusDto = { + /** Whether the user can currently enter this yield */ + enter: boolean; + /** Whether the user can currently exit this yield */ + exit: boolean; +}; + +/** + * Supported standards for this yield + */ +export type ERCStandards = (typeof ERCStandards)[keyof typeof ERCStandards]; + +export const ERCStandards = { + ERC20: 'ERC20', + ERC4626: 'ERC4626', + ERC721: 'ERC721', + ERC1155: 'ERC1155', +} as const; + +export type YieldMetadataDto = { + /** Display name of the yield opportunity */ + name: string; + /** Yield opportunity logo URI */ + logoURI: string; + /** Markdown-supported short description of this yield opportunity, including where rewards come from. */ + description: string; + /** Link to documentation or integration guide */ + documentation: string; + /** Whether this yield is currently under maintenance */ + underMaintenance: boolean; + /** Whether this yield is deprecated and will be discontinued */ + deprecated: boolean; + supportedStandards: ERCStandards[]; +}; + +/** + * Type of yield mechanism (staking, restaking, LP, vault, etc.) + */ +export type YieldType = (typeof YieldType)[keyof typeof YieldType]; + +export const YieldType = { + 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', +} as const; + +/** + * How often rewards are distributed (e.g. continuously, epoch-based) + */ +export type RewardSchedule = (typeof RewardSchedule)[keyof typeof RewardSchedule]; + +export const RewardSchedule = { + block: 'block', + hour: 'hour', + day: 'day', + week: 'week', + month: 'month', + era: 'era', + epoch: 'epoch', + campaign: 'campaign', +} as const; + +/** + * How rewards are claimed: auto, manual, or mixed + */ +export type RewardClaiming = (typeof RewardClaiming)[keyof typeof RewardClaiming]; + +export const RewardClaiming = { + auto: 'auto', + manual: 'manual', +} as const; + +export type TimePeriodDto = { + /** Duration in seconds */ + seconds: number; +}; + +export type YieldFeeDto = { + /** Deposit fee percentage */ + deposit?: string; + /** Withdrawal fee percentage */ + withdrawal?: string; + /** Management fee percentage (annual) */ + management?: string; + /** Performance fee percentage */ + performance?: string; +}; + +export type YieldEntryLimitsDto = { + /** + * Minimum amount required to enter this yield in token units (null if no minimum) + * @nullable + */ + minimum: string | null; + /** + * Maximum amount allowed to enter this yield in token units (null if no limit) + * @nullable + */ + maximum: string | null; +}; + +/** + * Field name + */ +export type ArgumentFieldDtoName = (typeof ArgumentFieldDtoName)[keyof typeof ArgumentFieldDtoName]; + +export const ArgumentFieldDtoName = { + amount: 'amount', + amounts: 'amounts', + validatorAddress: 'validatorAddress', + validatorAddresses: 'validatorAddresses', + receiverAddress: 'receiverAddress', + providerId: 'providerId', + duration: 'duration', + inputToken: 'inputToken', + inputTokenNetwork: 'inputTokenNetwork', + outputToken: 'outputToken', + outputTokenNetwork: 'outputTokenNetwork', + subnetId: 'subnetId', + tronResource: 'tronResource', + feeConfigurationId: 'feeConfigurationId', + cosmosPubKey: 'cosmosPubKey', + tezosPubKey: 'tezosPubKey', + cAddressBech: 'cAddressBech', + pAddressBech: 'pAddressBech', + executionMode: 'executionMode', + ledgerWalletApiCompatible: 'ledgerWalletApiCompatible', + useMaxAmount: 'useMaxAmount', + useInstantExecution: 'useInstantExecution', + rangeMin: 'rangeMin', + rangeMax: 'rangeMax', + percentage: 'percentage', + tokenId: 'tokenId', +} as const; + +/** + * Field type + */ +export type ArgumentFieldDtoType = (typeof ArgumentFieldDtoType)[keyof typeof ArgumentFieldDtoType]; + +export const ArgumentFieldDtoType = { + string: 'string', + number: 'number', + address: 'address', + enum: 'enum', + boolean: 'boolean', +} as const; + +/** + * Default value for the field + */ +export type ArgumentFieldDtoDefault = { [key: string]: unknown }; + +export type ArgumentFieldDto = { + /** Field name */ + name: ArgumentFieldDtoName; + /** Field type */ + type: ArgumentFieldDtoType; + /** Field label */ + label: string; + /** Field description */ + description?: string; + /** Whether the field is required */ + required?: boolean; + /** Options for enum fields */ + options?: string[]; + /** Reference to API endpoint that provides options dynamically */ + optionsRef?: string; + /** Default value for the field */ + default?: ArgumentFieldDtoDefault; + /** Placeholder text for the field */ + placeholder?: string; + /** + * Minimum allowed value for number fields (null if no minimum) + * @nullable + */ + minimum?: string | null; + /** + * Maximum allowed value for number fields (null if no maximum) + * @nullable + */ + maximum?: string | null; + /** Whether the field is an array */ + isArray?: boolean; +}; + +export type ArgumentSchemaDto = { + /** List of argument fields */ + fields: ArgumentFieldDto[]; + /** Notes or instructions for these arguments */ + notes?: string; +}; + +/** + * Manage action schemas. Each yield supports different ActionTypes (CLAIM_UNSTAKED, CLAIM_REWARDS, etc.). Keys are ActionTypes enum values. + */ +export type YieldMechanicsArgumentsDtoManage = { [key: string]: ArgumentSchemaDto }; + +export type YieldMechanicsArgumentsDto = { + enter?: ArgumentSchemaDto; + exit?: ArgumentSchemaDto; + /** Manage action schemas. Each yield supports different ActionTypes (CLAIM_UNSTAKED, CLAIM_REWARDS, etc.). Keys are ActionTypes enum values. */ + manage?: YieldMechanicsArgumentsDtoManage; + /** Arguments for the balances endpoint (e.g., alternative addresses, chain-specific fields) */ + balance?: ArgumentSchemaDto; +}; + +export type PossibleFeeTakingMechanismsDto = { + /** User can take (earn) a deposit fee */ + depositFee: boolean; + /** User can take (earn) a management fee */ + managementFee: boolean; + /** User can take (earn) a performance fee */ + performanceFee: boolean; + /** User can take (earn) validator rebates */ + validatorRebates: boolean; +}; + +export type YieldMechanicsDtoExtraTransactionFormatsSupportedItem = + (typeof YieldMechanicsDtoExtraTransactionFormatsSupportedItem)[keyof typeof YieldMechanicsDtoExtraTransactionFormatsSupportedItem]; + +export const YieldMechanicsDtoExtraTransactionFormatsSupportedItem = { + raw: 'raw', + default: 'default', +} as const; + +export type YieldMechanicsDto = { + type: YieldType; + /** Indicates whether this yield requires validator selection */ + requiresValidatorSelection?: boolean; + rewardSchedule: RewardSchedule; + rewardClaiming: RewardClaiming; + /** Token used for gas fees (typically native) */ + gasFeeToken: TokenDto; + /** Lockup period - minimum time before exit can be initiated */ + lockupPeriod?: TimePeriodDto; + /** Cooldown period required before exit is allowed */ + cooldownPeriod?: TimePeriodDto; + /** Warmup period before rewards start accruing */ + warmupPeriod?: TimePeriodDto; + /** Fees charged to the user for this yield (e.g., deposit, management, performance). */ + fee?: YieldFeeDto; + /** Entry amount limits for this yield */ + entryLimits?: YieldEntryLimitsDto; + /** Supports Ledger Wallet API (connect via Ledger Live) */ + supportsLedgerWalletApi?: boolean; + /** Additional transaction formats supported (e.g. safe, batch) */ + extraTransactionFormatsSupported?: YieldMechanicsDtoExtraTransactionFormatsSupportedItem[]; + /** Arguments required for each action (enter, exit, manage, etc.) */ + arguments?: YieldMechanicsArgumentsDto; + /** Possible fee-taking mechanisms for the user or integrator (i.e., what fees the user/integrator can potentially earn from this yield). */ + possibleFeeTakingMechanisms?: PossibleFeeTakingMechanismsDto; +}; + +export type PricePerShareStateDto = { + /** Price per share for the yield (e.g., LP token price, vault share price) */ + price: number; + /** Share token (the token you own shares of) */ + shareToken: TokenDto; + /** Quote token (the token the price is denominated in) */ + quoteToken: TokenDto; +}; + +export type ConcentratedLiquidityPoolStateDto = { + /** Full-range trading APR (24h or rolling) */ + baseApr: number; + /** Current mid-price from the AMM (token1 per token0) */ + price: number; + /** Tick spacing required so UI can snap ranges */ + tickSpacing: number; + /** Minimum tick bound for the pool */ + minTick: number; + /** Maximum tick bound for the pool */ + maxTick: number; + /** + * 24-hour trading volume in USD + * @nullable + */ + volume24hUsd: number | null; + /** + * 24-hour fees earned by LPs in USD + * @nullable + */ + fee24hUsd: number | null; + /** + * Total value locked in USD + * @nullable + */ + tvlUsd: number | null; + /** Pool fee tier as a decimal (e.g., 0.0005 for 0.05%) */ + feeTier: number; + /** Base token (token0) */ + baseToken: TokenDto; + /** Quote token (token1) */ + quoteToken: TokenDto; +}; + +export type CapacityDto = { + /** Current total assets in the yield */ + current: string; + /** + * Maximum capacity of the yield + * @nullable + */ + max?: string | null; + /** + * Remaining capacity available for deposits + * @nullable + */ + remaining?: string | null; +}; + +export type AllocationRewardRateDto = { + /** Total reward rate */ + total: number; + /** Whether this rate is APR or APY */ + rateType: string; +}; + +/** + * Network the underlying strategy is on + */ +export type AllocationDtoNetwork = (typeof AllocationDtoNetwork)[keyof typeof AllocationDtoNetwork]; + +export const AllocationDtoNetwork = { + ethereum: 'ethereum', + 'ethereum-goerli': 'ethereum-goerli', + 'ethereum-holesky': 'ethereum-holesky', + 'ethereum-sepolia': 'ethereum-sepolia', + 'ethereum-hoodi': 'ethereum-hoodi', + arbitrum: 'arbitrum', + base: 'base', + 'base-sepolia': 'base-sepolia', + gnosis: 'gnosis', + optimism: 'optimism', + polygon: 'polygon', + 'polygon-amoy': 'polygon-amoy', + starknet: 'starknet', + zksync: 'zksync', + linea: 'linea', + unichain: 'unichain', + 'monad-testnet': 'monad-testnet', + monad: 'monad', + 'avalanche-c': 'avalanche-c', + 'avalanche-c-atomic': 'avalanche-c-atomic', + 'avalanche-p': 'avalanche-p', + binance: 'binance', + celo: 'celo', + fantom: 'fantom', + harmony: 'harmony', + moonriver: 'moonriver', + okc: 'okc', + viction: 'viction', + core: 'core', + sonic: 'sonic', + plasma: 'plasma', + katana: 'katana', + hyperevm: 'hyperevm', + agoric: 'agoric', + akash: 'akash', + axelar: 'axelar', + 'band-protocol': 'band-protocol', + bitsong: 'bitsong', + canto: 'canto', + chihuahua: 'chihuahua', + comdex: 'comdex', + coreum: 'coreum', + cosmos: 'cosmos', + crescent: 'crescent', + cronos: 'cronos', + cudos: 'cudos', + desmos: 'desmos', + dydx: 'dydx', + evmos: 'evmos', + 'fetch-ai': 'fetch-ai', + 'gravity-bridge': 'gravity-bridge', + injective: 'injective', + irisnet: 'irisnet', + juno: 'juno', + kava: 'kava', + 'ki-network': 'ki-network', + 'mars-protocol': 'mars-protocol', + nym: 'nym', + 'okex-chain': 'okex-chain', + onomy: 'onomy', + osmosis: 'osmosis', + persistence: 'persistence', + quicksilver: 'quicksilver', + regen: 'regen', + secret: 'secret', + sentinel: 'sentinel', + sommelier: 'sommelier', + stafi: 'stafi', + stargaze: 'stargaze', + stride: 'stride', + teritori: 'teritori', + tgrade: 'tgrade', + umee: 'umee', + sei: 'sei', + mantra: 'mantra', + celestia: 'celestia', + saga: 'saga', + zetachain: 'zetachain', + dymension: 'dymension', + humansai: 'humansai', + neutron: 'neutron', + polkadot: 'polkadot', + kusama: 'kusama', + westend: 'westend', + bittensor: 'bittensor', + aptos: 'aptos', + binancebeacon: 'binancebeacon', + cardano: 'cardano', + near: 'near', + solana: 'solana', + 'solana-devnet': 'solana-devnet', + stellar: 'stellar', + 'stellar-testnet': 'stellar-testnet', + sui: 'sui', + tezos: 'tezos', + tron: 'tron', + ton: 'ton', + 'ton-testnet': 'ton-testnet', + hyperliquid: 'hyperliquid', +} as const; + +/** + * Reward rate of the underlying strategy + * @nullable + */ +export type AllocationDtoRewardRate = AllocationRewardRateDto | null; + +export type AllocationDto = { + /** Contract address of the underlying strategy */ + address: string; + /** Network the underlying strategy is on */ + network: AllocationDtoNetwork; + /** Display name of the underlying strategy */ + name: string; + /** Yield ID if this strategy is supported as a separate yield opportunity */ + yieldId?: string; + /** Provider ID for this strategy (e.g., morpho, aave, lido) */ + providerId?: string; + /** Amount allocated to this strategy in input token units */ + allocation: string; + /** + * USD value of the allocation + * @nullable + */ + allocationUsd: string | null; + /** Current weight of this strategy as a percentage (0-100) */ + weight: number; + /** Target weight of this strategy as a percentage (0-100) */ + targetWeight: number; + /** + * Reward rate of the underlying strategy + * @nullable + */ + rewardRate: AllocationDtoRewardRate; + /** + * Total value locked in the underlying strategy in input token units + * @nullable + */ + tvl: string | null; + /** + * Total value locked in USD for the underlying strategy + * @nullable + */ + tvlUsd: string | null; + /** + * Maximum capacity of the underlying strategy + * @nullable + */ + maxCapacity: string | null; + /** + * Remaining capacity in the underlying strategy + * @nullable + */ + remainingCapacity: string | null; +}; + +export type YieldStateDto = { + /** Price per share state metadata */ + pricePerShareState?: PricePerShareStateDto; + /** Concentrated liquidity pool state metadata */ + concentratedLiquidityPoolState?: ConcentratedLiquidityPoolStateDto; + /** Capacity state metadata */ + capacityState?: CapacityDto; + /** Allocations to underlying strategies for vault yields (e.g., OAV, Morpho). Includes allocation, APY, TVL, and capacity per strategy. */ + allocations?: AllocationDto[]; +}; + +/** + * Network this yield opportunity is on + */ +export type YieldDtoNetwork = (typeof YieldDtoNetwork)[keyof typeof YieldDtoNetwork]; + +export const YieldDtoNetwork = { + ethereum: 'ethereum', + 'ethereum-goerli': 'ethereum-goerli', + 'ethereum-holesky': 'ethereum-holesky', + 'ethereum-sepolia': 'ethereum-sepolia', + 'ethereum-hoodi': 'ethereum-hoodi', + arbitrum: 'arbitrum', + base: 'base', + 'base-sepolia': 'base-sepolia', + gnosis: 'gnosis', + optimism: 'optimism', + polygon: 'polygon', + 'polygon-amoy': 'polygon-amoy', + starknet: 'starknet', + zksync: 'zksync', + linea: 'linea', + unichain: 'unichain', + 'monad-testnet': 'monad-testnet', + monad: 'monad', + 'avalanche-c': 'avalanche-c', + 'avalanche-c-atomic': 'avalanche-c-atomic', + 'avalanche-p': 'avalanche-p', + binance: 'binance', + celo: 'celo', + fantom: 'fantom', + harmony: 'harmony', + moonriver: 'moonriver', + okc: 'okc', + viction: 'viction', + core: 'core', + sonic: 'sonic', + plasma: 'plasma', + katana: 'katana', + hyperevm: 'hyperevm', + agoric: 'agoric', + akash: 'akash', + axelar: 'axelar', + 'band-protocol': 'band-protocol', + bitsong: 'bitsong', + canto: 'canto', + chihuahua: 'chihuahua', + comdex: 'comdex', + coreum: 'coreum', + cosmos: 'cosmos', + crescent: 'crescent', + cronos: 'cronos', + cudos: 'cudos', + desmos: 'desmos', + dydx: 'dydx', + evmos: 'evmos', + 'fetch-ai': 'fetch-ai', + 'gravity-bridge': 'gravity-bridge', + injective: 'injective', + irisnet: 'irisnet', + juno: 'juno', + kava: 'kava', + 'ki-network': 'ki-network', + 'mars-protocol': 'mars-protocol', + nym: 'nym', + 'okex-chain': 'okex-chain', + onomy: 'onomy', + osmosis: 'osmosis', + persistence: 'persistence', + quicksilver: 'quicksilver', + regen: 'regen', + secret: 'secret', + sentinel: 'sentinel', + sommelier: 'sommelier', + stafi: 'stafi', + stargaze: 'stargaze', + stride: 'stride', + teritori: 'teritori', + tgrade: 'tgrade', + umee: 'umee', + sei: 'sei', + mantra: 'mantra', + celestia: 'celestia', + saga: 'saga', + zetachain: 'zetachain', + dymension: 'dymension', + humansai: 'humansai', + neutron: 'neutron', + polkadot: 'polkadot', + kusama: 'kusama', + westend: 'westend', + bittensor: 'bittensor', + aptos: 'aptos', + binancebeacon: 'binancebeacon', + cardano: 'cardano', + near: 'near', + solana: 'solana', + 'solana-devnet': 'solana-devnet', + stellar: 'stellar', + 'stellar-testnet': 'stellar-testnet', + sui: 'sui', + tezos: 'tezos', + tron: 'tron', + ton: 'ton', + 'ton-testnet': 'ton-testnet', + hyperliquid: 'hyperliquid', +} as const; + +export type YieldDto = { + /** Unique identifier for this yield opportunity */ + id: string; + /** Network this yield opportunity is on */ + network: YieldDtoNetwork; + /** EVM chain ID for this network (only for EVM networks) */ + chainId?: string; + /** Accepted input tokens (auto-converted as needed) */ + inputTokens: TokenDto[]; + /** Token received from the protocol */ + outputToken?: TokenDto; + /** Canonical deposit token - used for balances */ + token: TokenDto; + /** Canonical deposit tokens - used for balances */ + tokens: TokenDto[]; + /** Total effective yield broken down by source and token. */ + rewardRate: RewardRateDto; + /** Key statistics and analytics for this yield opportunity */ + statistics?: YieldStatisticsDto; + /** Risk scores and provider ratings for this yield */ + risk?: YieldRiskDto; + /** Current availability of user actions like enter, exit, claim */ + status: YieldStatusDto; + /** Descriptive metadata including name, logo, description, and documentation */ + metadata: YieldMetadataDto; + /** Operational mechanics including constraints, fees, and capabilities */ + mechanics: YieldMechanicsDto; + /** The provider ID this yield belongs to */ + providerId: string; + /** 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; +}; + +/** + * Type of balance + */ +export type BalanceType = (typeof BalanceType)[keyof typeof BalanceType]; + +export const BalanceType = { + active: 'active', + entering: 'entering', + exiting: 'exiting', + withdrawable: 'withdrawable', + claimable: 'claimable', + locked: 'locked', +} as const; + +/** + * High-level action intent + */ +export type PendingActionDtoIntent = + (typeof PendingActionDtoIntent)[keyof typeof PendingActionDtoIntent]; + +export const PendingActionDtoIntent = { + enter: 'enter', + manage: 'manage', + exit: 'exit', +} as const; + +/** + * Specific action type + */ +export type PendingActionDtoType = (typeof PendingActionDtoType)[keyof typeof PendingActionDtoType]; + +export const PendingActionDtoType = { + STAKE: 'STAKE', + UNSTAKE: 'UNSTAKE', + CLAIM_REWARDS: 'CLAIM_REWARDS', + RESTAKE_REWARDS: 'RESTAKE_REWARDS', + WITHDRAW: 'WITHDRAW', + WITHDRAW_ALL: 'WITHDRAW_ALL', + RESTAKE: 'RESTAKE', + CLAIM_UNSTAKED: 'CLAIM_UNSTAKED', + UNLOCK_LOCKED: 'UNLOCK_LOCKED', + STAKE_LOCKED: 'STAKE_LOCKED', + VOTE: 'VOTE', + REVOKE: 'REVOKE', + VOTE_LOCKED: 'VOTE_LOCKED', + REVOTE: 'REVOTE', + REBOND: 'REBOND', + MIGRATE: 'MIGRATE', + VERIFY_WITHDRAW_CREDENTIALS: 'VERIFY_WITHDRAW_CREDENTIALS', + DELEGATE: 'DELEGATE', +} as const; + +/** + * Argument schema required to execute this action + * @nullable + */ +export type PendingActionDtoArguments = ArgumentSchemaDto | null; + +export type PendingActionDto = { + /** High-level action intent */ + intent: PendingActionDtoIntent; + /** Specific action type */ + type: PendingActionDtoType; + /** Server-generated passthrough that must be included when executing the action */ + passthrough: string; + /** + * Argument schema required to execute this action + * @nullable + */ + arguments?: PendingActionDtoArguments; + /** + * Amount involved in the action + * @nullable + */ + amount?: string | null; +}; + +export type RevShareDetailsDto = { + /** Minimum revenue share percentage (0-1) */ + minRevShare: number; + /** Maximum revenue share percentage (0-1) */ + maxRevShare: number; +}; + +export type RevShareTiersDto = { + /** Trial tier revenue share details */ + trial?: RevShareDetailsDto; + /** Standard tier revenue share details */ + standard?: RevShareDetailsDto; + /** Pro tier revenue share details */ + pro?: RevShareDetailsDto; +}; + +/** + * Total TVL across the entire provider in USD + * @nullable + */ +export type ValidatorProviderDtoTvlUsd = { [key: string]: unknown } | null; + +/** + * Type of provider (protocol or validator provider) + */ +export type ValidatorProviderDtoType = + (typeof ValidatorProviderDtoType)[keyof typeof ValidatorProviderDtoType]; + +export const ValidatorProviderDtoType = { + protocol: 'protocol', + validator_provider: 'validator_provider', +} as const; + +export type ValidatorProviderDto = { + /** Provider name */ + name: string; + /** Provider ID */ + id: string; + /** Provider logo URI */ + logoURI: string; + /** Short description of the provider */ + description: string; + /** Provider website */ + website: string; + /** + * Total TVL across the entire provider in USD + * @nullable + */ + tvlUsd: ValidatorProviderDtoTvlUsd; + /** Type of provider (protocol or validator provider) */ + type: ValidatorProviderDtoType; + /** + * Optional social/media references or audit links + * @nullable + */ + references?: string[] | null; + /** Provider ranking (lower numbers indicate higher preference) */ + rank: number; + /** Whether this provider is marked as preferred */ + preferred: boolean; + /** Revenue sharing details by tier */ + revshare?: RevShareTiersDto; + /** + * Provider ID (deprecated, use `id` instead) + * @deprecated + */ + uniqueId?: string; + /** + * Creation timestamp (deprecated) + * @deprecated + */ + createdAt?: string; + /** + * Last update timestamp (deprecated) + * @deprecated + */ + updatedAt?: string; +}; + +export type ValidatorDto = { + /** Validator address or ID */ + address: string; + /** Validator display name */ + name?: string; + /** Validator logo URI */ + logoURI?: string; + /** Link to validator website */ + website?: string; + /** Detailed reward rate breakdown by source (emissions, MEV, fees, etc.) */ + rewardRate?: RewardRateDto; + /** Provider information for this validator */ + provider?: ValidatorProviderDto; + /** Commission rate charged by validator */ + commission?: number; + /** Total value locked with this validator in USD */ + tvlUsd?: string; + /** Total value locked with this validator in native token */ + tvl?: string; + /** Raw total value locked with this validator (full precision) */ + tvlRaw?: string; + /** Validator's voting power share (0–1) */ + votingPower?: number; + /** Whether this validator is flagged as preferred */ + preferred?: boolean; + /** Minimum stake allowed in native token */ + minimumStake?: string; + /** Maximum available stake before hitting cap in native token */ + remainingPossibleStake?: string; + /** Number of remaining nominator/delegator slots (for capped chains) */ + remainingSlots?: number; + /** Number of current nominators */ + nominatorCount?: number; + /** Validator status description (active, jailed, unbonding, etc.) */ + 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; +}; + +/** + * Validator information (if applicable) + * @nullable + */ +export type BalanceDtoValidator = ValidatorDto | null; + +/** + * Price range for concentrated liquidity positions in tokens[1]/tokens[0] format (e.g., if tokens[0]=WETH and tokens[1]=USDC, then priceRange represents USDC/WETH) + */ +export type BalanceDtoPriceRange = { [key: string]: unknown }; + +export type BalanceDto = { + /** User wallet address that owns this balance */ + address: string; + type: BalanceType; + /** Balance amount in underlying token */ + amount: string; + /** Raw balance amount (full precision) */ + amountRaw: string; + /** + * Date relevant to this balance state + * @nullable + */ + date?: string | null; + /** Fee configuration ID (if applicable) */ + feeConfigurationId?: string; + /** Pending actions for this balance */ + pendingActions: PendingActionDto[]; + /** Token used for balance amounts */ + token: TokenDto; + /** + * Validator information (if applicable) + * @nullable + */ + validator?: BalanceDtoValidator; + /** + * Multiple validators information (when balance is distributed across multiple validators) + * @nullable + */ + validators?: ValidatorDto[] | null; + /** + * Value of the balance in USD + * @nullable + */ + amountUsd?: string | null; + /** Whether this balance is currently earning rewards */ + isEarning: boolean; + /** Price range for concentrated liquidity positions in tokens[1]/tokens[0] format (e.g., if tokens[0]=WETH and tokens[1]=USDC, then priceRange represents USDC/WETH) */ + priceRange?: BalanceDtoPriceRange; + /** NFT token ID for liquidity positions (e.g., PancakeSwap V3 position NFT ID) */ + tokenId?: string; +}; + +/** + * Balance for the output token + * @nullable + */ +export type YieldBalancesDtoOutputTokenBalance = BalanceDto | null; + +export type YieldBalancesDto = { + /** Unique identifier of the yield */ + yieldId: string; + /** List of balances for this yield */ + balances: BalanceDto[]; + /** + * Balance for the output token + * @nullable + */ + outputTokenBalance?: YieldBalancesDtoOutputTokenBalance; +}; + +export type YieldErrorDto = { + /** Unique identifier of the yield that failed */ + yieldId: string; + /** Error message describing what went wrong */ + error: string; +}; + +export type BalancesResponseDto = { + /** Successful yield balance results */ + items: YieldBalancesDto[]; + /** Errors encountered while fetching balances */ + errors: YieldErrorDto[]; +}; + +export type Networks = (typeof Networks)[keyof typeof Networks]; + +export const Networks = { + ethereum: 'ethereum', + 'ethereum-goerli': 'ethereum-goerli', + 'ethereum-holesky': 'ethereum-holesky', + 'ethereum-sepolia': 'ethereum-sepolia', + 'ethereum-hoodi': 'ethereum-hoodi', + arbitrum: 'arbitrum', + base: 'base', + 'base-sepolia': 'base-sepolia', + gnosis: 'gnosis', + optimism: 'optimism', + polygon: 'polygon', + 'polygon-amoy': 'polygon-amoy', + starknet: 'starknet', + zksync: 'zksync', + linea: 'linea', + unichain: 'unichain', + 'monad-testnet': 'monad-testnet', + monad: 'monad', + 'avalanche-c': 'avalanche-c', + 'avalanche-c-atomic': 'avalanche-c-atomic', + 'avalanche-p': 'avalanche-p', + binance: 'binance', + celo: 'celo', + fantom: 'fantom', + harmony: 'harmony', + moonriver: 'moonriver', + okc: 'okc', + viction: 'viction', + core: 'core', + sonic: 'sonic', + plasma: 'plasma', + katana: 'katana', + hyperevm: 'hyperevm', + agoric: 'agoric', + akash: 'akash', + axelar: 'axelar', + 'band-protocol': 'band-protocol', + bitsong: 'bitsong', + canto: 'canto', + chihuahua: 'chihuahua', + comdex: 'comdex', + coreum: 'coreum', + cosmos: 'cosmos', + crescent: 'crescent', + cronos: 'cronos', + cudos: 'cudos', + desmos: 'desmos', + dydx: 'dydx', + evmos: 'evmos', + 'fetch-ai': 'fetch-ai', + 'gravity-bridge': 'gravity-bridge', + injective: 'injective', + irisnet: 'irisnet', + juno: 'juno', + kava: 'kava', + 'ki-network': 'ki-network', + 'mars-protocol': 'mars-protocol', + nym: 'nym', + 'okex-chain': 'okex-chain', + onomy: 'onomy', + osmosis: 'osmosis', + persistence: 'persistence', + quicksilver: 'quicksilver', + regen: 'regen', + secret: 'secret', + sentinel: 'sentinel', + sommelier: 'sommelier', + stafi: 'stafi', + stargaze: 'stargaze', + stride: 'stride', + teritori: 'teritori', + tgrade: 'tgrade', + umee: 'umee', + sei: 'sei', + mantra: 'mantra', + celestia: 'celestia', + saga: 'saga', + zetachain: 'zetachain', + dymension: 'dymension', + humansai: 'humansai', + neutron: 'neutron', + polkadot: 'polkadot', + kusama: 'kusama', + westend: 'westend', + bittensor: 'bittensor', + aptos: 'aptos', + binancebeacon: 'binancebeacon', + cardano: 'cardano', + near: 'near', + solana: 'solana', + 'solana-devnet': 'solana-devnet', + stellar: 'stellar', + 'stellar-testnet': 'stellar-testnet', + sui: 'sui', + tezos: 'tezos', + tron: 'tron', + ton: 'ton', + 'ton-testnet': 'ton-testnet', + hyperliquid: 'hyperliquid', +} as const; + +export type GetBalancesArgumentsDto = { + /** Avalanche C-chain address */ + cAddressBech?: string; + /** Avalanche P-chain address */ + pAddressBech?: string; +}; + +export type BalancesQueryDto = { + /** The unique identifier of the yield (optional for chain scanning) */ + yieldId?: string; + /** User wallet address to check balances for */ + address: string; + network: Networks; + /** Arguments for balance queries */ + arguments?: GetBalancesArgumentsDto; +}; + +export type BalancesRequestDto = { + /** Array of balance queries */ + queries: BalancesQueryDto[]; +}; + +export type YieldBalancesRequestDto = { + /** User wallet address to check balances for */ + address: string; + /** Optional arguments for advanced or protocol-specific balance queries */ + arguments?: GetBalancesArgumentsDto; +}; + +export type ValidatorQueryDto = { + /** + * Offset for pagination + * @minimum 0 + */ + offset?: number; + /** + * Maximum number of items to return + * @minimum 1 + * @maximum 100 + */ + limit?: number; + /** Filter by validator name (case-insensitive, partial match) */ + name?: string; + /** Filter by validator address */ + address?: string; + /** Filter by provider ID */ + provider?: string; + /** Filter by validator status */ + status?: string; + /** Filter by preferred flag */ + preferred?: boolean; +}; + +/** + * Network this transaction is for + */ +export type TransactionDtoNetwork = + (typeof TransactionDtoNetwork)[keyof typeof TransactionDtoNetwork]; + +export const TransactionDtoNetwork = { + ethereum: 'ethereum', + 'ethereum-goerli': 'ethereum-goerli', + 'ethereum-holesky': 'ethereum-holesky', + 'ethereum-sepolia': 'ethereum-sepolia', + 'ethereum-hoodi': 'ethereum-hoodi', + arbitrum: 'arbitrum', + base: 'base', + 'base-sepolia': 'base-sepolia', + gnosis: 'gnosis', + optimism: 'optimism', + polygon: 'polygon', + 'polygon-amoy': 'polygon-amoy', + starknet: 'starknet', + zksync: 'zksync', + linea: 'linea', + unichain: 'unichain', + 'monad-testnet': 'monad-testnet', + monad: 'monad', + 'avalanche-c': 'avalanche-c', + 'avalanche-c-atomic': 'avalanche-c-atomic', + 'avalanche-p': 'avalanche-p', + binance: 'binance', + celo: 'celo', + fantom: 'fantom', + harmony: 'harmony', + moonriver: 'moonriver', + okc: 'okc', + viction: 'viction', + core: 'core', + sonic: 'sonic', + plasma: 'plasma', + katana: 'katana', + hyperevm: 'hyperevm', + agoric: 'agoric', + akash: 'akash', + axelar: 'axelar', + 'band-protocol': 'band-protocol', + bitsong: 'bitsong', + canto: 'canto', + chihuahua: 'chihuahua', + comdex: 'comdex', + coreum: 'coreum', + cosmos: 'cosmos', + crescent: 'crescent', + cronos: 'cronos', + cudos: 'cudos', + desmos: 'desmos', + dydx: 'dydx', + evmos: 'evmos', + 'fetch-ai': 'fetch-ai', + 'gravity-bridge': 'gravity-bridge', + injective: 'injective', + irisnet: 'irisnet', + juno: 'juno', + kava: 'kava', + 'ki-network': 'ki-network', + 'mars-protocol': 'mars-protocol', + nym: 'nym', + 'okex-chain': 'okex-chain', + onomy: 'onomy', + osmosis: 'osmosis', + persistence: 'persistence', + quicksilver: 'quicksilver', + regen: 'regen', + secret: 'secret', + sentinel: 'sentinel', + sommelier: 'sommelier', + stafi: 'stafi', + stargaze: 'stargaze', + stride: 'stride', + teritori: 'teritori', + tgrade: 'tgrade', + umee: 'umee', + sei: 'sei', + mantra: 'mantra', + celestia: 'celestia', + saga: 'saga', + zetachain: 'zetachain', + dymension: 'dymension', + humansai: 'humansai', + neutron: 'neutron', + polkadot: 'polkadot', + kusama: 'kusama', + westend: 'westend', + bittensor: 'bittensor', + aptos: 'aptos', + binancebeacon: 'binancebeacon', + cardano: 'cardano', + near: 'near', + solana: 'solana', + 'solana-devnet': 'solana-devnet', + stellar: 'stellar', + 'stellar-testnet': 'stellar-testnet', + sui: 'sui', + tezos: 'tezos', + tron: 'tron', + ton: 'ton', + 'ton-testnet': 'ton-testnet', + hyperliquid: 'hyperliquid', +} as const; + +/** + * Current status of the transaction + */ +export type TransactionDtoStatus = (typeof TransactionDtoStatus)[keyof typeof TransactionDtoStatus]; + +export const TransactionDtoStatus = { + NOT_FOUND: 'NOT_FOUND', + CREATED: 'CREATED', + BLOCKED: 'BLOCKED', + WAITING_FOR_SIGNATURE: 'WAITING_FOR_SIGNATURE', + SIGNED: 'SIGNED', + BROADCASTED: 'BROADCASTED', + PENDING: 'PENDING', + CONFIRMED: 'CONFIRMED', + FAILED: 'FAILED', + SKIPPED: 'SKIPPED', +} as const; + +/** + * Type of transaction operation + */ +export type TransactionDtoType = (typeof TransactionDtoType)[keyof typeof TransactionDtoType]; + +export const TransactionDtoType = { + SWAP: 'SWAP', + DEPOSIT: 'DEPOSIT', + APPROVAL: 'APPROVAL', + STAKE: 'STAKE', + CLAIM_UNSTAKED: 'CLAIM_UNSTAKED', + CLAIM_REWARDS: 'CLAIM_REWARDS', + RESTAKE_REWARDS: 'RESTAKE_REWARDS', + UNSTAKE: 'UNSTAKE', + SPLIT: 'SPLIT', + MERGE: 'MERGE', + LOCK: 'LOCK', + UNLOCK: 'UNLOCK', + SUPPLY: 'SUPPLY', + ADD_LIQUIDITY: 'ADD_LIQUIDITY', + REMOVE_LIQUIDITY: 'REMOVE_LIQUIDITY', + BRIDGE: 'BRIDGE', + VOTE: 'VOTE', + REVOKE: 'REVOKE', + RESTAKE: 'RESTAKE', + REBOND: 'REBOND', + WITHDRAW: 'WITHDRAW', + WITHDRAW_ALL: 'WITHDRAW_ALL', + CREATE_ACCOUNT: 'CREATE_ACCOUNT', + REVEAL: 'REVEAL', + MIGRATE: 'MIGRATE', + DELEGATE: 'DELEGATE', + UNDELEGATE: 'UNDELEGATE', + UTXO_P_TO_C_IMPORT: 'UTXO_P_TO_C_IMPORT', + UTXO_C_TO_P_IMPORT: 'UTXO_C_TO_P_IMPORT', + WRAP: 'WRAP', + UNWRAP: 'UNWRAP', + UNFREEZE_LEGACY: 'UNFREEZE_LEGACY', + UNFREEZE_LEGACY_BANDWIDTH: 'UNFREEZE_LEGACY_BANDWIDTH', + UNFREEZE_LEGACY_ENERGY: 'UNFREEZE_LEGACY_ENERGY', + UNFREEZE_BANDWIDTH: 'UNFREEZE_BANDWIDTH', + UNFREEZE_ENERGY: 'UNFREEZE_ENERGY', + FREEZE_BANDWIDTH: 'FREEZE_BANDWIDTH', + FREEZE_ENERGY: 'FREEZE_ENERGY', + UNDELEGATE_BANDWIDTH: 'UNDELEGATE_BANDWIDTH', + UNDELEGATE_ENERGY: 'UNDELEGATE_ENERGY', + P2P_NODE_REQUEST: 'P2P_NODE_REQUEST', + CREATE_EIGENPOD: 'CREATE_EIGENPOD', + VERIFY_WITHDRAW_CREDENTIALS: 'VERIFY_WITHDRAW_CREDENTIALS', + START_CHECKPOINT: 'START_CHECKPOINT', + VERIFY_CHECKPOINT_PROOFS: 'VERIFY_CHECKPOINT_PROOFS', + QUEUE_WITHDRAWALS: 'QUEUE_WITHDRAWALS', + COMPLETE_QUEUED_WITHDRAWALS: 'COMPLETE_QUEUED_WITHDRAWALS', + LZ_DEPOSIT: 'LZ_DEPOSIT', + LZ_WITHDRAW: 'LZ_WITHDRAW', + LUGANODES_PROVISION: 'LUGANODES_PROVISION', + LUGANODES_EXIT_REQUEST: 'LUGANODES_EXIT_REQUEST', + INFSTONES_PROVISION: 'INFSTONES_PROVISION', + INFSTONES_EXIT_REQUEST: 'INFSTONES_EXIT_REQUEST', + INFSTONES_CLAIM_REQUEST: 'INFSTONES_CLAIM_REQUEST', +} as const; + +/** + * Transaction object (for non-EVM chains) + */ +export type TransactionDtoUnsignedTransactionOneOf = { [key: string]: unknown }; + +/** + * The unsigned transaction data to be signed by the wallet + * @nullable + */ +export type TransactionDtoUnsignedTransaction = + | string + | TransactionDtoUnsignedTransactionOneOf + | null; + +/** + * Human-readable breakdown of the transaction for display purposes + * @nullable + */ +export type TransactionDtoAnnotatedTransaction = { [key: string]: unknown } | null; + +/** + * Detailed transaction data for client-side validation or simulation + * @nullable + */ +export type TransactionDtoStructuredTransaction = { [key: string]: unknown } | null; + +export type TransactionDto = { + /** Unique transaction identifier */ + id: string; + /** Display title for the transaction */ + title: string; + /** Network this transaction is for */ + network: TransactionDtoNetwork; + /** Current status of the transaction */ + status: TransactionDtoStatus; + /** Type of transaction operation */ + type: TransactionDtoType; + /** + * Transaction hash (available after broadcast) + * @nullable + */ + hash: string | null; + /** When the transaction was created */ + createdAt: string; + /** + * When the transaction was broadcasted to the network + * @nullable + */ + broadcastedAt: string | null; + /** + * Signed transaction data (ready for broadcast) + * @nullable + */ + signedTransaction: string | null; + /** + * The unsigned transaction data to be signed by the wallet + * @nullable + */ + unsignedTransaction: TransactionDtoUnsignedTransaction; + /** + * Human-readable breakdown of the transaction for display purposes + * @nullable + */ + annotatedTransaction?: TransactionDtoAnnotatedTransaction; + /** + * Detailed transaction data for client-side validation or simulation + * @nullable + */ + structuredTransaction?: TransactionDtoStructuredTransaction; + /** Zero-based index of the step in the action flow */ + stepIndex?: number; + /** User-friendly description of what this transaction does */ + description?: string; + /** + * Error message if the transaction failed + * @nullable + */ + error?: string | null; + /** Estimated gas cost for the transaction */ + gasEstimate?: string; + /** + * Link to the blockchain explorer for this transaction + * @nullable + */ + explorerUrl?: string | null; + /** Whether this transaction is a message rather than a value transfer */ + isMessage?: boolean; +}; + +/** + * Network for the input token. Required for cross-chain deposits when the token is on a different network than the vault. + */ +export type ActionArgumentsDtoInputTokenNetwork = + (typeof ActionArgumentsDtoInputTokenNetwork)[keyof typeof ActionArgumentsDtoInputTokenNetwork]; + +export const ActionArgumentsDtoInputTokenNetwork = { + ethereum: 'ethereum', + 'ethereum-goerli': 'ethereum-goerli', + 'ethereum-holesky': 'ethereum-holesky', + 'ethereum-sepolia': 'ethereum-sepolia', + 'ethereum-hoodi': 'ethereum-hoodi', + arbitrum: 'arbitrum', + base: 'base', + 'base-sepolia': 'base-sepolia', + gnosis: 'gnosis', + optimism: 'optimism', + polygon: 'polygon', + 'polygon-amoy': 'polygon-amoy', + starknet: 'starknet', + zksync: 'zksync', + linea: 'linea', + unichain: 'unichain', + 'monad-testnet': 'monad-testnet', + monad: 'monad', + 'avalanche-c': 'avalanche-c', + 'avalanche-c-atomic': 'avalanche-c-atomic', + 'avalanche-p': 'avalanche-p', + binance: 'binance', + celo: 'celo', + fantom: 'fantom', + harmony: 'harmony', + moonriver: 'moonriver', + okc: 'okc', + viction: 'viction', + core: 'core', + sonic: 'sonic', + plasma: 'plasma', + katana: 'katana', + hyperevm: 'hyperevm', + agoric: 'agoric', + akash: 'akash', + axelar: 'axelar', + 'band-protocol': 'band-protocol', + bitsong: 'bitsong', + canto: 'canto', + chihuahua: 'chihuahua', + comdex: 'comdex', + coreum: 'coreum', + cosmos: 'cosmos', + crescent: 'crescent', + cronos: 'cronos', + cudos: 'cudos', + desmos: 'desmos', + dydx: 'dydx', + evmos: 'evmos', + 'fetch-ai': 'fetch-ai', + 'gravity-bridge': 'gravity-bridge', + injective: 'injective', + irisnet: 'irisnet', + juno: 'juno', + kava: 'kava', + 'ki-network': 'ki-network', + 'mars-protocol': 'mars-protocol', + nym: 'nym', + 'okex-chain': 'okex-chain', + onomy: 'onomy', + osmosis: 'osmosis', + persistence: 'persistence', + quicksilver: 'quicksilver', + regen: 'regen', + secret: 'secret', + sentinel: 'sentinel', + sommelier: 'sommelier', + stafi: 'stafi', + stargaze: 'stargaze', + stride: 'stride', + teritori: 'teritori', + tgrade: 'tgrade', + umee: 'umee', + sei: 'sei', + mantra: 'mantra', + celestia: 'celestia', + saga: 'saga', + zetachain: 'zetachain', + dymension: 'dymension', + humansai: 'humansai', + neutron: 'neutron', + polkadot: 'polkadot', + kusama: 'kusama', + westend: 'westend', + bittensor: 'bittensor', + aptos: 'aptos', + binancebeacon: 'binancebeacon', + cardano: 'cardano', + near: 'near', + solana: 'solana', + 'solana-devnet': 'solana-devnet', + stellar: 'stellar', + 'stellar-testnet': 'stellar-testnet', + sui: 'sui', + tezos: 'tezos', + tron: 'tron', + ton: 'ton', + 'ton-testnet': 'ton-testnet', + hyperliquid: 'hyperliquid', +} as const; + +/** + * Network for the output token. Required for cross-chain withdrawals when the destination is on a different network than the vault. + */ +export type ActionArgumentsDtoOutputTokenNetwork = + (typeof ActionArgumentsDtoOutputTokenNetwork)[keyof typeof ActionArgumentsDtoOutputTokenNetwork]; + +export const ActionArgumentsDtoOutputTokenNetwork = { + ethereum: 'ethereum', + 'ethereum-goerli': 'ethereum-goerli', + 'ethereum-holesky': 'ethereum-holesky', + 'ethereum-sepolia': 'ethereum-sepolia', + 'ethereum-hoodi': 'ethereum-hoodi', + arbitrum: 'arbitrum', + base: 'base', + 'base-sepolia': 'base-sepolia', + gnosis: 'gnosis', + optimism: 'optimism', + polygon: 'polygon', + 'polygon-amoy': 'polygon-amoy', + starknet: 'starknet', + zksync: 'zksync', + linea: 'linea', + unichain: 'unichain', + 'monad-testnet': 'monad-testnet', + monad: 'monad', + 'avalanche-c': 'avalanche-c', + 'avalanche-c-atomic': 'avalanche-c-atomic', + 'avalanche-p': 'avalanche-p', + binance: 'binance', + celo: 'celo', + fantom: 'fantom', + harmony: 'harmony', + moonriver: 'moonriver', + okc: 'okc', + viction: 'viction', + core: 'core', + sonic: 'sonic', + plasma: 'plasma', + katana: 'katana', + hyperevm: 'hyperevm', + agoric: 'agoric', + akash: 'akash', + axelar: 'axelar', + 'band-protocol': 'band-protocol', + bitsong: 'bitsong', + canto: 'canto', + chihuahua: 'chihuahua', + comdex: 'comdex', + coreum: 'coreum', + cosmos: 'cosmos', + crescent: 'crescent', + cronos: 'cronos', + cudos: 'cudos', + desmos: 'desmos', + dydx: 'dydx', + evmos: 'evmos', + 'fetch-ai': 'fetch-ai', + 'gravity-bridge': 'gravity-bridge', + injective: 'injective', + irisnet: 'irisnet', + juno: 'juno', + kava: 'kava', + 'ki-network': 'ki-network', + 'mars-protocol': 'mars-protocol', + nym: 'nym', + 'okex-chain': 'okex-chain', + onomy: 'onomy', + osmosis: 'osmosis', + persistence: 'persistence', + quicksilver: 'quicksilver', + regen: 'regen', + secret: 'secret', + sentinel: 'sentinel', + sommelier: 'sommelier', + stafi: 'stafi', + stargaze: 'stargaze', + stride: 'stride', + teritori: 'teritori', + tgrade: 'tgrade', + umee: 'umee', + sei: 'sei', + mantra: 'mantra', + celestia: 'celestia', + saga: 'saga', + zetachain: 'zetachain', + dymension: 'dymension', + humansai: 'humansai', + neutron: 'neutron', + polkadot: 'polkadot', + kusama: 'kusama', + westend: 'westend', + bittensor: 'bittensor', + aptos: 'aptos', + binancebeacon: 'binancebeacon', + cardano: 'cardano', + near: 'near', + solana: 'solana', + 'solana-devnet': 'solana-devnet', + stellar: 'stellar', + 'stellar-testnet': 'stellar-testnet', + sui: 'sui', + tezos: 'tezos', + tron: 'tron', + ton: 'ton', + 'ton-testnet': 'ton-testnet', + hyperliquid: 'hyperliquid', +} as const; + +/** + * Tron resource type for Tron staking + */ +export type ActionArgumentsDtoTronResource = + (typeof ActionArgumentsDtoTronResource)[keyof typeof ActionArgumentsDtoTronResource]; + +export const ActionArgumentsDtoTronResource = { + BANDWIDTH: 'BANDWIDTH', + ENERGY: 'ENERGY', +} as const; + +/** + * Transaction execution mode + */ +export type ActionArgumentsDtoExecutionMode = + (typeof ActionArgumentsDtoExecutionMode)[keyof typeof ActionArgumentsDtoExecutionMode]; + +export const ActionArgumentsDtoExecutionMode = { + individual: 'individual', + batched: 'batched', +} as const; + +export type ActionArgumentsDto = { + /** Amount to stake/unstake */ + amount?: string; + /** Amounts to stake/unstake */ + amounts?: string[]; + /** Validator address for single validator selection */ + validatorAddress?: string; + /** Multiple validator addresses */ + validatorAddresses?: string[]; + /** Provider ID for Ethereum native staking */ + providerId?: string; + /** Duration for Avalanche native staking (in seconds) */ + duration?: number; + /** Token for deposits. Use "0x" for native token or provide the token address. For cross-chain deposits, also provide inputTokenNetwork. */ + inputToken?: string; + /** Network for the input token. Required for cross-chain deposits when the token is on a different network than the vault. */ + inputTokenNetwork?: ActionArgumentsDtoInputTokenNetwork; + /** Token for withdrawals. Use "0x" for native token or provide the token address. For cross-chain withdrawals, also provide outputTokenNetwork. */ + outputToken?: string; + /** Network for the output token. Required for cross-chain withdrawals when the destination is on a different network than the vault. */ + outputTokenNetwork?: ActionArgumentsDtoOutputTokenNetwork; + /** Subnet ID for Bittensor staking */ + subnetId?: number; + /** Tron resource type for Tron staking */ + tronResource?: ActionArgumentsDtoTronResource; + /** Fee configuration ID for custom fee settings */ + feeConfigurationId?: string; + /** Cosmos public key for Cosmos staking */ + cosmosPubKey?: string; + /** Tezos public key for Tezos staking */ + tezosPubKey?: string; + /** Avalanche C-chain address */ + cAddressBech?: string; + /** Avalanche P-chain address */ + pAddressBech?: string; + /** Transaction execution mode */ + executionMode?: ActionArgumentsDtoExecutionMode; + /** Transactions should have Ledger wallet API compatibility for hardware wallet users */ + ledgerWalletApiCompatible?: boolean; + /** Use max amount for ERC4626 withdraw */ + useMaxAmount?: boolean; + /** Use instant execution for exit (faster but may have fees) */ + useInstantExecution?: boolean; + /** Minimum price bound for concentrated liquidity pools (as decimal string). Must be non-negative (can be 0) and less than rangeMax. */ + rangeMin?: string; + /** Maximum price bound for concentrated liquidity pools (as decimal string). Must be positive and greater than rangeMin. */ + rangeMax?: string; + /** + * Percentage of liquidity to exit (0-100). Required for partial exits from liquidity positions. + * @minimum 0 + * @maximum 100 + */ + percentage?: number; + /** NFT token ID for concentrated liquidity positions. Required for exiting specific positions. */ + tokenId?: string; +}; + +/** + * High-level action intent + */ +export type ActionDtoIntent = (typeof ActionDtoIntent)[keyof typeof ActionDtoIntent]; + +export const ActionDtoIntent = { + enter: 'enter', + manage: 'manage', + exit: 'exit', +} as const; + +/** + * Specific action type + */ +export type ActionDtoType = (typeof ActionDtoType)[keyof typeof ActionDtoType]; + +export const ActionDtoType = { + STAKE: 'STAKE', + UNSTAKE: 'UNSTAKE', + CLAIM_REWARDS: 'CLAIM_REWARDS', + RESTAKE_REWARDS: 'RESTAKE_REWARDS', + WITHDRAW: 'WITHDRAW', + WITHDRAW_ALL: 'WITHDRAW_ALL', + RESTAKE: 'RESTAKE', + CLAIM_UNSTAKED: 'CLAIM_UNSTAKED', + UNLOCK_LOCKED: 'UNLOCK_LOCKED', + STAKE_LOCKED: 'STAKE_LOCKED', + VOTE: 'VOTE', + REVOKE: 'REVOKE', + VOTE_LOCKED: 'VOTE_LOCKED', + REVOTE: 'REVOTE', + REBOND: 'REBOND', + MIGRATE: 'MIGRATE', + VERIFY_WITHDRAW_CREDENTIALS: 'VERIFY_WITHDRAW_CREDENTIALS', + DELEGATE: 'DELEGATE', +} as const; + +/** + * Transaction execution pattern - synchronous (submit one by one, wait for each), asynchronous (submit all at once), or batch (single transaction with multiple operations) + */ +export type ActionDtoExecutionPattern = + (typeof ActionDtoExecutionPattern)[keyof typeof ActionDtoExecutionPattern]; + +export const ActionDtoExecutionPattern = { + synchronous: 'synchronous', + asynchronous: 'asynchronous', + batch: 'batch', +} as const; + +/** + * Raw arguments exactly as submitted by the user for this action + * @nullable + */ +export type ActionDtoRawArguments = ActionArgumentsDto | null; + +/** + * Current status of the action + */ +export type ActionDtoStatus = (typeof ActionDtoStatus)[keyof typeof ActionDtoStatus]; + +export const ActionDtoStatus = { + CANCELED: 'CANCELED', + CREATED: 'CREATED', + WAITING_FOR_NEXT: 'WAITING_FOR_NEXT', + PROCESSING: 'PROCESSING', + FAILED: 'FAILED', + SUCCESS: 'SUCCESS', + STALE: 'STALE', +} as const; + +export type ActionDto = { + /** Unique action identifier */ + id: string; + /** High-level action intent */ + intent: ActionDtoIntent; + /** Specific action type */ + type: ActionDtoType; + /** Yield ID this action belongs to */ + yieldId: string; + /** User wallet address */ + address: string; + /** + * Amount involved in the action + * @nullable + */ + amount: string | null; + /** + * Raw wei amount (full precision) + * @nullable + */ + amountRaw: string | null; + /** + * USD value of the amount + * @nullable + */ + amountUsd: string | null; + /** Array of transactions for this action */ + transactions: TransactionDto[]; + /** Transaction execution pattern - synchronous (submit one by one, wait for each), asynchronous (submit all at once), or batch (single transaction with multiple operations) */ + executionPattern: ActionDtoExecutionPattern; + /** + * Raw arguments exactly as submitted by the user for this action + * @nullable + */ + rawArguments: ActionDtoRawArguments; + /** When the action was created */ + createdAt: string; + /** + * When the action was completed + * @nullable + */ + completedAt: string | null; + /** Current status of the action */ + status: ActionDtoStatus; +}; + +export type PaginatedResponseDto = { + /** Total number of items available */ + total: number; + /** Offset of the current page */ + offset: number; + /** Limit of the current page */ + limit: number; +}; + +/** + * Filter by network + */ +export type YieldQueryDtoNetwork = (typeof YieldQueryDtoNetwork)[keyof typeof YieldQueryDtoNetwork]; + +export const YieldQueryDtoNetwork = { + ethereum: 'ethereum', + 'ethereum-goerli': 'ethereum-goerli', + 'ethereum-holesky': 'ethereum-holesky', + 'ethereum-sepolia': 'ethereum-sepolia', + 'ethereum-hoodi': 'ethereum-hoodi', + arbitrum: 'arbitrum', + base: 'base', + 'base-sepolia': 'base-sepolia', + gnosis: 'gnosis', + optimism: 'optimism', + polygon: 'polygon', + 'polygon-amoy': 'polygon-amoy', + starknet: 'starknet', + zksync: 'zksync', + linea: 'linea', + unichain: 'unichain', + 'monad-testnet': 'monad-testnet', + monad: 'monad', + 'avalanche-c': 'avalanche-c', + 'avalanche-c-atomic': 'avalanche-c-atomic', + 'avalanche-p': 'avalanche-p', + binance: 'binance', + celo: 'celo', + fantom: 'fantom', + harmony: 'harmony', + moonriver: 'moonriver', + okc: 'okc', + viction: 'viction', + core: 'core', + sonic: 'sonic', + plasma: 'plasma', + katana: 'katana', + hyperevm: 'hyperevm', + agoric: 'agoric', + akash: 'akash', + axelar: 'axelar', + 'band-protocol': 'band-protocol', + bitsong: 'bitsong', + canto: 'canto', + chihuahua: 'chihuahua', + comdex: 'comdex', + coreum: 'coreum', + cosmos: 'cosmos', + crescent: 'crescent', + cronos: 'cronos', + cudos: 'cudos', + desmos: 'desmos', + dydx: 'dydx', + evmos: 'evmos', + 'fetch-ai': 'fetch-ai', + 'gravity-bridge': 'gravity-bridge', + injective: 'injective', + irisnet: 'irisnet', + juno: 'juno', + kava: 'kava', + 'ki-network': 'ki-network', + 'mars-protocol': 'mars-protocol', + nym: 'nym', + 'okex-chain': 'okex-chain', + onomy: 'onomy', + osmosis: 'osmosis', + persistence: 'persistence', + quicksilver: 'quicksilver', + regen: 'regen', + secret: 'secret', + sentinel: 'sentinel', + sommelier: 'sommelier', + stafi: 'stafi', + stargaze: 'stargaze', + stride: 'stride', + teritori: 'teritori', + tgrade: 'tgrade', + umee: 'umee', + sei: 'sei', + mantra: 'mantra', + celestia: 'celestia', + saga: 'saga', + zetachain: 'zetachain', + dymension: 'dymension', + humansai: 'humansai', + neutron: 'neutron', + polkadot: 'polkadot', + kusama: 'kusama', + westend: 'westend', + bittensor: 'bittensor', + aptos: 'aptos', + binancebeacon: 'binancebeacon', + cardano: 'cardano', + near: 'near', + solana: 'solana', + 'solana-devnet': 'solana-devnet', + stellar: 'stellar', + 'stellar-testnet': 'stellar-testnet', + sui: 'sui', + tezos: 'tezos', + tron: 'tron', + ton: 'ton', + 'ton-testnet': 'ton-testnet', + hyperliquid: 'hyperliquid', +} as const; + +/** + * Filter by yield type + */ +export type YieldQueryDtoType = (typeof YieldQueryDtoType)[keyof typeof YieldQueryDtoType]; + +export const YieldQueryDtoType = { + 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', +} as const; + +export type YieldQueryDtoTypesItem = + (typeof YieldQueryDtoTypesItem)[keyof typeof YieldQueryDtoTypesItem]; + +export const YieldQueryDtoTypesItem = { + 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', +} as const; + +/** + * Sort by yield status + */ +export type YieldQueryDtoSort = (typeof YieldQueryDtoSort)[keyof typeof YieldQueryDtoSort]; + +export const YieldQueryDtoSort = { + statusEnterAsc: 'statusEnterAsc', + statusEnterDesc: 'statusEnterDesc', + statusExitAsc: 'statusExitAsc', + statusExitDesc: 'statusExitDesc', +} as const; + +export type YieldQueryDto = { + /** + * Offset for pagination + * @minimum 0 + */ + offset?: number; + /** + * Maximum number of items to return + * @minimum 1 + * @maximum 100 + */ + limit?: number; + /** Filter by network */ + network?: YieldQueryDtoNetwork; + /** Filter by EVM chain ID (Ethereum: 1, Polygon: 137, etc) */ + chainId?: string; + /** Filter by multiple networks (comma separated) */ + networks?: string; + /** @maxLength 200 */ + yieldId?: string; + /** @maxItems 100 */ + yieldIds?: string[]; + /** Filter by yield type */ + type?: YieldQueryDtoType; + /** Filter by multiple yield types (comma separated) */ + types?: YieldQueryDtoTypesItem[]; + /** Filter by cooldown period */ + hasCooldownPeriod?: boolean; + /** Filter by warmup period */ + hasWarmupPeriod?: boolean; + /** Filter by token symbol or address */ + token?: string; + /** Filter by input token symbol or address */ + inputToken?: string; + /** Filter by multiple input token symbol or address (comma separated) */ + inputTokens?: string[]; + /** Filter by provider ID */ + provider?: string; + /** Filter by multiple provider IDs (comma separated) */ + providers?: string[]; + /** Search by yield name */ + search?: string; + /** Sort by yield status */ + sort?: YieldQueryDtoSort; +}; + +export type PaginationQueryDto = { + /** + * Offset for pagination + * @minimum 0 + */ + offset?: number; + /** + * Maximum number of items to return + * @minimum 1 + * @maximum 100 + */ + limit?: number; +}; + +export type RiskParameterDtoValue = { [key: string]: unknown }; + +export type RiskParameterDtoAsset = { [key: string]: unknown }; + +export type RiskParameterDtoProtocol = { [key: string]: unknown }; + +export type RiskParameterDtoIntegrationId = { [key: string]: unknown }; + +export type RiskParameterDto = { + id: string; + category: string; + item: string; + isDynamic: boolean; + value?: RiskParameterDtoValue; + network?: Networks; + asset?: RiskParameterDtoAsset; + protocol?: RiskParameterDtoProtocol; + integrationId?: RiskParameterDtoIntegrationId; + createdAt: string; + updatedAt: string; +}; + +export type CreateActionDto = { + /** Yield ID to perform the action on */ + yieldId: string; + /** User wallet address */ + address: string; + /** Arguments for the action */ + arguments?: ActionArgumentsDto; +}; + +/** + * Pending action type (required for manage actions) + */ +export type CreateManageActionDtoAction = + (typeof CreateManageActionDtoAction)[keyof typeof CreateManageActionDtoAction]; + +export const CreateManageActionDtoAction = { + STAKE: 'STAKE', + UNSTAKE: 'UNSTAKE', + CLAIM_REWARDS: 'CLAIM_REWARDS', + RESTAKE_REWARDS: 'RESTAKE_REWARDS', + WITHDRAW: 'WITHDRAW', + WITHDRAW_ALL: 'WITHDRAW_ALL', + RESTAKE: 'RESTAKE', + CLAIM_UNSTAKED: 'CLAIM_UNSTAKED', + UNLOCK_LOCKED: 'UNLOCK_LOCKED', + STAKE_LOCKED: 'STAKE_LOCKED', + VOTE: 'VOTE', + REVOKE: 'REVOKE', + VOTE_LOCKED: 'VOTE_LOCKED', + REVOTE: 'REVOTE', + REBOND: 'REBOND', + MIGRATE: 'MIGRATE', + VERIFY_WITHDRAW_CREDENTIALS: 'VERIFY_WITHDRAW_CREDENTIALS', + DELEGATE: 'DELEGATE', +} as const; + +export type CreateManageActionDto = { + /** Yield ID to perform the action on */ + yieldId: string; + /** User wallet address */ + address: string; + /** Arguments for the action */ + arguments?: ActionArgumentsDto; + /** Pending action type (required for manage actions) */ + action: CreateManageActionDtoAction; + /** Server-generated passthrough from the balances endpoint (required for manage actions) */ + passthrough: string; +}; + +/** + * Filter by action status + */ +export type ActionsQueryDtoStatus = + (typeof ActionsQueryDtoStatus)[keyof typeof ActionsQueryDtoStatus]; + +export const ActionsQueryDtoStatus = { + CANCELED: 'CANCELED', + CREATED: 'CREATED', + WAITING_FOR_NEXT: 'WAITING_FOR_NEXT', + PROCESSING: 'PROCESSING', + FAILED: 'FAILED', + SUCCESS: 'SUCCESS', + STALE: 'STALE', +} as const; + +/** + * Filter by action intent + */ +export type ActionsQueryDtoIntent = + (typeof ActionsQueryDtoIntent)[keyof typeof ActionsQueryDtoIntent]; + +export const ActionsQueryDtoIntent = { + enter: 'enter', + manage: 'manage', + exit: 'exit', +} as const; + +/** + * Filter by action type + */ +export type ActionsQueryDtoType = (typeof ActionsQueryDtoType)[keyof typeof ActionsQueryDtoType]; + +export const ActionsQueryDtoType = { + STAKE: 'STAKE', + UNSTAKE: 'UNSTAKE', + CLAIM_REWARDS: 'CLAIM_REWARDS', + RESTAKE_REWARDS: 'RESTAKE_REWARDS', + WITHDRAW: 'WITHDRAW', + WITHDRAW_ALL: 'WITHDRAW_ALL', + RESTAKE: 'RESTAKE', + CLAIM_UNSTAKED: 'CLAIM_UNSTAKED', + UNLOCK_LOCKED: 'UNLOCK_LOCKED', + STAKE_LOCKED: 'STAKE_LOCKED', + VOTE: 'VOTE', + REVOKE: 'REVOKE', + VOTE_LOCKED: 'VOTE_LOCKED', + REVOTE: 'REVOTE', + REBOND: 'REBOND', + MIGRATE: 'MIGRATE', + VERIFY_WITHDRAW_CREDENTIALS: 'VERIFY_WITHDRAW_CREDENTIALS', + DELEGATE: 'DELEGATE', +} as const; + +export type ActionsQueryDto = { + /** + * Offset for pagination + * @minimum 0 + */ + offset?: number; + /** + * Maximum number of items to return + * @minimum 1 + * @maximum 100 + */ + limit?: number; + /** User wallet address to filter actions for */ + address: string; + /** Filter by action status */ + status?: ActionsQueryDtoStatus; + /** Filter by action intent */ + intent?: ActionsQueryDtoIntent; + /** Filter by action type */ + type?: ActionsQueryDtoType; + /** Filter by yield ID */ + yieldId?: string; +}; + +export type SubmitHashDto = { + /** Transaction hash from the blockchain */ + hash: string; +}; + +export type SubmitTransactionDto = { + /** Encoded signed transaction to submit to the blockchain */ + signedTransaction: string; +}; + +/** + * The network identifier + */ +export type NetworkDtoId = (typeof NetworkDtoId)[keyof typeof NetworkDtoId]; + +export const NetworkDtoId = { + ethereum: 'ethereum', + 'ethereum-goerli': 'ethereum-goerli', + 'ethereum-holesky': 'ethereum-holesky', + 'ethereum-sepolia': 'ethereum-sepolia', + 'ethereum-hoodi': 'ethereum-hoodi', + arbitrum: 'arbitrum', + base: 'base', + 'base-sepolia': 'base-sepolia', + gnosis: 'gnosis', + optimism: 'optimism', + polygon: 'polygon', + 'polygon-amoy': 'polygon-amoy', + starknet: 'starknet', + zksync: 'zksync', + linea: 'linea', + unichain: 'unichain', + 'monad-testnet': 'monad-testnet', + monad: 'monad', + 'avalanche-c': 'avalanche-c', + 'avalanche-c-atomic': 'avalanche-c-atomic', + 'avalanche-p': 'avalanche-p', + binance: 'binance', + celo: 'celo', + fantom: 'fantom', + harmony: 'harmony', + moonriver: 'moonriver', + okc: 'okc', + viction: 'viction', + core: 'core', + sonic: 'sonic', + plasma: 'plasma', + katana: 'katana', + hyperevm: 'hyperevm', + agoric: 'agoric', + akash: 'akash', + axelar: 'axelar', + 'band-protocol': 'band-protocol', + bitsong: 'bitsong', + canto: 'canto', + chihuahua: 'chihuahua', + comdex: 'comdex', + coreum: 'coreum', + cosmos: 'cosmos', + crescent: 'crescent', + cronos: 'cronos', + cudos: 'cudos', + desmos: 'desmos', + dydx: 'dydx', + evmos: 'evmos', + 'fetch-ai': 'fetch-ai', + 'gravity-bridge': 'gravity-bridge', + injective: 'injective', + irisnet: 'irisnet', + juno: 'juno', + kava: 'kava', + 'ki-network': 'ki-network', + 'mars-protocol': 'mars-protocol', + nym: 'nym', + 'okex-chain': 'okex-chain', + onomy: 'onomy', + osmosis: 'osmosis', + persistence: 'persistence', + quicksilver: 'quicksilver', + regen: 'regen', + secret: 'secret', + sentinel: 'sentinel', + sommelier: 'sommelier', + stafi: 'stafi', + stargaze: 'stargaze', + stride: 'stride', + teritori: 'teritori', + tgrade: 'tgrade', + umee: 'umee', + sei: 'sei', + mantra: 'mantra', + celestia: 'celestia', + saga: 'saga', + zetachain: 'zetachain', + dymension: 'dymension', + humansai: 'humansai', + neutron: 'neutron', + polkadot: 'polkadot', + kusama: 'kusama', + westend: 'westend', + bittensor: 'bittensor', + aptos: 'aptos', + binancebeacon: 'binancebeacon', + cardano: 'cardano', + near: 'near', + solana: 'solana', + 'solana-devnet': 'solana-devnet', + stellar: 'stellar', + 'stellar-testnet': 'stellar-testnet', + sui: 'sui', + tezos: 'tezos', + tron: 'tron', + ton: 'ton', + 'ton-testnet': 'ton-testnet', + hyperliquid: 'hyperliquid', +} as const; + +/** + * The category of the network + */ +export type NetworkDtoCategory = (typeof NetworkDtoCategory)[keyof typeof NetworkDtoCategory]; + +export const NetworkDtoCategory = { + evm: 'evm', + cosmos: 'cosmos', + substrate: 'substrate', + misc: 'misc', +} as const; + +export type NetworkDto = { + /** The network identifier */ + id: NetworkDtoId; + /** Human-readable display name of the network */ + name: string; + /** The category of the network */ + category: NetworkDtoCategory; + /** Logo URI for the network */ + logoURI: string; +}; + +/** + * Total TVL across the entire provider in USD + * @nullable + */ +export type ProviderDtoTvlUsd = { [key: string]: unknown } | null; + +/** + * Type of provider (protocol or validator provider) + */ +export type ProviderDtoType = (typeof ProviderDtoType)[keyof typeof ProviderDtoType]; + +export const ProviderDtoType = { + protocol: 'protocol', + validator_provider: 'validator_provider', +} as const; + +export type ProviderDto = { + /** Provider name */ + name: string; + /** Provider ID */ + id: string; + /** Provider logo URI */ + logoURI: string; + /** Short description of the provider */ + description: string; + /** Provider website */ + website: string; + /** + * Total TVL across the entire provider in USD + * @nullable + */ + tvlUsd: ProviderDtoTvlUsd; + /** Type of provider (protocol or validator provider) */ + type: ProviderDtoType; + /** + * Optional social/media references or audit links + * @nullable + */ + references?: string[] | null; +}; + +/** + * The health status of the service + */ +export type HealthStatus = (typeof HealthStatus)[keyof typeof HealthStatus]; + +export const HealthStatus = { + OK: 'OK', + FAIL: 'FAIL', +} as const; + +export type HealthStatusDto = { + status: HealthStatus; + /** Timestamp when the health check was performed */ + timestamp: string; +}; + +export type YieldsControllerGetYieldsParams = { + /** + * Offset for pagination + * @minimum 0 + */ + offset?: number; + /** + * Number of items per page + * @minimum 1 + * @maximum 100 + */ + limit?: number; + /** + * Filter by network + */ + network?: YieldsControllerGetYieldsNetwork; + /** + * Filter by EVM chain ID (Ethereum: 1, Polygon: 137) + */ + chainId?: string; + /** + * Filter by multiple networks (comma separated) + */ + networks?: string; + /** + * @maxLength 200 + */ + yieldId?: string; + /** + * @maxLength 200 + * @maxItems 100 + */ + yieldIds?: string[]; + /** + * Filter by yield type + */ + type?: YieldsControllerGetYieldsType; + /** + * Filter by multiple yield types (comma separated) + */ + types?: YieldsControllerGetYieldsTypesItem[]; + /** + * Filter by cooldown period + */ + hasCooldownPeriod?: boolean; + /** + * Filter by warmup period + */ + hasWarmupPeriod?: boolean; + /** + * Filter by token symbol or address + */ + token?: string; + /** + * Filter by input token symbol or address + */ + inputToken?: string; + /** + * Filter by multiple input token symbol or address (comma separated) + */ + inputTokens?: string[]; + /** + * Filter by provider ID + */ + provider?: string; + /** + * Filter by multiple provider IDs (comma separated) + */ + providers?: string[]; + /** + * Search by yield name + */ + search?: string; + /** + * Sort by yield status + */ + sort?: YieldsControllerGetYieldsSort; +}; + +export type YieldsControllerGetYieldsNetwork = + (typeof YieldsControllerGetYieldsNetwork)[keyof typeof YieldsControllerGetYieldsNetwork]; + +export const YieldsControllerGetYieldsNetwork = { + ethereum: 'ethereum', + 'ethereum-goerli': 'ethereum-goerli', + 'ethereum-holesky': 'ethereum-holesky', + 'ethereum-sepolia': 'ethereum-sepolia', + 'ethereum-hoodi': 'ethereum-hoodi', + arbitrum: 'arbitrum', + base: 'base', + 'base-sepolia': 'base-sepolia', + gnosis: 'gnosis', + optimism: 'optimism', + polygon: 'polygon', + 'polygon-amoy': 'polygon-amoy', + starknet: 'starknet', + zksync: 'zksync', + linea: 'linea', + unichain: 'unichain', + 'monad-testnet': 'monad-testnet', + monad: 'monad', + 'avalanche-c': 'avalanche-c', + 'avalanche-c-atomic': 'avalanche-c-atomic', + 'avalanche-p': 'avalanche-p', + binance: 'binance', + celo: 'celo', + fantom: 'fantom', + harmony: 'harmony', + moonriver: 'moonriver', + okc: 'okc', + viction: 'viction', + core: 'core', + sonic: 'sonic', + plasma: 'plasma', + katana: 'katana', + hyperevm: 'hyperevm', + agoric: 'agoric', + akash: 'akash', + axelar: 'axelar', + 'band-protocol': 'band-protocol', + bitsong: 'bitsong', + canto: 'canto', + chihuahua: 'chihuahua', + comdex: 'comdex', + coreum: 'coreum', + cosmos: 'cosmos', + crescent: 'crescent', + cronos: 'cronos', + cudos: 'cudos', + desmos: 'desmos', + dydx: 'dydx', + evmos: 'evmos', + 'fetch-ai': 'fetch-ai', + 'gravity-bridge': 'gravity-bridge', + injective: 'injective', + irisnet: 'irisnet', + juno: 'juno', + kava: 'kava', + 'ki-network': 'ki-network', + 'mars-protocol': 'mars-protocol', + nym: 'nym', + 'okex-chain': 'okex-chain', + onomy: 'onomy', + osmosis: 'osmosis', + persistence: 'persistence', + quicksilver: 'quicksilver', + regen: 'regen', + secret: 'secret', + sentinel: 'sentinel', + sommelier: 'sommelier', + stafi: 'stafi', + stargaze: 'stargaze', + stride: 'stride', + teritori: 'teritori', + tgrade: 'tgrade', + umee: 'umee', + sei: 'sei', + mantra: 'mantra', + celestia: 'celestia', + saga: 'saga', + zetachain: 'zetachain', + dymension: 'dymension', + humansai: 'humansai', + neutron: 'neutron', + polkadot: 'polkadot', + kusama: 'kusama', + westend: 'westend', + bittensor: 'bittensor', + aptos: 'aptos', + binancebeacon: 'binancebeacon', + cardano: 'cardano', + near: 'near', + solana: 'solana', + 'solana-devnet': 'solana-devnet', + stellar: 'stellar', + 'stellar-testnet': 'stellar-testnet', + sui: 'sui', + tezos: 'tezos', + tron: 'tron', + ton: 'ton', + 'ton-testnet': 'ton-testnet', + hyperliquid: 'hyperliquid', +} as const; + +export type YieldsControllerGetYieldsType = + (typeof YieldsControllerGetYieldsType)[keyof typeof YieldsControllerGetYieldsType]; + +export const YieldsControllerGetYieldsType = { + 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', +} as const; + +export type YieldsControllerGetYieldsTypesItem = + (typeof YieldsControllerGetYieldsTypesItem)[keyof typeof YieldsControllerGetYieldsTypesItem]; + +export const YieldsControllerGetYieldsTypesItem = { + 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', +} as const; + +export type YieldsControllerGetYieldsSort = + (typeof YieldsControllerGetYieldsSort)[keyof typeof YieldsControllerGetYieldsSort]; + +export const YieldsControllerGetYieldsSort = { + statusEnterAsc: 'statusEnterAsc', + statusEnterDesc: 'statusEnterDesc', + statusExitAsc: 'statusExitAsc', + statusExitDesc: 'statusExitDesc', +} as const; + +export type YieldsControllerGetYields200AllOf = { + items?: YieldDto[]; +}; + +export type YieldsControllerGetYields200 = PaginatedResponseDto & YieldsControllerGetYields200AllOf; + +export type YieldsControllerGetYields400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetYields401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetYields429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type YieldsControllerGetYields500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetAggregateBalances400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetAggregateBalances401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetAggregateBalances429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type YieldsControllerGetAggregateBalances500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetYieldPathParameters = { + yieldId: string; +}; +export type YieldsControllerGetYield400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetYield401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetYield429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type YieldsControllerGetYield500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetYieldRiskPathParameters = { + yieldId: string; +}; +export type YieldsControllerGetYieldRisk400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetYieldRisk401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetYieldRisk429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type YieldsControllerGetYieldRisk500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetYieldBalancesPathParameters = { + yieldId: string; +}; +export type YieldsControllerGetYieldBalances400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetYieldBalances401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetYieldBalances429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type YieldsControllerGetYieldBalances500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetYieldValidatorsPathParameters = { + yieldId: string; +}; +export type YieldsControllerGetYieldValidatorsParams = { + /** + * Offset for pagination + * @minimum 0 + */ + offset?: number; + /** + * Number of items per page + * @minimum 1 + * @maximum 100 + */ + limit?: number; + /** + * Filter by validator name (case-insensitive, partial match) + */ + name?: string; + /** + * Filter by validator address + */ + address?: string; + /** + * Filter by provider ID + */ + provider?: string; + /** + * Filter by validator status + */ + status?: string; + /** + * Filter by preferred flag + */ + preferred?: boolean; +}; + +export type YieldsControllerGetYieldValidators200AllOf = { + items?: ValidatorDto[]; +}; + +export type YieldsControllerGetYieldValidators200 = PaginatedResponseDto & + YieldsControllerGetYieldValidators200AllOf; + +export type YieldsControllerGetYieldValidators400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetYieldValidators401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type YieldsControllerGetYieldValidators429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type YieldsControllerGetYieldValidators500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerGetActionsParams = { + /** + * Offset for pagination + * @minimum 0 + */ + offset?: number; + /** + * Maximum number of items to return + * @minimum 1 + * @maximum 100 + */ + limit?: number; + /** + * User wallet address to get actions for + */ + address: string; + /** + * Filter actions by status + */ + status?: ActionsControllerGetActionsStatus; + /** + * Filter actions by intent + */ + intent?: ActionsControllerGetActionsIntent; + /** + * Filter by action type + */ + type?: ActionsControllerGetActionsType; + /** + * Filter actions by specific yield + */ + yieldId?: string; +}; + +export type ActionsControllerGetActionsStatus = + (typeof ActionsControllerGetActionsStatus)[keyof typeof ActionsControllerGetActionsStatus]; + +export const ActionsControllerGetActionsStatus = { + pending: 'pending', + completed: 'completed', + failed: 'failed', +} as const; + +export type ActionsControllerGetActionsIntent = + (typeof ActionsControllerGetActionsIntent)[keyof typeof ActionsControllerGetActionsIntent]; + +export const ActionsControllerGetActionsIntent = { + enter: 'enter', + exit: 'exit', + manage: 'manage', +} as const; + +export type ActionsControllerGetActionsType = + (typeof ActionsControllerGetActionsType)[keyof typeof ActionsControllerGetActionsType]; + +export const ActionsControllerGetActionsType = { + STAKE: 'STAKE', + UNSTAKE: 'UNSTAKE', + CLAIM_REWARDS: 'CLAIM_REWARDS', + RESTAKE_REWARDS: 'RESTAKE_REWARDS', + WITHDRAW: 'WITHDRAW', + WITHDRAW_ALL: 'WITHDRAW_ALL', + RESTAKE: 'RESTAKE', + CLAIM_UNSTAKED: 'CLAIM_UNSTAKED', + UNLOCK_LOCKED: 'UNLOCK_LOCKED', + STAKE_LOCKED: 'STAKE_LOCKED', + VOTE: 'VOTE', + REVOKE: 'REVOKE', + VOTE_LOCKED: 'VOTE_LOCKED', + REVOTE: 'REVOTE', + REBOND: 'REBOND', + MIGRATE: 'MIGRATE', + VERIFY_WITHDRAW_CREDENTIALS: 'VERIFY_WITHDRAW_CREDENTIALS', + DELEGATE: 'DELEGATE', +} as const; + +export type ActionsControllerGetActions200AllOf = { + items?: ActionDto[]; +}; + +export type ActionsControllerGetActions200 = PaginatedResponseDto & + ActionsControllerGetActions200AllOf; + +export type ActionsControllerGetActions400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerGetActions401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerGetActions429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type ActionsControllerGetActions500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerGetActionPathParameters = { + actionId: string; +}; +export type ActionsControllerGetAction400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerGetAction401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerGetAction429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type ActionsControllerGetAction500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerEnterYield400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerEnterYield401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerEnterYield403 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerEnterYield429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type ActionsControllerEnterYield500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerExitYield400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerExitYield401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerExitYield403 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerExitYield429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type ActionsControllerExitYield500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerManageYield400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerManageYield401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerManageYield403 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ActionsControllerManageYield429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type ActionsControllerManageYield500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type TransactionsControllerSubmitTransactionHashPathParameters = { + transactionId: unknown; +}; +export type TransactionsControllerSubmitTransactionHash401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type TransactionsControllerSubmitTransactionHash429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type TransactionsControllerSubmitTransactionHash500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type TransactionsControllerSubmitTransactionPathParameters = { + transactionId: unknown; +}; +export type TransactionsControllerSubmitTransaction401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type TransactionsControllerSubmitTransaction429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type TransactionsControllerSubmitTransaction500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type TransactionsControllerGetTransactionPathParameters = { + transactionId: unknown; +}; +export type TransactionsControllerGetTransaction400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type TransactionsControllerGetTransaction401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type TransactionsControllerGetTransaction429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type TransactionsControllerGetTransaction500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type NetworksControllerGetNetworks400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type NetworksControllerGetNetworks401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type NetworksControllerGetNetworks429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type NetworksControllerGetNetworks500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ProvidersControllerGetProvidersParams = { + /** + * Offset for pagination + * @minimum 0 + */ + offset?: number; + /** + * Number of items per page + * @minimum 1 + * @maximum 100 + */ + limit?: number; +}; + +export type ProvidersControllerGetProviders200AllOf = { + items?: ProviderDto[]; +}; + +export type ProvidersControllerGetProviders200 = PaginatedResponseDto & + ProvidersControllerGetProviders200AllOf; + +export type ProvidersControllerGetProviders400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ProvidersControllerGetProviders401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ProvidersControllerGetProviders429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type ProvidersControllerGetProviders500 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ProvidersControllerGetProviderPathParameters = { + providerId: string; +}; +export type ProvidersControllerGetProvider400 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ProvidersControllerGetProvider401 = { + message?: string; + error?: string; + statusCode?: number; +}; + +export type ProvidersControllerGetProvider429 = { + message?: string; + error?: string; + statusCode?: number; + retryAfter?: number; +}; + +export type ProvidersControllerGetProvider500 = { + message?: string; + error?: string; + statusCode?: number; +}; diff --git a/suite-common/earn-api/src/api/index.ts b/suite-common/earn-api/src/api/index.ts new file mode 100644 index 0000000000..434e467776 --- /dev/null +++ b/suite-common/earn-api/src/api/index.ts @@ -0,0 +1,6 @@ +export * from './discovery'; +export * from './index.schemas'; +export * from './portfolio'; +export * from './risk'; +export * from './actions'; +export * from './health'; diff --git a/suite-common/earn-api/src/api/portfolio.ts b/suite-common/earn-api/src/api/portfolio.ts new file mode 100644 index 0000000000..b2ac43061a --- /dev/null +++ b/suite-common/earn-api/src/api/portfolio.ts @@ -0,0 +1,140 @@ +/** + * Generated by orval v7.17.2 🍺 + * Do not edit manually. + * Yield.xyz API + * API Documentation + * OpenAPI spec version: 1.0 + */ +import type { + BalancesRequestDto, + BalancesResponseDto, + YieldBalancesDto, + YieldBalancesRequestDto, + YieldsControllerGetAggregateBalances400, + YieldsControllerGetAggregateBalances401, + YieldsControllerGetAggregateBalances429, + YieldsControllerGetAggregateBalances500, + YieldsControllerGetYieldBalances400, + YieldsControllerGetYieldBalances401, + YieldsControllerGetYieldBalances429, + YieldsControllerGetYieldBalances500, + YieldsControllerGetYieldBalancesPathParameters, +} from './index.schemas'; +import { httpClient } from '../httpClient'; + +/** + * Retrieve balances for multiple wallet addresses across different networks and yield opportunities. Send an array of balance requests - each request can specify a yieldId (optional for chain scanning), address, network, and custom arguments. This is the same format as the single yield balance endpoint but in array form. Duplicate requests (same yieldId + address + network) are automatically deduplicated, with specific yield requests taking precedence over chain scans. + * @summary Get balances across multiple yields and networks + */ +export type GetAggregateBalancesResponse200 = { + data: BalancesResponseDto; + status: 200; +}; + +export type GetAggregateBalancesResponse400 = { + data: YieldsControllerGetAggregateBalances400; + status: 400; +}; + +export type GetAggregateBalancesResponse401 = { + data: YieldsControllerGetAggregateBalances401; + status: 401; +}; + +export type GetAggregateBalancesResponse429 = { + data: YieldsControllerGetAggregateBalances429; + status: 429; +}; + +export type GetAggregateBalancesResponse500 = { + data: YieldsControllerGetAggregateBalances500; + status: 500; +}; + +export type GetAggregateBalancesResponseSuccess = GetAggregateBalancesResponse200 & { + headers: Headers; +}; +export type GetAggregateBalancesResponseError = ( + | GetAggregateBalancesResponse400 + | GetAggregateBalancesResponse401 + | GetAggregateBalancesResponse429 + | GetAggregateBalancesResponse500 +) & { + headers: Headers; +}; + +export const getGetAggregateBalancesUrl = () => `/v1/yields/balances`; + +export const getAggregateBalances = ( + balancesRequestDto: BalancesRequestDto, + options?: RequestInit, +): Promise => + httpClient(getGetAggregateBalancesUrl(), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(balancesRequestDto), + }); + +/** + * Retrieve all balances associated with a yield opportunity for a specific wallet address, including active, pending, claimable, and withdrawable balances. The network is automatically determined from the yield configuration. + * @summary Get balances for a specific yield + */ +export type GetYieldBalancesResponse200 = { + data: YieldBalancesDto; + status: 200; +}; + +export type GetYieldBalancesResponse400 = { + data: YieldsControllerGetYieldBalances400; + status: 400; +}; + +export type GetYieldBalancesResponse401 = { + data: YieldsControllerGetYieldBalances401; + status: 401; +}; + +export type GetYieldBalancesResponse404 = { + data: void; + status: 404; +}; + +export type GetYieldBalancesResponse429 = { + data: YieldsControllerGetYieldBalances429; + status: 429; +}; + +export type GetYieldBalancesResponse500 = { + data: YieldsControllerGetYieldBalances500; + status: 500; +}; + +export type GetYieldBalancesResponseSuccess = GetYieldBalancesResponse200 & { + headers: Headers; +}; +export type GetYieldBalancesResponseError = ( + | GetYieldBalancesResponse400 + | GetYieldBalancesResponse401 + | GetYieldBalancesResponse404 + | GetYieldBalancesResponse429 + | GetYieldBalancesResponse500 +) & { + headers: Headers; +}; + +export const getGetYieldBalancesUrl = ({ + yieldId, +}: YieldsControllerGetYieldBalancesPathParameters) => `/v1/yields/${yieldId}/balances`; + +export const getYieldBalances = ( + { yieldId }: YieldsControllerGetYieldBalancesPathParameters, + yieldBalancesRequestDto: YieldBalancesRequestDto, + options?: RequestInit, +): Promise => + httpClient(getGetYieldBalancesUrl({ yieldId }), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(yieldBalancesRequestDto), + }); diff --git a/suite-common/earn-api/src/api/risk.ts b/suite-common/earn-api/src/api/risk.ts new file mode 100644 index 0000000000..fa64c31501 --- /dev/null +++ b/suite-common/earn-api/src/api/risk.ts @@ -0,0 +1,75 @@ +/** + * Generated by orval v7.17.2 🍺 + * Do not edit manually. + * Yield.xyz API + * API Documentation + * OpenAPI spec version: 1.0 + */ +import type { + RiskParameterDto, + YieldsControllerGetYieldRisk400, + YieldsControllerGetYieldRisk401, + YieldsControllerGetYieldRisk429, + YieldsControllerGetYieldRisk500, + YieldsControllerGetYieldRiskPathParameters, +} from './index.schemas'; +import { httpClient } from '../httpClient'; + +/** + * Retrieve risk metadata associated with a specific yield. + * @summary Get risk metadata for a yield + */ +export type GetYieldRiskResponse200 = { + data: RiskParameterDto[]; + status: 200; +}; + +export type GetYieldRiskResponse400 = { + data: YieldsControllerGetYieldRisk400; + status: 400; +}; + +export type GetYieldRiskResponse401 = { + data: YieldsControllerGetYieldRisk401; + status: 401; +}; + +export type GetYieldRiskResponse404 = { + data: void; + status: 404; +}; + +export type GetYieldRiskResponse429 = { + data: YieldsControllerGetYieldRisk429; + status: 429; +}; + +export type GetYieldRiskResponse500 = { + data: YieldsControllerGetYieldRisk500; + status: 500; +}; + +export type GetYieldRiskResponseSuccess = GetYieldRiskResponse200 & { + headers: Headers; +}; +export type GetYieldRiskResponseError = ( + | GetYieldRiskResponse400 + | GetYieldRiskResponse401 + | GetYieldRiskResponse404 + | GetYieldRiskResponse429 + | GetYieldRiskResponse500 +) & { + headers: Headers; +}; + +export const getGetYieldRiskUrl = ({ yieldId }: YieldsControllerGetYieldRiskPathParameters) => + `/v1/yields/${yieldId}/risk`; + +export const getYieldRisk = ( + { yieldId }: YieldsControllerGetYieldRiskPathParameters, + options?: RequestInit, +): Promise => + httpClient(getGetYieldRiskUrl({ yieldId }), { + ...options, + method: 'GET', + }); diff --git a/suite-common/earn-api/src/config/index.ts b/suite-common/earn-api/src/config/index.ts new file mode 100644 index 0000000000..1baa542b2a --- /dev/null +++ b/suite-common/earn-api/src/config/index.ts @@ -0,0 +1,4 @@ +/** + * A proxy service for yield.xyz API + */ +export const YIELD_XYZ_BASE_URL = 'https://services.trezor.io/earn/yieldxyz'; diff --git a/suite-common/earn-api/src/hooks/useEnterYieldOpportunity.ts b/suite-common/earn-api/src/hooks/useEnterYieldOpportunity.ts new file mode 100644 index 0000000000..8a94b5704c --- /dev/null +++ b/suite-common/earn-api/src/hooks/useEnterYieldOpportunity.ts @@ -0,0 +1,24 @@ +import { desktopMutationKeys, useMutation } from '@suite-common/react-query'; + +import { CreateActionDto, EnterYieldResponseSuccess, enterYield } from '../api'; + +type EnterYieldOpportunityVariables = Pick & { + amount: string; +}; + +/** + * Generate the transactions needed to enter a yield position + * @url https://docs.yield.xyz/reference/actionscontroller_enteryield + */ +export function useEnterYieldOpportunity() { + return useMutation({ + mutationKey: desktopMutationKeys.enterYieldOpportunity, + mutationFn({ yieldId, address, amount }) { + return enterYield({ + yieldId, + address, + arguments: { amount }, + }); + }, + }); +} diff --git a/suite-common/earn-api/src/hooks/useGetYieldOpportunities.ts b/suite-common/earn-api/src/hooks/useGetYieldOpportunities.ts new file mode 100644 index 0000000000..08bd52890a --- /dev/null +++ b/suite-common/earn-api/src/hooks/useGetYieldOpportunities.ts @@ -0,0 +1,62 @@ +import { type MutationOptions, desktopMutationKeys, useMutation } from '@suite-common/react-query'; + +import { + GetYieldResponseError, + GetYieldsResponseSuccess, + ProviderDto, + YieldsControllerGetYieldsSort, + YieldsControllerGetYieldsType, + getYields, +} from '../api'; + +interface GetYieldOpportunitiesVariables { + offset?: number; + limit?: number; + sort?: YieldsControllerGetYieldsSort; +} + +export interface UseGetYieldOpportunitiesProps { + /** + * @url https://docs.yield.xyz/reference/providerscontroller_getproviders + */ + providers?: ProviderDto['id'][]; + + types?: YieldsControllerGetYieldsType[]; + + onSuccess?: MutationOptions< + GetYieldsResponseSuccess, + Error, + GetYieldOpportunitiesVariables + >['onSuccess']; + onError?: MutationOptions< + GetYieldResponseError, + Error, + GetYieldOpportunitiesVariables + >['onError']; +} + +/** + * Paginated list of Yield opportunities + * @url https://docs.yield.xyz/reference/yieldscontroller_getyields + */ +export function useGetYieldOpportunities({ + providers = ['morpho'], + types = ['vault'], + onError, + onSuccess, +}: UseGetYieldOpportunitiesProps) { + return useMutation({ + mutationKey: desktopMutationKeys.getYieldOpportunities, + mutationFn: ({ offset = 0, limit = 20, sort = 'statusEnterDesc' }) => + getYields({ + offset, + limit, + providers, + types, + sort, + }), + onError, + onSuccess: (data, variables, onMutateResult, context) => + onSuccess?.(data, variables, onMutateResult, context), + }); +} diff --git a/suite-common/earn-api/src/hooks/useSubmitTxHash.ts b/suite-common/earn-api/src/hooks/useSubmitTxHash.ts new file mode 100644 index 0000000000..81d790445f --- /dev/null +++ b/suite-common/earn-api/src/hooks/useSubmitTxHash.ts @@ -0,0 +1,39 @@ +import { MutationOptions, desktopMutationKeys, useMutation } from '@suite-common/react-query'; + +import { + SubmitTransactionHashResponseError, + SubmitTransactionHashResponseSuccess, + submitTransactionHash, +} from '../api'; + +type SubmitTxHashVariables = { + txId: string; + txHash: string; +}; + +interface UseSubmitTxHashProps { + onSuccess?: MutationOptions< + SubmitTransactionHashResponseSuccess, + Error, + SubmitTxHashVariables + >['onSuccess']; + onError?: MutationOptions< + SubmitTransactionHashResponseError, + Error, + SubmitTxHashVariables + >['onError']; +} + +/** + * Submit the transaction hash after broadcasting a transaction to the blockchain. This updates the transaction status and enables tracking. + * @url https://docs.yield.xyz/reference/transactionscontroller_submittransactionhash + */ +export function useSubmitTxHash({ onSuccess, onError }: UseSubmitTxHashProps) { + return useMutation({ + mutationKey: desktopMutationKeys.submitTxHash, + mutationFn: ({ txId, txHash }) => + submitTransactionHash({ transactionId: txId }, { hash: txHash }), + onSuccess, + onError, + }); +} diff --git a/suite-common/earn-api/src/httpClient.ts b/suite-common/earn-api/src/httpClient.ts new file mode 100644 index 0000000000..893e0ffa57 --- /dev/null +++ b/suite-common/earn-api/src/httpClient.ts @@ -0,0 +1,69 @@ +import { YIELD_XYZ_BASE_URL } from './config'; + +type OrvalFetchOptions = RequestInit; + +export class OrvalHttpError extends Error { + info?: T; + status?: number; + response?: Response; + + constructor(message: string, data?: T, status?: number, response?: Response) { + super(message); + this.name = 'OrvalHttpError'; + this.info = data; + this.status = status; + this.response = response; + } +} + +export const isOrvalHttpError = (error: unknown): error is OrvalHttpError => + error instanceof OrvalHttpError; + +const isJsonContentType = (contentType: string) => + contentType.includes('application/json') || contentType.includes('+json'); + +const parseBody = async (res: Response): Promise => { + // These statuses must not include a response body per HTTP spec. + if ([204, 205, 304].includes(res.status)) return null; + + const contentType = (res.headers.get('content-type') ?? '').toLowerCase(); + + switch (true) { + case isJsonContentType(contentType): + return res.json(); + case contentType.includes('text/'): + return res.text(); + case contentType.includes('application/x-www-form-urlencoded'): { + const text = await res.text(); + + return new URLSearchParams(text); + } + case contentType.includes('multipart/form-data'): + return res.formData(); + case contentType.includes('application/octet-stream') || + contentType.startsWith('image/') || + contentType.startsWith('audio/') || + contentType.startsWith('video/'): + return res.blob(); + default: + return res.text(); + } +}; + +export const httpClient = async (endpoint: string, init?: OrvalFetchOptions) => { + const [pathname, search = ''] = endpoint.split('?'); + const url = new URL(YIELD_XYZ_BASE_URL); + + url.search = search; + url.pathname = `${url.pathname}${pathname}`; + + const req = new Request(url.toString(), init); + const res = await fetch(req); + const data = await parseBody(res); + + if (!res.ok) { + throw new OrvalHttpError('Request failed', data, res.status, res); + } + + return { data, status: res.status, headers: res.headers } as T; +}; diff --git a/suite-common/earn-api/src/index.ts b/suite-common/earn-api/src/index.ts new file mode 100644 index 0000000000..4e668e4eea --- /dev/null +++ b/suite-common/earn-api/src/index.ts @@ -0,0 +1,4 @@ +export * from './api'; +export * from './hooks/useGetYieldOpportunities'; +export * from './hooks/useEnterYieldOpportunity'; +export * from './hooks/useSubmitTxHash'; diff --git a/suite-common/earn-api/tsconfig.json b/suite-common/earn-api/tsconfig.json new file mode 100644 index 0000000000..26beaae619 --- /dev/null +++ b/suite-common/earn-api/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "outDir": "libDev" }, + "references": [{ "path": "../react-query" }] +} diff --git a/suite-common/react-query/package.json b/suite-common/react-query/package.json index ccf35b77a4..339eef040a 100644 --- a/suite-common/react-query/package.json +++ b/suite-common/react-query/package.json @@ -11,7 +11,6 @@ "type-check": "yarn g:tsc --build" }, "dependencies": { - "@suite-common/suite-utils": "workspace:^", "@tanstack/react-query": "5.90.16", "@tanstack/react-query-devtools": "5.91.2", "react": "19.1.0" diff --git a/suite-common/react-query/src/components/ReactNativeQueryProvider.tsx b/suite-common/react-query/src/components/ReactNativeQueryProvider.tsx index a8578bb6fa..238f13647d 100644 --- a/suite-common/react-query/src/components/ReactNativeQueryProvider.tsx +++ b/suite-common/react-query/src/components/ReactNativeQueryProvider.tsx @@ -2,7 +2,7 @@ import { type PropsWithChildren, useMemo } from 'react'; import { MutationCache, QueryCache, QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { isDevEnv } from '@suite-common/suite-utils'; +import { isDevEnv } from '../config'; /** * Fail fast during development, retry in production diff --git a/suite-common/react-query/src/components/ReactQueryProvider.tsx b/suite-common/react-query/src/components/ReactQueryProvider.tsx index 5fe48c4d77..08c8a9967b 100644 --- a/suite-common/react-query/src/components/ReactQueryProvider.tsx +++ b/suite-common/react-query/src/components/ReactQueryProvider.tsx @@ -2,7 +2,7 @@ import { PropsWithChildren, Suspense, lazy, useMemo } from 'react'; import { MutationCache, QueryCache, QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { isDevEnv } from '@suite-common/suite-utils'; +import { isDevEnv } from '../config'; const Devtools = lazy(async () => { const { ReactQueryDevtools } = await import('@tanstack/react-query-devtools'); diff --git a/suite-common/react-query/src/config/index.ts b/suite-common/react-query/src/config/index.ts new file mode 100644 index 0000000000..32ee82949b --- /dev/null +++ b/suite-common/react-query/src/config/index.ts @@ -0,0 +1 @@ +export const isDevEnv = process.env.NODE_ENV !== 'production'; diff --git a/suite-common/react-query/src/constants/mutationKeys.ts b/suite-common/react-query/src/constants/mutationKeys.ts index 293444fa6e..cf90f3352e 100644 --- a/suite-common/react-query/src/constants/mutationKeys.ts +++ b/suite-common/react-query/src/constants/mutationKeys.ts @@ -2,6 +2,11 @@ import { AllowedMutationKey } from '../types'; export const commonMutationKeys = {} as const satisfies Record; -export const desktopMutationKeys = {} as const satisfies Record; +export const desktopMutationKeys = { + getYieldOpportunities: ['get-yield-opportunities'], + enterYieldOpportunity: ['enter-yield-opportunity'], + submitTxHash: ['submit-tx-hash'], + exitYieldOpportunity: ['exit-yield-opportunity'], +} as const satisfies Record; export const mobileMutationKeys = {} as const satisfies Record; diff --git a/suite-common/react-query/src/constants/queryKeys.ts b/suite-common/react-query/src/constants/queryKeys.ts index c6496e8c2b..609f79cf5d 100644 --- a/suite-common/react-query/src/constants/queryKeys.ts +++ b/suite-common/react-query/src/constants/queryKeys.ts @@ -9,6 +9,7 @@ export const desktopQueryKeys = { defaultUrls: (symbol: string) => ['default-urls', symbol], proxyImage: (src?: string) => ['proxy-image', src], inactiveTokens: (symbol: string) => ['inactive-tokens', symbol], + yieldOpportunities: (pagination: any) => ['yield-opportunities', pagination], } as const satisfies Record; export const mobileQueryKeys = {} as const satisfies Record; diff --git a/suite-common/react-query/src/index.ts b/suite-common/react-query/src/index.ts index 1bdea78c81..79a9650ace 100644 --- a/suite-common/react-query/src/index.ts +++ b/suite-common/react-query/src/index.ts @@ -1,4 +1,10 @@ -export { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; +export { + useQuery, + useMutation, + useQueryClient, + type MutationOptions, + type QueryOptions, +} from '@tanstack/react-query'; export * from './components/ReactQueryProvider'; export * from './components/ReactNativeQueryProvider'; export * from './constants/queryKeys'; diff --git a/suite-common/react-query/tsconfig.json b/suite-common/react-query/tsconfig.json index 07dd949f7e..c7ebe855e2 100644 --- a/suite-common/react-query/tsconfig.json +++ b/suite-common/react-query/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, - "references": [{ "path": "../suite-utils" }] + "references": [] } diff --git a/suite-common/wallet-config/package.json b/suite-common/wallet-config/package.json index a9c6dc82d9..4eed07f3bb 100644 --- a/suite-common/wallet-config/package.json +++ b/suite-common/wallet-config/package.json @@ -11,6 +11,7 @@ "type-check": "yarn g:tsc --build" }, "dependencies": { + "@suite-common/earn-api": "workspace:*", "@trezor/device-utils": "workspace:*", "@trezor/type-utils": "workspace:*", "@trezor/utils": "workspace:*" diff --git a/suite-common/wallet-config/src/networksConfig.ts b/suite-common/wallet-config/src/networksConfig.ts index 84638233fd..291d1efb1b 100644 --- a/suite-common/wallet-config/src/networksConfig.ts +++ b/suite-common/wallet-config/src/networksConfig.ts @@ -40,6 +40,7 @@ export const networks = { coingeckoId: 'bitcoin', tradeCryptoId: 'bitcoin', caipId: 'bip122:000000000019d6689c085ae165831e93', + yieldXyzId: null, }, eth: { symbol: 'eth', @@ -81,6 +82,7 @@ export const networks = { coingeckoId: 'ethereum', tradeCryptoId: 'ethereum', caipId: 'eip155:1', + yieldXyzId: 'ethereum', }, pol: { symbol: 'pol', @@ -115,6 +117,7 @@ export const networks = { coingeckoId: 'polygon-pos', tradeCryptoId: 'polygon-ecosystem-token', caipId: 'eip155:137', + yieldXyzId: 'polygon', }, bsc: { symbol: 'bsc', @@ -149,6 +152,7 @@ export const networks = { coingeckoId: 'binance-smart-chain', tradeCryptoId: 'binancecoin', caipId: 'eip155:56', + yieldXyzId: 'binance', }, arb: { symbol: 'arb', @@ -185,6 +189,7 @@ export const networks = { coingeckoId: 'arbitrum-one', tradeCryptoId: 'arbitrum-one--0x0000000000000000000000000000000000000000', caipId: 'eip155:42161', + yieldXyzId: 'arbitrum', }, base: { symbol: 'base', @@ -222,6 +227,7 @@ export const networks = { tradeCryptoId: 'base--0x0000000000000000000000000000000000000000', caipId: 'eip155:8453', nativeTokenReserve: '0.0002', + yieldXyzId: 'base', }, op: { symbol: 'op', @@ -258,6 +264,7 @@ export const networks = { tradeCryptoId: 'optimistic-ethereum--0x0000000000000000000000000000000000000000', caipId: 'eip155:10', nativeTokenReserve: '0.0002', + yieldXyzId: 'optimism', }, avax: { symbol: 'avax', @@ -292,6 +299,7 @@ export const networks = { coingeckoId: 'avalanche', tradeCryptoId: 'avalanche-2', caipId: 'eip155:43114', + yieldXyzId: 'avalanche-c', }, sol: { symbol: 'sol', @@ -323,6 +331,7 @@ export const networks = { tradeCryptoId: 'solana', caipId: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', nativeTokenReserve: '0.003', + yieldXyzId: 'solana', }, trx: { symbol: 'trx', @@ -346,6 +355,7 @@ export const networks = { accountTypes: {}, coingeckoId: 'tron', tradeCryptoId: 'tron', + yieldXyzId: 'tron', }, ada: { // icarus derivation @@ -382,6 +392,7 @@ export const networks = { }, coingeckoId: 'cardano', tradeCryptoId: 'cardano', + yieldXyzId: 'cardano', }, etc: { symbol: 'etc', @@ -398,6 +409,7 @@ export const networks = { accountTypes: {}, coingeckoId: 'ethereum-classic', tradeCryptoId: 'ethereum-classic', + yieldXyzId: null, }, xrp: { symbol: 'xrp', @@ -413,6 +425,7 @@ export const networks = { accountTypes: {}, coingeckoId: 'ripple', tradeCryptoId: 'ripple', + yieldXyzId: null, }, xlm: { symbol: 'xlm', @@ -428,6 +441,7 @@ export const networks = { accountTypes: {}, coingeckoId: 'stellar', tradeCryptoId: 'stellar', + yieldXyzId: 'stellar', }, ltc: { symbol: 'ltc', @@ -453,6 +467,7 @@ export const networks = { coingeckoId: 'litecoin', tradeCryptoId: 'litecoin', caipId: 'bip122:12a765e31ffd4059bada1e25190f6e98', + yieldXyzId: null, }, bch: { symbol: 'bch', @@ -468,6 +483,7 @@ export const networks = { accountTypes: {}, coingeckoId: 'bitcoin-cash', tradeCryptoId: 'bitcoin-cash', + yieldXyzId: null, }, doge: { symbol: 'doge', @@ -484,6 +500,7 @@ export const networks = { coingeckoId: 'dogecoin', tradeCryptoId: 'dogecoin', caipId: 'bip122:1a91e3dace36e2be3bf030a65679fe82', + yieldXyzId: null, }, zec: { symbol: 'zec', @@ -499,6 +516,7 @@ export const networks = { accountTypes: {}, coingeckoId: 'zcash', tradeCryptoId: 'zcash', + yieldXyzId: null, }, // testnets test: { @@ -536,6 +554,7 @@ export const networks = { coingeckoId: undefined, tradeCryptoId: 'test-bitcoin', // fake, coingecko does not have testnets caipId: 'bip122:000000000933ea01ad0ee984209779ba', + yieldXyzId: null, }, regtest: { symbol: 'regtest', @@ -572,6 +591,7 @@ export const networks = { isDebugOnlyNetwork: true, coingeckoId: undefined, tradeCryptoId: undefined, + yieldXyzId: null, }, tsep: { symbol: 'tsep', @@ -588,6 +608,7 @@ export const networks = { accountTypes: {}, coingeckoId: 'sepolia-test-ethereum', // fake, coingecko does not have testnets tradeCryptoId: 'sepolia-test-ethereum', // fake, coingecko does not have testnets + yieldXyzId: 'ethereum-sepolia', }, thod: { symbol: 'thod', @@ -613,6 +634,7 @@ export const networks = { accountTypes: {}, coingeckoId: 'hoodi-test-ethereum', // fake, coingecko does not have testnets tradeCryptoId: 'hoodi-test-ethereum', // fake, coingecko does not have testnets + yieldXyzId: 'ethereum-hoodi', }, dsol: { symbol: 'dsol', @@ -636,6 +658,7 @@ export const networks = { coingeckoId: undefined, tradeCryptoId: undefined, caipId: 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1', + yieldXyzId: 'solana-devnet', }, txrp: { symbol: 'txrp', @@ -651,6 +674,7 @@ export const networks = { accountTypes: {}, coingeckoId: undefined, tradeCryptoId: 'test-ripple', // fake, coingecko does not have testnets + yieldXyzId: null, }, txlm: { symbol: 'txlm', @@ -666,6 +690,7 @@ export const networks = { accountTypes: {}, coingeckoId: undefined, tradeCryptoId: undefined, + yieldXyzId: 'stellar-testnet', }, } as const satisfies Networks; diff --git a/suite-common/wallet-config/src/types.ts b/suite-common/wallet-config/src/types.ts index fd7c3ec512..b42f0d99f2 100644 --- a/suite-common/wallet-config/src/types.ts +++ b/suite-common/wallet-config/src/types.ts @@ -1,3 +1,4 @@ +import { NetworkDtoId } from '@suite-common/earn-api'; import { type DeviceModelInternal } from '@trezor/device-utils'; import { RequiredKey } from '@trezor/type-utils'; @@ -139,6 +140,11 @@ type NetworkWithSpecificKey = { tradeCryptoId?: string; caipId?: string; // CAIP-2 chain id, used by WalletConnect nativeTokenReserve?: string; + /** + * Network ID used by Yield.xyz + * @url https://yield.xyz + */ + yieldXyzId: NetworkDtoId | null; }; export type Network = NetworkWithSpecificKey; diff --git a/suite-common/wallet-config/src/utils.ts b/suite-common/wallet-config/src/utils.ts index 3e145f80a2..a6985414b6 100644 --- a/suite-common/wallet-config/src/utils.ts +++ b/suite-common/wallet-config/src/utils.ts @@ -1,3 +1,5 @@ +import { NetworkDtoId } from '@suite-common/earn-api'; + import { networks } from './networksConfig'; import { type AccountType, @@ -160,3 +162,6 @@ export const getNetworkDecimals = (symbol: NetworkSymbolExtended) => { return undefined; }; + +export const getNetworkByYieldXyzId = (yieldXyzId: NetworkDtoId) => + networksCollection.find(n => n.yieldXyzId === yieldXyzId) ?? null; diff --git a/suite-common/wallet-config/tsconfig.json b/suite-common/wallet-config/tsconfig.json index 89785b75f5..ac83c54b8a 100644 --- a/suite-common/wallet-config/tsconfig.json +++ b/suite-common/wallet-config/tsconfig.json @@ -2,6 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ + { "path": "../earn-api" }, { "path": "../../packages/device-utils" }, { "path": "../../packages/type-utils" }, { "path": "../../packages/utils" } diff --git a/yarn.lock b/yarn.lock index 4304e99cec..9837430da1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2126,6 +2126,15 @@ __metadata: languageName: node linkType: hard +"@commander-js/extra-typings@npm:^14.0.0": + version: 14.0.0 + resolution: "@commander-js/extra-typings@npm:14.0.0" + peerDependencies: + commander: ~14.0.0 + checksum: 10/66754a659d049430f498fedf7184d22702ffe32cc61318783f58cb584d27e9f9e749920448cc5f66542064afa2de8c9246c39e31d9b0f6ae623358e421f36a87 + languageName: node + linkType: hard + "@config-plugins/detox@npm:^11.0.0": version: 11.0.0 resolution: "@config-plugins/detox@npm:11.0.0" @@ -2781,156 +2790,156 @@ __metadata: languageName: node linkType: hard -"@esbuild/aix-ppc64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/aix-ppc64@npm:0.25.2" +"@esbuild/aix-ppc64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/aix-ppc64@npm:0.25.12" conditions: os=aix & cpu=ppc64 languageName: node linkType: hard -"@esbuild/aix-ppc64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/aix-ppc64@npm:0.27.2" +"@esbuild/aix-ppc64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/aix-ppc64@npm:0.27.3" conditions: os=aix & cpu=ppc64 languageName: node linkType: hard -"@esbuild/android-arm64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/android-arm64@npm:0.25.2" +"@esbuild/android-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/android-arm64@npm:0.25.12" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@esbuild/android-arm64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/android-arm64@npm:0.27.2" +"@esbuild/android-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/android-arm64@npm:0.27.3" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@esbuild/android-arm@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/android-arm@npm:0.25.2" +"@esbuild/android-arm@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/android-arm@npm:0.25.12" conditions: os=android & cpu=arm languageName: node linkType: hard -"@esbuild/android-arm@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/android-arm@npm:0.27.2" +"@esbuild/android-arm@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/android-arm@npm:0.27.3" conditions: os=android & cpu=arm languageName: node linkType: hard -"@esbuild/android-x64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/android-x64@npm:0.25.2" +"@esbuild/android-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/android-x64@npm:0.25.12" conditions: os=android & cpu=x64 languageName: node linkType: hard -"@esbuild/android-x64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/android-x64@npm:0.27.2" +"@esbuild/android-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/android-x64@npm:0.27.3" conditions: os=android & cpu=x64 languageName: node linkType: hard -"@esbuild/darwin-arm64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/darwin-arm64@npm:0.25.2" +"@esbuild/darwin-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/darwin-arm64@npm:0.25.12" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@esbuild/darwin-arm64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/darwin-arm64@npm:0.27.2" +"@esbuild/darwin-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/darwin-arm64@npm:0.27.3" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@esbuild/darwin-x64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/darwin-x64@npm:0.25.2" +"@esbuild/darwin-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/darwin-x64@npm:0.25.12" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@esbuild/darwin-x64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/darwin-x64@npm:0.27.2" +"@esbuild/darwin-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/darwin-x64@npm:0.27.3" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@esbuild/freebsd-arm64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/freebsd-arm64@npm:0.25.2" +"@esbuild/freebsd-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/freebsd-arm64@npm:0.25.12" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@esbuild/freebsd-arm64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/freebsd-arm64@npm:0.27.2" +"@esbuild/freebsd-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/freebsd-arm64@npm:0.27.3" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@esbuild/freebsd-x64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/freebsd-x64@npm:0.25.2" +"@esbuild/freebsd-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/freebsd-x64@npm:0.25.12" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@esbuild/freebsd-x64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/freebsd-x64@npm:0.27.2" +"@esbuild/freebsd-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/freebsd-x64@npm:0.27.3" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@esbuild/linux-arm64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/linux-arm64@npm:0.25.2" +"@esbuild/linux-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-arm64@npm:0.25.12" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@esbuild/linux-arm64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/linux-arm64@npm:0.27.2" +"@esbuild/linux-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-arm64@npm:0.27.3" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@esbuild/linux-arm@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/linux-arm@npm:0.25.2" +"@esbuild/linux-arm@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-arm@npm:0.25.12" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@esbuild/linux-arm@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/linux-arm@npm:0.27.2" +"@esbuild/linux-arm@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-arm@npm:0.27.3" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@esbuild/linux-ia32@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/linux-ia32@npm:0.25.2" +"@esbuild/linux-ia32@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-ia32@npm:0.25.12" conditions: os=linux & cpu=ia32 languageName: node linkType: hard -"@esbuild/linux-ia32@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/linux-ia32@npm:0.27.2" +"@esbuild/linux-ia32@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-ia32@npm:0.27.3" conditions: os=linux & cpu=ia32 languageName: node linkType: hard @@ -2942,205 +2951,212 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/linux-loong64@npm:0.25.2" +"@esbuild/linux-loong64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-loong64@npm:0.25.12" conditions: os=linux & cpu=loong64 languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/linux-loong64@npm:0.27.2" +"@esbuild/linux-loong64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-loong64@npm:0.27.3" conditions: os=linux & cpu=loong64 languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/linux-mips64el@npm:0.25.2" +"@esbuild/linux-mips64el@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-mips64el@npm:0.25.12" conditions: os=linux & cpu=mips64el languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/linux-mips64el@npm:0.27.2" +"@esbuild/linux-mips64el@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-mips64el@npm:0.27.3" conditions: os=linux & cpu=mips64el languageName: node linkType: hard -"@esbuild/linux-ppc64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/linux-ppc64@npm:0.25.2" +"@esbuild/linux-ppc64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-ppc64@npm:0.25.12" conditions: os=linux & cpu=ppc64 languageName: node linkType: hard -"@esbuild/linux-ppc64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/linux-ppc64@npm:0.27.2" +"@esbuild/linux-ppc64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-ppc64@npm:0.27.3" conditions: os=linux & cpu=ppc64 languageName: node linkType: hard -"@esbuild/linux-riscv64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/linux-riscv64@npm:0.25.2" +"@esbuild/linux-riscv64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-riscv64@npm:0.25.12" conditions: os=linux & cpu=riscv64 languageName: node linkType: hard -"@esbuild/linux-riscv64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/linux-riscv64@npm:0.27.2" +"@esbuild/linux-riscv64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-riscv64@npm:0.27.3" conditions: os=linux & cpu=riscv64 languageName: node linkType: hard -"@esbuild/linux-s390x@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/linux-s390x@npm:0.25.2" +"@esbuild/linux-s390x@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-s390x@npm:0.25.12" conditions: os=linux & cpu=s390x languageName: node linkType: hard -"@esbuild/linux-s390x@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/linux-s390x@npm:0.27.2" +"@esbuild/linux-s390x@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-s390x@npm:0.27.3" conditions: os=linux & cpu=s390x languageName: node linkType: hard -"@esbuild/linux-x64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/linux-x64@npm:0.25.2" +"@esbuild/linux-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/linux-x64@npm:0.25.12" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@esbuild/linux-x64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/linux-x64@npm:0.27.2" +"@esbuild/linux-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-x64@npm:0.27.3" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@esbuild/netbsd-arm64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/netbsd-arm64@npm:0.25.2" +"@esbuild/netbsd-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/netbsd-arm64@npm:0.25.12" conditions: os=netbsd & cpu=arm64 languageName: node linkType: hard -"@esbuild/netbsd-arm64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/netbsd-arm64@npm:0.27.2" +"@esbuild/netbsd-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/netbsd-arm64@npm:0.27.3" conditions: os=netbsd & cpu=arm64 languageName: node linkType: hard -"@esbuild/netbsd-x64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/netbsd-x64@npm:0.25.2" +"@esbuild/netbsd-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/netbsd-x64@npm:0.25.12" conditions: os=netbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/netbsd-x64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/netbsd-x64@npm:0.27.2" +"@esbuild/netbsd-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/netbsd-x64@npm:0.27.3" conditions: os=netbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/openbsd-arm64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/openbsd-arm64@npm:0.25.2" +"@esbuild/openbsd-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/openbsd-arm64@npm:0.25.12" conditions: os=openbsd & cpu=arm64 languageName: node linkType: hard -"@esbuild/openbsd-arm64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/openbsd-arm64@npm:0.27.2" +"@esbuild/openbsd-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/openbsd-arm64@npm:0.27.3" conditions: os=openbsd & cpu=arm64 languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/openbsd-x64@npm:0.25.2" +"@esbuild/openbsd-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/openbsd-x64@npm:0.25.12" conditions: os=openbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/openbsd-x64@npm:0.27.2" +"@esbuild/openbsd-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/openbsd-x64@npm:0.27.3" conditions: os=openbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/openharmony-arm64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/openharmony-arm64@npm:0.27.2" +"@esbuild/openharmony-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/openharmony-arm64@npm:0.25.12" conditions: os=openharmony & cpu=arm64 languageName: node linkType: hard -"@esbuild/sunos-x64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/sunos-x64@npm:0.25.2" +"@esbuild/openharmony-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/openharmony-arm64@npm:0.27.3" + conditions: os=openharmony & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/sunos-x64@npm:0.25.12" conditions: os=sunos & cpu=x64 languageName: node linkType: hard -"@esbuild/sunos-x64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/sunos-x64@npm:0.27.2" +"@esbuild/sunos-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/sunos-x64@npm:0.27.3" conditions: os=sunos & cpu=x64 languageName: node linkType: hard -"@esbuild/win32-arm64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/win32-arm64@npm:0.25.2" +"@esbuild/win32-arm64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/win32-arm64@npm:0.25.12" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@esbuild/win32-arm64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/win32-arm64@npm:0.27.2" +"@esbuild/win32-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/win32-arm64@npm:0.27.3" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@esbuild/win32-ia32@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/win32-ia32@npm:0.25.2" +"@esbuild/win32-ia32@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/win32-ia32@npm:0.25.12" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@esbuild/win32-ia32@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/win32-ia32@npm:0.27.2" +"@esbuild/win32-ia32@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/win32-ia32@npm:0.27.3" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@esbuild/win32-x64@npm:0.25.2": - version: 0.25.2 - resolution: "@esbuild/win32-x64@npm:0.25.2" +"@esbuild/win32-x64@npm:0.25.12": + version: 0.25.12 + resolution: "@esbuild/win32-x64@npm:0.25.12" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@esbuild/win32-x64@npm:0.27.2": - version: 0.27.2 - resolution: "@esbuild/win32-x64@npm:0.27.2" +"@esbuild/win32-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/win32-x64@npm:0.27.3" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -4797,6 +4813,19 @@ __metadata: languageName: node linkType: hard +"@gerrit0/mini-shiki@npm:^3.17.0": + version: 3.21.0 + resolution: "@gerrit0/mini-shiki@npm:3.21.0" + dependencies: + "@shikijs/engine-oniguruma": "npm:^3.21.0" + "@shikijs/langs": "npm:^3.21.0" + "@shikijs/themes": "npm:^3.21.0" + "@shikijs/types": "npm:^3.21.0" + "@shikijs/vscode-textmate": "npm:^10.0.2" + checksum: 10/e3f997e18ff3e0654a951f3be2c8fa1deba02afa77865861fbedd62775ef06d38333c76b67ecab4cc38b07d4fe39720f8fe2170ac685323991b4ed7500079b11 + languageName: node + linkType: hard + "@gorhom/bottom-sheet@npm:5.2.6": version: 5.2.6 resolution: "@gorhom/bottom-sheet@npm:5.2.6" @@ -7009,6 +7038,126 @@ __metadata: languageName: node linkType: hard +"@orval/angular@npm:8.2.0": + version: 8.2.0 + resolution: "@orval/angular@npm:8.2.0" + dependencies: + "@orval/core": "npm:8.2.0" + checksum: 10/3c845ee1415e5eeb3fe3e47d34daa3ac72dcec6a31ac380fd4c397d8021b91aabd1a3c5c5c8ed5b0b55fa8c2c256a5cf19b7b14bd758151020b52ade0c204999 + languageName: node + linkType: hard + +"@orval/axios@npm:8.2.0": + version: 8.2.0 + resolution: "@orval/axios@npm:8.2.0" + dependencies: + "@orval/core": "npm:8.2.0" + checksum: 10/0f50fee0f8d745b103aa17226068ba6da5cd1fd63d852ca638ce7fb2d6ca6bf2a29fe17cd4557b741b0b1c15897bcfb7e26918e03e2afe65e9a6899d3ed95eff + languageName: node + linkType: hard + +"@orval/core@npm:8.2.0": + version: 8.2.0 + resolution: "@orval/core@npm:8.2.0" + dependencies: + "@scalar/openapi-types": "npm:0.5.3" + acorn: "npm:^8.15.0" + chalk: "npm:^5.6.2" + compare-versions: "npm:^6.1.1" + debug: "npm:^4.4.3" + esbuild: "npm:^0.27.2" + esutils: "npm:2.0.3" + fs-extra: "npm:^11.3.2" + globby: "npm:16.1.0" + remeda: "npm:^2.32.0" + typedoc: "npm:^0.28.15" + checksum: 10/e1b52ef6356c111ab8d7093a04131ab81897ea727512418b66bb24d20e3654f74927b77bdba6bb411922e0992e4a8a6c12f9009addbeeaf74b88add7d9a1f501 + languageName: node + linkType: hard + +"@orval/fetch@npm:8.2.0": + version: 8.2.0 + resolution: "@orval/fetch@npm:8.2.0" + dependencies: + "@orval/core": "npm:8.2.0" + "@scalar/openapi-types": "npm:0.5.3" + checksum: 10/deff587906f1df90f56c5056869fd78d22258007b129c6e0def5641fe2b93e13f51255c584317f8ad922975049da3073d82811404350817b71f6e7ddc4970543 + languageName: node + linkType: hard + +"@orval/hono@npm:8.2.0": + version: 8.2.0 + resolution: "@orval/hono@npm:8.2.0" + dependencies: + "@orval/core": "npm:8.2.0" + "@orval/zod": "npm:8.2.0" + fs-extra: "npm:^11.3.2" + remeda: "npm:^2.32.0" + checksum: 10/fa2ea22cce9855d5a0dd5269eba884281ecd2a5253e622b8d7de9b0ace36c3c24fd4650827c2b4e5437cad778803c99eeb9cca12aaadfef0b83b27a2701b796f + languageName: node + linkType: hard + +"@orval/mcp@npm:8.2.0": + version: 8.2.0 + resolution: "@orval/mcp@npm:8.2.0" + dependencies: + "@orval/core": "npm:8.2.0" + "@orval/fetch": "npm:8.2.0" + "@orval/zod": "npm:8.2.0" + checksum: 10/c08340051403e10f5864840b17b7355fd83391b9bb7551492a27c8c1383edf8cc0234ed74758a4141275e619a1e74290d35089277bca076f573d99209092ce33 + languageName: node + linkType: hard + +"@orval/mock@npm:8.2.0": + version: 8.2.0 + resolution: "@orval/mock@npm:8.2.0" + dependencies: + "@orval/core": "npm:8.2.0" + checksum: 10/6c4d2d94b203db33681047b8c4d823f419a0c3563244922f1d07b963dbb0ae82b03f507f18bac38e37a9f552d2db4c8ca0995a6698ec308061b077ee383b28dc + languageName: node + linkType: hard + +"@orval/query@npm:8.2.0": + version: 8.2.0 + resolution: "@orval/query@npm:8.2.0" + dependencies: + "@orval/core": "npm:8.2.0" + "@orval/fetch": "npm:8.2.0" + chalk: "npm:^5.6.2" + remeda: "npm:^2.32.0" + checksum: 10/b5206d1c8504a95c96683942c6bb222f922d3cfe212ace305b7094228142fc79132049151bc196776196fa95b7960c4612093d2060a41e0e4b30b30227865838 + languageName: node + linkType: hard + +"@orval/solid-start@npm:8.2.0": + version: 8.2.0 + resolution: "@orval/solid-start@npm:8.2.0" + dependencies: + "@orval/core": "npm:8.2.0" + checksum: 10/91df5164843b9d34d00420a42e50b88b2f938bd39ea313e984182a5f14b7c5075fd6bee40a962c5d49cd3af482be56d7fcb4e8dea45aaeb4b68a35cc7d1e66ea + languageName: node + linkType: hard + +"@orval/swr@npm:8.2.0": + version: 8.2.0 + resolution: "@orval/swr@npm:8.2.0" + dependencies: + "@orval/core": "npm:8.2.0" + "@orval/fetch": "npm:8.2.0" + checksum: 10/f6a78e05e0bcdb93e6ce6cd7c51ab05ef77c743346490478f5b44fd15f9b8d1e9d6762a7947ab033a0ad4b6706a2a6f0ce65633fb4aa768c1d4395dc59f63e3e + languageName: node + linkType: hard + +"@orval/zod@npm:8.2.0": + version: 8.2.0 + resolution: "@orval/zod@npm:8.2.0" + dependencies: + "@orval/core": "npm:8.2.0" + remeda: "npm:^2.32.0" + checksum: 10/e0d63a8c4e5d47b90ad60efaf182f7e8a28b5d8b72bd4cd93e5f849276388d3f80c82e8ddcac2c5c1ffcab69ab97a6dc3f59e7b1b0b7e655640e7dacae00af38 + languageName: node + linkType: hard + "@parcel/watcher-android-arm64@npm:2.5.0": version: 2.5.0 resolution: "@parcel/watcher-android-arm64@npm:2.5.0" @@ -8956,6 +9105,75 @@ __metadata: languageName: node linkType: hard +"@scalar/helpers@npm:0.2.6": + version: 0.2.6 + resolution: "@scalar/helpers@npm:0.2.6" + checksum: 10/1fde934206b5e2c15134e27d789939dcec77c59e7e14d17aeb075fc0ebfd2cb8ac2726237a42c77ef91e8d448ef1d4964d30731a2ecbfeaa21226d87bab8a310 + languageName: node + linkType: hard + +"@scalar/helpers@npm:0.2.7": + version: 0.2.7 + resolution: "@scalar/helpers@npm:0.2.7" + checksum: 10/80f8017e175e8fb16bead75c020a32219dceb4b3b31a4d72ab66d2cf40fc3b6b35473cd1dd2ee862e5006916ad95335d8abfd8a4a2383b96a1d4b96255a623fe + languageName: node + linkType: hard + +"@scalar/json-magic@npm:0.9.0": + version: 0.9.0 + resolution: "@scalar/json-magic@npm:0.9.0" + dependencies: + "@scalar/helpers": "npm:0.2.7" + yaml: "npm:^2.8.0" + checksum: 10/f7d3653e485331f8a5891a281037fd2a0c870260f497d2f057a7d1533d615ee6fda0fb935171f82a753f9b67fe9ca6fe40cc46140a6ef567f5c46c64c452fc62 + languageName: node + linkType: hard + +"@scalar/json-magic@npm:^0.8.8": + version: 0.8.10 + resolution: "@scalar/json-magic@npm:0.8.10" + dependencies: + "@scalar/helpers": "npm:0.2.6" + yaml: "npm:^2.8.0" + checksum: 10/6ff3c90d41a780804ea33f07222675c44760441315189f99477092bb2617522f7e69b2dd462619da80ca74a3d6543ce2e8763dd9a362c68ce6460e8594cfeb29 + languageName: node + linkType: hard + +"@scalar/openapi-parser@npm:^0.23.9": + version: 0.23.13 + resolution: "@scalar/openapi-parser@npm:0.23.13" + dependencies: + "@scalar/json-magic": "npm:0.9.0" + "@scalar/openapi-types": "npm:0.5.3" + "@scalar/openapi-upgrader": "npm:0.1.7" + ajv: "npm:^8.17.1" + ajv-draft-04: "npm:^1.0.0" + ajv-formats: "npm:^3.0.1" + jsonpointer: "npm:^5.0.1" + leven: "npm:^4.0.0" + yaml: "npm:^2.8.0" + checksum: 10/67e413a0109d14fc0ee3d126b1fb25ec71dec7390bbe726fe7a0bf314bc145a4478566339043267fc81facf7e952d4f48dd823f6464cdffc7a43d9b7fb6d440a + languageName: node + linkType: hard + +"@scalar/openapi-types@npm:0.5.3": + version: 0.5.3 + resolution: "@scalar/openapi-types@npm:0.5.3" + dependencies: + zod: "npm:^4.1.11" + checksum: 10/b2606b4bb5ddde66a50f65a417f28787f3ed81c00fe84485c4fa620203eaaf1f05d115f63874067a9218582c04cbde58e26c72db135bb01ddcbaddba1557b1c9 + languageName: node + linkType: hard + +"@scalar/openapi-upgrader@npm:0.1.7": + version: 0.1.7 + resolution: "@scalar/openapi-upgrader@npm:0.1.7" + dependencies: + "@scalar/openapi-types": "npm:0.5.3" + checksum: 10/4fcb9ec2ce9f5ef0da5e04500b8eb0ef50441df127b7ee7f3a34c7d162a7f12ea849a87ae98ef646e41bc1a6bbddb4d46fa6345b03ddeb60e03e52347e9ec50c + languageName: node + linkType: hard + "@scure/base@npm:1.2.6, @scure/base@npm:^1.1.3, @scure/base@npm:~1.2.5": version: 1.2.6 resolution: "@scure/base@npm:1.2.6" @@ -9375,6 +9593,25 @@ __metadata: languageName: node linkType: hard +"@shikijs/engine-oniguruma@npm:^3.21.0": + version: 3.21.0 + resolution: "@shikijs/engine-oniguruma@npm:3.21.0" + dependencies: + "@shikijs/types": "npm:3.21.0" + "@shikijs/vscode-textmate": "npm:^10.0.2" + checksum: 10/670dcb10195b7aabe7965921e7ff5e315182ca15287a61867f16df3046d8bb81b53416803f2fe6b12b5656be61e7a9990da3a5caf4d7d75b1386884b0e9568d1 + languageName: node + linkType: hard + +"@shikijs/langs@npm:^3.21.0": + version: 3.21.0 + resolution: "@shikijs/langs@npm:3.21.0" + dependencies: + "@shikijs/types": "npm:3.21.0" + checksum: 10/37c56fbfdacd3b74a4943cb8d481e3c3288eba72e55c76e34b1a56dd528f728d636c1691433d8bdc96cc5c0b63789754b9515995f28943580b6ef72abc5fd8d9 + languageName: node + linkType: hard + "@shikijs/markdown-it@npm:^1.1.7": version: 1.16.2 resolution: "@shikijs/markdown-it@npm:1.16.2" @@ -9386,6 +9623,15 @@ __metadata: languageName: node linkType: hard +"@shikijs/themes@npm:^3.21.0": + version: 3.21.0 + resolution: "@shikijs/themes@npm:3.21.0" + dependencies: + "@shikijs/types": "npm:3.21.0" + checksum: 10/dd3d333f85da79b0904f0ca33e66fc6b01984d161c3ac0e8373df865dabb73f4a7fe5bb7425475aa041082d364c657a756b246d85de4735557902be408e079d4 + languageName: node + linkType: hard + "@shikijs/transformers@npm:1.16.2": version: 1.16.2 resolution: "@shikijs/transformers@npm:1.16.2" @@ -9395,6 +9641,23 @@ __metadata: languageName: node linkType: hard +"@shikijs/types@npm:3.21.0, @shikijs/types@npm:^3.21.0": + version: 3.21.0 + resolution: "@shikijs/types@npm:3.21.0" + dependencies: + "@shikijs/vscode-textmate": "npm:^10.0.2" + "@types/hast": "npm:^3.0.4" + checksum: 10/814dfbbaae55b9d1d86874ed870e80da0cba521a96fb799c73c8439f88b2218fb9e84f64485a50258508d0f912bdd19d0fb8494c2717a9eed2a809e243a81a49 + languageName: node + linkType: hard + +"@shikijs/vscode-textmate@npm:^10.0.2": + version: 10.0.2 + resolution: "@shikijs/vscode-textmate@npm:10.0.2" + checksum: 10/d924cba8a01cd9ca12f56ba097d628fdb81455abb85884c8d8a5ae85b628a37dd5907e7691019b97107bd6608c866adf91ba04a1c3bba391281c88e386c044ea + languageName: node + linkType: hard + "@shikijs/vscode-textmate@npm:^9.2.0": version: 9.2.0 resolution: "@shikijs/vscode-textmate@npm:9.2.0" @@ -10717,6 +10980,16 @@ __metadata: languageName: unknown linkType: soft +"@suite-common/earn-api@workspace:*, @suite-common/earn-api@workspace:suite-common/earn-api": + version: 0.0.0-use.local + resolution: "@suite-common/earn-api@workspace:suite-common/earn-api" + dependencies: + "@suite-common/react-query": "workspace:^" + orval: "npm:8.2.0" + prettier: "npm:3.7.4" + languageName: unknown + linkType: soft + "@suite-common/feedback@workspace:*, @suite-common/feedback@workspace:suite-common/feedback": version: 0.0.0-use.local resolution: "@suite-common/feedback@workspace:suite-common/feedback" @@ -10934,7 +11207,6 @@ __metadata: version: 0.0.0-use.local resolution: "@suite-common/react-query@workspace:suite-common/react-query" dependencies: - "@suite-common/suite-utils": "workspace:^" "@tanstack/react-query": "npm:5.90.16" "@tanstack/react-query-devtools": "npm:5.91.2" react: "npm:19.1.0" @@ -11166,7 +11438,7 @@ __metadata: languageName: unknown linkType: soft -"@suite-common/suite-utils@workspace:*, @suite-common/suite-utils@workspace:^, @suite-common/suite-utils@workspace:suite-common/suite-utils": +"@suite-common/suite-utils@workspace:*, @suite-common/suite-utils@workspace:suite-common/suite-utils": version: 0.0.0-use.local resolution: "@suite-common/suite-utils@workspace:suite-common/suite-utils" dependencies: @@ -11327,6 +11599,7 @@ __metadata: version: 0.0.0-use.local resolution: "@suite-common/wallet-config@workspace:suite-common/wallet-config" dependencies: + "@suite-common/earn-api": "workspace:*" "@trezor/device-utils": "workspace:*" "@trezor/type-utils": "workspace:*" "@trezor/utils": "workspace:*" @@ -18532,6 +18805,18 @@ __metadata: languageName: node linkType: hard +"ajv-draft-04@npm:^1.0.0": + version: 1.0.0 + resolution: "ajv-draft-04@npm:1.0.0" + peerDependencies: + ajv: ^8.5.0 + peerDependenciesMeta: + ajv: + optional: true + checksum: 10/3f11fa0e7f7359bef6608657f02ab78e9cc62b1fb7bdd860db0d00351b3863a1189c1a23b72466d2d82726cab4eb20725c76f5e7c134a89865e2bfd0e6828137 + languageName: node + linkType: hard + "ajv-formats@npm:^2.1.1": version: 2.1.1 resolution: "ajv-formats@npm:2.1.1" @@ -19136,11 +19421,11 @@ __metadata: linkType: hard "astring@npm:^1.8.0": - version: 1.8.6 - resolution: "astring@npm:1.8.6" + version: 1.9.0 + resolution: "astring@npm:1.9.0" bin: astring: bin/astring - checksum: 10/5c1eb7cf3e8ff7da2021c887dddd887c6ae307767e76ee4418eb02dfee69794c397ea4dccaf3f28975ecd8eb32a5fe4dce108d35b2e4c6429c2a7ec9b7b7de57 + checksum: 10/ee88f71d8534557b27993d6d035ae85d78488d8dbc6429cd8e8fdfcafec3c65928a3bdc518cf69767a1298d3361490559a4819cd4b314007edae1e94cf1f9e4c languageName: node linkType: hard @@ -20792,6 +21077,15 @@ __metadata: languageName: node linkType: hard +"chokidar@npm:^5.0.0": + version: 5.0.0 + resolution: "chokidar@npm:5.0.0" + dependencies: + readdirp: "npm:^5.0.0" + checksum: 10/a1c2a4ee6ee81ba6409712c295a47be055fb9de1186dfbab33c1e82f28619de962ba02fc5f9d433daaedc96c35747460d8b2079ac2907de2c95e3f7cce913113 + languageName: node + linkType: hard + "chownr@npm:^1.1.1": version: 1.1.4 resolution: "chownr@npm:1.1.4" @@ -21425,6 +21719,13 @@ __metadata: languageName: node linkType: hard +"compare-versions@npm:^6.1.1": + version: 6.1.1 + resolution: "compare-versions@npm:6.1.1" + checksum: 10/9325c0fadfba81afa0ec17e6fc2ef823ba785c693089698b8d9374e5460509f1916a88591644d4cb4045c9a58e47fafbcc0724fe8bf446d2a875a3d6eeddf165 + languageName: node + linkType: hard + "compress-commons@npm:^6.0.2": version: 6.0.2 resolution: "compress-commons@npm:6.0.2" @@ -24145,6 +24446,16 @@ __metadata: languageName: node linkType: hard +"enquirer@npm:^2.4.1": + version: 2.4.1 + resolution: "enquirer@npm:2.4.1" + dependencies: + ansi-colors: "npm:^4.1.1" + strip-ansi: "npm:^6.0.1" + checksum: 10/b3726486cd98f0d458a851a03326a2a5dd4d84f37ff94ff2a2960c915e0fc865865da3b78f0877dc36ac5c1189069eca603e82ec63d5bc6b0dd9985bf6426d7a + languageName: node + linkType: hard + "enquirer@npm:~2.3.6": version: 2.3.6 resolution: "enquirer@npm:2.3.6" @@ -24789,36 +25100,36 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0, esbuild@npm:~0.27.0": - version: 0.27.2 - resolution: "esbuild@npm:0.27.2" +"esbuild@npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0, esbuild@npm:^0.27.2, esbuild@npm:~0.27.0": + version: 0.27.3 + resolution: "esbuild@npm:0.27.3" dependencies: - "@esbuild/aix-ppc64": "npm:0.27.2" - "@esbuild/android-arm": "npm:0.27.2" - "@esbuild/android-arm64": "npm:0.27.2" - "@esbuild/android-x64": "npm:0.27.2" - "@esbuild/darwin-arm64": "npm:0.27.2" - "@esbuild/darwin-x64": "npm:0.27.2" - "@esbuild/freebsd-arm64": "npm:0.27.2" - "@esbuild/freebsd-x64": "npm:0.27.2" - "@esbuild/linux-arm": "npm:0.27.2" - "@esbuild/linux-arm64": "npm:0.27.2" - "@esbuild/linux-ia32": "npm:0.27.2" - "@esbuild/linux-loong64": "npm:0.27.2" - "@esbuild/linux-mips64el": "npm:0.27.2" - "@esbuild/linux-ppc64": "npm:0.27.2" - "@esbuild/linux-riscv64": "npm:0.27.2" - "@esbuild/linux-s390x": "npm:0.27.2" - "@esbuild/linux-x64": "npm:0.27.2" - "@esbuild/netbsd-arm64": "npm:0.27.2" - "@esbuild/netbsd-x64": "npm:0.27.2" - "@esbuild/openbsd-arm64": "npm:0.27.2" - "@esbuild/openbsd-x64": "npm:0.27.2" - "@esbuild/openharmony-arm64": "npm:0.27.2" - "@esbuild/sunos-x64": "npm:0.27.2" - "@esbuild/win32-arm64": "npm:0.27.2" - "@esbuild/win32-ia32": "npm:0.27.2" - "@esbuild/win32-x64": "npm:0.27.2" + "@esbuild/aix-ppc64": "npm:0.27.3" + "@esbuild/android-arm": "npm:0.27.3" + "@esbuild/android-arm64": "npm:0.27.3" + "@esbuild/android-x64": "npm:0.27.3" + "@esbuild/darwin-arm64": "npm:0.27.3" + "@esbuild/darwin-x64": "npm:0.27.3" + "@esbuild/freebsd-arm64": "npm:0.27.3" + "@esbuild/freebsd-x64": "npm:0.27.3" + "@esbuild/linux-arm": "npm:0.27.3" + "@esbuild/linux-arm64": "npm:0.27.3" + "@esbuild/linux-ia32": "npm:0.27.3" + "@esbuild/linux-loong64": "npm:0.27.3" + "@esbuild/linux-mips64el": "npm:0.27.3" + "@esbuild/linux-ppc64": "npm:0.27.3" + "@esbuild/linux-riscv64": "npm:0.27.3" + "@esbuild/linux-s390x": "npm:0.27.3" + "@esbuild/linux-x64": "npm:0.27.3" + "@esbuild/netbsd-arm64": "npm:0.27.3" + "@esbuild/netbsd-x64": "npm:0.27.3" + "@esbuild/openbsd-arm64": "npm:0.27.3" + "@esbuild/openbsd-x64": "npm:0.27.3" + "@esbuild/openharmony-arm64": "npm:0.27.3" + "@esbuild/sunos-x64": "npm:0.27.3" + "@esbuild/win32-arm64": "npm:0.27.3" + "@esbuild/win32-ia32": "npm:0.27.3" + "@esbuild/win32-x64": "npm:0.27.3" dependenciesMeta: "@esbuild/aix-ppc64": optional: true @@ -24874,39 +25185,40 @@ __metadata: optional: true bin: esbuild: bin/esbuild - checksum: 10/7f1229328b0efc63c4184a61a7eb303df1e99818cc1d9e309fb92600703008e69821e8e984e9e9f54a627da14e0960d561db3a93029482ef96dc82dd267a60c2 + checksum: 10/aa74b8d8a3ed8e2eea4d8421737b322f4d21215244e8fa2156c6402d49b5bda01343c220196f1e3f830a7ce92b54ef653c6c723a8cc2e912bb4d17b7398b51ae languageName: node linkType: hard "esbuild@npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0, esbuild@npm:^0.25.0, esbuild@npm:^0.25.2": - version: 0.25.2 - resolution: "esbuild@npm:0.25.2" + version: 0.25.12 + resolution: "esbuild@npm:0.25.12" dependencies: - "@esbuild/aix-ppc64": "npm:0.25.2" - "@esbuild/android-arm": "npm:0.25.2" - "@esbuild/android-arm64": "npm:0.25.2" - "@esbuild/android-x64": "npm:0.25.2" - "@esbuild/darwin-arm64": "npm:0.25.2" - "@esbuild/darwin-x64": "npm:0.25.2" - "@esbuild/freebsd-arm64": "npm:0.25.2" - "@esbuild/freebsd-x64": "npm:0.25.2" - "@esbuild/linux-arm": "npm:0.25.2" - "@esbuild/linux-arm64": "npm:0.25.2" - "@esbuild/linux-ia32": "npm:0.25.2" - "@esbuild/linux-loong64": "npm:0.25.2" - "@esbuild/linux-mips64el": "npm:0.25.2" - "@esbuild/linux-ppc64": "npm:0.25.2" - "@esbuild/linux-riscv64": "npm:0.25.2" - "@esbuild/linux-s390x": "npm:0.25.2" - "@esbuild/linux-x64": "npm:0.25.2" - "@esbuild/netbsd-arm64": "npm:0.25.2" - "@esbuild/netbsd-x64": "npm:0.25.2" - "@esbuild/openbsd-arm64": "npm:0.25.2" - "@esbuild/openbsd-x64": "npm:0.25.2" - "@esbuild/sunos-x64": "npm:0.25.2" - "@esbuild/win32-arm64": "npm:0.25.2" - "@esbuild/win32-ia32": "npm:0.25.2" - "@esbuild/win32-x64": "npm:0.25.2" + "@esbuild/aix-ppc64": "npm:0.25.12" + "@esbuild/android-arm": "npm:0.25.12" + "@esbuild/android-arm64": "npm:0.25.12" + "@esbuild/android-x64": "npm:0.25.12" + "@esbuild/darwin-arm64": "npm:0.25.12" + "@esbuild/darwin-x64": "npm:0.25.12" + "@esbuild/freebsd-arm64": "npm:0.25.12" + "@esbuild/freebsd-x64": "npm:0.25.12" + "@esbuild/linux-arm": "npm:0.25.12" + "@esbuild/linux-arm64": "npm:0.25.12" + "@esbuild/linux-ia32": "npm:0.25.12" + "@esbuild/linux-loong64": "npm:0.25.12" + "@esbuild/linux-mips64el": "npm:0.25.12" + "@esbuild/linux-ppc64": "npm:0.25.12" + "@esbuild/linux-riscv64": "npm:0.25.12" + "@esbuild/linux-s390x": "npm:0.25.12" + "@esbuild/linux-x64": "npm:0.25.12" + "@esbuild/netbsd-arm64": "npm:0.25.12" + "@esbuild/netbsd-x64": "npm:0.25.12" + "@esbuild/openbsd-arm64": "npm:0.25.12" + "@esbuild/openbsd-x64": "npm:0.25.12" + "@esbuild/openharmony-arm64": "npm:0.25.12" + "@esbuild/sunos-x64": "npm:0.25.12" + "@esbuild/win32-arm64": "npm:0.25.12" + "@esbuild/win32-ia32": "npm:0.25.12" + "@esbuild/win32-x64": "npm:0.25.12" dependenciesMeta: "@esbuild/aix-ppc64": optional: true @@ -24950,6 +25262,8 @@ __metadata: optional: true "@esbuild/openbsd-x64": optional: true + "@esbuild/openharmony-arm64": + optional: true "@esbuild/sunos-x64": optional: true "@esbuild/win32-arm64": @@ -24960,7 +25274,7 @@ __metadata: optional: true bin: esbuild: bin/esbuild - checksum: 10/3b16423d33e0c05078b38bfe88e1b2125164a6b8dccfd06db8698766e54406f3299de8a74e3ce818f1d5a9c8bf993aa4d27a5716c39580eb80bd92d52ccf34d3 + checksum: 10/bc9c03d64e96a0632a926662c9d29decafb13a40e5c91790f632f02939bc568edc9abe0ee5d8055085a2819a00139eb12e223cfb8126dbf89bbc569f125d91fd languageName: node linkType: hard @@ -25518,7 +25832,7 @@ __metadata: languageName: node linkType: hard -"esutils@npm:^2.0.2": +"esutils@npm:2.0.3, esutils@npm:^2.0.2": version: 2.0.3 resolution: "esutils@npm:2.0.3" checksum: 10/b23acd24791db11d8f65be5ea58fd9a6ce2df5120ae2da65c16cfc5331ff59d5ac4ef50af66cd4bde238881503ec839928a0135b99a036a9cdfa22d17fd56cdb @@ -25763,9 +26077,9 @@ __metadata: languageName: node linkType: hard -"execa@npm:^9.5.1, execa@npm:^9.6.0": - version: 9.6.0 - resolution: "execa@npm:9.6.0" +"execa@npm:^9.5.1, execa@npm:^9.6.0, execa@npm:^9.6.1": + version: 9.6.1 + resolution: "execa@npm:9.6.1" dependencies: "@sindresorhus/merge-streams": "npm:^4.0.0" cross-spawn: "npm:^7.0.6" @@ -25779,7 +26093,7 @@ __metadata: signal-exit: "npm:^4.1.0" strip-final-newline: "npm:^4.0.0" yoctocolors: "npm:^2.1.1" - checksum: 10/53443be93d847ff5b52d31ed3714f77aab764fb6c1d72dc7019214ab1cb1a69888e2158ba846426a8ea51443c110fe7a86de61ffb9ee5687b00120fbd739b8a4 + checksum: 10/d0f7a2185152379f8772f6d780b188f2728a95b9a68d1a897f58805d7ba6bd55eaa5e128cb66a274251a6b5e4d9388332b1417bd7d46c25e020e4e55725cf79e languageName: node linkType: hard @@ -27081,6 +27395,16 @@ __metadata: languageName: node linkType: hard +"find-up@npm:8.0.0": + version: 8.0.0 + resolution: "find-up@npm:8.0.0" + dependencies: + locate-path: "npm:^8.0.0" + unicorn-magic: "npm:^0.3.0" + checksum: 10/0db90efb0543250e4239a299205389d490afffe178e8ed916d53100611faa69f9f3039b2dc951eb254f02ff4ac4c25bf6511c93c4c08f582b314b1aa776e4584 + languageName: node + linkType: hard + "find-up@npm:^3.0.0": version: 3.0.0 resolution: "find-up@npm:3.0.0" @@ -27422,14 +27746,14 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^11.0.0, fs-extra@npm:^11.1.1, fs-extra@npm:^11.2.0, fs-extra@npm:^11.3.0, fs-extra@npm:^11.3.1": - version: 11.3.2 - resolution: "fs-extra@npm:11.3.2" +"fs-extra@npm:^11.0.0, fs-extra@npm:^11.1.1, fs-extra@npm:^11.2.0, fs-extra@npm:^11.3.0, fs-extra@npm:^11.3.1, fs-extra@npm:^11.3.2": + version: 11.3.3 + resolution: "fs-extra@npm:11.3.3" dependencies: graceful-fs: "npm:^4.2.0" jsonfile: "npm:^6.0.1" universalify: "npm:^2.0.0" - checksum: 10/d559545c73fda69c75aa786f345c2f738b623b42aea850200b1582e006a35278f63787179e3194ba19413c26a280441758952b0c7e88dd96762d497e365a6c3e + checksum: 10/daeaefafbebe8fa6efd2fb96fc926f2c952be5877811f00a6794f0d64e0128e3d0d93368cd328f8f063b45deacf385c40e3d931aa46014245431cd2f4f89c67a languageName: node linkType: hard @@ -28047,6 +28371,20 @@ __metadata: languageName: node linkType: hard +"globby@npm:16.1.0": + version: 16.1.0 + resolution: "globby@npm:16.1.0" + dependencies: + "@sindresorhus/merge-streams": "npm:^4.0.0" + fast-glob: "npm:^3.3.3" + ignore: "npm:^7.0.5" + is-path-inside: "npm:^4.0.0" + slash: "npm:^5.1.0" + unicorn-magic: "npm:^0.4.0" + checksum: 10/394335741d5f5199fd498960a99cd5688f6db9632cb5617b700274d008d3ee269ecf4050cbc0d3f910205334c90e43424fa5192316c345fdc58d64faf4f103d7 + languageName: node + linkType: hard + "globby@npm:^11.0.0, globby@npm:^11.0.1, globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" @@ -29790,6 +30128,13 @@ __metadata: languageName: node linkType: hard +"is-path-inside@npm:^4.0.0": + version: 4.0.0 + resolution: "is-path-inside@npm:4.0.0" + checksum: 10/8810fa11c58e6360b82c3e0d6cd7d9c7d0392d3ac9eb10f980b81f9839f40ac6d1d6d6f05d069db0d227759801228f0b072e1b6c343e4469b065ab5fe0b68fe5 + languageName: node + linkType: hard + "is-plain-obj@npm:^2.1.0": version: 2.1.0 resolution: "is-plain-obj@npm:2.1.0" @@ -31064,7 +31409,7 @@ __metadata: languageName: node linkType: hard -"jiti@npm:^2.1.2, jiti@npm:^2.4.2": +"jiti@npm:^2.1.2, jiti@npm:^2.4.2, jiti@npm:^2.6.1": version: 2.6.1 resolution: "jiti@npm:2.6.1" bin: @@ -31158,6 +31503,17 @@ __metadata: languageName: node linkType: hard +"js-yaml@npm:4.1.1, js-yaml@npm:^4.0.0, js-yaml@npm:^4.1.0": + version: 4.1.1 + resolution: "js-yaml@npm:4.1.1" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/a52d0519f0f4ef5b4adc1cde466cb54c50d56e2b4a983b9d5c9c0f2f99462047007a6274d7e95617a21d3c91fde3ee6115536ed70991cd645ba8521058b78f77 + languageName: node + linkType: hard + "js-yaml@npm:^3.10.0, js-yaml@npm:^3.13.1, js-yaml@npm:^3.14.1": version: 3.14.2 resolution: "js-yaml@npm:3.14.2" @@ -31170,17 +31526,6 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:^4.0.0, js-yaml@npm:^4.1.0": - version: 4.1.1 - resolution: "js-yaml@npm:4.1.1" - dependencies: - argparse: "npm:^2.0.1" - bin: - js-yaml: bin/js-yaml.js - checksum: 10/a52d0519f0f4ef5b4adc1cde466cb54c50d56e2b4a983b9d5c9c0f2f99462047007a6274d7e95617a21d3c91fde3ee6115536ed70991cd645ba8521058b78f77 - languageName: node - linkType: hard - "js2xmlparser@npm:^4.0.2": version: 4.0.2 resolution: "js2xmlparser@npm:4.0.2" @@ -32039,6 +32384,13 @@ __metadata: languageName: node linkType: hard +"leven@npm:^4.0.0": + version: 4.1.0 + resolution: "leven@npm:4.1.0" + checksum: 10/ab6c1af4a44e9cd83d3fba79a36ed405afce146e7f12c6653d3ac02f17d3d6de0ace0e0d2728b38446e7f40c1df7692352d8b1278cb3ff0dfb868324219636e5 + languageName: node + linkType: hard + "levn@npm:^0.4.1": version: 0.4.1 resolution: "levn@npm:0.4.1" @@ -32384,6 +32736,15 @@ __metadata: languageName: node linkType: hard +"locate-path@npm:^8.0.0": + version: 8.0.0 + resolution: "locate-path@npm:8.0.0" + dependencies: + p-locate: "npm:^6.0.0" + checksum: 10/9c8c1c0ace8dc496e916fadee5a7bcc6abf3a4a0952e25c6e7c8c4c8cd9f8f6e97e0ee5d303b61df1c13dce92b15aad60ce262aa4b728e617d1e03c196ea6a8a + languageName: node + linkType: hard + "lodash-es@npm:^4.17.21": version: 4.17.21 resolution: "lodash-es@npm:4.17.21" @@ -32518,9 +32879,9 @@ __metadata: linkType: hard "lodash@npm:^4.17.10, lodash@npm:^4.17.11, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4": - version: 4.17.21 - resolution: "lodash@npm:4.17.21" - checksum: 10/c08619c038846ea6ac754abd6dd29d2568aa705feb69339e836dfa8d8b09abbb2f859371e86863eda41848221f9af43714491467b5b0299122431e202bb0c532 + version: 4.17.23 + resolution: "lodash@npm:4.17.23" + checksum: 10/82504c88250f58da7a5a4289f57a4f759c44946c005dd232821c7688b5fcfbf4a6268f6a6cdde4b792c91edd2f3b5398c1d2a0998274432cff76def48735e233 languageName: node linkType: hard @@ -32753,6 +33114,13 @@ __metadata: languageName: node linkType: hard +"lunr@npm:^2.3.9": + version: 2.3.9 + resolution: "lunr@npm:2.3.9" + checksum: 10/f2f6db34c046f5a767782fe2454e6dd69c75ba3c5cf5c1cb9cacca2313a99c2ba78ff8fa67dac866fb7c4ffd5f22e06684793f5f15ba14bddb598b94513d54bf + languageName: node + linkType: hard + "lz-string@npm:^1.5.0": version: 1.5.0 resolution: "lz-string@npm:1.5.0" @@ -35144,7 +35512,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.0, minimatch@npm:^9.0.3, minimatch@npm:^9.0.4": +"minimatch@npm:^9.0.0, minimatch@npm:^9.0.3, minimatch@npm:^9.0.4, minimatch@npm:^9.0.5": version: 9.0.5 resolution: "minimatch@npm:9.0.5" dependencies: @@ -36700,6 +37068,46 @@ __metadata: languageName: node linkType: hard +"orval@npm:8.2.0": + version: 8.2.0 + resolution: "orval@npm:8.2.0" + dependencies: + "@commander-js/extra-typings": "npm:^14.0.0" + "@orval/angular": "npm:8.2.0" + "@orval/axios": "npm:8.2.0" + "@orval/core": "npm:8.2.0" + "@orval/fetch": "npm:8.2.0" + "@orval/hono": "npm:8.2.0" + "@orval/mcp": "npm:8.2.0" + "@orval/mock": "npm:8.2.0" + "@orval/query": "npm:8.2.0" + "@orval/solid-start": "npm:8.2.0" + "@orval/swr": "npm:8.2.0" + "@orval/zod": "npm:8.2.0" + "@scalar/json-magic": "npm:^0.8.8" + "@scalar/openapi-parser": "npm:^0.23.9" + "@scalar/openapi-types": "npm:0.5.3" + chalk: "npm:^5.6.2" + chokidar: "npm:^5.0.0" + commander: "npm:^14.0.2" + enquirer: "npm:^2.4.1" + execa: "npm:^9.6.1" + find-up: "npm:8.0.0" + fs-extra: "npm:^11.3.2" + jiti: "npm:^2.6.1" + js-yaml: "npm:4.1.1" + remeda: "npm:^2.32.0" + string-argv: "npm:^0.3.2" + tsconfck: "npm:^3.1.6" + typedoc: "npm:^0.28.15" + typedoc-plugin-coverage: "npm:^4.0.2" + typedoc-plugin-markdown: "npm:^4.9.0" + bin: + orval: ./dist/bin/orval.mjs + checksum: 10/c070a448b25869c11653dbdf92f40d23110e540430720672c0355b384df34acbf4cf4ed77fbbd6c58c301d560b3760d2c61a152b85337b1a9e4ba3cffde1fd53 + languageName: node + linkType: hard + "os-browserify@npm:^0.3.0": version: 0.3.0 resolution: "os-browserify@npm:0.3.0" @@ -39877,6 +40285,13 @@ __metadata: languageName: node linkType: hard +"readdirp@npm:^5.0.0": + version: 5.0.0 + resolution: "readdirp@npm:5.0.0" + checksum: 10/a17a591b51d8b912083660df159e8bd17305dc1a9ef27c869c818bd95ff59e3a6496f97e91e724ef433e789d559d24e39496ea1698822eb5719606dc9c1a923d + languageName: node + linkType: hard + "reading-time@npm:^1.3.0": version: 1.5.0 resolution: "reading-time@npm:1.5.0" @@ -40348,6 +40763,13 @@ __metadata: languageName: node linkType: hard +"remeda@npm:^2.32.0": + version: 2.33.5 + resolution: "remeda@npm:2.33.5" + checksum: 10/4d729a53435f450ddcd4c094aa4d554a9c92206c5bfa4446a40e0ada8c5f2e88795f938131adf5f5cf340364c1d3c18822b5a73e23ac0dbb1b1b3a5ae58c21c8 + languageName: node + linkType: hard + "remove-accents@npm:0.5.0": version: 0.5.0 resolution: "remove-accents@npm:0.5.0" @@ -41915,7 +42337,7 @@ __metadata: languageName: node linkType: hard -"slash@npm:^5.0.0": +"slash@npm:^5.0.0, slash@npm:^5.1.0": version: 5.1.0 resolution: "slash@npm:5.1.0" checksum: 10/2c41ec6fb1414cd9bba0fa6b1dd00e8be739e3fe85d079c69d4b09ca5f2f86eafd18d9ce611c0c0f686428638a36c272a6ac14799146a8295f259c10cc45cde4 @@ -42527,7 +42949,7 @@ __metadata: languageName: node linkType: hard -"string-argv@npm:^0.3.1": +"string-argv@npm:^0.3.1, string-argv@npm:^0.3.2": version: 0.3.2 resolution: "string-argv@npm:0.3.2" checksum: 10/f9d3addf887026b4b5f997a271149e93bf71efc8692e7dc0816e8807f960b18bcb9787b45beedf0f97ff459575ee389af3f189d8b649834cac602f2e857e75af @@ -44071,9 +44493,9 @@ __metadata: languageName: node linkType: hard -"tsconfck@npm:^3.0.3": - version: 3.1.3 - resolution: "tsconfck@npm:3.1.3" +"tsconfck@npm:^3.0.3, tsconfck@npm:^3.1.6": + version: 3.1.6 + resolution: "tsconfck@npm:3.1.6" peerDependencies: typescript: ^5.0.0 peerDependenciesMeta: @@ -44081,7 +44503,7 @@ __metadata: optional: true bin: tsconfck: bin/tsconfck.js - checksum: 10/bf9b9b72de5b83f833f5dea8b276e77bab08e85751589f36dd23854fa3d5f7955194086fb8424df388bf232f2fc9a067d7913bfa674cb1217be0bba648ec71f2 + checksum: 10/8574595286850273bf83319b4e67ca760088df3c36f7ca1425aaf797416672e854271bd31e75c9b3e1836ed5b66410c6bc38cbbda9c638a5416c6a682ed94132 languageName: node linkType: hard @@ -44346,6 +44768,41 @@ __metadata: languageName: node linkType: hard +"typedoc-plugin-coverage@npm:^4.0.2": + version: 4.0.2 + resolution: "typedoc-plugin-coverage@npm:4.0.2" + peerDependencies: + typedoc: 0.28.x + checksum: 10/041d8fce12a6e7d11f18611f7c659e6bade18e29dff59a3d086a2e527f0e5eb11998cad243e7f02717e1e9bb53afedc0c040598ffcface1134c12647b3f9278a + languageName: node + linkType: hard + +"typedoc-plugin-markdown@npm:^4.9.0": + version: 4.9.0 + resolution: "typedoc-plugin-markdown@npm:4.9.0" + peerDependencies: + typedoc: 0.28.x + checksum: 10/69293e9cd1a5cecd9d2f92872472dbc48b3912c658d0a2d07b6d7bd96bd1efa9617e9bea6a4e6181482610733533b1b058dc1fc505cac7931875f081f0023a0c + languageName: node + linkType: hard + +"typedoc@npm:^0.28.15": + version: 0.28.16 + resolution: "typedoc@npm:0.28.16" + dependencies: + "@gerrit0/mini-shiki": "npm:^3.17.0" + lunr: "npm:^2.3.9" + markdown-it: "npm:^14.1.0" + minimatch: "npm:^9.0.5" + yaml: "npm:^2.8.1" + peerDependencies: + typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x + bin: + typedoc: bin/typedoc + checksum: 10/657afd087d88a14cf77ad941de8913041a6a025e87c78833a5ee58a52b8252b685730394ab7920781b0b2faa0507b1c9d87fcf82dd86d1b788420716fc17ded3 + languageName: node + linkType: hard + "typeforce@npm:^1.18.0": version: 1.18.0 resolution: "typeforce@npm:1.18.0" @@ -44624,6 +45081,13 @@ __metadata: languageName: node linkType: hard +"unicorn-magic@npm:^0.4.0": + version: 0.4.0 + resolution: "unicorn-magic@npm:0.4.0" + checksum: 10/5a02923ac75a322b6ea8b0835cd106180cce01b67110f933ebd446757c708591ea45fbbe576f1e027c44a69642926d1d5b94ddf3a64082f4ff420296c84caff9 + languageName: node + linkType: hard + "unified-engine@npm:^11.2.2": version: 11.2.2 resolution: "unified-engine@npm:11.2.2" @@ -47067,7 +47531,7 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.0.0, yaml@npm:^2.2.1, yaml@npm:^2.2.2, yaml@npm:^2.3.4, yaml@npm:^2.6.0, yaml@npm:^2.6.1": +"yaml@npm:^2.0.0, yaml@npm:^2.2.1, yaml@npm:^2.2.2, yaml@npm:^2.3.4, yaml@npm:^2.6.0, yaml@npm:^2.6.1, yaml@npm:^2.8.0, yaml@npm:^2.8.1": version: 2.8.2 resolution: "yaml@npm:2.8.2" bin: @@ -47276,10 +47740,10 @@ __metadata: languageName: node linkType: hard -"zod@npm:^3.25.0 || ^4.0.0": - version: 4.1.12 - resolution: "zod@npm:4.1.12" - checksum: 10/c5f04e6ac306515c4db6ef73cf7705f521c7a2107c8c8912416a0658d689f361db9bee829b0bf01ef4a22492f1065c5cbcdb523ce532606ac6792fd714f3c326 +"zod@npm:^3.25.0 || ^4.0.0, zod@npm:^4.1.11": + version: 4.3.6 + resolution: "zod@npm:4.3.6" + checksum: 10/25fc0f62e01b557b4644bf0b393bbaf47542ab30877c37837ea8caf314a8713d220c7d7fe51f68ffa72f0e1018ddfa34d96f1973d23033f5a2a5a9b6b9d9da01 languageName: node linkType: hard