/** * Build Shield Transaction - Returns unsigned transaction data * * This function builds the shield transaction without sending it, * allowing for gasless relay where the relayer broadcasts the signed tx. */ import type { SupportedToken } from './local-config'; export interface BuildShieldOptions { invoicePrivateKey: string; amount: string; token: SupportedToken; network?: 'mainnet' | 'testnet'; chainId?: number; rpcUrl?: string; } export interface ShieldTransactionData { approveTx?: { to: string; data: string; nonce: number; gasLimit: bigint; gasPrice: bigint; }; shieldTx: { to: string; data: string; value: bigint; nonce: number; gasLimit: bigint; gasPrice: bigint; }; railgunAddress: string; tokenAddress: string; amountWei: bigint; } /** * Build shield transaction data without sending * Returns unsigned transaction data that can be signed offline and broadcast by a relayer */ export declare function buildShieldTransaction(options: BuildShieldOptions): Promise; /** * Sign and serialize a transaction for relay */ export declare function signTransactionForRelay(invoicePrivateKey: string, tx: { to: string; data: string; value?: bigint; nonce: number; gasLimit: bigint; gasPrice: bigint; }, chainId?: number): Promise; export interface ShieldCalldataResult { approveCall: { to: string; value: string; data: string; }; shieldCall: { to: string; value: string; data: string; }; railgunAddress: string; tokenAddress: string; balance: string; } /** * Build shield calldata for use in a UserOp * * This is used for Smart Wallet invoices where the shield operation * is executed via ERC-4337 UserOp with paymaster sponsorship. * * Returns the approve and shield call data that will be batched in the UserOp. */ export declare function buildShieldCalldata(invoicePrivateKey: string, token: SupportedToken, network?: 'mainnet' | 'testnet', rpcUrl?: string, smartWalletAddress?: string, // For smart invoices, tokens are at this address amount?: string, // Specific amount to shield (if not provided, shields full balance) chainIdOverride?: number): Promise;