import { type Address, type Hex } from 'viem'; import * as Db from '../../db/Db.js'; import * as RewardAccounts from '../../db/tables/rewardAccounts.js'; import * as RewardCampaigns from '../../db/tables/rewardCampaigns.js'; import type * as Viem from '../Viem.js'; /** One active Merkle reward campaign paid in EarnShare. */ export type Reward = { /** EarnShare token distributed as the reward. */ asset: { /** EarnShare address. */ address: Address; /** Tempo chain id. */ chainId: number; /** EarnShare decimals. */ decimals: number; }; /** Last calculated Unix boundary. */ calculatedThrough?: number | undefined; /** Public campaign id, equal to the EarnVault address. */ campaignId: string; /** Latest measured boost APR in basis points. */ currentRewardsAprBps: number | null; /** Exclusive configured end timestamp. */ endsAt: number; /** Inclusive configured start timestamp. */ startsAt: number; /** Configured target total APR in basis points. */ targetTotalAprBps: number; }; /** One recipient's current cumulative reward state and proof. */ export type Recipient = { /** Cumulative EarnShare entitlement. */ cumulativeEntitlement: string; /** Cumulative EarnShare already paid. */ cumulativePaid: string; /** Current delivery exception, when present. */ deferral?: string | undefined; /** Pending unpaid EarnShare. */ pending: string; /** Proof against the latest confirmed root, when entitled. */ proof?: { /** Cumulative amount committed by the leaf. */ cumulativeAmount: string; /** EarnShare distributor accepting the recovery claim. */ distributorAddress: Address; /** Merkle proof. */ proof: readonly Hex[]; /** Confirmed root version. */ rootVersion: string; /** Statement content hash. */ statementHash: Hex; }; }; /** Effective APY combining live position amounts with the latest delivered reward qualification. */ export type PositionApy = { /** Position amounts grouped by the annual rate they receive. */ breakdown: readonly { /** Position amount in vault asset units. */ assetAmount: { /** Amount in the asset's smallest unit. */ baseUnits: string; /** Asset decimal places. */ decimals: number; /** Amount rendered in whole asset units. */ formatted: string; }; /** Annual rate applied to this amount, as a decimal ratio. */ net: string; /** Whether this amount receives the base or qualified boost rate. */ type: 'base' | 'boost'; }[]; /** Balance-weighted annual rate for the wallet's position, as a decimal ratio. */ net: string; }; /** Reads active rewards for one EarnVault. */ export declare function get(options: get.Options): Promise; export declare namespace get { /** Campaign selector. */ type Options = { /** Chain containing the vault. */ chainId: number; /** Authoritative Postgres source. */ db: Db.Source; /** EarnVault address. */ vaultAddress: string; }; } /** Reads active rewards for a vault page. */ export declare function resolveCollection(options: resolveCollection.Options): Promise>; export declare namespace resolveCollection { /** Vault-page selector. */ type Options = { /** Chain containing every vault. */ chainId: number; /** Authoritative Postgres source. */ db: Db.Source; /** EarnVault addresses. */ vaults: readonly string[]; }; } /** Reads one recipient's current state and latest proof. */ export declare function recipient(options: recipient.Options): Promise; export declare namespace recipient { /** Recipient state selector. */ type Options = { /** Chain containing the vault. */ chainId: number; /** Authoritative Postgres source. */ db: Db.Source; /** Chain-aware RPC client factory used to reconcile permissionless claims. */ getClient?: Viem.GetClient | undefined; /** Registered recipient. */ recipient: string; /** EarnVault address. */ vaultAddress: string; }; } /** Resolves effective APY from live position amounts and the latest delivered reward qualification. */ export declare function positionApy(options: positionApy.Options): Promise; export declare namespace positionApy { /** Live position and latest delivered reward-state selector. */ type Options = { /** Fallback asset decimals when no reward campaign exists. */ assetDecimals: number; /** Measured fee-aware vault APY. */ baseNet: string; /** Chain containing the vault. */ chainId: number; /** Authoritative Postgres source. */ db: Db.Source; /** Current engine, fee, router, and Zone contract addresses excluded from boosts. */ excludedAddresses: readonly string[]; /** Wallet receiving the position yield. */ recipient: string; /** Current EarnShare balance. */ shareBalance: string; /** Current asset value of the position. */ value: string; /** EarnVault address. */ vaultAddress: string; }; } /** Reads current unpaid totals, reconciling permissionless claims from the distributor. */ export declare function unpaid(options: unpaid.Options): Promise; export declare namespace unpaid { /** Live unpaid-summary dependencies. */ type Options = { /** Campaign whose current recipient projection is summarized. */ campaign: RewardCampaigns.Record; /** Authoritative Postgres source. */ db: Db.Source; /** Chain-aware RPC client factory used to reconcile permissionless claims. */ getClient: Viem.GetClient; }; } /** Converts integer basis points into a decimal APR ratio. */ export declare function ratio(bps: number): string; //# sourceMappingURL=Read.d.ts.map