import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const [account] = await window.ethereum.request({method: "eth_requestAccounts"});
const walletClient = createWalletClient({
chain: mainnet,
account,
transport: custom(window.ethereum!)
});
const payload: any = {
userOpHash: "",
transferType: "wallet",
destinationChainId: 8453,
destinationTokenAddress: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
toAmount: 1000000, // decimal adjusted
destinationRecipient: "0x45c0470ef627a30efe30c06b13d883669b8fd3a8",
fromTokenAddess: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
fromChainId: 42161,
fromAddress: "0xeDa8Dec60B6C2055B61939dDA41E9173Bab372b2",
fromAmount: 1000000
};
const depositData = await aarcCoreSDK.getDepositAddress(payload);
// make user sign the generated tx
const { to, value, data, gasLimit, chainId, from } = depositData.txData;
const txHash = await signer.sendTransaction({ to, value, data, gasLimit, chainId, from });