/**
 * ABI Encoding Helpers
 *
 * TypeScript ABI encoding for shield/transfer/unshield flows
 * using viem. Matches the Rust ABI module at chain/abi.rs.
 */
import { encodeFunctionData } from 'viem';
const shieldAbi = [
    {
        type: 'function',
        name: 'requestDeposit',
        stateMutability: 'nonpayable',
        inputs: [
            { name: 'commitment', type: 'bytes32' },
            { name: 'ciphertext', type: 'bytes' },
        ],
        outputs: [],
    },
];
const erc20Abi = [
    {
        type: 'function',
        name: 'approve',
        stateMutability: 'nonpayable',
        inputs: [
            { name: 'spender', type: 'address' },
            { name: 'amount', type: 'uint256' },
        ],
        outputs: [{ name: '', type: 'bool' }],
    },
];
const wethAbi = [
    {
        type: 'function',
        name: 'deposit',
        stateMutability: 'payable',
        inputs: [],
        outputs: [],
    },
    {
        type: 'function',
        name: 'withdraw',
        stateMutability: 'nonpayable',
        inputs: [{ name: 'wad', type: 'uint256' }],
        outputs: [],
    },
];
export function encodeRequestDeposit(commitment, ciphertext) {
    return encodeFunctionData({
        abi: shieldAbi,
        functionName: 'requestDeposit',
        args: [commitment, ciphertext],
    });
}
export function encodeErc20Approve(spender, amount) {
    return encodeFunctionData({
        abi: erc20Abi,
        functionName: 'approve',
        args: [spender, amount],
    });
}
export function encodeWethWrap() {
    return encodeFunctionData({
        abi: wethAbi,
        functionName: 'deposit',
    });
}
export function encodeWethUnwrap(amount) {
    return encodeFunctionData({
        abi: wethAbi,
        functionName: 'withdraw',
        args: [amount],
    });
}
//# sourceMappingURL=abi.js.map