From 67a70517d76dd0d3534c625969f47cf639e76bdd Mon Sep 17 00:00:00 2001 From: Petar Todorovic Date: Thu, 28 May 2026 12:22:10 +0200 Subject: [PATCH 01/14] fix: share validator cache between activity and list hooks --- .../widget/src/hooks/api/use-activity-actions.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/widget/src/hooks/api/use-activity-actions.ts b/packages/widget/src/hooks/api/use-activity-actions.ts index 9a9cdc4c..d3d96041 100644 --- a/packages/widget/src/hooks/api/use-activity-actions.ts +++ b/packages/widget/src/hooks/api/use-activity-actions.ts @@ -57,7 +57,7 @@ const getItemsWithValidators = async ({ validatorsData: await getYieldValidatorsByAddresses({ apiClient, queryClient, - yieldId: item.yieldData.id, + yieldId: item.actionData.yieldId, addresses: getActionValidatorAddresses(item.actionData) ?? [], }), })) @@ -85,14 +85,9 @@ export const useActivityActions = (): UseActivityActionsResult => { limit: PAGE_SIZE, offset: pageParam, network: network!, - statuses: [ - "SUCCESS", - "FAILED", - "CANCELED", - "PROCESSING", - "STALE", - "WAITING_FOR_NEXT", - ], + // Pending actions are filtered out; only completed (SUCCESS) and + // retryable error (FAILED) actions are surfaced in the activity list. + statuses: ["SUCCESS", "FAILED"], }, }) ) From 0990a30200e4c706cf7c4700e4ec7c0b8edba120 Mon Sep 17 00:00:00 2001 From: Petar Todorovic Date: Wed, 3 Jun 2026 12:02:37 +0200 Subject: [PATCH 02/14] feat: temp --- AGENTS.md | 17 +- agent-patterns/effect-atoms.md | 306 +++++ packages/widget/package.json | 5 +- packages/widget/src/Dashboard.tsx | 10 +- .../molecules/reward-rate-breakdown/index.tsx | 2 +- .../widget/src/domain/types/reward-rate.ts | 63 + packages/widget/src/generated/api/legacy.ts | 1178 +++++++++++++++-- packages/widget/src/generated/api/yield.ts | 2 + .../common/components/tabs/index.tsx | 37 +- .../common/components/tabs/tab.tsx | 2 +- .../overview/earn-details/index.tsx | 380 ++++++ .../earn-details/reward-rate-chart.tsx | 135 ++ .../overview/earn-details/styles.css.ts | 156 +++ .../use-yield-reward-rate-history.ts | 85 ++ .../earn-details/use-yield-tvl-history.ts | 80 ++ .../overview/earn-page/index.tsx | 78 +- .../src/pages-dashboard/overview/index.tsx | 48 +- .../pages-dashboard/overview/manage.page.tsx | 15 + .../select-yield-reward-details.tsx | 15 +- .../widget/src/providers/api/api-client.ts | 10 + .../src/translation/English/translations.json | 21 + .../src/translation/French/translations.json | 21 + packages/widget/src/utils/formatters.ts | 34 +- packages/widget/src/worker.ts | 331 +---- .../widget/tests/domain/reward-rate.test.ts | 89 ++ .../widget/tests/mocks/yield-api-handlers.ts | 56 + .../tests/use-cases/staking-flow/setup.ts | 1 + pnpm-lock.yaml | 343 ++++- pnpm-workspace.yaml | 3 + 29 files changed, 3033 insertions(+), 490 deletions(-) create mode 100644 agent-patterns/effect-atoms.md create mode 100644 packages/widget/src/pages-dashboard/overview/earn-details/index.tsx create mode 100644 packages/widget/src/pages-dashboard/overview/earn-details/reward-rate-chart.tsx create mode 100644 packages/widget/src/pages-dashboard/overview/earn-details/styles.css.ts create mode 100644 packages/widget/src/pages-dashboard/overview/earn-details/use-yield-reward-rate-history.ts create mode 100644 packages/widget/src/pages-dashboard/overview/earn-details/use-yield-tvl-history.ts create mode 100644 packages/widget/src/pages-dashboard/overview/manage.page.tsx create mode 100644 packages/widget/tests/domain/reward-rate.test.ts diff --git a/AGENTS.md b/AGENTS.md index 7b8bbc2e..a5286118 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,4 @@ -# StakeKit Widget — Agent Guide +# StakeKit Widget - Agent Guide ## Project Overview - Monorepo managed with `pnpm` workspaces + Turborepo. @@ -26,17 +26,18 @@ - `pnpm lint` — lint/type-check all packages. - `pnpm test` — run all workspace tests. - `pnpm format` — run formatting checks/tasks. -- `pnpm check-hygiene` - check unused deps, unresolved imports, circular deps, etc +- `pnpm check-hygiene` — check unused deps, unresolved imports, circular deps, etc. ### Focused widget commands (recommended for most tasks) - `pnpm --filter @stakekit/widget {command}` ## Agent Working Guidelines (short) - Keep public API compatibility in `src/index.package.ts` and `src/index.bundle.ts`. +- React Compiler is enabled. Do not add `useMemo`, `useCallback`, or `React.memo` only for render-performance optimization; prefer plain values/functions. Use manual memoization only when required for semantic stability, such as an external API dependency or context value identity. - When changing user-facing copy, update both: - `packages/widget/src/translation/English/translations.json` - `packages/widget/src/translation/French/translations.json` -- After changes, confirm nothing is broken with lint command which checks lint/type errors +- After changes, run the lint command to check lint and type errors. ## Useful Context for Debugging - API client is configured in `packages/widget/src/providers/api/api-client-provider.tsx`. @@ -48,11 +49,13 @@ ## Vendored Repositories -This project vendors external repositories under @repos/ +This project vendors external repositories under `@repos/`. - Use vendored repositories as read-only reference material when working with related libraries - Prefer examples and patterns from the vendored source code over generated guesses or web search results -- Do not edit files under @repos/ unless explicitly asked -- Do not import from @repos/ - application code should continue importing from normal package dependencies -- Before writing any Effect code, inspect @repos/effect/LLMS.md +- Do not edit files under `@repos/` unless explicitly asked +- Do not import from `@repos/` - application code should continue importing from normal package dependencies +- `@repos/effect` is a local-only clone of Effect-TS/effect-smol and may be ignored by Git locally +- When searching `@repos/`, use `rg --no-ignore @repos/` so ignored local reference repositories are included without searching unrelated ignored directories +- Before writing any Effect code, inspect `@repos/effect/LLMS.md` - Before writing code that interacts with Effect `HttpClient`, inspect `agent-patterns/effect-http-client.md` diff --git a/agent-patterns/effect-atoms.md b/agent-patterns/effect-atoms.md new file mode 100644 index 00000000..e0b801e4 --- /dev/null +++ b/agent-patterns/effect-atoms.md @@ -0,0 +1,306 @@ +# Effect Atom Patterns + +Use this when writing or changing code that uses Effect's unstable atom +reactivity APIs. The source of truth reviewed for these patterns is the vendored +Effect repo: `@repos/effect/LLMS.md`, +`@repos/effect/packages/effect/src/unstable/reactivity/Atom.ts`, +`AtomRegistry.ts`, `AsyncResult.ts`, `Reactivity.ts`, `Hydration.ts`, +`AtomHttpApi.ts`, `AtomRpc.ts`, and the tests in +`@repos/effect/packages/effect/test/reactivity`. + +## Imports + +Import atom APIs from the unstable reactivity barrel. + +```ts +import { Effect, Layer, Schema, Stream } from "effect" +import { AsyncResult, Atom, AtomRegistry, Hydration } from "effect/unstable/reactivity" +``` + +## Registry Owns State + +An `Atom` is a value description. An `AtomRegistry` owns cached values, +dependency edges, subscriptions, running fibers, stream scopes, and disposal. +Use one registry per isolated lifetime: UI root, request, route boundary, or +test. + +```ts +const count = Atom.make(0) +const doubled = Atom.make((get) => get(count) * 2) + +const registry = AtomRegistry.make() +registry.set(count, 21) +registry.get(doubled) // 42 +``` + +The same atom object can have different values in different registries. After +`registry.dispose()`, later atom access is an error. + +## Keep Atom Identity Stable + +Do not create parameterized atoms inline during reads or renders. Atom identity +is the cache key unless the atom is serializable. Use `Atom.family` for +parameterized atoms so the same input returns the same atom object. + +```ts +const userAtom = Atom.family((id: string) => + UserClient.runtime.atom(UserClient.use((client) => client.getUser({ id }))).pipe( + Atom.withLabel(`user:${id}`) + ) +) +``` + +Use `Atom.withLabel` on important atoms. It only adds diagnostic metadata and +does not change behavior. + +## Choose The Right Constructor + +Use `Atom.make(value)` for writable local state, `Atom.make((get) => value)` for +derived synchronous state, and `Atom.make(effectOrStream)` for read atoms that +produce `AsyncResult`. + +```ts +const search = Atom.make("") + +const trimmedSearch = Atom.make((get) => get(search).trim()) + +const users = Atom.make((get) => + Effect.gen(function*() { + const query = get(trimmedSearch) + return yield* UserApi.use((api) => api.search(query)) + }) +) +``` + +Use `Atom.fn` for command-style effects that run when written to. Use +`Atom.fnSync` for synchronous commands. Before the first write, `Atom.fn` +returns `AsyncResult.initial()` unless `initialValue` is supplied, and +`Atom.fnSync` returns `Option.none()` unless `initialValue` is supplied. + +```ts +const saveUser = Atom.fn<{ readonly id: string; readonly name: string }>()( + Effect.fn("saveUser")(function*(input) { + return yield* UserApi.use((api) => api.save(input)) + }) +) + +registry.set(saveUser, { id: "1", name: "Ada" }) +``` + +Write `Atom.Reset` to clear an `Atom.fn` result back to its initial state and +`Atom.Interrupt` to interrupt the current computation. Set `{ concurrent: true }` +only when multiple writes should run at the same time; the default interrupts +and replaces the previous run. + +## Read Dependencies Deliberately + +Inside an atom read, `get(atom)` records a dependency. When that dependency +changes, the current atom is invalidated. Use `get.once(atom)` when you need the +current value without creating a dependency edge. + +Use `get.result(asyncAtom)` to await an `AsyncResult` atom from another effect +atom. It waits while the result is `Initial`; pass `{ suspendOnWaiting: true }` +when stale values marked `waiting` should also suspend. + +```ts +const enrichedUser = Atom.make((get) => + Effect.gen(function*() { + const user = yield* get.result(userAtom("1"), { suspendOnWaiting: true }) + return { ...user, displayName: user.name.toUpperCase() } + }) +) +``` + +In `Atom.fn` bodies, `get.result` behaves as a one-shot wait instead of a normal +dependency read. If the command should rerun from another atom changing, read +that atom with `get(atom)` as part of the command trigger or use reactivity keys. + +## Handle AsyncResult As State + +`AsyncResult` has three variants: `Initial`, `Success`, and `Failure`. The +`waiting` flag is an overlay, not a fourth variant. A waiting success or failure +can still contain the previous usable value. + +Prefer `AsyncResult.matchWithWaiting`, `AsyncResult.builder`, or explicit +refinements instead of assuming any non-success is a loading state. + +```ts +const view = AsyncResult.matchWithWaiting(result, { + onWaiting: () => "Loading", + onSuccess: ({ value }) => value.name, + onError: (error) => `Error: ${String(error)}`, + onDefect: () => "Unexpected error" +}) +``` + +`AsyncResult.value(result)` and `AsyncResult.getOrElse(result, fallback)` may +return a previous success stored inside a failure. Inspect +`AsyncResult.cause(result)` or `AsyncResult.error(result)` when current failure +versus stale data matters. + +## Manage Lifetime Explicitly + +Unobserved atoms are auto-disposed by default. That means local state can reset, +effects can restart, streams can resubscribe, and finalizers can run after the +last listener or dependent child disappears. + +Use the narrowest lifetime tool that matches the behavior: + +- `Atom.keepAlive` keeps an atom cached even when unobserved. +- `Atom.setIdleTTL(duration)` keeps an unused atom around for a finite idle time. +- `Atom.autoDispose` restores default disposal on a copied atom. +- `registry.mount(atom)` keeps an atom alive until the returned release function + is called. +- `Atom.mount(atom)` keeps an atom alive for the current Effect scope. + +Always release `registry.subscribe` and `registry.mount` callbacks when +integrating with external callback-based code. + +## Batch Related Writes + +Use `Atom.batch` when multiple synchronous writes should invalidate dependents +and notify listeners once after the final state is known. + +```ts +Atom.batch(() => { + registry.set(firstName, "Ada") + registry.set(lastName, "Lovelace") +}) +``` + +Reads inside a batch can still rebuild from the latest written state, but +listeners are notified after the batch commits. + +## Use Runtime Atoms For Services + +Use `Atom.runtime(layer)` or `Atom.context({ memoMap })` when atom effects need +Effect services. The runtime builds the layer with a memo map, provides +`AtomRegistry`, `Scope`, `Scheduler`, and `Reactivity`, and exposes +`runtime.atom`, `runtime.fn`, `runtime.pull`, and `runtime.subscriptionRef`. + +```ts +const UserRuntime = Atom.runtime(UserApi.layer) + +const user = Atom.family((id: string) => + UserRuntime.atom(UserApi.use((api) => api.getUser(id)), { + initialValue: { id, name: "Loading" } + }) +) + +const saveUser = UserRuntime.fn( + Effect.fn("saveUser")(function*(input: User) { + return yield* UserApi.use((api) => api.saveUser(input)) + }), + { reactivityKeys: { users: [] } } +) +``` + +Use registry `initialValues` with `Atom.initialValue(runtime.layer, testLayer)` +to replace runtime services in tests. + +## Invalidate Server State With Reactivity Keys + +Use `Atom.withReactivity(keys)` for reads that should refresh after matching +invalidations. Use `runtime.fn(..., { reactivityKeys })`, +`Reactivity.mutation(effect, keys)`, or `Reactivity.invalidate(keys)` for writes +that should trigger those refreshes after success. + +Keys can be a flat array or a record. Prefer stable primitive keys or stable ids; +non-primitive keys are matched by `Hash.hash`. + +```ts +const user = UserRuntime.atom(UserApi.use((api) => api.getUser("1"))).pipe( + UserRuntime.factory.withReactivity({ users: ["1"] }) +) + +const saveUser = UserRuntime.fn( + (input: User) => UserApi.use((api) => api.saveUser(input)), + { reactivityKeys: { users: ["1"] } } +) +``` + +## Streams, Pulls, And SubscriptionRefs + +An `Atom.make(stream)` stores the latest emitted item in an `AsyncResult`. An +empty stream completes as `NoSuchElementError`. Failures preserve the latest +previous success when possible. + +Use `Atom.pull(stream)` or `runtime.pull(stream)` for paginated or incremental +streams that should advance only when the atom is written to. It accumulates +items by default; pass `{ disableAccumulation: true }` when each pull should +replace the previous batch. + +Use `Atom.subscriptionRef(refOrEffect)` when state already lives in a +`SubscriptionRef`; writes to the atom update the ref. + +## Persistence And Hydration + +Mark atoms that cross registry boundaries with `Atom.serializable({ key, +schema })`. Only serializable atoms are included in `Hydration.dehydrate`, and +`Hydration.hydrate` must run before the matching atoms are first read. + +```ts +const user = userAtom("1").pipe( + Atom.serializable({ + key: "user:1", + schema: AsyncResult.Schema({ + success: User, + error: UserError + }) + }) +) + +const state = Hydration.dehydrate(serverRegistry) +Hydration.hydrate(clientRegistry, state) +``` + +Stable keys matter more than atom identity during hydration. The target atom must +use a compatible schema. `Hydration.dehydrate(..., { encodeInitialAs: "promise" })` +uses a live JavaScript promise for initial async results, so do not serialize +that form across JSON or processes. + +For browser URL state, `Atom.searchParam` requires synchronous schemas with no +Effect context. For storage-backed state, use `Atom.kvs` with an atom runtime +that provides `KeyValueStore`. + +## Remote API Helpers + +Use `AtomHttpApi.Service` or `AtomRpc.Service` when typed HTTP API or RPC +clients should participate in atom caching, invalidation, and hydration. + +- Queries return `Atom>` for non-streaming endpoints. +- Mutations return `AtomResultFn`. +- `reactivityKeys` connect successful mutations to query refreshes. +- `timeToLive` maps to `Atom.setIdleTTL` for finite durations and + `Atom.keepAlive` for infinite durations. +- `serializationKey` is required for serializable queries, and should uniquely + identify the endpoint plus request. +- RPC streaming queries return pull atoms and are not serializable query atoms. + +## Testing Patterns + +Use `it.effect` for Effect-based tests, `AtomRegistry.make()` for an isolated +cache, fake timers or `TestClock` for delayed atoms, and explicit +`registry.mount(atom)` when async work must stay alive during the test. + +```ts +it.effect("refreshes after mutation", () => + Effect.gen(function*() { + const registry = AtomRegistry.make() + const unmount = registry.mount(user) + + registry.set(saveUser, { id: "1", name: "Grace" }) + yield* Effect.yieldNow + + const result = registry.get(user) + assert(AsyncResult.isSuccess(result)) + assert.strictEqual(result.value.name, "Grace") + + unmount() + })) +``` + +Prefer `yield* Effect.yieldNow`, fake timer advancement, or `TestClock` over +real sleeps. Assert `AsyncResult` variants and `waiting` flags directly. For +lifetime behavior, assert node disposal by reading again after yielding, or use +`keepAlive` / `mount` when state should persist. diff --git a/packages/widget/package.json b/packages/widget/package.json index 9a1417e2..18f249ad 100644 --- a/packages/widget/package.json +++ b/packages/widget/package.json @@ -109,6 +109,7 @@ "@types/lodash.uniqwith": "catalog:", "@types/react": "catalog:", "@types/react-dom": "catalog:", + "@types/react-is": "catalog:", "@vanilla-extract/css": "catalog:", "@vanilla-extract/dynamic": "catalog:", "@vanilla-extract/recipes": "catalog:", @@ -156,7 +157,9 @@ "vitest-browser-react": "catalog:", "wagmi": "catalog:", "xstate": "catalog:", - "yaml": "catalog:" + "yaml": "catalog:", + "react-is": "catalog:", + "recharts": "catalog:" }, "msw": { "workerDirectory": [ diff --git a/packages/widget/src/Dashboard.tsx b/packages/widget/src/Dashboard.tsx index a43f13f0..1ae21e7f 100644 --- a/packages/widget/src/Dashboard.tsx +++ b/packages/widget/src/Dashboard.tsx @@ -16,7 +16,8 @@ import { ActivityTabPage } from "./pages-dashboard/activity"; import { ActivityDetailsPage } from "./pages-dashboard/activity/activity-details.page"; import { DashboardWrapper } from "./pages-dashboard/common/components/wrapper"; import { OverviewPage } from "./pages-dashboard/overview"; -import { EarnPage } from "./pages-dashboard/overview/earn-page"; +import { EarnPageContent } from "./pages-dashboard/overview/earn-page"; +import { ManagePage } from "./pages-dashboard/overview/manage.page"; import { PositionDetailsPage } from "./pages-dashboard/position-details"; import { PositionDetailsActions } from "./pages-dashboard/position-details/components/position-details-actions"; import { DashboardProvider } from "./pages-dashboard/providers/dashboard-context"; @@ -26,9 +27,9 @@ export const Dashboard = () => { }> - {/* Overview Tab */} + {/* Earn Tab */} }> - } /> + } /> }> } /> @@ -37,6 +38,9 @@ export const Dashboard = () => { + {/* Manage Tab */} + } /> + {/* Position Details */} ; type YieldWithRewardRate = Pick; +type ValidatorRewardRateDto = NonNullable; +type SelectedValidators = + | ReadonlyArray + | ReadonlyMap; type RewardRateBreakdownKey = "native" | "protocol_incentive" | "campaign"; @@ -45,6 +50,64 @@ export const getYieldRewardRateDetails = ( yieldDto: YieldWithRewardRate | null | undefined ): YieldRewardRateDto | undefined => yieldDto?.rewardRate; +export const getEffectiveYieldRewardRateDetails = ({ + selectedValidators, + yieldDto, +}: { + selectedValidators?: SelectedValidators | null; + yieldDto: YieldWithRewardRate | null | undefined; +}): YieldRewardRateDto | ValidatorRewardRateDto | undefined => + getSelectedValidatorsRewardRate(selectedValidators) ?? + getYieldRewardRateDetails(yieldDto); + +const getSelectedValidatorsRewardRate = ( + selectedValidators: SelectedValidators | null | undefined +) => { + const validators = selectedValidators + ? selectedValidators instanceof Map + ? [...selectedValidators.values()] + : [...selectedValidators] + : []; + const rewardRates = validators.flatMap((validator) => + validator.rewardRate ? [validator.rewardRate] : [] + ); + + if (rewardRates.length < 2) { + return rewardRates[0]; + } + + return averageRewardRates(rewardRates); +}; + +const averageRewardRates = ( + rewardRates: ValidatorRewardRateDto[] +): ValidatorRewardRateDto => { + const componentsByKey = rewardRates.reduce((acc, rewardRate) => { + rewardRate.components.forEach((component) => { + const key = `${component.yieldSource}:${component.rateType}:${component.token.symbol}`; + const prev = acc.get(key); + + acc.set(key, { + component, + rate: (prev?.rate ?? 0) + component.rate, + }); + }); + + return acc; + }, new Map()); + + return { + total: + rewardRates.reduce((acc, rewardRate) => acc + rewardRate.total, 0) / + rewardRates.length, + rateType: rewardRates[0].rateType, + components: [...componentsByKey.values()].map(({ component, rate }) => ({ + ...component, + rate: rate / rewardRates.length, + })), + }; +}; + export const getRewardRateBreakdown = ( rewardRate: YieldRewardRateDto | null | undefined, opts?: { diff --git a/packages/widget/src/generated/api/legacy.ts b/packages/widget/src/generated/api/legacy.ts index 2500bba7..0878ddbd 100644 --- a/packages/widget/src/generated/api/legacy.ts +++ b/packages/widget/src/generated/api/legacy.ts @@ -130,6 +130,40 @@ export type CampaignBudgetSpendStrategy = | "allow_underspend" | "spend_full_budget"; export type CampaignStatus = "draft" | "active" | "paused" | "ended"; +export type StakeKitErrorDto = { + readonly message: string; + readonly code: number; + readonly type?: string; + readonly details?: {}; + readonly path?: string; +}; +export type CampaignAlertFlagsDto = { + readonly lowBudget: boolean; + readonly noQualifyingUsers: boolean; + readonly recentPayoutFailure: boolean; +}; +export type CampaignBalanceSortField = + | "address" + | "qualified" + | "inputTokenBalance" + | "totalEarned" + | "totalPaid" + | "totalUnpaid"; +export type CampaignUserBalanceDto = { + readonly address: string; + readonly currentIndexedBalanceRaw: string | null; + readonly inputTokenBalance: string | null; + readonly cappedBalance: string; + readonly qualified: boolean; + readonly totalEarned: string; + readonly totalPaid: string; + readonly totalUnpaid: string; +}; +export type CampaignBalanceFreshnessDto = { + readonly balancesAsOfHour: string; + readonly pricePerShareAsOf: string; + readonly vaultAggregatesComputed: boolean; +}; export type CampaignLiabilityDto = { readonly totalEarned: string; readonly totalPaid: string; @@ -152,12 +186,16 @@ export type BudgetProjectionDto = { }; export type UpdateCampaignUserPayoutEligibilityDto = { readonly isPayoutEligible: boolean; + readonly reason?: string; }; export type CampaignUserPayoutEligibilityDto = { readonly campaignId: string; readonly address: string; readonly isPayoutEligible: boolean; readonly totalUnpaid: string; + readonly blacklistReason?: string | null; + readonly addedBy?: string; + readonly addedAt?: string; }; export type CampaignUserEntitlementDto = { readonly campaignId: string; @@ -181,6 +219,22 @@ export type CampaignPayoutItemStatus = | "submitted" | "settled" | "failed"; +export type SafeTransactionDetailDto = { + readonly batchKey: string; + readonly chainId: string | null; + readonly safeTxHash: string | null; + readonly executionTxHash: string | null; + readonly signaturesCollected: number | null; + readonly signaturesRequired: number | null; + readonly safeTxUiUrl: string | null; + readonly executionTxHashExplorerUrl: string | null; +}; +export type PayoutRunBudgetStateDto = { + readonly totalBudget: string; + readonly remainingBefore: string; + readonly distributedInRun: string; + readonly remainingAfter: string; +}; export type CampaignPayoutAuditDto = { readonly campaignId: string; readonly campaignPayoutRunId: string; @@ -194,6 +248,11 @@ export type WeeklyDistributionDto = { readonly totalReward: string; readonly qualifyingUsers: number; }; +export type EligibleUserSortField = + | "totalEarned" + | "totalUnpaid" + | "totalPaid" + | "cumulativeQualifiedBalance"; export type EligibleUserDto = { readonly address: string; readonly totalEarned: string; @@ -201,20 +260,6 @@ export type EligibleUserDto = { readonly totalUnpaid: string; readonly cumulativeQualifiedBalance: string; }; -export type CampaignConfigurationRequestType = - | "create_campaign" - | "update_configuration" - | "end_campaign"; -export type CampaignConfigurationRequestStatus = - | "pending" - | "accepted" - | "rejected"; -export type AcceptCampaignConfigurationRequestDto = { - readonly safeAddress?: string; -}; -export type RejectCampaignConfigurationRequestDto = { - readonly rejectionReason: string; -}; export type HourlyAccrualSummaryDto = { readonly timestamp: string; readonly qualifyingUserCount: number; @@ -222,41 +267,28 @@ export type HourlyAccrualSummaryDto = { readonly hourlyBudgetAllocated: string; readonly hourlyBudgetDistributed: string; readonly ceilingActive: boolean; - readonly calculatedApr?: number | null; - readonly pricePerShare?: string | null; + readonly calculatedApr: number | null; + readonly pricePerShare: string | null; }; +export type AccrualHourSortField = "allocatedReward"; export type UserHourlyAccrualDto = { readonly address: string; - readonly rawBalance?: string | null; + readonly rawBalance: string | null; readonly cappedBalance: string; readonly qualified: boolean; readonly qualificationReason: string; readonly allocatedReward: string; - readonly pricePerShareApplied?: string | null; + readonly pricePerShareApplied: string | null; }; export type UserHourlyAccrualHistoryDto = { readonly hour: string; - readonly rawBalance?: string | null; + readonly rawBalance: string | null; readonly balance: string; readonly qualified: boolean; readonly qualificationReason: string; readonly rewardEarned: string; readonly cumulativeEarned: string; - readonly pricePerShareApplied?: string | null; -}; -export type PayoutRunBudgetStateDto = { - readonly totalBudget: string; - readonly remainingBefore: string; - readonly distributedInRun: string; - readonly remainingAfter: string; -}; -export type SafeTransactionDetailDto = { - readonly batchKey: string; - readonly chainId?: string | null; - readonly safeTxHash?: string | null; - readonly executionTxHash?: string | null; - readonly signaturesCollected?: number | null; - readonly signaturesRequired?: number | null; + readonly pricePerShareApplied: string | null; }; export type CampaignPayoutEligibilitySummaryDto = { readonly campaignId: string; @@ -264,20 +296,43 @@ export type CampaignPayoutEligibilitySummaryDto = { readonly blacklistedUserCount: number; readonly totalUserCount: number; }; -export type CampaignUserBalanceDto = { +export type BlacklistedAddressDto = { readonly address: string; - readonly currentIndexedBalanceRaw?: string | null; - readonly inputTokenBalance?: string | null; - readonly cappedBalance: string; - readonly qualified: boolean; readonly totalEarned: string; - readonly totalPaid: string; readonly totalUnpaid: string; }; -export type CampaignBalanceFreshnessDto = { - readonly balancesAsOfHour?: string; - readonly pricePerShareAsOf?: string; +export type CampaignAuditLogType = + | "blacklist_added" + | "blacklist_removed" + | "blacklist_reason_updated" + | "paused" + | "resumed" + | "acknowledged"; +export type CampaignConfigurationRequestType = + | "create_campaign" + | "update_configuration" + | "end_campaign"; +export type CampaignConfigurationRequestStatus = + | "pending" + | "accepted" + | "rejected"; +export type AcceptCampaignConfigurationRequestDto = { + readonly safeAddress?: string; }; +export type RejectCampaignConfigurationRequestDto = { + readonly rejectionReason: string; +}; +export type CampaignAdminSortingOption = + | "createdAtAsc" + | "createdAtDesc" + | "updatedAtAsc" + | "updatedAtDesc" + | "startTimeAsc" + | "startTimeDesc" + | "endTimeAsc" + | "endTimeDesc" + | "statusAsc" + | "statusDesc"; export type CreateMasterBannedRegionDto = { readonly country: string; readonly isMandatory: boolean; @@ -375,13 +430,6 @@ export type UpdateKeyDto = { readonly info: string; readonly name: string; }; -export type StakeKitErrorDto = { - readonly message: string; - readonly code: number; - readonly type?: string; - readonly details?: {}; - readonly path?: string; -}; export type HealthStatusDto = { readonly status: "OK" | "FAIL" | "DEGRADED"; readonly db: "OK" | "FAIL" | "DEGRADED"; @@ -619,6 +667,7 @@ export type YieldProviders = | "benqi" | "compound" | "lido" + | "marinade" | "sushi" | "yearn" | "ape" @@ -1320,6 +1369,16 @@ export type CustomValidatorAddresses = { readonly integrationId: string; readonly validatorAddresses: ReadonlyArray; }; +export type BalanceTransferEventDto = { + readonly blockTimestamp: string; + readonly blockNumber: number; + readonly network: string; + readonly address: string; + readonly contractAddress: string; + readonly transactionId: string; + readonly transferAmountWei: string; + readonly cumulativeBalanceWei: string; +}; export type YieldRewardsSummaryDto = { readonly total: string; readonly last24H: string; @@ -1852,7 +1911,22 @@ export type CampaignBalanceTotalsDto = { readonly qualifyingUserCount: number; readonly safeAddress: string; readonly campaignStatus: CampaignStatus; - readonly nextPayoutDueAt?: string; + readonly nextPayoutDueAt: string; + readonly vaultTvl: string; + readonly totalInflows: string; + readonly totalOutflows: string; +}; +export type PaginatedCampaignUserBalanceDto = { + readonly total: number; + readonly offset: number; + readonly limit: number; + readonly items: ReadonlyArray; +}; +export type PaginatedCampaignUserPayoutEligibilityDto = { + readonly total: number; + readonly offset: number; + readonly limit: number; + readonly items: ReadonlyArray; }; export type CampaignPayoutRunDto = { readonly id: string; @@ -1861,7 +1935,7 @@ export type CampaignPayoutRunDto = { readonly payoutWindowEnd: string; readonly actualWindowStart: string; readonly actualWindowEnd: string; - readonly cappedBudget: string; + readonly distributedAmount: string; readonly status: CampaignPayoutRunStatus; readonly currentStep: CampaignPayoutRunStep; readonly retryCount: number; @@ -1869,24 +1943,11 @@ export type CampaignPayoutRunDto = { readonly startedAt?: string; readonly completedAt?: string; readonly merkleRoot?: string | null; -}; -export type ProgrammaticPayoutRunDto = { - readonly id: string; - readonly campaignId: string; - readonly payoutWindowStart: string; - readonly payoutWindowEnd: string; - readonly actualWindowStart: string; - readonly actualWindowEnd: string; - readonly totalAmount: string; readonly recipientCount: number; - readonly status: CampaignPayoutRunStatus; - readonly currentStep: CampaignPayoutRunStep; - readonly safeTransactionHash?: string | null; - readonly executionTxHash?: string | null; - readonly preparedSafeTransactionMetadata?: {} | null; - readonly merkleRoot?: string | null; - readonly startedAt?: string; - readonly completedAt?: string; + readonly safeTransactionHash: string | null; + readonly executionTxHash: string | null; + readonly safeTransactionUiUrl: string | null; + readonly executionTxHashExplorerUrl: string | null; }; export type CampaignPayoutItemDto = { readonly id: string; @@ -1923,24 +1984,6 @@ export type PaginatedEligibleUserDto = { readonly limit: number; readonly items: ReadonlyArray; }; -export type CampaignConfigurationRequestDto = { - readonly id: string; - readonly projectId: string; - readonly teamId: string; - readonly campaignId?: string | null; - readonly requestType: CampaignConfigurationRequestType; - readonly status: CampaignConfigurationRequestStatus; - readonly requestedBy: string; - readonly reviewedBy?: string | null; - readonly reviewedAt?: string; - readonly rejectionReason?: string | null; - readonly requestedChanges: { readonly [x: string]: unknown }; - readonly previousValues?: {}; - readonly version: number; - readonly metadata?: {}; - readonly createdAt: string; - readonly updatedAt: string; -}; export type PaginatedHourlyAccrualSummaryDto = { readonly total: number; readonly offset: number; @@ -1959,11 +2002,39 @@ export type PaginatedUserHourlyAccrualHistoryDto = { readonly limit: number; readonly items: ReadonlyArray; }; -export type PaginatedCampaignUserBalanceDto = { +export type PaginatedBlacklistedAddressDto = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items: ReadonlyArray; + readonly items: ReadonlyArray; +}; +export type CampaignAuditLogDto = { + readonly id: string; + readonly campaignId: string; + readonly type: CampaignAuditLogType; + readonly address?: string | null; + readonly reason?: string | null; + readonly actorId?: string; + readonly actorRole?: string | null; + readonly createdAt: string; +}; +export type CampaignConfigurationRequestDto = { + readonly id: string; + readonly projectId: string; + readonly teamId: string; + readonly campaignId?: string | null; + readonly requestType: CampaignConfigurationRequestType; + readonly status: CampaignConfigurationRequestStatus; + readonly requestedBy: string; + readonly reviewedBy?: string | null; + readonly reviewedAt?: string; + readonly rejectionReason?: string | null; + readonly requestedChanges: { readonly [x: string]: unknown }; + readonly previousValues?: {}; + readonly version: number; + readonly metadata?: {}; + readonly createdAt: string; + readonly updatedAt: string; }; export type CreateTeamDto = { readonly contactDetails: {}; @@ -2212,6 +2283,12 @@ export type PendingActionConstraintDto = { readonly type: ActionTypes; readonly amount?: PendingActionConstraintAmountDto; }; +export type PaginatedBalanceTransferEventDto = { + readonly total: number; + readonly offset: number; + readonly limit: number; + readonly items: ReadonlyArray; +}; export type StakeFailureDto = { readonly error: FailureViewDto }; export type StakeViewSuccessDto = { readonly protocol_name: string; @@ -2254,7 +2331,7 @@ export type UpsertSsoConfigDto = { readonly enforced?: boolean; readonly jitDefaultRole?: "member"; readonly syncUserAttributesOnLogin?: boolean; - readonly ssoLoginDomain?: {} | null; + readonly ssoLoginDomain?: string | null; }; export type ValidatorAdminDto = { readonly id: string; @@ -2571,6 +2648,10 @@ export type CampaignDto = { readonly apyCeiling?: number | null; readonly budgetSpendStrategy: CampaignBudgetSpendStrategy; readonly qualificationConfig: CampaignQualificationConfigDto; + readonly pausedBy?: string; + readonly pausedAt?: string; + readonly pausedByRole?: string | null; + readonly acknowledgedAt?: string; }; export type UpdateCampaignDto = { readonly yieldId?: string; @@ -2655,21 +2736,59 @@ export type CreateCampaignConfigurationRequestDto = { }; readonly metadata?: { readonly [x: string]: unknown }; }; +export type AdminCampaignDto = { + readonly id: string; + readonly name?: string | null; + readonly projectId: string; + readonly yieldId: string; + readonly integrationId: string; + readonly rewardToken: { + readonly name: string; + readonly network: Networks; + readonly symbol: string; + readonly decimals: number; + readonly address?: string; + readonly coinGeckoId?: string; + readonly logoURI?: string; + readonly isPoints?: boolean; + readonly feeConfigurationId?: string; + }; + readonly rewardMode: CampaignRewardMode; + readonly safeAddress: string; + readonly totalBudget: string; + readonly distributedBudget: string; + readonly remainingBudget: string; + readonly startTime: string; + readonly endTime: string; + readonly payoutFrequency: CampaignPayoutFrequency; + readonly status: CampaignStatus; + readonly lastProcessedHour?: string; + readonly nextPayoutDueAt?: string; + readonly apyCeiling?: number | null; + readonly budgetSpendStrategy: CampaignBudgetSpendStrategy; + readonly qualificationConfig: CampaignQualificationConfigDto; + readonly pausedBy?: string; + readonly pausedAt?: string; + readonly pausedByRole?: string | null; + readonly acknowledgedAt?: string; + readonly teamId?: string | null; +}; +export type CampaignBalancesResponseDto = { + readonly users: PaginatedCampaignUserBalanceDto; + readonly totals: CampaignBalanceTotalsDto; + readonly freshness: CampaignBalanceFreshnessDto; +}; export type PaginatedCampaignPayoutRunDto = { readonly total: number; readonly offset: number; readonly limit: number; readonly items: ReadonlyArray; }; -export type PaginatedProgrammaticPayoutRunDto = { - readonly total: number; - readonly offset: number; - readonly limit: number; - readonly items: ReadonlyArray; -}; export type CampaignPayoutRunDetailDto = { readonly run: CampaignPayoutRunDto; readonly items: ReadonlyArray; + readonly safeTransactions: ReadonlyArray; + readonly budgetState: PayoutRunBudgetStateDto; }; export type PaginatedProgrammaticPayoutItemDto = { readonly total: number; @@ -2677,21 +2796,22 @@ export type PaginatedProgrammaticPayoutItemDto = { readonly limit: number; readonly items: ReadonlyArray; }; +export type HourlyAccrualDetailDto = { + readonly summary: HourlyAccrualSummaryDto; + readonly users: PaginatedUserHourlyAccrualDto; +}; +export type PaginatedCampaignAuditLogDto = { + readonly total: number; + readonly offset: number; + readonly limit: number; + readonly items: ReadonlyArray; +}; export type PaginatedCampaignConfigurationRequestDto = { readonly total: number; readonly offset: number; readonly limit: number; readonly items: ReadonlyArray; }; -export type HourlyAccrualDetailDto = { - readonly summary: HourlyAccrualSummaryDto; - readonly users: PaginatedUserHourlyAccrualDto; -}; -export type CampaignBalancesResponseDto = { - readonly users: PaginatedCampaignUserBalanceDto; - readonly totals: CampaignBalanceTotalsDto; - readonly freshness: CampaignBalanceFreshnessDto; -}; export type YieldMetadataDto = { readonly name: string; readonly logoURI: string; @@ -2717,6 +2837,7 @@ export type YieldMetadataDto = { readonly isIntegrationAggregator?: boolean; readonly extraTransactionFormatsSupported?: ReadonlyArray; readonly supportedStandards?: ReadonlyArray; + readonly supportsCampaigns: boolean; readonly commission?: ReadonlyArray; readonly tvl?: ReadonlyArray; }; @@ -3098,9 +3219,18 @@ export type CampaignSummaryDto = { readonly unpaidLiability: string; readonly totalQualifyingTvl: string; readonly participantsCount: number; + readonly averageHourlyEmission: string; + readonly ceilingActiveHoursCount: number; + readonly alertFlags: CampaignAlertFlagsDto; +}; +export type PaginatedAdminCampaignDto = { + readonly total: number; + readonly offset: number; + readonly limit: number; + readonly items: ReadonlyArray; }; export type ProgrammaticPayoutRunDetailDto = { - readonly run: ProgrammaticPayoutRunDto; + readonly run: CampaignPayoutRunDto; readonly recipients: PaginatedProgrammaticPayoutItemDto; readonly budgetState: PayoutRunBudgetStateDto; readonly safeTransactions: ReadonlyArray; @@ -3195,9 +3325,23 @@ export type CampaignControllerGetById200 = CampaignDto; export type CampaignControllerUpdateRequestJson = UpdateCampaignDto; export type CampaignControllerUpdate200 = CampaignDto; export type CampaignControllerPause200 = CampaignDto; +export type CampaignControllerPause409 = StakeKitErrorDto; export type CampaignControllerResume200 = CampaignDto; +export type CampaignControllerResume409 = StakeKitErrorDto; +export type CampaignControllerAcknowledgePause200 = CampaignDto; +export type CampaignControllerAcknowledgePause409 = StakeKitErrorDto; export type CampaignControllerEnd200 = CampaignDto; export type CampaignControllerGetSummary200 = CampaignSummaryDto; +export type CampaignControllerGetCampaignBalancesParams = { + readonly offset?: number; + readonly limit?: number; + readonly address?: string; + readonly qualified?: boolean; + readonly sortField?: CampaignBalanceSortField; + readonly sortDirection?: "asc" | "desc"; +}; +export type CampaignControllerGetCampaignBalances200 = + CampaignBalancesResponseDto; export type CampaignControllerGetLiability200 = CampaignLiabilityDto; export type CampaignControllerGetBudgetProjectionParams = { readonly totalBudget?: string; @@ -3213,6 +3357,7 @@ export type CampaignControllerGetUserEntitlement200 = export type CampaignControllerGetPayoutRunsParams = { readonly offset?: number; readonly limit?: number; + readonly status?: CampaignPayoutRunStatus; }; export type CampaignControllerGetPayoutRuns200 = PaginatedCampaignPayoutRunDto; export type CampaignControllerGetPayoutRunDetail200 = @@ -3232,8 +3377,56 @@ export type CampaignControllerGetWeeklyDistribution200 = export type CampaignControllerGetEligibleUsersParams = { readonly offset?: number; readonly limit?: number; + readonly minTotalEarned?: string; + readonly sortField?: EligibleUserSortField; + readonly sortDirection?: "asc" | "desc"; }; export type CampaignControllerGetEligibleUsers200 = PaginatedEligibleUserDto; +export type CampaignControllerGetBlacklistedUsersParams = { + readonly offset?: number; + readonly limit?: number; +}; +export type CampaignControllerGetBlacklistedUsers200 = + PaginatedCampaignUserPayoutEligibilityDto; +export type CampaignControllerGetAccrualDetailsParams = { + readonly offset?: number; + readonly limit?: number; + readonly runId?: string; +}; +export type CampaignControllerGetAccrualDetails200 = + PaginatedHourlyAccrualSummaryDto; +export type CampaignControllerGetAccrualDetailForHourParams = { + readonly offset?: number; + readonly limit?: number; + readonly address?: string; + readonly qualified?: boolean; + readonly sortField?: AccrualHourSortField; + readonly sortDirection?: "asc" | "desc"; +}; +export type CampaignControllerGetAccrualDetailForHour200 = + HourlyAccrualDetailDto; +export type CampaignControllerGetUserAccrualHistoryParams = { + readonly offset?: number; + readonly limit?: number; +}; +export type CampaignControllerGetUserAccrualHistory200 = + PaginatedUserHourlyAccrualHistoryDto; +export type CampaignControllerGetSafeBalance200 = CampaignSafeBalanceDto; +export type CampaignControllerGetPayoutEligibilitySummary200 = + CampaignPayoutEligibilitySummaryDto; +export type CampaignControllerGetBlacklistedAddressesParams = { + readonly offset?: number; + readonly limit?: number; +}; +export type CampaignControllerGetBlacklistedAddresses200 = + PaginatedBlacklistedAddressDto; +export type CampaignControllerGetAuditHistoryParams = { + readonly offset?: number; + readonly limit?: number; + readonly address?: string; + readonly type?: CampaignAuditLogType; +}; +export type CampaignControllerGetAuditHistory200 = PaginatedCampaignAuditLogDto; export type CampaignConfigurationRequestControllerListForProjectParams = { readonly status?: CampaignConfigurationRequestStatus; readonly requestType?: CampaignConfigurationRequestType; @@ -3273,6 +3466,21 @@ export type CampaignConfigurationRequestAdminControllerListParams = { }; export type CampaignConfigurationRequestAdminControllerList200 = PaginatedCampaignConfigurationRequestDto; +export type CampaignAdminControllerListParams = { + readonly status?: CampaignStatus; + readonly projectId?: string; + readonly integrationId?: string; + readonly rewardMode?: CampaignRewardMode; + readonly startTimeFrom?: string; + readonly startTimeTo?: string; + readonly endTimeFrom?: string; + readonly endTimeTo?: string; + readonly sort?: CampaignAdminSortingOption; + readonly offset?: number; + readonly limit?: number; +}; +export type CampaignAdminControllerList200 = PaginatedAdminCampaignDto; +export type CampaignAdminControllerGetById200 = AdminCampaignDto; export type ProgrammaticCampaignControllerListCampaignsParams = { readonly offset?: number; readonly limit?: number; @@ -3293,6 +3501,10 @@ export type ProgrammaticCampaignControllerGetAccrualDetails200 = export type ProgrammaticCampaignControllerGetAccrualDetailForHourParams = { readonly offset?: number; readonly limit?: number; + readonly address?: string; + readonly qualified?: boolean; + readonly sortField?: AccrualHourSortField; + readonly sortDirection?: "asc" | "desc"; readonly "X-ADMIN-API-KEY": string; }; export type ProgrammaticCampaignControllerGetAccrualDetailForHour200 = @@ -3307,10 +3519,11 @@ export type ProgrammaticCampaignControllerGetUserAccrualHistory200 = export type ProgrammaticCampaignControllerGetPayoutRunsParams = { readonly offset?: number; readonly limit?: number; + readonly status?: CampaignPayoutRunStatus; readonly "X-ADMIN-API-KEY": string; }; export type ProgrammaticCampaignControllerGetPayoutRuns200 = - PaginatedProgrammaticPayoutRunDto; + PaginatedCampaignPayoutRunDto; export type ProgrammaticCampaignControllerGetPayoutRunDetailParams = { readonly offset?: number; readonly limit?: number; @@ -3337,6 +3550,10 @@ export type ProgrammaticCampaignControllerGetCampaignPayoutEligibilitySummary200 export type ProgrammaticCampaignControllerGetCampaignBalancesParams = { readonly offset?: number; readonly limit?: number; + readonly address?: string; + readonly qualified?: boolean; + readonly sortField?: CampaignBalanceSortField; + readonly sortDirection?: "asc" | "desc"; readonly "X-ADMIN-API-KEY": string; }; export type ProgrammaticCampaignControllerGetCampaignBalances200 = @@ -3482,6 +3699,7 @@ export type HealthControllerHealthV2400 = StakeKitErrorDto; export type HealthControllerHealthV2401 = StakeKitErrorDto; export type HealthControllerHealthV2404 = StakeKitErrorDto; export type HealthControllerHealthV2408 = StakeKitErrorDto; +export type HealthControllerHealthV2409 = StakeKitErrorDto; export type HealthControllerHealthV2410 = StakeKitErrorDto; export type HealthControllerHealthV2412 = StakeKitErrorDto; export type HealthControllerHealthV2429 = StakeKitErrorDto; @@ -3834,6 +4052,7 @@ export type ActionControllerGetAction400 = StakeKitErrorDto; export type ActionControllerGetAction401 = StakeKitErrorDto; export type ActionControllerGetAction404 = StakeKitErrorDto; export type ActionControllerGetAction408 = StakeKitErrorDto; +export type ActionControllerGetAction409 = StakeKitErrorDto; export type ActionControllerGetAction410 = StakeKitErrorDto; export type ActionControllerGetAction412 = StakeKitErrorDto; export type ActionControllerGetAction429 = StakeKitErrorDto; @@ -3847,6 +4066,7 @@ export type ActionControllerGetGasEstimate400 = StakeKitErrorDto; export type ActionControllerGetGasEstimate401 = StakeKitErrorDto; export type ActionControllerGetGasEstimate404 = StakeKitErrorDto; export type ActionControllerGetGasEstimate408 = StakeKitErrorDto; +export type ActionControllerGetGasEstimate409 = StakeKitErrorDto; export type ActionControllerGetGasEstimate410 = StakeKitErrorDto; export type ActionControllerGetGasEstimate412 = StakeKitErrorDto; export type ActionControllerGetGasEstimate429 = StakeKitErrorDto; @@ -3860,6 +4080,7 @@ export type ActionControllerEnter401 = StakeKitErrorDto; export type ActionControllerEnter403 = GeolocationError; export type ActionControllerEnter404 = StakeKitErrorDto; export type ActionControllerEnter408 = StakeKitErrorDto; +export type ActionControllerEnter409 = StakeKitErrorDto; export type ActionControllerEnter410 = StakeKitErrorDto; export type ActionControllerEnter412 = StakeKitErrorDto; export type ActionControllerEnter429 = StakeKitErrorDto; @@ -3873,6 +4094,7 @@ export type ActionControllerExit401 = StakeKitErrorDto; export type ActionControllerExit403 = GeolocationError; export type ActionControllerExit404 = StakeKitErrorDto; export type ActionControllerExit408 = StakeKitErrorDto; +export type ActionControllerExit409 = StakeKitErrorDto; export type ActionControllerExit410 = StakeKitErrorDto; export type ActionControllerExit412 = StakeKitErrorDto; export type ActionControllerExit429 = StakeKitErrorDto; @@ -3886,6 +4108,7 @@ export type ActionControllerPending401 = StakeKitErrorDto; export type ActionControllerPending403 = GeolocationError; export type ActionControllerPending404 = StakeKitErrorDto; export type ActionControllerPending408 = StakeKitErrorDto; +export type ActionControllerPending409 = StakeKitErrorDto; export type ActionControllerPending410 = StakeKitErrorDto; export type ActionControllerPending412 = StakeKitErrorDto; export type ActionControllerPending429 = StakeKitErrorDto; @@ -3901,6 +4124,7 @@ export type ActionControllerEnterGasEstimation400 = StakeKitErrorDto; export type ActionControllerEnterGasEstimation401 = StakeKitErrorDto; export type ActionControllerEnterGasEstimation404 = StakeKitErrorDto; export type ActionControllerEnterGasEstimation408 = StakeKitErrorDto; +export type ActionControllerEnterGasEstimation409 = StakeKitErrorDto; export type ActionControllerEnterGasEstimation410 = StakeKitErrorDto; export type ActionControllerEnterGasEstimation412 = StakeKitErrorDto; export type ActionControllerEnterGasEstimation429 = StakeKitErrorDto; @@ -3916,6 +4140,7 @@ export type ActionControllerExitGasEstimate400 = StakeKitErrorDto; export type ActionControllerExitGasEstimate401 = StakeKitErrorDto; export type ActionControllerExitGasEstimate404 = StakeKitErrorDto; export type ActionControllerExitGasEstimate408 = StakeKitErrorDto; +export type ActionControllerExitGasEstimate409 = StakeKitErrorDto; export type ActionControllerExitGasEstimate410 = StakeKitErrorDto; export type ActionControllerExitGasEstimate412 = StakeKitErrorDto; export type ActionControllerExitGasEstimate429 = StakeKitErrorDto; @@ -3995,6 +4220,7 @@ export type ActionControllerList400 = StakeKitErrorDto; export type ActionControllerList401 = StakeKitErrorDto; export type ActionControllerList404 = StakeKitErrorDto; export type ActionControllerList408 = StakeKitErrorDto; +export type ActionControllerList409 = StakeKitErrorDto; export type ActionControllerList410 = StakeKitErrorDto; export type ActionControllerList412 = StakeKitErrorDto; export type ActionControllerList429 = StakeKitErrorDto; @@ -4010,6 +4236,7 @@ export type ActionControllerPendingGasEstimate400 = StakeKitErrorDto; export type ActionControllerPendingGasEstimate401 = StakeKitErrorDto; export type ActionControllerPendingGasEstimate404 = StakeKitErrorDto; export type ActionControllerPendingGasEstimate408 = StakeKitErrorDto; +export type ActionControllerPendingGasEstimate409 = StakeKitErrorDto; export type ActionControllerPendingGasEstimate410 = StakeKitErrorDto; export type ActionControllerPendingGasEstimate412 = StakeKitErrorDto; export type ActionControllerPendingGasEstimate429 = StakeKitErrorDto; @@ -4036,6 +4263,7 @@ export type TransactionControllerGetTransaction400 = StakeKitErrorDto; export type TransactionControllerGetTransaction401 = StakeKitErrorDto; export type TransactionControllerGetTransaction404 = StakeKitErrorDto; export type TransactionControllerGetTransaction408 = StakeKitErrorDto; +export type TransactionControllerGetTransaction409 = StakeKitErrorDto; export type TransactionControllerGetTransaction410 = StakeKitErrorDto; export type TransactionControllerGetTransaction412 = StakeKitErrorDto; export type TransactionControllerGetTransaction429 = StakeKitErrorDto; @@ -4052,6 +4280,7 @@ export type TransactionControllerConstruct401 = StakeKitErrorDto; export type TransactionControllerConstruct403 = GeolocationError; export type TransactionControllerConstruct404 = StakeKitErrorDto; export type TransactionControllerConstruct408 = StakeKitErrorDto; +export type TransactionControllerConstruct409 = StakeKitErrorDto; export type TransactionControllerConstruct410 = StakeKitErrorDto; export type TransactionControllerConstruct412 = StakeKitErrorDto; export type TransactionControllerConstruct429 = StakeKitErrorDto; @@ -4067,6 +4296,7 @@ export type TransactionControllerSubmit401 = StakeKitErrorDto; export type TransactionControllerSubmit403 = GeolocationError; export type TransactionControllerSubmit404 = StakeKitErrorDto; export type TransactionControllerSubmit408 = StakeKitErrorDto; +export type TransactionControllerSubmit409 = StakeKitErrorDto; export type TransactionControllerSubmit410 = StakeKitErrorDto; export type TransactionControllerSubmit412 = StakeKitErrorDto; export type TransactionControllerSubmit429 = StakeKitErrorDto; @@ -4081,6 +4311,7 @@ export type TransactionControllerSubmitHash401 = StakeKitErrorDto; export type TransactionControllerSubmitHash403 = GeolocationError; export type TransactionControllerSubmitHash404 = StakeKitErrorDto; export type TransactionControllerSubmitHash408 = StakeKitErrorDto; +export type TransactionControllerSubmitHash409 = StakeKitErrorDto; export type TransactionControllerSubmitHash410 = StakeKitErrorDto; export type TransactionControllerSubmitHash412 = StakeKitErrorDto; export type TransactionControllerSubmitHash429 = StakeKitErrorDto; @@ -4099,6 +4330,8 @@ export type TransactionControllerGetTransactionStatusFromId404 = StakeKitErrorDto; export type TransactionControllerGetTransactionStatusFromId408 = StakeKitErrorDto; +export type TransactionControllerGetTransactionStatusFromId409 = + StakeKitErrorDto; export type TransactionControllerGetTransactionStatusFromId410 = StakeKitErrorDto; export type TransactionControllerGetTransactionStatusFromId412 = @@ -4117,6 +4350,7 @@ export type TransactionControllerGetGasForNetwork400 = StakeKitErrorDto; export type TransactionControllerGetGasForNetwork401 = StakeKitErrorDto; export type TransactionControllerGetGasForNetwork404 = StakeKitErrorDto; export type TransactionControllerGetGasForNetwork408 = StakeKitErrorDto; +export type TransactionControllerGetGasForNetwork409 = StakeKitErrorDto; export type TransactionControllerGetGasForNetwork410 = StakeKitErrorDto; export type TransactionControllerGetGasForNetwork412 = StakeKitErrorDto; export type TransactionControllerGetGasForNetwork429 = StakeKitErrorDto; @@ -4135,6 +4369,8 @@ export type TransactionControllerGetTransactionStatusByNetworkAndHash404 = StakeKitErrorDto; export type TransactionControllerGetTransactionStatusByNetworkAndHash408 = StakeKitErrorDto; +export type TransactionControllerGetTransactionStatusByNetworkAndHash409 = + StakeKitErrorDto; export type TransactionControllerGetTransactionStatusByNetworkAndHash410 = StakeKitErrorDto; export type TransactionControllerGetTransactionStatusByNetworkAndHash412 = @@ -4161,6 +4397,8 @@ export type TransactionControllerGetTransactionVerificationMessageForNetwork404 StakeKitErrorDto; export type TransactionControllerGetTransactionVerificationMessageForNetwork408 = StakeKitErrorDto; +export type TransactionControllerGetTransactionVerificationMessageForNetwork409 = + StakeKitErrorDto; export type TransactionControllerGetTransactionVerificationMessageForNetwork410 = StakeKitErrorDto; export type TransactionControllerGetTransactionVerificationMessageForNetwork412 = @@ -4184,6 +4422,8 @@ export type NetworkAddressesTokenV2ControllerGetTokenBalances404 = StakeKitErrorDto; export type NetworkAddressesTokenV2ControllerGetTokenBalances408 = StakeKitErrorDto; +export type NetworkAddressesTokenV2ControllerGetTokenBalances409 = + StakeKitErrorDto; export type NetworkAddressesTokenV2ControllerGetTokenBalances410 = StakeKitErrorDto; export type NetworkAddressesTokenV2ControllerGetTokenBalances412 = @@ -4204,6 +4444,7 @@ export type NetworkTokensV2ControllerGetTokens400 = StakeKitErrorDto; export type NetworkTokensV2ControllerGetTokens401 = StakeKitErrorDto; export type NetworkTokensV2ControllerGetTokens404 = StakeKitErrorDto; export type NetworkTokensV2ControllerGetTokens408 = StakeKitErrorDto; +export type NetworkTokensV2ControllerGetTokens409 = StakeKitErrorDto; export type NetworkTokensV2ControllerGetTokens410 = StakeKitErrorDto; export type NetworkTokensV2ControllerGetTokens412 = StakeKitErrorDto; export type NetworkTokensV2ControllerGetTokens429 = StakeKitErrorDto; @@ -4220,6 +4461,7 @@ export type TokenControllerGetTokens400 = StakeKitErrorDto; export type TokenControllerGetTokens401 = StakeKitErrorDto; export type TokenControllerGetTokens404 = StakeKitErrorDto; export type TokenControllerGetTokens408 = StakeKitErrorDto; +export type TokenControllerGetTokens409 = StakeKitErrorDto; export type TokenControllerGetTokens410 = StakeKitErrorDto; export type TokenControllerGetTokens412 = StakeKitErrorDto; export type TokenControllerGetTokens429 = StakeKitErrorDto; @@ -4234,6 +4476,7 @@ export type TokenControllerGetTokenPrices400 = StakeKitErrorDto; export type TokenControllerGetTokenPrices401 = StakeKitErrorDto; export type TokenControllerGetTokenPrices404 = StakeKitErrorDto; export type TokenControllerGetTokenPrices408 = StakeKitErrorDto; +export type TokenControllerGetTokenPrices409 = StakeKitErrorDto; export type TokenControllerGetTokenPrices410 = StakeKitErrorDto; export type TokenControllerGetTokenPrices412 = StakeKitErrorDto; export type TokenControllerGetTokenPrices429 = StakeKitErrorDto; @@ -4249,6 +4492,7 @@ export type TokenControllerGetTokenBalances400 = StakeKitErrorDto; export type TokenControllerGetTokenBalances401 = StakeKitErrorDto; export type TokenControllerGetTokenBalances404 = StakeKitErrorDto; export type TokenControllerGetTokenBalances408 = StakeKitErrorDto; +export type TokenControllerGetTokenBalances409 = StakeKitErrorDto; export type TokenControllerGetTokenBalances410 = StakeKitErrorDto; export type TokenControllerGetTokenBalances412 = StakeKitErrorDto; export type TokenControllerGetTokenBalances429 = StakeKitErrorDto; @@ -4264,6 +4508,7 @@ export type TokenControllerTokenBalancesScan400 = StakeKitErrorDto; export type TokenControllerTokenBalancesScan401 = StakeKitErrorDto; export type TokenControllerTokenBalancesScan404 = StakeKitErrorDto; export type TokenControllerTokenBalancesScan408 = StakeKitErrorDto; +export type TokenControllerTokenBalancesScan409 = StakeKitErrorDto; export type TokenControllerTokenBalancesScan410 = StakeKitErrorDto; export type TokenControllerTokenBalancesScan412 = StakeKitErrorDto; export type TokenControllerTokenBalancesScan429 = StakeKitErrorDto; @@ -4332,6 +4577,7 @@ export type OAVControllerFindAllTokens400 = StakeKitErrorDto; export type OAVControllerFindAllTokens401 = StakeKitErrorDto; export type OAVControllerFindAllTokens404 = StakeKitErrorDto; export type OAVControllerFindAllTokens408 = StakeKitErrorDto; +export type OAVControllerFindAllTokens409 = StakeKitErrorDto; export type OAVControllerFindAllTokens410 = StakeKitErrorDto; export type OAVControllerFindAllTokens412 = StakeKitErrorDto; export type OAVControllerFindAllTokens429 = StakeKitErrorDto; @@ -4344,6 +4590,7 @@ export type OAVControllerFindYieldsByToken200 = ReadonlyArray; export type OAVControllerFindYieldsByToken400 = StakeKitErrorDto; export type OAVControllerFindYieldsByToken401 = StakeKitErrorDto; export type OAVControllerFindYieldsByToken408 = StakeKitErrorDto; +export type OAVControllerFindYieldsByToken409 = StakeKitErrorDto; export type OAVControllerFindYieldsByToken410 = StakeKitErrorDto; export type OAVControllerFindYieldsByToken412 = StakeKitErrorDto; export type OAVControllerFindYieldsByToken429 = StakeKitErrorDto; @@ -4355,6 +4602,7 @@ export type OAVControllerFindAll400 = StakeKitErrorDto; export type OAVControllerFindAll401 = StakeKitErrorDto; export type OAVControllerFindAll404 = StakeKitErrorDto; export type OAVControllerFindAll408 = StakeKitErrorDto; +export type OAVControllerFindAll409 = StakeKitErrorDto; export type OAVControllerFindAll410 = StakeKitErrorDto; export type OAVControllerFindAll412 = StakeKitErrorDto; export type OAVControllerFindAll429 = StakeKitErrorDto; @@ -4365,6 +4613,7 @@ export type OAVControllerCreate201 = OAVResponseDto; export type OAVControllerCreate401 = StakeKitErrorDto; export type OAVControllerCreate404 = StakeKitErrorDto; export type OAVControllerCreate408 = StakeKitErrorDto; +export type OAVControllerCreate409 = StakeKitErrorDto; export type OAVControllerCreate410 = StakeKitErrorDto; export type OAVControllerCreate412 = StakeKitErrorDto; export type OAVControllerCreate429 = StakeKitErrorDto; @@ -4373,6 +4622,7 @@ export type OAVControllerCreate503 = StakeKitErrorDto; export type OAVControllerRemove400 = StakeKitErrorDto; export type OAVControllerRemove401 = StakeKitErrorDto; export type OAVControllerRemove408 = StakeKitErrorDto; +export type OAVControllerRemove409 = StakeKitErrorDto; export type OAVControllerRemove410 = StakeKitErrorDto; export type OAVControllerRemove412 = StakeKitErrorDto; export type OAVControllerRemove429 = StakeKitErrorDto; @@ -4382,6 +4632,7 @@ export type OAVControllerUpdateRequestJson = UpdateOAVDto; export type OAVControllerUpdate200 = OAVResponseDto; export type OAVControllerUpdate401 = StakeKitErrorDto; export type OAVControllerUpdate408 = StakeKitErrorDto; +export type OAVControllerUpdate409 = StakeKitErrorDto; export type OAVControllerUpdate410 = StakeKitErrorDto; export type OAVControllerUpdate412 = StakeKitErrorDto; export type OAVControllerUpdate429 = StakeKitErrorDto; @@ -4446,6 +4697,7 @@ export type YieldControllerYields400 = StakeKitErrorDto; export type YieldControllerYields401 = StakeKitErrorDto; export type YieldControllerYields404 = StakeKitErrorDto; export type YieldControllerYields408 = StakeKitErrorDto; +export type YieldControllerYields409 = StakeKitErrorDto; export type YieldControllerYields410 = StakeKitErrorDto; export type YieldControllerYields412 = StakeKitErrorDto; export type YieldControllerYields429 = StakeKitErrorDto; @@ -4462,6 +4714,7 @@ export type YieldControllerGetMultipleYieldBalances400 = StakeKitErrorDto; export type YieldControllerGetMultipleYieldBalances401 = StakeKitErrorDto; export type YieldControllerGetMultipleYieldBalances404 = StakeKitErrorDto; export type YieldControllerGetMultipleYieldBalances408 = StakeKitErrorDto; +export type YieldControllerGetMultipleYieldBalances409 = StakeKitErrorDto; export type YieldControllerGetMultipleYieldBalances410 = StakeKitErrorDto; export type YieldControllerGetMultipleYieldBalances412 = StakeKitErrorDto; export type YieldControllerGetMultipleYieldBalances429 = StakeKitErrorDto; @@ -4478,6 +4731,7 @@ export type YieldControllerYieldBalancesScan400 = StakeKitErrorDto; export type YieldControllerYieldBalancesScan401 = StakeKitErrorDto; export type YieldControllerYieldBalancesScan404 = StakeKitErrorDto; export type YieldControllerYieldBalancesScan408 = StakeKitErrorDto; +export type YieldControllerYieldBalancesScan409 = StakeKitErrorDto; export type YieldControllerYieldBalancesScan410 = StakeKitErrorDto; export type YieldControllerYieldBalancesScan412 = StakeKitErrorDto; export type YieldControllerYieldBalancesScan429 = StakeKitErrorDto; @@ -4494,6 +4748,7 @@ export type YieldControllerYieldBalancesScanEvm400 = StakeKitErrorDto; export type YieldControllerYieldBalancesScanEvm401 = StakeKitErrorDto; export type YieldControllerYieldBalancesScanEvm404 = StakeKitErrorDto; export type YieldControllerYieldBalancesScanEvm408 = StakeKitErrorDto; +export type YieldControllerYieldBalancesScanEvm409 = StakeKitErrorDto; export type YieldControllerYieldBalancesScanEvm410 = StakeKitErrorDto; export type YieldControllerYieldBalancesScanEvm412 = StakeKitErrorDto; export type YieldControllerYieldBalancesScanEvm429 = StakeKitErrorDto; @@ -4550,6 +4805,7 @@ export type YieldControllerGetMyYields400 = StakeKitErrorDto; export type YieldControllerGetMyYields401 = StakeKitErrorDto; export type YieldControllerGetMyYields404 = StakeKitErrorDto; export type YieldControllerGetMyYields408 = StakeKitErrorDto; +export type YieldControllerGetMyYields409 = StakeKitErrorDto; export type YieldControllerGetMyYields410 = StakeKitErrorDto; export type YieldControllerGetMyYields412 = StakeKitErrorDto; export type YieldControllerGetMyYields429 = StakeKitErrorDto; @@ -4562,6 +4818,7 @@ export type YieldControllerGetMyNetworks400 = StakeKitErrorDto; export type YieldControllerGetMyNetworks401 = StakeKitErrorDto; export type YieldControllerGetMyNetworks404 = StakeKitErrorDto; export type YieldControllerGetMyNetworks408 = StakeKitErrorDto; +export type YieldControllerGetMyNetworks409 = StakeKitErrorDto; export type YieldControllerGetMyNetworks410 = StakeKitErrorDto; export type YieldControllerGetMyNetworks412 = StakeKitErrorDto; export type YieldControllerGetMyNetworks429 = StakeKitErrorDto; @@ -4580,6 +4837,7 @@ export type YieldControllerFindValidators400 = StakeKitErrorDto; export type YieldControllerFindValidators401 = StakeKitErrorDto; export type YieldControllerFindValidators404 = StakeKitErrorDto; export type YieldControllerFindValidators408 = StakeKitErrorDto; +export type YieldControllerFindValidators409 = StakeKitErrorDto; export type YieldControllerFindValidators410 = StakeKitErrorDto; export type YieldControllerFindValidators412 = StakeKitErrorDto; export type YieldControllerFindValidators429 = StakeKitErrorDto; @@ -4595,6 +4853,7 @@ export type YieldControllerYieldOpportunity400 = StakeKitErrorDto; export type YieldControllerYieldOpportunity401 = StakeKitErrorDto; export type YieldControllerYieldOpportunity404 = StakeKitErrorDto; export type YieldControllerYieldOpportunity408 = StakeKitErrorDto; +export type YieldControllerYieldOpportunity409 = StakeKitErrorDto; export type YieldControllerYieldOpportunity410 = StakeKitErrorDto; export type YieldControllerYieldOpportunity412 = StakeKitErrorDto; export type YieldControllerYieldOpportunity429 = StakeKitErrorDto; @@ -4610,6 +4869,7 @@ export type YieldControllerGetValidators400 = StakeKitErrorDto; export type YieldControllerGetValidators401 = StakeKitErrorDto; export type YieldControllerGetValidators404 = StakeKitErrorDto; export type YieldControllerGetValidators408 = StakeKitErrorDto; +export type YieldControllerGetValidators409 = StakeKitErrorDto; export type YieldControllerGetValidators410 = StakeKitErrorDto; export type YieldControllerGetValidators412 = StakeKitErrorDto; export type YieldControllerGetValidators429 = StakeKitErrorDto; @@ -4627,12 +4887,33 @@ export type YieldControllerGetSingleYieldBalances400 = StakeKitErrorDto; export type YieldControllerGetSingleYieldBalances401 = StakeKitErrorDto; export type YieldControllerGetSingleYieldBalances404 = StakeKitErrorDto; export type YieldControllerGetSingleYieldBalances408 = StakeKitErrorDto; +export type YieldControllerGetSingleYieldBalances409 = StakeKitErrorDto; export type YieldControllerGetSingleYieldBalances410 = StakeKitErrorDto; export type YieldControllerGetSingleYieldBalances412 = StakeKitErrorDto; export type YieldControllerGetSingleYieldBalances429 = StakeKitErrorDto; export type YieldControllerGetSingleYieldBalances500 = StakeKitErrorDto; export type YieldControllerGetSingleYieldBalances503 = StakeKitErrorDto; -export type YieldControllerGetSingleYieldRewardsSummaryParams = { +export type YieldControllerGetBalanceTransferEventsParams = { + readonly address: string; + readonly sort?: "asc" | "desc"; + readonly limit?: number; + readonly offset?: number; + readonly feeConfigurationId?: string; + readonly "X-API-KEY"?: string; +}; +export type YieldControllerGetBalanceTransferEvents200 = + PaginatedBalanceTransferEventDto; +export type YieldControllerGetBalanceTransferEvents400 = StakeKitErrorDto; +export type YieldControllerGetBalanceTransferEvents401 = StakeKitErrorDto; +export type YieldControllerGetBalanceTransferEvents404 = StakeKitErrorDto; +export type YieldControllerGetBalanceTransferEvents408 = StakeKitErrorDto; +export type YieldControllerGetBalanceTransferEvents409 = StakeKitErrorDto; +export type YieldControllerGetBalanceTransferEvents410 = StakeKitErrorDto; +export type YieldControllerGetBalanceTransferEvents412 = StakeKitErrorDto; +export type YieldControllerGetBalanceTransferEvents429 = StakeKitErrorDto; +export type YieldControllerGetBalanceTransferEvents500 = StakeKitErrorDto; +export type YieldControllerGetBalanceTransferEvents503 = StakeKitErrorDto; +export type YieldControllerGetSingleYieldRewardsSummaryParams = { readonly "X-API-KEY"?: string; }; export type YieldControllerGetSingleYieldRewardsSummaryRequestJson = @@ -4643,6 +4924,7 @@ export type YieldControllerGetSingleYieldRewardsSummary400 = StakeKitErrorDto; export type YieldControllerGetSingleYieldRewardsSummary401 = StakeKitErrorDto; export type YieldControllerGetSingleYieldRewardsSummary404 = StakeKitErrorDto; export type YieldControllerGetSingleYieldRewardsSummary408 = StakeKitErrorDto; +export type YieldControllerGetSingleYieldRewardsSummary409 = StakeKitErrorDto; export type YieldControllerGetSingleYieldRewardsSummary410 = StakeKitErrorDto; export type YieldControllerGetSingleYieldRewardsSummary412 = StakeKitErrorDto; export type YieldControllerGetSingleYieldRewardsSummary429 = StakeKitErrorDto; @@ -4652,6 +4934,7 @@ export type YieldControllerGetFeeConfiguration200 = FeeConfigurationDto; export type YieldControllerGetFeeConfiguration400 = StakeKitErrorDto; export type YieldControllerGetFeeConfiguration401 = StakeKitErrorDto; export type YieldControllerGetFeeConfiguration408 = StakeKitErrorDto; +export type YieldControllerGetFeeConfiguration409 = StakeKitErrorDto; export type YieldControllerGetFeeConfiguration410 = StakeKitErrorDto; export type YieldControllerGetFeeConfiguration412 = StakeKitErrorDto; export type YieldControllerGetFeeConfiguration429 = StakeKitErrorDto; @@ -4667,6 +4950,7 @@ export type YieldControllerCreateFeeConfiguration400 = StakeKitErrorDto; export type YieldControllerCreateFeeConfiguration401 = StakeKitErrorDto; export type YieldControllerCreateFeeConfiguration404 = StakeKitErrorDto; export type YieldControllerCreateFeeConfiguration408 = StakeKitErrorDto; +export type YieldControllerCreateFeeConfiguration409 = StakeKitErrorDto; export type YieldControllerCreateFeeConfiguration410 = StakeKitErrorDto; export type YieldControllerCreateFeeConfiguration412 = StakeKitErrorDto; export type YieldControllerCreateFeeConfiguration429 = StakeKitErrorDto; @@ -4679,6 +4963,7 @@ export type YieldV2ControllerYieldsParams = { | "benqi" | "compound" | "lido" + | "marinade" | "sushi" | "yearn" | "ape" @@ -4887,6 +5172,7 @@ export type YieldV2ControllerYields400 = StakeKitErrorDto; export type YieldV2ControllerYields401 = StakeKitErrorDto; export type YieldV2ControllerYields404 = StakeKitErrorDto; export type YieldV2ControllerYields408 = StakeKitErrorDto; +export type YieldV2ControllerYields409 = StakeKitErrorDto; export type YieldV2ControllerYields410 = StakeKitErrorDto; export type YieldV2ControllerYields412 = StakeKitErrorDto; export type YieldV2ControllerYields429 = StakeKitErrorDto; @@ -4900,6 +5186,7 @@ export type YieldV2ControllerGetYieldById400 = StakeKitErrorDto; export type YieldV2ControllerGetYieldById401 = StakeKitErrorDto; export type YieldV2ControllerGetYieldById404 = StakeKitErrorDto; export type YieldV2ControllerGetYieldById408 = StakeKitErrorDto; +export type YieldV2ControllerGetYieldById409 = StakeKitErrorDto; export type YieldV2ControllerGetYieldById410 = StakeKitErrorDto; export type YieldV2ControllerGetYieldById412 = StakeKitErrorDto; export type YieldV2ControllerGetYieldById429 = StakeKitErrorDto; @@ -4917,6 +5204,7 @@ export type YieldV2ControllerFindYieldValidators400 = StakeKitErrorDto; export type YieldV2ControllerFindYieldValidators401 = StakeKitErrorDto; export type YieldV2ControllerFindYieldValidators404 = StakeKitErrorDto; export type YieldV2ControllerFindYieldValidators408 = StakeKitErrorDto; +export type YieldV2ControllerFindYieldValidators409 = StakeKitErrorDto; export type YieldV2ControllerFindYieldValidators410 = StakeKitErrorDto; export type YieldV2ControllerFindYieldValidators412 = StakeKitErrorDto; export type YieldV2ControllerFindYieldValidators429 = StakeKitErrorDto; @@ -4935,6 +5223,7 @@ export type YieldV2ControllerFindValidators400 = StakeKitErrorDto; export type YieldV2ControllerFindValidators401 = StakeKitErrorDto; export type YieldV2ControllerFindValidators404 = StakeKitErrorDto; export type YieldV2ControllerFindValidators408 = StakeKitErrorDto; +export type YieldV2ControllerFindValidators409 = StakeKitErrorDto; export type YieldV2ControllerFindValidators410 = StakeKitErrorDto; export type YieldV2ControllerFindValidators412 = StakeKitErrorDto; export type YieldV2ControllerFindValidators429 = StakeKitErrorDto; @@ -4964,6 +5253,7 @@ export type YieldV2ControllerGetFeeConfigurations200 = { export type YieldV2ControllerGetFeeConfigurations400 = StakeKitErrorDto; export type YieldV2ControllerGetFeeConfigurations401 = StakeKitErrorDto; export type YieldV2ControllerGetFeeConfigurations408 = StakeKitErrorDto; +export type YieldV2ControllerGetFeeConfigurations409 = StakeKitErrorDto; export type YieldV2ControllerGetFeeConfigurations410 = StakeKitErrorDto; export type YieldV2ControllerGetFeeConfigurations412 = StakeKitErrorDto; export type YieldV2ControllerGetFeeConfigurations429 = StakeKitErrorDto; @@ -5583,11 +5873,32 @@ export const make = ( CampaignControllerPause: (teamId, projectId, campaignId, options) => HttpClientRequest.post( `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/pause` - ).pipe(onRequest(options?.config)(["2xx"])), + ).pipe( + onRequest(options?.config)(["2xx"], { + "409": "CampaignControllerPause409", + }) + ), CampaignControllerResume: (teamId, projectId, campaignId, options) => HttpClientRequest.post( `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/resume` - ).pipe(onRequest(options?.config)(["2xx"])), + ).pipe( + onRequest(options?.config)(["2xx"], { + "409": "CampaignControllerResume409", + }) + ), + CampaignControllerAcknowledgePause: ( + teamId, + projectId, + campaignId, + options + ) => + HttpClientRequest.post( + `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/acknowledge-pause` + ).pipe( + onRequest(options?.config)(["2xx"], { + "409": "CampaignControllerAcknowledgePause409", + }) + ), CampaignControllerEnd: (teamId, projectId, campaignId, options) => HttpClientRequest.post( `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/end` @@ -5596,6 +5907,25 @@ export const make = ( HttpClientRequest.get( `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/summary` ).pipe(onRequest(options?.config)(["2xx"])), + CampaignControllerGetCampaignBalances: ( + teamId, + projectId, + campaignId, + options + ) => + HttpClientRequest.get( + `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/balances` + ).pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + address: options?.params?.["address"] as any, + qualified: options?.params?.["qualified"] as any, + sortField: options?.params?.["sortField"] as any, + sortDirection: options?.params?.["sortDirection"] as any, + }), + onRequest(options?.config)(["2xx"]) + ), CampaignControllerGetLiability: (teamId, projectId, campaignId, options) => HttpClientRequest.get( `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/liability` @@ -5645,6 +5975,7 @@ export const make = ( HttpClientRequest.setUrlParams({ offset: options?.params?.["offset"] as any, limit: options?.params?.["limit"] as any, + status: options?.params?.["status"] as any, }), onRequest(options?.config)(["2xx"]) ), @@ -5696,6 +6027,109 @@ export const make = ( ) => HttpClientRequest.get( `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/eligible-users` + ).pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + minTotalEarned: options?.params?.["minTotalEarned"] as any, + sortField: options?.params?.["sortField"] as any, + sortDirection: options?.params?.["sortDirection"] as any, + }), + onRequest(options?.config)(["2xx"]) + ), + CampaignControllerGetBlacklistedUsers: ( + teamId, + projectId, + campaignId, + options + ) => + HttpClientRequest.get( + `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/blacklisted-users` + ).pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ), + CampaignControllerGetAccrualDetails: ( + teamId, + projectId, + campaignId, + options + ) => + HttpClientRequest.get( + `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/accrual-details` + ).pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + runId: options?.params?.["runId"] as any, + }), + onRequest(options?.config)(["2xx"]) + ), + CampaignControllerGetAccrualDetailForHour: ( + teamId, + projectId, + campaignId, + hour, + options + ) => + HttpClientRequest.get( + `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/accrual-details/hour/${hour}` + ).pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + address: options?.params?.["address"] as any, + qualified: options?.params?.["qualified"] as any, + sortField: options?.params?.["sortField"] as any, + sortDirection: options?.params?.["sortDirection"] as any, + }), + onRequest(options?.config)(["2xx"]) + ), + CampaignControllerGetUserAccrualHistory: ( + teamId, + projectId, + campaignId, + address, + options + ) => + HttpClientRequest.get( + `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/user-accrual/${address}` + ).pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ), + CampaignControllerGetSafeBalance: ( + teamId, + projectId, + campaignId, + options + ) => + HttpClientRequest.get( + `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/safe-balance` + ).pipe(onRequest(options?.config)(["2xx"])), + CampaignControllerGetPayoutEligibilitySummary: ( + teamId, + projectId, + campaignId, + options + ) => + HttpClientRequest.get( + `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/payout-eligibility/summary` + ).pipe(onRequest(options?.config)(["2xx"])), + CampaignControllerGetBlacklistedAddresses: ( + teamId, + projectId, + campaignId, + options + ) => + HttpClientRequest.get( + `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/blacklisted-addresses` ).pipe( HttpClientRequest.setUrlParams({ offset: options?.params?.["offset"] as any, @@ -5703,6 +6137,23 @@ export const make = ( }), onRequest(options?.config)(["2xx"]) ), + CampaignControllerGetAuditHistory: ( + teamId, + projectId, + campaignId, + options + ) => + HttpClientRequest.get( + `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/audit-history` + ).pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + address: options?.params?.["address"] as any, + type: options?.params?.["type"] as any, + }), + onRequest(options?.config)(["2xx"]) + ), CampaignConfigurationRequestControllerListForProject: ( teamId, projectId, @@ -5791,6 +6242,27 @@ export const make = ( }), onRequest(options?.config)(["2xx"]) ), + CampaignAdminControllerList: (options) => + HttpClientRequest.get(`/v1/admin/campaigns`).pipe( + HttpClientRequest.setUrlParams({ + status: options?.params?.["status"] as any, + projectId: options?.params?.["projectId"] as any, + integrationId: options?.params?.["integrationId"] as any, + rewardMode: options?.params?.["rewardMode"] as any, + startTimeFrom: options?.params?.["startTimeFrom"] as any, + startTimeTo: options?.params?.["startTimeTo"] as any, + endTimeFrom: options?.params?.["endTimeFrom"] as any, + endTimeTo: options?.params?.["endTimeTo"] as any, + sort: options?.params?.["sort"] as any, + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ), + CampaignAdminControllerGetById: (campaignId, options) => + HttpClientRequest.get(`/v1/admin/campaigns/${campaignId}`).pipe( + onRequest(options?.config)(["2xx"]) + ), ProgrammaticCampaignControllerListCampaigns: (projectId, options) => HttpClientRequest.get( `/v1/programmatic/projects/${projectId}/campaigns` @@ -5836,6 +6308,10 @@ export const make = ( HttpClientRequest.setUrlParams({ offset: options.params["offset"] as any, limit: options.params["limit"] as any, + address: options.params["address"] as any, + qualified: options.params["qualified"] as any, + sortField: options.params["sortField"] as any, + sortDirection: options.params["sortDirection"] as any, }), HttpClientRequest.setHeaders({ "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, @@ -5871,6 +6347,7 @@ export const make = ( HttpClientRequest.setUrlParams({ offset: options.params["offset"] as any, limit: options.params["limit"] as any, + status: options.params["status"] as any, }), HttpClientRequest.setHeaders({ "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, @@ -5951,6 +6428,10 @@ export const make = ( HttpClientRequest.setUrlParams({ offset: options.params["offset"] as any, limit: options.params["limit"] as any, + address: options.params["address"] as any, + qualified: options.params["qualified"] as any, + sortField: options.params["sortField"] as any, + sortDirection: options.params["sortDirection"] as any, }), HttpClientRequest.setHeaders({ "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, @@ -6152,6 +6633,7 @@ export const make = ( "401": "HealthControllerHealthV2401", "404": "HealthControllerHealthV2404", "408": "HealthControllerHealthV2408", + "409": "HealthControllerHealthV2409", "410": "HealthControllerHealthV2410", "412": "HealthControllerHealthV2412", "429": "HealthControllerHealthV2429", @@ -6443,6 +6925,7 @@ export const make = ( "401": "ActionControllerGetAction401", "404": "ActionControllerGetAction404", "408": "ActionControllerGetAction408", + "409": "ActionControllerGetAction409", "410": "ActionControllerGetAction410", "412": "ActionControllerGetAction412", "429": "ActionControllerGetAction429", @@ -6460,6 +6943,7 @@ export const make = ( "401": "ActionControllerGetGasEstimate401", "404": "ActionControllerGetGasEstimate404", "408": "ActionControllerGetGasEstimate408", + "409": "ActionControllerGetGasEstimate409", "410": "ActionControllerGetGasEstimate410", "412": "ActionControllerGetGasEstimate412", "429": "ActionControllerGetGasEstimate429", @@ -6479,6 +6963,7 @@ export const make = ( "403": "ActionControllerEnter403", "404": "ActionControllerEnter404", "408": "ActionControllerEnter408", + "409": "ActionControllerEnter409", "410": "ActionControllerEnter410", "412": "ActionControllerEnter412", "429": "ActionControllerEnter429", @@ -6498,6 +6983,7 @@ export const make = ( "403": "ActionControllerExit403", "404": "ActionControllerExit404", "408": "ActionControllerExit408", + "409": "ActionControllerExit409", "410": "ActionControllerExit410", "412": "ActionControllerExit412", "429": "ActionControllerExit429", @@ -6517,6 +7003,7 @@ export const make = ( "403": "ActionControllerPending403", "404": "ActionControllerPending404", "408": "ActionControllerPending408", + "409": "ActionControllerPending409", "410": "ActionControllerPending410", "412": "ActionControllerPending412", "429": "ActionControllerPending429", @@ -6535,6 +7022,7 @@ export const make = ( "401": "ActionControllerEnterGasEstimation401", "404": "ActionControllerEnterGasEstimation404", "408": "ActionControllerEnterGasEstimation408", + "409": "ActionControllerEnterGasEstimation409", "410": "ActionControllerEnterGasEstimation410", "412": "ActionControllerEnterGasEstimation412", "429": "ActionControllerEnterGasEstimation429", @@ -6553,6 +7041,7 @@ export const make = ( "401": "ActionControllerExitGasEstimate401", "404": "ActionControllerExitGasEstimate404", "408": "ActionControllerExitGasEstimate408", + "409": "ActionControllerExitGasEstimate409", "410": "ActionControllerExitGasEstimate410", "412": "ActionControllerExitGasEstimate412", "429": "ActionControllerExitGasEstimate429", @@ -6580,6 +7069,7 @@ export const make = ( "401": "ActionControllerList401", "404": "ActionControllerList404", "408": "ActionControllerList408", + "409": "ActionControllerList409", "410": "ActionControllerList410", "412": "ActionControllerList412", "429": "ActionControllerList429", @@ -6598,6 +7088,7 @@ export const make = ( "401": "ActionControllerPendingGasEstimate401", "404": "ActionControllerPendingGasEstimate404", "408": "ActionControllerPendingGasEstimate408", + "409": "ActionControllerPendingGasEstimate409", "410": "ActionControllerPendingGasEstimate410", "412": "ActionControllerPendingGasEstimate412", "429": "ActionControllerPendingGasEstimate429", @@ -6647,6 +7138,7 @@ export const make = ( "401": "TransactionControllerGetTransaction401", "404": "TransactionControllerGetTransaction404", "408": "TransactionControllerGetTransaction408", + "409": "TransactionControllerGetTransaction409", "410": "TransactionControllerGetTransaction410", "412": "TransactionControllerGetTransaction412", "429": "TransactionControllerGetTransaction429", @@ -6666,6 +7158,7 @@ export const make = ( "403": "TransactionControllerConstruct403", "404": "TransactionControllerConstruct404", "408": "TransactionControllerConstruct408", + "409": "TransactionControllerConstruct409", "410": "TransactionControllerConstruct410", "412": "TransactionControllerConstruct412", "429": "TransactionControllerConstruct429", @@ -6685,6 +7178,7 @@ export const make = ( "403": "TransactionControllerSubmit403", "404": "TransactionControllerSubmit404", "408": "TransactionControllerSubmit408", + "409": "TransactionControllerSubmit409", "410": "TransactionControllerSubmit410", "412": "TransactionControllerSubmit412", "429": "TransactionControllerSubmit429", @@ -6706,6 +7200,7 @@ export const make = ( "403": "TransactionControllerSubmitHash403", "404": "TransactionControllerSubmitHash404", "408": "TransactionControllerSubmitHash408", + "409": "TransactionControllerSubmitHash409", "410": "TransactionControllerSubmitHash410", "412": "TransactionControllerSubmitHash412", "429": "TransactionControllerSubmitHash429", @@ -6723,6 +7218,7 @@ export const make = ( "401": "TransactionControllerGetTransactionStatusFromId401", "404": "TransactionControllerGetTransactionStatusFromId404", "408": "TransactionControllerGetTransactionStatusFromId408", + "409": "TransactionControllerGetTransactionStatusFromId409", "410": "TransactionControllerGetTransactionStatusFromId410", "412": "TransactionControllerGetTransactionStatusFromId412", "429": "TransactionControllerGetTransactionStatusFromId429", @@ -6740,6 +7236,7 @@ export const make = ( "401": "TransactionControllerGetGasForNetwork401", "404": "TransactionControllerGetGasForNetwork404", "408": "TransactionControllerGetGasForNetwork408", + "409": "TransactionControllerGetGasForNetwork409", "410": "TransactionControllerGetGasForNetwork410", "412": "TransactionControllerGetGasForNetwork412", "429": "TransactionControllerGetGasForNetwork429", @@ -6761,6 +7258,7 @@ export const make = ( "401": "TransactionControllerGetTransactionStatusByNetworkAndHash401", "404": "TransactionControllerGetTransactionStatusByNetworkAndHash404", "408": "TransactionControllerGetTransactionStatusByNetworkAndHash408", + "409": "TransactionControllerGetTransactionStatusByNetworkAndHash409", "410": "TransactionControllerGetTransactionStatusByNetworkAndHash410", "412": "TransactionControllerGetTransactionStatusByNetworkAndHash412", "429": "TransactionControllerGetTransactionStatusByNetworkAndHash429", @@ -6788,6 +7286,8 @@ export const make = ( "TransactionControllerGetTransactionVerificationMessageForNetwork404", "408": "TransactionControllerGetTransactionVerificationMessageForNetwork408", + "409": + "TransactionControllerGetTransactionVerificationMessageForNetwork409", "410": "TransactionControllerGetTransactionVerificationMessageForNetwork410", "412": @@ -6816,6 +7316,7 @@ export const make = ( "401": "NetworkAddressesTokenV2ControllerGetTokenBalances401", "404": "NetworkAddressesTokenV2ControllerGetTokenBalances404", "408": "NetworkAddressesTokenV2ControllerGetTokenBalances408", + "409": "NetworkAddressesTokenV2ControllerGetTokenBalances409", "410": "NetworkAddressesTokenV2ControllerGetTokenBalances410", "412": "NetworkAddressesTokenV2ControllerGetTokenBalances412", "429": "NetworkAddressesTokenV2ControllerGetTokenBalances429", @@ -6836,6 +7337,7 @@ export const make = ( "401": "NetworkTokensV2ControllerGetTokens401", "404": "NetworkTokensV2ControllerGetTokens404", "408": "NetworkTokensV2ControllerGetTokens408", + "409": "NetworkTokensV2ControllerGetTokens409", "410": "NetworkTokensV2ControllerGetTokens410", "412": "NetworkTokensV2ControllerGetTokens412", "429": "NetworkTokensV2ControllerGetTokens429", @@ -6857,6 +7359,7 @@ export const make = ( "401": "TokenControllerGetTokens401", "404": "TokenControllerGetTokens404", "408": "TokenControllerGetTokens408", + "409": "TokenControllerGetTokens409", "410": "TokenControllerGetTokens410", "412": "TokenControllerGetTokens412", "429": "TokenControllerGetTokens429", @@ -6875,6 +7378,7 @@ export const make = ( "401": "TokenControllerGetTokenPrices401", "404": "TokenControllerGetTokenPrices404", "408": "TokenControllerGetTokenPrices408", + "409": "TokenControllerGetTokenPrices409", "410": "TokenControllerGetTokenPrices410", "412": "TokenControllerGetTokenPrices412", "429": "TokenControllerGetTokenPrices429", @@ -6893,6 +7397,7 @@ export const make = ( "401": "TokenControllerGetTokenBalances401", "404": "TokenControllerGetTokenBalances404", "408": "TokenControllerGetTokenBalances408", + "409": "TokenControllerGetTokenBalances409", "410": "TokenControllerGetTokenBalances410", "412": "TokenControllerGetTokenBalances412", "429": "TokenControllerGetTokenBalances429", @@ -6911,6 +7416,7 @@ export const make = ( "401": "TokenControllerTokenBalancesScan401", "404": "TokenControllerTokenBalancesScan404", "408": "TokenControllerTokenBalancesScan408", + "409": "TokenControllerTokenBalancesScan409", "410": "TokenControllerTokenBalancesScan410", "412": "TokenControllerTokenBalancesScan412", "429": "TokenControllerTokenBalancesScan429", @@ -7023,6 +7529,7 @@ export const make = ( "401": "OAVControllerFindAllTokens401", "404": "OAVControllerFindAllTokens404", "408": "OAVControllerFindAllTokens408", + "409": "OAVControllerFindAllTokens409", "410": "OAVControllerFindAllTokens410", "412": "OAVControllerFindAllTokens412", "429": "OAVControllerFindAllTokens429", @@ -7041,6 +7548,7 @@ export const make = ( "400": "OAVControllerFindYieldsByToken400", "401": "OAVControllerFindYieldsByToken401", "408": "OAVControllerFindYieldsByToken408", + "409": "OAVControllerFindYieldsByToken409", "410": "OAVControllerFindYieldsByToken410", "412": "OAVControllerFindYieldsByToken412", "429": "OAVControllerFindYieldsByToken429", @@ -7060,6 +7568,7 @@ export const make = ( "401": "OAVControllerFindAll401", "404": "OAVControllerFindAll404", "408": "OAVControllerFindAll408", + "409": "OAVControllerFindAll409", "410": "OAVControllerFindAll410", "412": "OAVControllerFindAll412", "429": "OAVControllerFindAll429", @@ -7076,6 +7585,7 @@ export const make = ( "401": "OAVControllerCreate401", "404": "OAVControllerCreate404", "408": "OAVControllerCreate408", + "409": "OAVControllerCreate409", "410": "OAVControllerCreate410", "412": "OAVControllerCreate412", "429": "OAVControllerCreate429", @@ -7091,6 +7601,7 @@ export const make = ( "400": "OAVControllerRemove400", "401": "OAVControllerRemove401", "408": "OAVControllerRemove408", + "409": "OAVControllerRemove409", "410": "OAVControllerRemove410", "412": "OAVControllerRemove412", "429": "OAVControllerRemove429", @@ -7106,6 +7617,7 @@ export const make = ( onRequest(options.config)(["2xx"], { "401": "OAVControllerUpdate401", "408": "OAVControllerUpdate408", + "409": "OAVControllerUpdate409", "410": "OAVControllerUpdate410", "412": "OAVControllerUpdate412", "429": "OAVControllerUpdate429", @@ -7154,6 +7666,7 @@ export const make = ( "401": "YieldControllerYields401", "404": "YieldControllerYields404", "408": "YieldControllerYields408", + "409": "YieldControllerYields409", "410": "YieldControllerYields410", "412": "YieldControllerYields412", "429": "YieldControllerYields429", @@ -7172,6 +7685,7 @@ export const make = ( "401": "YieldControllerGetMultipleYieldBalances401", "404": "YieldControllerGetMultipleYieldBalances404", "408": "YieldControllerGetMultipleYieldBalances408", + "409": "YieldControllerGetMultipleYieldBalances409", "410": "YieldControllerGetMultipleYieldBalances410", "412": "YieldControllerGetMultipleYieldBalances412", "429": "YieldControllerGetMultipleYieldBalances429", @@ -7190,6 +7704,7 @@ export const make = ( "401": "YieldControllerYieldBalancesScan401", "404": "YieldControllerYieldBalancesScan404", "408": "YieldControllerYieldBalancesScan408", + "409": "YieldControllerYieldBalancesScan409", "410": "YieldControllerYieldBalancesScan410", "412": "YieldControllerYieldBalancesScan412", "429": "YieldControllerYieldBalancesScan429", @@ -7208,6 +7723,7 @@ export const make = ( "401": "YieldControllerYieldBalancesScanEvm401", "404": "YieldControllerYieldBalancesScanEvm404", "408": "YieldControllerYieldBalancesScanEvm408", + "409": "YieldControllerYieldBalancesScanEvm409", "410": "YieldControllerYieldBalancesScanEvm410", "412": "YieldControllerYieldBalancesScanEvm412", "429": "YieldControllerYieldBalancesScanEvm429", @@ -7238,6 +7754,7 @@ export const make = ( "401": "YieldControllerGetMyYields401", "404": "YieldControllerGetMyYields404", "408": "YieldControllerGetMyYields408", + "409": "YieldControllerGetMyYields409", "410": "YieldControllerGetMyYields410", "412": "YieldControllerGetMyYields412", "429": "YieldControllerGetMyYields429", @@ -7255,6 +7772,7 @@ export const make = ( "401": "YieldControllerGetMyNetworks401", "404": "YieldControllerGetMyNetworks404", "408": "YieldControllerGetMyNetworks408", + "409": "YieldControllerGetMyNetworks409", "410": "YieldControllerGetMyNetworks410", "412": "YieldControllerGetMyNetworks412", "429": "YieldControllerGetMyNetworks429", @@ -7279,6 +7797,7 @@ export const make = ( "401": "YieldControllerFindValidators401", "404": "YieldControllerFindValidators404", "408": "YieldControllerFindValidators408", + "409": "YieldControllerFindValidators409", "410": "YieldControllerFindValidators410", "412": "YieldControllerFindValidators412", "429": "YieldControllerFindValidators429", @@ -7304,6 +7823,7 @@ export const make = ( "401": "YieldControllerYieldOpportunity401", "404": "YieldControllerYieldOpportunity404", "408": "YieldControllerYieldOpportunity408", + "409": "YieldControllerYieldOpportunity409", "410": "YieldControllerYieldOpportunity410", "412": "YieldControllerYieldOpportunity412", "429": "YieldControllerYieldOpportunity429", @@ -7329,6 +7849,7 @@ export const make = ( "401": "YieldControllerGetValidators401", "404": "YieldControllerGetValidators404", "408": "YieldControllerGetValidators408", + "409": "YieldControllerGetValidators409", "410": "YieldControllerGetValidators410", "412": "YieldControllerGetValidators412", "429": "YieldControllerGetValidators429", @@ -7352,6 +7873,7 @@ export const make = ( "401": "YieldControllerGetSingleYieldBalances401", "404": "YieldControllerGetSingleYieldBalances404", "408": "YieldControllerGetSingleYieldBalances408", + "409": "YieldControllerGetSingleYieldBalances409", "410": "YieldControllerGetSingleYieldBalances410", "412": "YieldControllerGetSingleYieldBalances412", "429": "YieldControllerGetSingleYieldBalances429", @@ -7359,6 +7881,33 @@ export const make = ( "503": "YieldControllerGetSingleYieldBalances503", }) ), + YieldControllerGetBalanceTransferEvents: (integrationId, options) => + HttpClientRequest.get( + `/v1/yields/${integrationId}/balances/transfers` + ).pipe( + HttpClientRequest.setUrlParams({ + address: options.params["address"] as any, + sort: options.params["sort"] as any, + limit: options.params["limit"] as any, + offset: options.params["offset"] as any, + feeConfigurationId: options.params["feeConfigurationId"] as any, + }), + HttpClientRequest.setHeaders({ + "X-API-KEY": options.params["X-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"], { + "400": "YieldControllerGetBalanceTransferEvents400", + "401": "YieldControllerGetBalanceTransferEvents401", + "404": "YieldControllerGetBalanceTransferEvents404", + "408": "YieldControllerGetBalanceTransferEvents408", + "409": "YieldControllerGetBalanceTransferEvents409", + "410": "YieldControllerGetBalanceTransferEvents410", + "412": "YieldControllerGetBalanceTransferEvents412", + "429": "YieldControllerGetBalanceTransferEvents429", + "500": "YieldControllerGetBalanceTransferEvents500", + "503": "YieldControllerGetBalanceTransferEvents503", + }) + ), YieldControllerGetSingleYieldRewardsSummary: (integrationId, options) => HttpClientRequest.post( `/v1/yields/${integrationId}/rewards-summary` @@ -7372,6 +7921,7 @@ export const make = ( "401": "YieldControllerGetSingleYieldRewardsSummary401", "404": "YieldControllerGetSingleYieldRewardsSummary404", "408": "YieldControllerGetSingleYieldRewardsSummary408", + "409": "YieldControllerGetSingleYieldRewardsSummary409", "410": "YieldControllerGetSingleYieldRewardsSummary410", "412": "YieldControllerGetSingleYieldRewardsSummary412", "429": "YieldControllerGetSingleYieldRewardsSummary429", @@ -7387,6 +7937,7 @@ export const make = ( "400": "YieldControllerGetFeeConfiguration400", "401": "YieldControllerGetFeeConfiguration401", "408": "YieldControllerGetFeeConfiguration408", + "409": "YieldControllerGetFeeConfiguration409", "410": "YieldControllerGetFeeConfiguration410", "412": "YieldControllerGetFeeConfiguration412", "429": "YieldControllerGetFeeConfiguration429", @@ -7407,6 +7958,7 @@ export const make = ( "401": "YieldControllerCreateFeeConfiguration401", "404": "YieldControllerCreateFeeConfiguration404", "408": "YieldControllerCreateFeeConfiguration408", + "409": "YieldControllerCreateFeeConfiguration409", "410": "YieldControllerCreateFeeConfiguration410", "412": "YieldControllerCreateFeeConfiguration412", "429": "YieldControllerCreateFeeConfiguration429", @@ -7441,6 +7993,7 @@ export const make = ( "401": "YieldV2ControllerYields401", "404": "YieldV2ControllerYields404", "408": "YieldV2ControllerYields408", + "409": "YieldV2ControllerYields409", "410": "YieldV2ControllerYields410", "412": "YieldV2ControllerYields412", "429": "YieldV2ControllerYields429", @@ -7458,6 +8011,7 @@ export const make = ( "401": "YieldV2ControllerGetYieldById401", "404": "YieldV2ControllerGetYieldById404", "408": "YieldV2ControllerGetYieldById408", + "409": "YieldV2ControllerGetYieldById409", "410": "YieldV2ControllerGetYieldById410", "412": "YieldV2ControllerGetYieldById412", "429": "YieldV2ControllerGetYieldById429", @@ -7482,6 +8036,7 @@ export const make = ( "401": "YieldV2ControllerFindYieldValidators401", "404": "YieldV2ControllerFindYieldValidators404", "408": "YieldV2ControllerFindYieldValidators408", + "409": "YieldV2ControllerFindYieldValidators409", "410": "YieldV2ControllerFindYieldValidators410", "412": "YieldV2ControllerFindYieldValidators412", "429": "YieldV2ControllerFindYieldValidators429", @@ -7509,6 +8064,7 @@ export const make = ( "401": "YieldV2ControllerFindValidators401", "404": "YieldV2ControllerFindValidators404", "408": "YieldV2ControllerFindValidators408", + "409": "YieldV2ControllerFindValidators409", "410": "YieldV2ControllerFindValidators410", "412": "YieldV2ControllerFindValidators412", "429": "YieldV2ControllerFindValidators429", @@ -7528,6 +8084,7 @@ export const make = ( "400": "YieldV2ControllerGetFeeConfigurations400", "401": "YieldV2ControllerGetFeeConfigurations401", "408": "YieldV2ControllerGetFeeConfigurations408", + "409": "YieldV2ControllerGetFeeConfigurations409", "410": "YieldV2ControllerGetFeeConfigurations410", "412": "YieldV2ControllerGetFeeConfigurations412", "429": "YieldV2ControllerGetFeeConfigurations429", @@ -8179,7 +8736,8 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + | HttpClientError.HttpClientError + | LegacyApiError<"CampaignControllerPause409", CampaignControllerPause409> >; readonly CampaignControllerResume: ( teamId: string, @@ -8188,7 +8746,21 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + | HttpClientError.HttpClientError + | LegacyApiError<"CampaignControllerResume409", CampaignControllerResume409> + >; + readonly CampaignControllerAcknowledgePause: ( + teamId: string, + projectId: string, + campaignId: string, + options: { readonly config?: Config | undefined } | undefined + ) => Effect.Effect< + WithOptionalResponse, + | HttpClientError.HttpClientError + | LegacyApiError< + "CampaignControllerAcknowledgePause409", + CampaignControllerAcknowledgePause409 + > >; readonly CampaignControllerEnd: ( teamId: string, @@ -8208,6 +8780,24 @@ export interface LegacyApi { WithOptionalResponse, HttpClientError.HttpClientError >; + readonly CampaignControllerGetCampaignBalances: < + Config extends OperationConfig, + >( + teamId: string, + projectId: string, + campaignId: string, + options: + | { + readonly params?: + | CampaignControllerGetCampaignBalancesParams + | undefined; + readonly config?: Config | undefined; + } + | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; readonly CampaignControllerGetLiability: ( teamId: string, projectId: string, @@ -8336,6 +8926,135 @@ export interface LegacyApi { WithOptionalResponse, HttpClientError.HttpClientError >; + readonly CampaignControllerGetBlacklistedUsers: < + Config extends OperationConfig, + >( + teamId: string, + projectId: string, + campaignId: string, + options: + | { + readonly params?: + | CampaignControllerGetBlacklistedUsersParams + | undefined; + readonly config?: Config | undefined; + } + | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; + readonly CampaignControllerGetAccrualDetails: < + Config extends OperationConfig, + >( + teamId: string, + projectId: string, + campaignId: string, + options: + | { + readonly params?: + | CampaignControllerGetAccrualDetailsParams + | undefined; + readonly config?: Config | undefined; + } + | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; + readonly CampaignControllerGetAccrualDetailForHour: < + Config extends OperationConfig, + >( + teamId: string, + projectId: string, + campaignId: string, + hour: string, + options: + | { + readonly params?: + | CampaignControllerGetAccrualDetailForHourParams + | undefined; + readonly config?: Config | undefined; + } + | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; + readonly CampaignControllerGetUserAccrualHistory: < + Config extends OperationConfig, + >( + teamId: string, + projectId: string, + campaignId: string, + address: string, + options: + | { + readonly params?: + | CampaignControllerGetUserAccrualHistoryParams + | undefined; + readonly config?: Config | undefined; + } + | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; + readonly CampaignControllerGetSafeBalance: ( + teamId: string, + projectId: string, + campaignId: string, + options: { readonly config?: Config | undefined } | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; + readonly CampaignControllerGetPayoutEligibilitySummary: < + Config extends OperationConfig, + >( + teamId: string, + projectId: string, + campaignId: string, + options: { readonly config?: Config | undefined } | undefined + ) => Effect.Effect< + WithOptionalResponse< + CampaignControllerGetPayoutEligibilitySummary200, + Config + >, + HttpClientError.HttpClientError + >; + readonly CampaignControllerGetBlacklistedAddresses: < + Config extends OperationConfig, + >( + teamId: string, + projectId: string, + campaignId: string, + options: + | { + readonly params?: + | CampaignControllerGetBlacklistedAddressesParams + | undefined; + readonly config?: Config | undefined; + } + | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; + readonly CampaignControllerGetAuditHistory: ( + teamId: string, + projectId: string, + campaignId: string, + options: + | { + readonly params?: CampaignControllerGetAuditHistoryParams | undefined; + readonly config?: Config | undefined; + } + | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; /** * List campaign configuration requests for a project */ @@ -8480,6 +9199,30 @@ export interface LegacyApi { >, HttpClientError.HttpClientError >; + /** + * List all campaigns across all projects (SuperAdmin). + */ + readonly CampaignAdminControllerList: ( + options: + | { + readonly params?: CampaignAdminControllerListParams | undefined; + readonly config?: Config | undefined; + } + | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; + /** + * Get a campaign by ID (SuperAdmin). + */ + readonly CampaignAdminControllerGetById: ( + campaignId: string, + options: { readonly config?: Config | undefined } | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; /** * List campaigns for a project */ @@ -8986,6 +9729,7 @@ export interface LegacyApi { | LegacyApiError<"HealthControllerHealthV2401", HealthControllerHealthV2401> | LegacyApiError<"HealthControllerHealthV2404", HealthControllerHealthV2404> | LegacyApiError<"HealthControllerHealthV2408", HealthControllerHealthV2408> + | LegacyApiError<"HealthControllerHealthV2409", HealthControllerHealthV2409> | LegacyApiError<"HealthControllerHealthV2410", HealthControllerHealthV2410> | LegacyApiError<"HealthControllerHealthV2412", HealthControllerHealthV2412> | LegacyApiError<"HealthControllerHealthV2429", HealthControllerHealthV2429> @@ -9333,6 +10077,10 @@ export interface LegacyApi { "ActionControllerGetAction408", ActionControllerGetAction408 > + | LegacyApiError< + "ActionControllerGetAction409", + ActionControllerGetAction409 + > | LegacyApiError< "ActionControllerGetAction410", ActionControllerGetAction410 @@ -9384,6 +10132,10 @@ export interface LegacyApi { "ActionControllerGetGasEstimate408", ActionControllerGetGasEstimate408 > + | LegacyApiError< + "ActionControllerGetGasEstimate409", + ActionControllerGetGasEstimate409 + > | LegacyApiError< "ActionControllerGetGasEstimate410", ActionControllerGetGasEstimate410 @@ -9420,6 +10172,7 @@ export interface LegacyApi { | LegacyApiError<"ActionControllerEnter403", ActionControllerEnter403> | LegacyApiError<"ActionControllerEnter404", ActionControllerEnter404> | LegacyApiError<"ActionControllerEnter408", ActionControllerEnter408> + | LegacyApiError<"ActionControllerEnter409", ActionControllerEnter409> | LegacyApiError<"ActionControllerEnter410", ActionControllerEnter410> | LegacyApiError<"ActionControllerEnter412", ActionControllerEnter412> | LegacyApiError<"ActionControllerEnter429", ActionControllerEnter429> @@ -9441,6 +10194,7 @@ export interface LegacyApi { | LegacyApiError<"ActionControllerExit403", ActionControllerExit403> | LegacyApiError<"ActionControllerExit404", ActionControllerExit404> | LegacyApiError<"ActionControllerExit408", ActionControllerExit408> + | LegacyApiError<"ActionControllerExit409", ActionControllerExit409> | LegacyApiError<"ActionControllerExit410", ActionControllerExit410> | LegacyApiError<"ActionControllerExit412", ActionControllerExit412> | LegacyApiError<"ActionControllerExit429", ActionControllerExit429> @@ -9462,6 +10216,7 @@ export interface LegacyApi { | LegacyApiError<"ActionControllerPending403", ActionControllerPending403> | LegacyApiError<"ActionControllerPending404", ActionControllerPending404> | LegacyApiError<"ActionControllerPending408", ActionControllerPending408> + | LegacyApiError<"ActionControllerPending409", ActionControllerPending409> | LegacyApiError<"ActionControllerPending410", ActionControllerPending410> | LegacyApiError<"ActionControllerPending412", ActionControllerPending412> | LegacyApiError<"ActionControllerPending429", ActionControllerPending429> @@ -9496,6 +10251,10 @@ export interface LegacyApi { "ActionControllerEnterGasEstimation408", ActionControllerEnterGasEstimation408 > + | LegacyApiError< + "ActionControllerEnterGasEstimation409", + ActionControllerEnterGasEstimation409 + > | LegacyApiError< "ActionControllerEnterGasEstimation410", ActionControllerEnterGasEstimation410 @@ -9545,6 +10304,10 @@ export interface LegacyApi { "ActionControllerExitGasEstimate408", ActionControllerExitGasEstimate408 > + | LegacyApiError< + "ActionControllerExitGasEstimate409", + ActionControllerExitGasEstimate409 + > | LegacyApiError< "ActionControllerExitGasEstimate410", ActionControllerExitGasEstimate410 @@ -9579,6 +10342,7 @@ export interface LegacyApi { | LegacyApiError<"ActionControllerList401", ActionControllerList401> | LegacyApiError<"ActionControllerList404", ActionControllerList404> | LegacyApiError<"ActionControllerList408", ActionControllerList408> + | LegacyApiError<"ActionControllerList409", ActionControllerList409> | LegacyApiError<"ActionControllerList410", ActionControllerList410> | LegacyApiError<"ActionControllerList412", ActionControllerList412> | LegacyApiError<"ActionControllerList429", ActionControllerList429> @@ -9613,6 +10377,10 @@ export interface LegacyApi { "ActionControllerPendingGasEstimate408", ActionControllerPendingGasEstimate408 > + | LegacyApiError< + "ActionControllerPendingGasEstimate409", + ActionControllerPendingGasEstimate409 + > | LegacyApiError< "ActionControllerPendingGasEstimate410", ActionControllerPendingGasEstimate410 @@ -9730,6 +10498,10 @@ export interface LegacyApi { "TransactionControllerGetTransaction408", TransactionControllerGetTransaction408 > + | LegacyApiError< + "TransactionControllerGetTransaction409", + TransactionControllerGetTransaction409 + > | LegacyApiError< "TransactionControllerGetTransaction410", TransactionControllerGetTransaction410 @@ -9784,6 +10556,10 @@ export interface LegacyApi { "TransactionControllerConstruct408", TransactionControllerConstruct408 > + | LegacyApiError< + "TransactionControllerConstruct409", + TransactionControllerConstruct409 + > | LegacyApiError< "TransactionControllerConstruct410", TransactionControllerConstruct410 @@ -9838,6 +10614,10 @@ export interface LegacyApi { "TransactionControllerSubmit408", TransactionControllerSubmit408 > + | LegacyApiError< + "TransactionControllerSubmit409", + TransactionControllerSubmit409 + > | LegacyApiError< "TransactionControllerSubmit410", TransactionControllerSubmit410 @@ -9892,6 +10672,10 @@ export interface LegacyApi { "TransactionControllerSubmitHash408", TransactionControllerSubmitHash408 > + | LegacyApiError< + "TransactionControllerSubmitHash409", + TransactionControllerSubmitHash409 + > | LegacyApiError< "TransactionControllerSubmitHash410", TransactionControllerSubmitHash410 @@ -9950,6 +10734,10 @@ export interface LegacyApi { "TransactionControllerGetTransactionStatusFromId408", TransactionControllerGetTransactionStatusFromId408 > + | LegacyApiError< + "TransactionControllerGetTransactionStatusFromId409", + TransactionControllerGetTransactionStatusFromId409 + > | LegacyApiError< "TransactionControllerGetTransactionStatusFromId410", TransactionControllerGetTransactionStatusFromId410 @@ -10005,6 +10793,10 @@ export interface LegacyApi { "TransactionControllerGetGasForNetwork408", TransactionControllerGetGasForNetwork408 > + | LegacyApiError< + "TransactionControllerGetGasForNetwork409", + TransactionControllerGetGasForNetwork409 + > | LegacyApiError< "TransactionControllerGetGasForNetwork410", TransactionControllerGetGasForNetwork410 @@ -10064,6 +10856,10 @@ export interface LegacyApi { "TransactionControllerGetTransactionStatusByNetworkAndHash408", TransactionControllerGetTransactionStatusByNetworkAndHash408 > + | LegacyApiError< + "TransactionControllerGetTransactionStatusByNetworkAndHash409", + TransactionControllerGetTransactionStatusByNetworkAndHash409 + > | LegacyApiError< "TransactionControllerGetTransactionStatusByNetworkAndHash410", TransactionControllerGetTransactionStatusByNetworkAndHash410 @@ -10125,6 +10921,10 @@ export interface LegacyApi { "TransactionControllerGetTransactionVerificationMessageForNetwork408", TransactionControllerGetTransactionVerificationMessageForNetwork408 > + | LegacyApiError< + "TransactionControllerGetTransactionVerificationMessageForNetwork409", + TransactionControllerGetTransactionVerificationMessageForNetwork409 + > | LegacyApiError< "TransactionControllerGetTransactionVerificationMessageForNetwork410", TransactionControllerGetTransactionVerificationMessageForNetwork410 @@ -10184,6 +10984,10 @@ export interface LegacyApi { "NetworkAddressesTokenV2ControllerGetTokenBalances408", NetworkAddressesTokenV2ControllerGetTokenBalances408 > + | LegacyApiError< + "NetworkAddressesTokenV2ControllerGetTokenBalances409", + NetworkAddressesTokenV2ControllerGetTokenBalances409 + > | LegacyApiError< "NetworkAddressesTokenV2ControllerGetTokenBalances410", NetworkAddressesTokenV2ControllerGetTokenBalances410 @@ -10237,6 +11041,10 @@ export interface LegacyApi { "NetworkTokensV2ControllerGetTokens408", NetworkTokensV2ControllerGetTokens408 > + | LegacyApiError< + "NetworkTokensV2ControllerGetTokens409", + NetworkTokensV2ControllerGetTokens409 + > | LegacyApiError< "NetworkTokensV2ControllerGetTokens410", NetworkTokensV2ControllerGetTokens410 @@ -10275,6 +11083,7 @@ export interface LegacyApi { | LegacyApiError<"TokenControllerGetTokens401", TokenControllerGetTokens401> | LegacyApiError<"TokenControllerGetTokens404", TokenControllerGetTokens404> | LegacyApiError<"TokenControllerGetTokens408", TokenControllerGetTokens408> + | LegacyApiError<"TokenControllerGetTokens409", TokenControllerGetTokens409> | LegacyApiError<"TokenControllerGetTokens410", TokenControllerGetTokens410> | LegacyApiError<"TokenControllerGetTokens412", TokenControllerGetTokens412> | LegacyApiError<"TokenControllerGetTokens429", TokenControllerGetTokens429> @@ -10309,6 +11118,10 @@ export interface LegacyApi { "TokenControllerGetTokenPrices408", TokenControllerGetTokenPrices408 > + | LegacyApiError< + "TokenControllerGetTokenPrices409", + TokenControllerGetTokenPrices409 + > | LegacyApiError< "TokenControllerGetTokenPrices410", TokenControllerGetTokenPrices410 @@ -10358,6 +11171,10 @@ export interface LegacyApi { "TokenControllerGetTokenBalances408", TokenControllerGetTokenBalances408 > + | LegacyApiError< + "TokenControllerGetTokenBalances409", + TokenControllerGetTokenBalances409 + > | LegacyApiError< "TokenControllerGetTokenBalances410", TokenControllerGetTokenBalances410 @@ -10407,6 +11224,10 @@ export interface LegacyApi { "TokenControllerTokenBalancesScan408", TokenControllerTokenBalancesScan408 > + | LegacyApiError< + "TokenControllerTokenBalancesScan409", + TokenControllerTokenBalancesScan409 + > | LegacyApiError< "TokenControllerTokenBalancesScan410", TokenControllerTokenBalancesScan410 @@ -10606,6 +11427,10 @@ export interface LegacyApi { "OAVControllerFindAllTokens408", OAVControllerFindAllTokens408 > + | LegacyApiError< + "OAVControllerFindAllTokens409", + OAVControllerFindAllTokens409 + > | LegacyApiError< "OAVControllerFindAllTokens410", OAVControllerFindAllTokens410 @@ -10655,6 +11480,10 @@ export interface LegacyApi { "OAVControllerFindYieldsByToken408", OAVControllerFindYieldsByToken408 > + | LegacyApiError< + "OAVControllerFindYieldsByToken409", + OAVControllerFindYieldsByToken409 + > | LegacyApiError< "OAVControllerFindYieldsByToken410", OAVControllerFindYieldsByToken410 @@ -10695,6 +11524,7 @@ export interface LegacyApi { | LegacyApiError<"OAVControllerFindAll401", OAVControllerFindAll401> | LegacyApiError<"OAVControllerFindAll404", OAVControllerFindAll404> | LegacyApiError<"OAVControllerFindAll408", OAVControllerFindAll408> + | LegacyApiError<"OAVControllerFindAll409", OAVControllerFindAll409> | LegacyApiError<"OAVControllerFindAll410", OAVControllerFindAll410> | LegacyApiError<"OAVControllerFindAll412", OAVControllerFindAll412> | LegacyApiError<"OAVControllerFindAll429", OAVControllerFindAll429> @@ -10717,6 +11547,7 @@ export interface LegacyApi { | LegacyApiError<"OAVControllerCreate401", OAVControllerCreate401> | LegacyApiError<"OAVControllerCreate404", OAVControllerCreate404> | LegacyApiError<"OAVControllerCreate408", OAVControllerCreate408> + | LegacyApiError<"OAVControllerCreate409", OAVControllerCreate409> | LegacyApiError<"OAVControllerCreate410", OAVControllerCreate410> | LegacyApiError<"OAVControllerCreate412", OAVControllerCreate412> | LegacyApiError<"OAVControllerCreate429", OAVControllerCreate429> @@ -10737,6 +11568,7 @@ export interface LegacyApi { | LegacyApiError<"OAVControllerRemove400", OAVControllerRemove400> | LegacyApiError<"OAVControllerRemove401", OAVControllerRemove401> | LegacyApiError<"OAVControllerRemove408", OAVControllerRemove408> + | LegacyApiError<"OAVControllerRemove409", OAVControllerRemove409> | LegacyApiError<"OAVControllerRemove410", OAVControllerRemove410> | LegacyApiError<"OAVControllerRemove412", OAVControllerRemove412> | LegacyApiError<"OAVControllerRemove429", OAVControllerRemove429> @@ -10759,6 +11591,7 @@ export interface LegacyApi { | HttpClientError.HttpClientError | LegacyApiError<"OAVControllerUpdate401", OAVControllerUpdate401> | LegacyApiError<"OAVControllerUpdate408", OAVControllerUpdate408> + | LegacyApiError<"OAVControllerUpdate409", OAVControllerUpdate409> | LegacyApiError<"OAVControllerUpdate410", OAVControllerUpdate410> | LegacyApiError<"OAVControllerUpdate412", OAVControllerUpdate412> | LegacyApiError<"OAVControllerUpdate429", OAVControllerUpdate429> @@ -10801,6 +11634,7 @@ export interface LegacyApi { | LegacyApiError<"YieldControllerYields401", YieldControllerYields401> | LegacyApiError<"YieldControllerYields404", YieldControllerYields404> | LegacyApiError<"YieldControllerYields408", YieldControllerYields408> + | LegacyApiError<"YieldControllerYields409", YieldControllerYields409> | LegacyApiError<"YieldControllerYields410", YieldControllerYields410> | LegacyApiError<"YieldControllerYields412", YieldControllerYields412> | LegacyApiError<"YieldControllerYields429", YieldControllerYields429> @@ -10835,6 +11669,10 @@ export interface LegacyApi { "YieldControllerGetMultipleYieldBalances408", YieldControllerGetMultipleYieldBalances408 > + | LegacyApiError< + "YieldControllerGetMultipleYieldBalances409", + YieldControllerGetMultipleYieldBalances409 + > | LegacyApiError< "YieldControllerGetMultipleYieldBalances410", YieldControllerGetMultipleYieldBalances410 @@ -10884,6 +11722,10 @@ export interface LegacyApi { "YieldControllerYieldBalancesScan408", YieldControllerYieldBalancesScan408 > + | LegacyApiError< + "YieldControllerYieldBalancesScan409", + YieldControllerYieldBalancesScan409 + > | LegacyApiError< "YieldControllerYieldBalancesScan410", YieldControllerYieldBalancesScan410 @@ -10933,6 +11775,10 @@ export interface LegacyApi { "YieldControllerYieldBalancesScanEvm408", YieldControllerYieldBalancesScanEvm408 > + | LegacyApiError< + "YieldControllerYieldBalancesScanEvm409", + YieldControllerYieldBalancesScanEvm409 + > | LegacyApiError< "YieldControllerYieldBalancesScanEvm410", YieldControllerYieldBalancesScanEvm410 @@ -10983,6 +11829,10 @@ export interface LegacyApi { "YieldControllerGetMyYields408", YieldControllerGetMyYields408 > + | LegacyApiError< + "YieldControllerGetMyYields409", + YieldControllerGetMyYields409 + > | LegacyApiError< "YieldControllerGetMyYields410", YieldControllerGetMyYields410 @@ -11033,6 +11883,10 @@ export interface LegacyApi { "YieldControllerGetMyNetworks408", YieldControllerGetMyNetworks408 > + | LegacyApiError< + "YieldControllerGetMyNetworks409", + YieldControllerGetMyNetworks409 + > | LegacyApiError< "YieldControllerGetMyNetworks410", YieldControllerGetMyNetworks410 @@ -11083,6 +11937,10 @@ export interface LegacyApi { "YieldControllerFindValidators408", YieldControllerFindValidators408 > + | LegacyApiError< + "YieldControllerFindValidators409", + YieldControllerFindValidators409 + > | LegacyApiError< "YieldControllerFindValidators410", YieldControllerFindValidators410 @@ -11134,6 +11992,10 @@ export interface LegacyApi { "YieldControllerYieldOpportunity408", YieldControllerYieldOpportunity408 > + | LegacyApiError< + "YieldControllerYieldOpportunity409", + YieldControllerYieldOpportunity409 + > | LegacyApiError< "YieldControllerYieldOpportunity410", YieldControllerYieldOpportunity410 @@ -11185,6 +12047,10 @@ export interface LegacyApi { "YieldControllerGetValidators408", YieldControllerGetValidators408 > + | LegacyApiError< + "YieldControllerGetValidators409", + YieldControllerGetValidators409 + > | LegacyApiError< "YieldControllerGetValidators410", YieldControllerGetValidators410 @@ -11237,6 +12103,10 @@ export interface LegacyApi { "YieldControllerGetSingleYieldBalances408", YieldControllerGetSingleYieldBalances408 > + | LegacyApiError< + "YieldControllerGetSingleYieldBalances409", + YieldControllerGetSingleYieldBalances409 + > | LegacyApiError< "YieldControllerGetSingleYieldBalances410", YieldControllerGetSingleYieldBalances410 @@ -11258,6 +12128,61 @@ export interface LegacyApi { YieldControllerGetSingleYieldBalances503 > >; + /** + * Returns one-to-one indexed ERC20 transfer rows for the resolved yield contract and wallet address, including the cumulative balance at each event. + */ + readonly YieldControllerGetBalanceTransferEvents: < + Config extends OperationConfig, + >( + integrationId: string, + options: { + readonly params: YieldControllerGetBalanceTransferEventsParams; + readonly config?: Config | undefined; + } + ) => Effect.Effect< + WithOptionalResponse, + | HttpClientError.HttpClientError + | LegacyApiError< + "YieldControllerGetBalanceTransferEvents400", + YieldControllerGetBalanceTransferEvents400 + > + | LegacyApiError< + "YieldControllerGetBalanceTransferEvents401", + YieldControllerGetBalanceTransferEvents401 + > + | LegacyApiError< + "YieldControllerGetBalanceTransferEvents404", + YieldControllerGetBalanceTransferEvents404 + > + | LegacyApiError< + "YieldControllerGetBalanceTransferEvents408", + YieldControllerGetBalanceTransferEvents408 + > + | LegacyApiError< + "YieldControllerGetBalanceTransferEvents409", + YieldControllerGetBalanceTransferEvents409 + > + | LegacyApiError< + "YieldControllerGetBalanceTransferEvents410", + YieldControllerGetBalanceTransferEvents410 + > + | LegacyApiError< + "YieldControllerGetBalanceTransferEvents412", + YieldControllerGetBalanceTransferEvents412 + > + | LegacyApiError< + "YieldControllerGetBalanceTransferEvents429", + YieldControllerGetBalanceTransferEvents429 + > + | LegacyApiError< + "YieldControllerGetBalanceTransferEvents500", + YieldControllerGetBalanceTransferEvents500 + > + | LegacyApiError< + "YieldControllerGetBalanceTransferEvents503", + YieldControllerGetBalanceTransferEvents503 + > + >; /** * Given addresses, returns a historic rewards summary for any yield */ @@ -11294,6 +12219,10 @@ export interface LegacyApi { "YieldControllerGetSingleYieldRewardsSummary408", YieldControllerGetSingleYieldRewardsSummary408 > + | LegacyApiError< + "YieldControllerGetSingleYieldRewardsSummary409", + YieldControllerGetSingleYieldRewardsSummary409 + > | LegacyApiError< "YieldControllerGetSingleYieldRewardsSummary410", YieldControllerGetSingleYieldRewardsSummary410 @@ -11336,6 +12265,10 @@ export interface LegacyApi { "YieldControllerGetFeeConfiguration408", YieldControllerGetFeeConfiguration408 > + | LegacyApiError< + "YieldControllerGetFeeConfiguration409", + YieldControllerGetFeeConfiguration409 + > | LegacyApiError< "YieldControllerGetFeeConfiguration410", YieldControllerGetFeeConfiguration410 @@ -11388,6 +12321,10 @@ export interface LegacyApi { "YieldControllerCreateFeeConfiguration408", YieldControllerCreateFeeConfiguration408 > + | LegacyApiError< + "YieldControllerCreateFeeConfiguration409", + YieldControllerCreateFeeConfiguration409 + > | LegacyApiError< "YieldControllerCreateFeeConfiguration410", YieldControllerCreateFeeConfiguration410 @@ -11426,6 +12363,7 @@ export interface LegacyApi { | LegacyApiError<"YieldV2ControllerYields401", YieldV2ControllerYields401> | LegacyApiError<"YieldV2ControllerYields404", YieldV2ControllerYields404> | LegacyApiError<"YieldV2ControllerYields408", YieldV2ControllerYields408> + | LegacyApiError<"YieldV2ControllerYields409", YieldV2ControllerYields409> | LegacyApiError<"YieldV2ControllerYields410", YieldV2ControllerYields410> | LegacyApiError<"YieldV2ControllerYields412", YieldV2ControllerYields412> | LegacyApiError<"YieldV2ControllerYields429", YieldV2ControllerYields429> @@ -11462,6 +12400,10 @@ export interface LegacyApi { "YieldV2ControllerGetYieldById408", YieldV2ControllerGetYieldById408 > + | LegacyApiError< + "YieldV2ControllerGetYieldById409", + YieldV2ControllerGetYieldById409 + > | LegacyApiError< "YieldV2ControllerGetYieldById410", YieldV2ControllerGetYieldById410 @@ -11517,6 +12459,10 @@ export interface LegacyApi { "YieldV2ControllerFindYieldValidators408", YieldV2ControllerFindYieldValidators408 > + | LegacyApiError< + "YieldV2ControllerFindYieldValidators409", + YieldV2ControllerFindYieldValidators409 + > | LegacyApiError< "YieldV2ControllerFindYieldValidators410", YieldV2ControllerFindYieldValidators410 @@ -11567,6 +12513,10 @@ export interface LegacyApi { "YieldV2ControllerFindValidators408", YieldV2ControllerFindValidators408 > + | LegacyApiError< + "YieldV2ControllerFindValidators409", + YieldV2ControllerFindValidators409 + > | LegacyApiError< "YieldV2ControllerFindValidators410", YieldV2ControllerFindValidators410 @@ -11618,6 +12568,10 @@ export interface LegacyApi { "YieldV2ControllerGetFeeConfigurations408", YieldV2ControllerGetFeeConfigurations408 > + | LegacyApiError< + "YieldV2ControllerGetFeeConfigurations409", + YieldV2ControllerGetFeeConfigurations409 + > | LegacyApiError< "YieldV2ControllerGetFeeConfigurations410", YieldV2ControllerGetFeeConfigurations410 diff --git a/packages/widget/src/generated/api/yield.ts b/packages/widget/src/generated/api/yield.ts index e8a1839f..2f9dcf81 100644 --- a/packages/widget/src/generated/api/yield.ts +++ b/packages/widget/src/generated/api/yield.ts @@ -3840,6 +3840,7 @@ export type YieldsControllerGetBalanceHistoryParams = { readonly from?: string; readonly to?: string; readonly blockNumber?: number; + readonly feeConfigurationId?: string; readonly interval?: "block" | "hour" | "day" | "week"; readonly sort?: "asc" | "desc"; readonly limit?: number; @@ -4652,6 +4653,7 @@ export const make = ( from: options.params["from"] as any, to: options.params["to"] as any, blockNumber: options.params["blockNumber"] as any, + feeConfigurationId: options.params["feeConfigurationId"] as any, interval: options.params["interval"] as any, sort: options.params["sort"] as any, limit: options.params["limit"] as any, diff --git a/packages/widget/src/pages-dashboard/common/components/tabs/index.tsx b/packages/widget/src/pages-dashboard/common/components/tabs/index.tsx index 1d57b552..19be3a72 100644 --- a/packages/widget/src/pages-dashboard/common/components/tabs/index.tsx +++ b/packages/widget/src/pages-dashboard/common/components/tabs/index.tsx @@ -1,3 +1,5 @@ +import { Match } from "effect"; +import { startsWith } from "effect/String"; import { useNavigate } from "react-router"; import { Box } from "../../../../components/atoms/box"; import { Divider } from "../../../../components/atoms/divider"; @@ -8,14 +10,11 @@ import { combineRecipeWithVariant } from "../../../../utils/styles"; import { divider, tabsContainer, tabsWrapper } from "./styles.css"; import { Tab } from "./tab"; -type TabsList = - | "overview" - // "rewards" | - | "activity"; +type TabsList = "earn" | "manage" | "activity"; const TABS_MAP = { - overview: "/", - // rewards: "/rewards", + earn: "/", + manage: "/manage", activity: "/activity", }; @@ -33,11 +32,11 @@ export const Tabs = () => { navigate(TABS_MAP[selected]); }; - const selectedTab = current.pathname.startsWith("/rewards") - ? "rewards" - : current.pathname.startsWith("/activity") - ? "activity" - : "overview"; + const selectedTab = Match.value(current.pathname).pipe( + Match.when(startsWith("/activity"), () => "activity"), + Match.when(startsWith("/manage"), () => "manage"), + Match.orElse(() => "earn") + ); const { variant } = useSettings(); @@ -48,16 +47,16 @@ export const Tabs = () => { className={combineRecipeWithVariant({ rec: tabsContainer, variant })} > onTabPress("overview")} - variant="overview" + isSelected={selectedTab === "earn"} + onTabPress={() => onTabPress("earn")} + variant="earn" /> - {/* onTabPress("rewards")} - variant="rewards" - /> */} + onTabPress("manage")} + variant="manage" + /> void; - variant: "overview" | "rewards" | "activity"; + variant: "earn" | "manage" | "activity"; }; export const Tab = ({ isSelected, variant, onTabPress }: Props) => { diff --git a/packages/widget/src/pages-dashboard/overview/earn-details/index.tsx b/packages/widget/src/pages-dashboard/overview/earn-details/index.tsx new file mode 100644 index 00000000..5adee857 --- /dev/null +++ b/packages/widget/src/pages-dashboard/overview/earn-details/index.tsx @@ -0,0 +1,380 @@ +import type { TFunction } from "i18next"; +import { type ReactNode, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { Box } from "../../../components/atoms/box"; +import { + CollapsibleArrow, + CollapsibleContent, + CollapsibleRoot, + CollapsibleTrigger, +} from "../../../components/atoms/collapsible"; +import { ContentLoaderSquare } from "../../../components/atoms/content-loader"; +import { TokenIcon } from "../../../components/atoms/token-icon"; +import { Text } from "../../../components/atoms/typography/text"; +import { RiskRatingBadge } from "../../../components/molecules/yield-risk"; +import { getEffectiveYieldRewardRateDetails } from "../../../domain/types/reward-rate"; +import { + getYieldCooldownPeriod, + getYieldProviderDetails, + getYieldRiskDisplay, + getYieldRiskSourceLabel, + type Yield, +} from "../../../domain/types/yields"; +import { useEarnPageContext } from "../../../pages/details/earn-page/state/earn-page-context"; +import { APToPercentage, formatAddress, formatNumber } from "../../../utils"; +import { formatCompactUsd } from "../../../utils/formatters"; +import { HistoryChart } from "./reward-rate-chart"; +import { + addressBox, + container, + detailRow, + headerProviderText, + metricCard, + metricGrid, + rangeButton, + sectionDivider, + valueText, +} from "./styles.css"; +import { + type RewardRateHistoryPeriod, + type RewardRateHistoryPoint, + useYieldRewardRateHistory, +} from "./use-yield-reward-rate-history"; +import { useYieldTvlHistory } from "./use-yield-tvl-history"; + +const periods = [ + ["30d", "1M"], + ["90d", "3M"], + ["1y", "1Y"], + ["all", "ALL"], +] as const satisfies ReadonlyArray; + +export const EarnDetails = () => { + const { + appLoading, + selectedStake, + selectedValidators, + selectYieldIsLoading, + } = useEarnPageContext(); + const [rewardRatePeriod, setRewardRatePeriod] = + useState("90d"); + const [tvlPeriod, setTvlPeriod] = useState("90d"); + const { t } = useTranslation(); + + const yieldDto = selectedStake.extractNullable(); + const rewardRateHistory = useYieldRewardRateHistory({ + period: rewardRatePeriod, + yieldId: yieldDto?.id, + }); + const tvlHistory = useYieldTvlHistory({ + period: tvlPeriod, + yieldId: yieldDto?.id, + }); + + if (appLoading || selectYieldIsLoading) { + return ; + } + + if (!yieldDto) { + return ( + + + {t("dashboard.earn_details.empty")} + + + ); + } + + const provider = getYieldProviderDetails(yieldDto); + const risk = getYieldRiskDisplay(yieldDto); + const addressRows = getAddressRows(yieldDto); + const effectiveRewardRate = getEffectiveYieldRewardRateDetails({ + selectedValidators, + yieldDto, + }); + const rewardRateFormatted = effectiveRewardRate + ? `${APToPercentage(effectiveRewardRate.total)}%` + : "-"; + const tvlFormatted = formatCompactUsd(yieldDto.statistics?.tvlUsd); + + return ( + + + + + + {yieldDto.metadata.name} + + {t("positions.via", { + providerName: provider?.name ?? yieldDto.providerId, + count: 1, + })} + {" · "} + {formatNetworkName(yieldDto.network)} + {" · "} + {yieldDto.token.symbol} + + + + + + + + : "-"} + /> + + + `${formatNumber(value, 2)}%`} + title={t("dashboard.earn_details.reward_rate")} + value={rewardRateFormatted} + /> + + + + + + + + {yieldDto.metadata.description} + + + + + + + + + + + + + {addressRows.length > 0 && ( + + {addressRows.map((row) => ( + + ))} + + )} + + + ); +}; + +const HistoryChartSection = ({ + chartId, + history, + onPeriodChange, + period, + tickFormatter, + title, + value, +}: { + chartId: string; + history: { + data: RewardRateHistoryPoint[]; + isFetching: boolean; + isLoading: boolean; + }; + onPeriodChange: (period: RewardRateHistoryPeriod) => void; + period: RewardRateHistoryPeriod; + tickFormatter: (value: number) => string; + title: string; + value: string; +}) => ( + + + + {title}{" "} + + {value} + + + + + {periods.map(([value, label]) => ( + onPeriodChange(value)} + type="button" + > + {label} + + ))} + + + + + +); + +const MetricCard = ({ + label, + subValue, + value, +}: { + label: string; + subValue?: string; + value: ReactNode; +}) => ( + + {label} + {value} + {subValue && ( + + {subValue} + + )} + +); + +const DetailsSection = ({ + children, + title, +}: { + children: ReactNode; + title: string; +}) => ( + + + + {title} + + + + + + {children} + + +); + +const DetailRow = ({ label, value }: { label: string; value: string }) => ( + + {label} + + {value} + + +); + +const AddressRow = ({ address, label }: { address: string; label: string }) => ( + + {label} + + {formatAddress(address)} + + +); + +const getAddressRows = (yieldDto: Yield) => + [ + yieldDto.outputToken?.address + ? { + label: "Vault", + address: yieldDto.outputToken.address, + } + : null, + yieldDto.token.address + ? { + label: `Asset (${yieldDto.token.symbol})`, + address: yieldDto.token.address, + } + : null, + ].filter((row): row is { label: string; address: string } => !!row); + +const formatNetworkName = (network: string) => + network + .split("-") + .map((part) => part.charAt(0).toUpperCase() + part.slice(1)) + .join(" "); + +const formatRewardTokenLabel = (yieldDto: Yield) => { + const symbol = yieldDto.token.symbol; + + return yieldDto.mechanics.rewardClaiming === "auto" + ? `${symbol} (PPS-bearing)` + : symbol; +}; + +const formatCooldown = (yieldDto: Yield, t: TFunction) => { + const days = getYieldCooldownPeriod(yieldDto)?.days ?? 0; + + return days > 0 + ? t("dashboard.earn_details.cooldown_days", { count: days }) + : t("dashboard.earn_details.none"); +}; + +const formatRewardClaiming = ( + yieldDto: Yield, + t: ReturnType["t"] +) => + yieldDto.mechanics.rewardClaiming === "auto" + ? t("dashboard.earn_details.auto_compounding") + : t("dashboard.earn_details.manual"); diff --git a/packages/widget/src/pages-dashboard/overview/earn-details/reward-rate-chart.tsx b/packages/widget/src/pages-dashboard/overview/earn-details/reward-rate-chart.tsx new file mode 100644 index 00000000..ae73ee2e --- /dev/null +++ b/packages/widget/src/pages-dashboard/overview/earn-details/reward-rate-chart.tsx @@ -0,0 +1,135 @@ +import { useId } from "react"; +import { Area, AreaChart, ResponsiveContainer, XAxis, YAxis } from "recharts"; +import { Box } from "../../../components/atoms/box"; +import { ContentLoaderSquare } from "../../../components/atoms/content-loader"; +import { Spinner } from "../../../components/atoms/spinner"; +import { Text } from "../../../components/atoms/typography/text"; +import { vars } from "../../../styles/theme/contract.css"; +import { + axisLabel, + chartContainer, + chartLoadingOverlay, + emptyChartContainer, +} from "./styles.css"; +import type { RewardRateHistoryPoint } from "./use-yield-reward-rate-history"; + +type Props = { + chartId: string; + data: RewardRateHistoryPoint[]; + isFetching: boolean; + isLoading: boolean; + tickFormatter: (value: number) => string; +}; + +const height = 150; + +const accentColor = vars.color.primaryButtonBackground; + +type EndpointDotProps = { + cx?: number; + cy?: number; + index?: number; +}; + +export const HistoryChart = ({ + chartId, + data, + isFetching, + isLoading, + tickFormatter, +}: Props) => { + const gradientId = `${chartId}-gradient-${useId().replaceAll(":", "")}`; + + if (isLoading && data.length < 2) { + return ; + } + + if (data.length < 2) { + return ( + + No chart data + + ); + } + + const values = data.map((point) => point.value); + const min = Math.min(...values); + const max = Math.max(...values); + const padding = Math.max((max - min) * 0.2, 0.05); + const domainMin = Math.max(0, min - padding); + const domainMax = domainMin === max + padding ? domainMin + 1 : max + padding; + const ticks = [domainMin, (domainMin + domainMax) / 2, domainMax]; + + const lastIndex = data.length - 1; + + const renderEndpointDot = ({ cx, cy, index }: EndpointDotProps) => { + if (index !== lastIndex || cx == null || cy == null) { + return ; + } + + return ( + + + + + ); + }; + + return ( + + + + + + + + + + + + + + + + + + + {isFetching && ( + + + + )} + + ); +}; diff --git a/packages/widget/src/pages-dashboard/overview/earn-details/styles.css.ts b/packages/widget/src/pages-dashboard/overview/earn-details/styles.css.ts new file mode 100644 index 00000000..22dc9580 --- /dev/null +++ b/packages/widget/src/pages-dashboard/overview/earn-details/styles.css.ts @@ -0,0 +1,156 @@ +import { globalStyle, keyframes, style } from "@vanilla-extract/css"; +import { recipe } from "@vanilla-extract/recipes"; +import { atoms } from "../../../styles/theme/atoms.css"; +import { vars } from "../../../styles/theme/contract.css"; + +export const container = style({ + maxHeight: "720px", + overflowY: "auto", +}); + +export const earnDetailsWrapper = style({ + alignSelf: "flex-start", +}); + +export const headerProviderText = style({ + overflow: "hidden", + textOverflow: "ellipsis", + whiteSpace: "nowrap", +}); + +export const metricGrid = style({ + display: "grid", + gap: "8px", + gridTemplateColumns: "repeat(3, minmax(0, 1fr))", +}); + +export const metricCard = style([ + atoms({ + background: "stakeSectionBackground", + borderRadius: "xl", + px: "3", + py: "3", + }), + { + minWidth: 0, + }, +]); + +export const sectionDivider = style([ + atoms({ + background: "backgroundMuted", + }), + { + height: "1px", + width: "100%", + }, +]); + +export const rangeButton = recipe({ + base: [ + atoms({ + borderRadius: "base", + px: "2", + py: "1", + }), + { + border: 0, + cursor: "pointer", + font: "inherit", + }, + ], + variants: { + active: { + true: atoms({ background: "stakeSectionBackground" }), + false: atoms({ background: "transparent" }), + }, + }, +}); + +export const chartContainer = style({ + height: "150px", + position: "relative", + width: "100%", +}); + +const chartOverlayFadeIn = keyframes({ + "0%": { opacity: 0 }, + "100%": { opacity: 1 }, +}); + +export const chartLoadingOverlay = style([ + atoms({ + alignItems: "center", + display: "flex", + justifyContent: "center", + }), + { + animation: `${chartOverlayFadeIn} 150ms ease`, + backdropFilter: "blur(2px)", + backgroundColor: `color-mix(in srgb, ${vars.color.background} 72%, transparent)`, + inset: 0, + position: "absolute", + willChange: "opacity", + zIndex: 1, + }, +]); + +globalStyle( + `${chartContainer} :is(.recharts-wrapper, .recharts-surface, svg, .recharts-cartesian-axis-tick-label, .recharts-cartesian-axis-tick-value):is(:focus, :focus-visible)`, + { + outline: "none", + } +); + +export const emptyChartContainer = style([ + atoms({ + alignItems: "center", + display: "flex", + justifyContent: "center", + }), + { + height: "150px", + }, +]); + +export const axisLabel = style({ + fill: vars.color.textMuted, + fontSize: "11px", + fontWeight: 400, +}); + +export const detailRow = style([ + atoms({ + alignItems: "center", + display: "flex", + justifyContent: "space-between", + gap: "4", + py: "2", + }), + { + borderBottom: `1px solid ${vars.color.backgroundMuted}`, + }, +]); + +export const addressBox = style([ + atoms({ + background: "stakeSectionBackground", + borderRadius: "base", + display: "flex", + justifyContent: "space-between", + gap: "2", + px: "3", + py: "2", + }), + { + minWidth: 0, + }, +]); + +export const valueText = style({ + minWidth: 0, + overflow: "hidden", + textAlign: "right", + textOverflow: "ellipsis", + whiteSpace: "nowrap", +}); diff --git a/packages/widget/src/pages-dashboard/overview/earn-details/use-yield-reward-rate-history.ts b/packages/widget/src/pages-dashboard/overview/earn-details/use-yield-reward-rate-history.ts new file mode 100644 index 00000000..222ca922 --- /dev/null +++ b/packages/widget/src/pages-dashboard/overview/earn-details/use-yield-reward-rate-history.ts @@ -0,0 +1,85 @@ +import { keepPreviousData, useQuery } from "@tanstack/react-query"; +import BigNumber from "bignumber.js"; +import { useMemo } from "react"; +import { useApiClient } from "../../../providers/api/api-client-provider"; + +export type RewardRateHistoryPeriod = "30d" | "90d" | "1y" | "all"; + +export type RewardRateHistoryPoint = { + date: Date; + timestamp: string; + value: number; +}; + +type RewardRateHistoryResponse = { + readonly items?: ReadonlyArray<{ + readonly timestamp: string; + readonly rewardRate: string; + }>; +}; + +export const periodToApiPeriod = { + "30d": "30d", + "90d": "90d", + "1y": "1y", + all: "all", +} as const; + +export const getYieldHistoryInterval = (period: RewardRateHistoryPeriod) => + period === "1y" || period === "all" ? "week" : "day"; + +export const useYieldRewardRateHistory = ({ + period, + yieldId, +}: { + period: RewardRateHistoryPeriod; + yieldId: string | undefined; +}) => { + const apiClient = useApiClient(); + + const query = useQuery({ + enabled: !!yieldId, + queryKey: ["yield-reward-rate-history", yieldId, period], + placeholderData: keepPreviousData, + staleTime: 1000 * 60 * 2, + queryFn: async ({ signal }) => { + if (!yieldId) return []; + + const response = await apiClient + .withRunOptions({ signal }) + .yield.YieldsControllerGetYieldRewardRateHistory(yieldId, { + params: { + period: periodToApiPeriod[period], + interval: getYieldHistoryInterval(period), + }, + }); + + return (response as RewardRateHistoryResponse).items ?? []; + }, + }); + + const data = useMemo( + () => + (query.data ?? []) + .flatMap((item) => { + const date = new Date(item.timestamp); + const rewardRate = BigNumber(item.rewardRate); + + if (Number.isNaN(date.getTime()) || !rewardRate.isFinite()) { + return []; + } + + return [ + { + date, + timestamp: item.timestamp, + value: rewardRate.times(100).toNumber(), + }, + ]; + }) + .sort((a, b) => a.date.getTime() - b.date.getTime()), + [query.data] + ); + + return { ...query, data }; +}; diff --git a/packages/widget/src/pages-dashboard/overview/earn-details/use-yield-tvl-history.ts b/packages/widget/src/pages-dashboard/overview/earn-details/use-yield-tvl-history.ts new file mode 100644 index 00000000..bc5ba562 --- /dev/null +++ b/packages/widget/src/pages-dashboard/overview/earn-details/use-yield-tvl-history.ts @@ -0,0 +1,80 @@ +import { keepPreviousData, useQuery } from "@tanstack/react-query"; +import BigNumber from "bignumber.js"; +import { useMemo } from "react"; +import { useApiClient } from "../../../providers/api/api-client-provider"; +import { + getYieldHistoryInterval, + periodToApiPeriod, + type RewardRateHistoryPeriod, + type RewardRateHistoryPoint, +} from "./use-yield-reward-rate-history"; + +type TvlHistoryResponse = { + readonly items?: ReadonlyArray<{ + readonly timestamp: string; + readonly tvl?: string | null; + readonly tvlUsd?: string | null; + }>; +}; + +export const useYieldTvlHistory = ({ + period, + yieldId, +}: { + period: RewardRateHistoryPeriod; + yieldId: string | undefined; +}) => { + const apiClient = useApiClient(); + + const query = useQuery({ + enabled: !!yieldId, + queryKey: ["yield-tvl-history", yieldId, period], + placeholderData: keepPreviousData, + staleTime: 1000 * 60 * 2, + queryFn: async ({ signal }) => { + if (!yieldId) return []; + + const response = await apiClient + .withRunOptions({ signal }) + .yield.YieldsControllerGetYieldTvlHistory(yieldId, { + params: { + period: periodToApiPeriod[period], + interval: getYieldHistoryInterval(period), + }, + }); + + return (response as TvlHistoryResponse).items ?? []; + }, + }); + + const data = useMemo( + () => + (query.data ?? []) + .flatMap((item) => { + const date = new Date(item.timestamp); + const tvlValue = item.tvlUsd; + + if (!tvlValue) { + return []; + } + + const tvl = BigNumber(tvlValue); + + if (Number.isNaN(date.getTime()) || !tvl.isFinite()) { + return []; + } + + return [ + { + date, + timestamp: item.timestamp, + value: tvl.toNumber(), + }, + ]; + }) + .sort((a, b) => a.date.getTime() - b.date.getTime()), + [query.data] + ); + + return { ...query, data }; +}; diff --git a/packages/widget/src/pages-dashboard/overview/earn-page/index.tsx b/packages/widget/src/pages-dashboard/overview/earn-page/index.tsx index 79d3dcfc..15e4ece0 100644 --- a/packages/widget/src/pages-dashboard/overview/earn-page/index.tsx +++ b/packages/widget/src/pages-dashboard/overview/earn-page/index.tsx @@ -18,53 +18,59 @@ import { } from "./styles.css"; import { UtilaSelectValidatorSection } from "./utila-select-validator-section"; -export const EarnPage = () => { +export const EarnPageContent = () => { const { variant } = useSettings(); return ( - - - - - - - + + + + + - + - {(variant === "utila" || variant === "porto") && ( - - - - )} + {(variant === "utila" || variant === "porto") && ( + + + + )} - + - + - {variant !== "utila" && variant !== "porto" && ( - - )} + {variant !== "utila" && variant !== "porto" && ( + + )} - - + + - {(variant === "utila" || variant === "porto") && } + {(variant === "utila" || variant === "porto") && } - -