export declare const delegateForUserDecryptionTypes: readonly ["address", "address", "uint64"]; export declare const callFromParentTypes: readonly ["address", "uint256", "bytes"]; export declare const aclMulticallTypes: readonly ["bytes[]"]; /** * Function selector for ACL.delegateForUserDecryption(address,address,uint64) * = keccak256('delegateForUserDecryption(address,address,uint64)')[0:4] */ export declare const delegateForUserDecryptionMethodId: string; /** * Function selector for ACL.multicall(bytes[]) * = keccak256('multicall(bytes[])')[0:4] * ACL inherits OpenZeppelin MulticallUpgradeable — preserves msg.sender via delegatecall. */ export declare const aclMulticallMethodId: string; /** * Function selector for ForwarderV4.callFromParent(address,uint256,bytes) * = keccak256('callFromParent(address,uint256,bytes)')[0:4] */ export declare const callFromParentMethodId: string; /** * Encodes a single ACL.delegateForUserDecryption() call. * * Grants `delegateAddress` the right to decrypt ERC-7984 token balances on * behalf of the calling address (msg.sender) for the specified token contract. * * @param delegateAddress BitGo enterprise viewing key address * @param tokenContractAddress ERC-7984 token contract address * @param expiryTimestamp Unix seconds; recommended: Math.floor(Date.now()/1000) + 365*86400 * @returns ABI-encoded calldata hex string (0x-prefixed) */ export declare function buildDelegationCalldata(delegateAddress: string, tokenContractAddress: string, expiryTimestamp: number): string; /** * Encodes N delegateForUserDecryption calls batched inside ACL.multicall(). * * Produces a single TX that grants delegation for all specified token contracts. * Requires tokenContractAddresses.length >= 1. * Note: DecryptionDelegationBuilder always uses this function (even for a single token) * to keep the transaction shape consistent regardless of token count. * * @param delegateAddress BitGo enterprise viewing key address * @param tokenContractAddresses Array of ERC-7984 token contract addresses * @param expiryTimestamp Unix seconds * @returns ABI-encoded calldata hex string (0x-prefixed) */ export declare function buildMulticallDelegationCalldata(delegateAddress: string, tokenContractAddresses: string[], expiryTimestamp: number): string; /** * Wraps calldata in a ForwarderV4.callFromParent(target, 0, data) call. * * Used when a forwarder contract must be msg.sender for an external contract * call — for example, when the forwarder itself needs to call * ACL.delegateForUserDecryption() so that its own balance can be decrypted. * * Only the parentAddress (root wallet) is allowed to call callFromParent * (enforced by the forwarder's onlyParent modifier). * * @param targetAddress Address of the contract the forwarder will call (e.g. ACL) * @param calldata ABI-encoded inner calldata (e.g. from buildDelegationCalldata) * @returns ABI-encoded callFromParent calldata hex string (0x-prefixed) */ export declare function wrapInCallFromParent(targetAddress: string, calldata: string): string; /** * Decodes token contract addresses from delegation calldata. * * Handles two shapes of calldata: * - Direct ACL.multicall(bytes[]) (root wallet path) * - ForwarderV4.callFromParent(address, uint256, bytes) wrapping a multicall (forwarder path) * * @param calldata ABI-encoded delegation calldata (0x-prefixed or raw hex) * @returns Array of token contract addresses (lowercase) found in the delegation calls * @throws {Error} if the calldata does not start with a recognised method selector */ export declare function decodeTokenAddressesFromDelegationCalldata(calldata: string): string[]; /** * Encodes confidentialTransfer(address to, bytes32 encryptedHandle) calldata. * Uses the no-proof variant (selector 0x5bebed7e) — valid when the caller (forwarder) * is already ACL-allowed on the handle from when it received the tokens. * * @param toAddress Address that will receive the tokens * @param encryptedHandle bytes32 encrypted balance handle from confidentialBalanceOf * @returns ABI-encoded calldata hex string (0x-prefixed) */ export declare function buildConfidentialTransferByHandleCalldata(toAddress: string, encryptedHandle: string): string; /** * Encodes the full flush calldata for ERC-7984 forwarder consolidation: * callFromParent(tokenContractAddress, 0, confidentialTransfer(parentAddress, encryptedHandle)) * The forwarder executes the inner confidentialTransfer with msg.sender = forwarder. * * @param tokenContractAddress ERC-7984 token contract address * @param parentAddress Root wallet address (destination of flushed tokens) * @param encryptedHandle bytes32 encrypted balance handle from confidentialBalanceOf * @returns ABI-encoded calldata hex string (0x-prefixed) */ export declare function buildFlushERC7984ForwarderTokenCalldata(tokenContractAddress: string, parentAddress: string, encryptedHandle: string): string; /** * Decodes a FlushERC7984ForwarderToken calldata. * Strips the outer callFromParent wrapper and the inner confidentialTransfer. * Returns { tokenContractAddress, parentAddress, encryptedHandle }. * * @param data ABI-encoded flush calldata (0x-prefixed) * @returns Decoded fields */ export declare function decodeFlushERC7984ForwarderTokenCalldata(data: string): { tokenContractAddress: string; parentAddress: string; encryptedHandle: string; }; //# sourceMappingURL=zamaUtils.d.ts.map