import { Hex } from 'ox'; import { type Address, type LocalAccount } from 'viem'; import type * as Viem from '../Viem.js'; import type * as Provider from './Provider.js'; /** Maximum subsidized deposit value expressed as a decimal USD amount. */ export type Policy = { /** Maximum source deposit value that Tempo will subsidize. */ maxAmount: string; }; /** Returns whether one USD stablecoin deposit is within the subsidy policy. */ export declare function supports(policy: Policy, options: supports.Options): boolean; export declare namespace supports { /** Route and source amount evaluated against a subsidy policy. */ type Options = { /** Source amount in base units. */ amount: string; /** Token that the recipient receives on Tempo. */ destinationToken: Provider.TokenRef; /** Token deposited on the source chain. */ sourceToken: Provider.TokenRef; }; } /** Prepares and submits durable pathUSD-funded subsidy transactions. */ export type Settler = { /** Tempo account that supplies pathUSD. */ account: Address; /** Broadcasts one previously persisted signed transaction. */ broadcast(parameters: Settler.broadcast.Parameters): Promise; /** Maximum subsidized deposit policy enforced at creation and settlement. */ policy: Policy; /** Prepares one signed transaction without broadcasting it. */ prepare(parameters: Settler.prepare.Parameters): Promise; /** Reads the receipt state of one persisted subsidy transaction. */ status(parameters: Settler.status.Parameters): Promise; }; /** Contracts for subsidy settlement operations. */ export declare namespace Settler { /** Contracts for broadcasting one signed subsidy transaction. */ namespace broadcast { /** Persisted transaction passed to the broadcaster. */ type Parameters = { /** Expected transaction hash. */ hash: Hex.Hex; /** Signed Tempo transaction bytes. */ transaction: Hex.Hex; }; } /** Contracts for preparing one subsidy transaction. */ namespace prepare { /** Deposit deficit used to construct a subsidy transaction. */ type Parameters = { /** Destination-token deficit in base units. */ amount: bigint; /** Deposit id hashed into the destination transfer memo. */ depositId: string; /** Tempo account that receives the subsidy. */ recipient: Address; /** Destination token address supplied by Tempo. */ token: Address; }; /** Signed transaction prepared for durable persistence. */ type ReturnType = { /** Hash of the signed transaction. */ hash: Hex.Hex; /** Signed Tempo transaction bytes. */ transaction: Hex.Hex; }; } /** Contracts for reading subsidy transaction state. */ namespace status { /** Persisted transaction inspected by receipt hash. */ type Parameters = { /** Persisted transaction hash. */ hash: Hex.Hex; }; /** Receipt state used by reconciliation. */ type ReturnType = { /** No verified receipt exists yet. */ type: 'pending'; } | { /** Tempo gas cost persisted for subsidy accounting, in fee-token base units. */ tempoGasPaid: string; /** Verified settlement execution result. */ type: 'reverted' | 'success'; }; } } /** Creates a subsidy settler backed by a Tempo account that holds pathUSD. */ export declare function create(options: create.Options): Settler; export declare namespace create { /** Dependencies and policy for one subsidy settler. */ type Options = { /** Tempo account that signs subsidies and holds pathUSD. */ account: LocalAccount; /** Trusted Tempo RPC client resolver. */ getClient: Viem.GetClient; /** Maximum subsidized deposit policy. */ policy: Policy; }; } /** The subsidy account lacks enough pathUSD. */ export declare class BalanceUnavailableError extends Error { name: string; } /** The Tempo DEX cannot quote the required destination amount. */ export declare class LiquidityUnavailableError extends Error { name: string; } /** The RPC returned a hash that differs from the persisted transaction. */ export declare class TransactionHashMismatchError extends Error { name: string; } //# sourceMappingURL=Subsidy.d.ts.map