/** * `allowance` namespace — the agent's local wallet. * * `status`, `create`, `export` touch the local allowance file via optional * provider methods. Sandbox providers that don't implement those throw a * descriptive error at runtime. * * `faucet` is an API call (request testnet USDC) and works in any environment. */ import type { Client } from "../kernel.js"; export interface AllowanceStatusResult { address: string; created?: string; /** * True once the faucet has been invoked on this allowance. This tracks * "faucet has been used," not "account can pay right now" — the two diverge * once funds are spent or expire. Callers wanting a real pay-readiness * check should call `allowance balance`. */ faucet_used?: boolean; lastFaucet?: string; path?: string; /** The persisted payment rail (`x402` when unset). */ rail?: "x402" | "mpp" | "lightning"; /** The Lightning allowance, without its pairing secret. */ lightning?: { wallet_id: string; lightning_address: string | null; budget_sats: number; starter_sats: number; custody: "run402_hub"; has_pairing: true; minted_at: string; }; /** true when the local provider holds an allowance, false otherwise. */ configured: boolean; } export interface AllowanceCreateResult { address: string; created: string; path?: string; } export interface FaucetResult { /** Present on gateways that wait for on-chain confirmation. */ fundingStatus?: "confirmed"; transactionHash: string; /** Display-formatted amount, e.g. `"0.25"`. Computed from `amountUsdMicros`. */ amount: string; /** Raw amount in micro-USD (1_000_000 = $1.00). */ amountUsdMicros: number; token: string; network: string; } export interface FaucetOptions { address?: string; idempotencyKey?: string; } export declare class Allowance { private readonly client; constructor(client: Client); /** Inspect the local allowance. Returns `{configured: false}` when absent. */ status(): Promise; /** * Generate a new allowance keypair and persist it. Throws when the * provider already holds an allowance (don't overwrite silently) or * when the provider doesn't support local allowance management. */ create(): Promise; /** Return the allowance address (safe to share). Throws if none is configured. */ export(): Promise; /** * Request testnet USDC from the Run402 faucet. When `address` is omitted, * the SDK uses the provider's local allowance address. Updates the * allowance's internal `funded` marker on success (surfaced as * `faucet_used` in `status()`). */ faucet(addressOrOptions?: string | FaucetOptions): Promise; } //# sourceMappingURL=allowance.d.ts.map