import type { EvmReadProvider, EvmWriteProvider, Hex } from "../types/evm.js"; import { type FeeOverrides } from "../utils/fees.js"; import { StealthCanisterClient } from "../ic/client.js"; import { PreparedPrivateSend, PrivateSendResult } from "../types.js"; /** * Parameters for preparing a private send. * * This derives a payment advice and burn address, then encrypts an announcement * for the recipient using the ICP stealth messaging layer. */ export interface PreparePrivateSendParams { /** ICP stealth client used to derive recipient keys and submit announcements. */ client: StealthCanisterClient; /** Recipient EVM address (0x-prefixed, 20 bytes). */ recipientAddress: string; /** Recipient chain ID (EVM chain ID). */ recipientChainId: number | bigint; /** 32-byte seed as 0x-hex string. */ seedHex: string; /** Optional 32-byte payment advice ID. If omitted, a random ID is generated. */ paymentAdviceIdHex?: string; /** RNG override used when generating a payment advice ID. */ randomBytes?: (length: number) => Uint8Array; /** VetKD key ID name for offchain public key derivation (e.g. "key_1" or "test_key_1") */ vetkdKeyIdName?: string; } /** * Prepare a private send announcement. * * @returns Artifacts needed to submit the announcement and later redeem it. * @throws Error if `seedHex` / `paymentAdviceIdHex` is not 32 bytes. */ export declare function preparePrivateSend(params: PreparePrivateSendParams): Promise; export interface SubmitPrivateSendParams { /** ICP stealth client. */ client: StealthCanisterClient; /** Output of `preparePrivateSend`. */ preparation: PreparedPrivateSend; /** Optional storage tag. */ tag?: string; } /** * Submit a prepared private send announcement to the storage canister. * * @returns The stored announcement and the same preparation metadata. */ export declare function submitPrivateSendAnnouncement(params: SubmitPrivateSendParams): Promise; /** * Parameters for {@link submitPrivateSendTransfer}. */ export interface SubmitPrivateSendTransferParams { /** EVM write provider (e.g. wallet client). */ writeProvider: EvmWriteProvider; /** Token contract address. */ tokenAddress: string; /** Burn address generated by `preparePrivateSend`. */ burnAddress: string; /** Amount in the token's smallest unit. */ amount: bigint; /** Optional fee overrides from `buildFeeOverrides`. */ feeOverrides?: FeeOverrides; /** * EVM read provider for awaiting the receipt. * Falls back to `writeProvider` if it exposes `waitForTransactionReceipt`. */ readProvider?: EvmReadProvider; } /** * Execute an ERC-20 `transfer` to the burn address and wait for the receipt. * * This is the final on-chain step of a private send, after the announcement * has been prepared and submitted. * * @returns The confirmed transaction hash. */ export declare function submitPrivateSendTransfer(params: SubmitPrivateSendTransferParams): Promise<{ transactionHash: Hex; }>; //# sourceMappingURL=privateSend.d.ts.map