import type { Connection, PublicKey } from "@solana/web3.js"; /** * - `landed`: every nullifier is published; the spend happened. * - `failed`: the transaction was processed and reverted; nothing moved, ever. * - `inputs-spent-elsewhere`: some nullifiers are published but not all — a * different transaction spent part of the input set. * - `not-landed`: nothing is published yet. NOT final on its own: a sent * transaction can still land until its blockhash expires. Treat it as final * only once a few minutes have passed since the quote's expiry. */ export type ClientSpendResolution = "landed" | "failed" | "inputs-spent-elsewhere" | "not-landed"; export interface ResolveClientSpendParams { connection: Connection; mintAddress?: PublicKey; /** From `ClientSpendRecovery.inputNullifiers` or a helper result. */ inputNullifiers: string[]; /** When known (an `unconfirmed` result), lets a reverted transaction resolve as `failed`. */ txSignature?: string; } /** * Settle a spend whose outcome the relayer could not report. * * Reads the chain directly — the nullifier markers are the ground truth for * whether notes were spent, whatever any server says. */ export declare function resolveClientSpend(params: ResolveClientSpendParams): Promise;