import type { Program, Idl } from "@coral-xyz/anchor"; import { PublicKey } from "@solana/web3.js"; import type { PrivacyConfigAccount } from "../config.js"; /** * Fetch and decode the on-chain PrivacyConfig account for a pool. */ export declare function fetchPoolConfig(program: Program, mintAddress: PublicKey): Promise; /** * Check whether a nullifier has been spent on-chain. * Returns true if the nullifier marker PDA exists (funds already spent). */ export declare function checkNullifierSpent(program: Program, mintAddress: PublicKey, nullifier: Uint8Array): Promise; /** On-chain tree utilization info */ export type TreeInfo = { treeId: number; leafCount: number; capacity: number; utilizationPercent: number; remainingCapacity: number; isFull: boolean; treePDA: PublicKey; }; /** * Fetch utilization info for a specific tree. * Returns null if the tree does not exist yet. */ export declare function getTreeInfo(program: Program, mintAddress: PublicKey, treeId: number): Promise; /** * Fetch utilization info for all trees in a pool. */ export declare function getAllTreeInfo(program: Program, mintAddress: PublicKey): Promise; /** * Find the best tree to deposit into. * * Strategy (matches veilo-dapp): * 1. Discard full trees. * 2. Prefer the LOWEST tree ID with remaining capacity ≥ minCapacity (default 0.01%). * 3. Ensures trees fill sequentially: 0 → 1 → 2 → … * 4. Fallback to the tree with the most remaining capacity. */ export declare function getBestTreeForDeposit(program: Program, mintAddress: PublicKey, minCapacity?: number): Promise;