import type { LocalAccount } from 'viem/accounts'; import type * as App from '../../../App.js'; import type * as Auth from '../../../internal/Auth.js'; import type * as Db from '../../../db/Db.js'; import type * as Mpp from '../Mpp.js'; /** Resolves the chain declared by a Tempo charge challenge. */ export declare function chainId(input: Mpp.RelayInput): number | undefined; /** Whether a Tempo charge credential requests platform fee sponsorship. */ export declare function requiresFeePayer(input: Mpp.RelayInput): boolean; /** Refuses a sponsored transaction that the current fee market cannot admit. */ export declare function assertFeeMarketAdmission(options: assertFeeMarketAdmission.Options): void; export declare namespace assertFeeMarketAdmission { /** Current fee-market and transaction fee bounds. */ type Options = { /** Latest block base fee. */ baseFeePerGas: bigint; /** Signed transaction fee cap. */ maxFeePerGas: bigint; }; } /** Refuses unsupported chains, unauthorized Zones, and sandbox access to mainnet. */ export declare function assertChainAccess(options: assertChainAccess.Options): void; export declare namespace assertChainAccess { /** Chain-selection inputs. */ type Options = { /** Resolved credential chain. */ chainId: number; /** Authenticated request principal. */ principal?: Auth.Principal | undefined; /** Chains served by this API deployment. */ supportedChainIds: ReadonlySet; /** Configured Zones and their parent chains. */ zones: App.Environment['Variables']['zones']; }; } /** Authorizes managed fee sponsorship for one broadcast request. */ export declare function authorizeFeePayer(options: authorizeFeePayer.Options): Promise; export declare namespace authorizeFeePayer { /** Dependencies used to authorize managed fee sponsorship. */ type Options = { /** Credential chain. */ chainId: number; /** Primary database for authoritative billing enforcement. */ db: Db.Db; /** Managed fee-payer account, when configured. */ feePayer?: LocalAccount | undefined; /** MPP credential being broadcast. */ input: Mpp.RelayInput; /** Authenticated request principal. */ principal?: Auth.Principal | undefined; /** Configured Zones and their parent chains. */ zones: App.Environment['Variables']['zones']; }; } /** Raised when an MPP credential selects a chain this deployment does not serve. */ export declare class UnsupportedChainError extends Error { name: string; constructor(chainId: number); } /** Raised when an MPP credential violates chain access or sponsorship policy. */ export declare class PolicyDeniedError extends Error { name: string; } //# sourceMappingURL=Policy.d.ts.map