import type { Program, Idl } from "@coral-xyz/anchor"; import { Keypair, PublicKey } from "@solana/web3.js"; import type { TransactionProofBuilder } from "../proofs/types.js"; import type { InputUTXO, SerializedUTXO } from "../notes/model.js"; import { MerkleTree } from "../merkle.js"; import { type NoteCiphers } from "../compactNote.js"; export type TransferResult = { /** Output UTXOs created by the transfer */ outputUTXOs: [SerializedUTXO, SerializedUTXO]; /** Leaf indices where the UTXOs were inserted */ leafIndices: [number, number]; /** New Merkle root after insertion */ root: Uint8Array; }; /** * Execute a private transfer within the pool. * * For transfers, the publicAmount is 0 (no funds enter or leave the pool). * Input amounts must equal output amounts. * * @param inputUTXOs - The UTXOs being spent * @param outputPubkeys - UTXO public keys for the recipients * @param outputAmounts - Amounts for each output (must sum to input total) * @param inputTreeId - The tree ID where input UTXOs are located * @param outputTreeId - The tree ID where output commitments will be inserted */ export declare function privateTransfer(params: { program: Program; relayer: Keypair; mintAddress: PublicKey; inputUTXOs: [InputUTXO, InputUTXO]; outputPubkeys: [bigint, bigint]; outputAmounts: [bigint, bigint]; root: Uint8Array; inputTreeId: number; outputTreeId: number; tree: MerkleTree; proofBuilder: TransactionProofBuilder; /** Must be zero: the program rejects fees on publicAmount=0 transfers. */ fee?: bigint; deadline?: bigint; /** Public recipient account committed in ExtData (no funds are sent to it). */ externalRecipient?: PublicKey; /** Wallet keys used to encrypt output notes for on-chain recovery. */ noteRecipientWallets?: [ PublicKey | Uint8Array | null, PublicKey | Uint8Array | null ]; /** Verified X25519 view-v2 targets; each entry overrides its wallet target. */ noteRecipientViewKeys?: [Uint8Array | null, Uint8Array | null]; /** Prebuilt note ciphers. Takes precedence over noteRecipientWallets. */ noteCiphers?: NoteCiphers | null; }): Promise;