/** Pool merkle tree depth — 4B notes capacity. */ declare const POOL_DEPTH = 32; /** ASP merkle tree depth — same as pool for symmetric witness costs. */ declare const ASP_DEPTH = 32; /** USDC base unit (6 decimals → micro-USDC). */ declare const USDC_DECIMALS = 6; interface PaymentAddress { /** 32-byte spending public key (Poseidon1(spending_sk)) — used in commitments. */ spendingPk: Uint8Array; /** 32-byte X25519 viewing public key — used to encrypt notes for the recipient. */ viewingPk: Uint8Array; } /** Base58Check encoding of `spendingPk || viewingPk`. ~88-char string. */ type PaymentAddressString = string; interface DecryptedNote { /** Micro-USDC value stored in the note. */ value: bigint; /** 32-byte recipient pubkey (== owner spending_pk). */ ownerPk: Uint8Array; /** 32-byte random blinding factor. */ blinding: Uint8Array; /** Optional 32-byte memo, or null if no memo. */ memo: Uint8Array | null; } interface OwnedNote extends DecryptedNote { /** Position in the pool's commitment tree, set when the note was added. */ leafIndex: number; /** Slot at which the note was added on chain. */ receivedAtSlot: number; /** True iff we've observed a tx that spent this note's nullifier. */ spent: boolean; /** Cached commitment (= Poseidon4 of the note fields). */ commitment: Uint8Array; /** Cached nullifier (= Poseidon2(commitment, nullifier_sk)). */ nullifier: Uint8Array; } interface EncryptedNoteBlob { /** 32-byte commitment of the note this blob describes. */ commitment: Uint8Array; /** 32-byte X25519 ephemeral public key the sender used. */ ephemeralPk: Uint8Array; /** ChaCha20-Poly1305 ciphertext + 16-byte tag (96 bytes for memo-less, 128 with memo). */ ciphertext: Uint8Array; /** Slot at which the blob was added on chain. */ slot: number; /** Position in the commitment tree (matches OwnedNote.leafIndex). */ leafIndex: number; } interface MerklePath { /** 32-byte hash siblings, leaf-to-root order (length == depth). */ pathElements: Uint8Array[]; /** Bit per level: 0 = leaf is left child, 1 = leaf is right child (length == depth). */ pathIndices: number[]; /** 32-byte root that this path verifies under. */ root: Uint8Array; } /** Witness for `Deposit.circom`. */ interface DepositWitness { ownerPk: string; blinding: string; memo: string; publicValue: string; depositorAddrHash: string; fee: string; } /** Witness for `Withdraw.circom`. */ interface WithdrawWitness { value: string; ownerPk: string; blinding: string; memo: string; spendingSk: string; nullifierSk: string; poolPathElements: string[]; poolPathIndices: number[]; aspPathElements: string[]; aspPathIndices: number[]; publicValue: string; publicAddress: string; fee: string; } /** Witness for `CashoutProof.circom` (ADR-012 V3). */ interface CashoutProofWitness { value: string; ownerPk: string; blinding: string; memo: string; spendingSk: string; nullifierSk: string; creditPoolPathElements: string[]; creditPoolPathIndices: number[]; publicValue: string; publicAddress: string; fee: string; } /** Witness for `JoinSplit2x2.circom`. */ interface JoinSplitWitness { inputValue1: string; inputOwnerPk1: string; inputBlinding1: string; inputMemo1: string; inputPoolPath1: string[]; inputPoolIndices1: number[]; inputAspPath1: string[]; inputAspIndices1: number[]; inputValue2: string; inputOwnerPk2: string; inputBlinding2: string; inputMemo2: string; inputPoolPath2: string[]; inputPoolIndices2: number[]; inputAspPath2: string[]; inputAspIndices2: number[]; spendingSk: string; nullifierSk: string; outputValue1: string; outputOwnerPk1: string; outputBlinding1: string; outputMemo1: string; outputValue2: string; outputOwnerPk2: string; outputBlinding2: string; outputMemo2: string; publicValueIn: string; publicValueOut: string; publicAddress: string; fee: string; } interface DepositPublicSignals { /** outputCommitment */ outputCommitment: string; /** depositorAddrHash */ depositorAddrHash: string; /** fee */ fee: string; /** publicValue */ publicValue: string; } interface WithdrawPublicSignals { /** nullifier */ nullifier: string; /** root */ root: string; /** aspRoot */ aspRoot: string; /** fee */ fee: string; /** publicAddress */ publicAddress: string; /** publicValue */ publicValue: string; } interface JoinSplitPublicSignals { /** inputNullifier1 */ inputNullifier1: string; /** inputNullifier2 */ inputNullifier2: string; /** outputCommitment1 */ outputCommitment1: string; /** outputCommitment2 */ outputCommitment2: string; /** root */ root: string; /** aspRoot */ aspRoot: string; /** fee */ fee: string; /** publicAddress */ publicAddress: string; /** publicValueIn */ publicValueIn: string; /** publicValueOut */ publicValueOut: string; } interface Groth16Proof { pi_a: string[]; pi_b: string[][]; pi_c: string[]; protocol: 'groth16'; curve: 'bn128'; } interface DepositTx { proof: Groth16Proof; publicSignals: DepositPublicSignals; encryptedNote: EncryptedNoteBlob; } interface WithdrawTx { proof: Groth16Proof; publicSignals: WithdrawPublicSignals; } interface JoinSplitTx { proof: Groth16Proof; publicSignals: JoinSplitPublicSignals; /** Length 2; one blob per output commitment. */ encryptedNotes: [EncryptedNoteBlob, EncryptedNoteBlob]; } interface PoolConfig { /** Solana program ID hosting the pool (or EVM contract address). */ programId: string; /** USDC mint / token contract for this pool. */ usdcMint: string; /** Relayer pubkey (sponsored fee payer). */ relayerAddress: string; /** Network identifier — `solana-devnet`, `solana`, etc. */ network: string; /** Current pool merkle root (hex). */ currentRoot: string; /** Most recent ASP root (hex). */ currentAspRoot: string; /** Snapshot age — seconds since the ASP root was published. */ aspAgeSeconds: number; /** 32-byte commitment of `DUMMY_A` — used to pad single-input JoinSplits. */ dummyACommitment: string; /** 32-byte commitment of `DUMMY_B` — used in 0-input edge cases. */ dummyBCommitment: string; } export { ASP_DEPTH, type CashoutProofWitness, type DecryptedNote, type DepositPublicSignals, type DepositTx, type DepositWitness, type EncryptedNoteBlob, type Groth16Proof, type JoinSplitPublicSignals, type JoinSplitTx, type JoinSplitWitness, type MerklePath, type OwnedNote, POOL_DEPTH, type PaymentAddress, type PaymentAddressString, type PoolConfig, USDC_DECIMALS, type WithdrawPublicSignals, type WithdrawTx, type WithdrawWitness };