require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../functions/utils/token-check.utils.cjs`),n=require(`../../functions/utils/create-provider.cjs`),r=require(`../../functions/pre-transaction/constructAdminData.cjs`),i=require(`../AccountActions/AccountActions.cjs`),a=require(`../../functions/pre-transaction/sendV0Transaction.cjs`),o=require(`../../API/admin-calls.cjs`),s=require(`../../functions/pre-transaction/solanaTransfer.utils.cjs`);let c=require(`@solana/web3.js`);var l=async(r,a,o,l)=>{let u=t.validateAndGetChainId([r]),d=i.AccountActions.getAddressFromSubAccount(u,o);if(!d)throw Error(`Public account address is not available`);let{fetchRpcUrl:f}=e.networkRegistry[u];if(!f)throw Error(`RPC URL not found for the specified chain ID`);let p=n.createCustomSolanaConnection(f),m=new c.PublicKey(d),{instructions:h,programId:g}=await s.buildSolanaTransferInstructions(p,m,new c.PublicKey(l),r,a);return{connection:p,chainId:u,senderAddress:d,senderPublickey:m,programId:g,instructions:h}},u=async(e,t,n,i,s,c)=>{let[{connection:u,chainId:d,senderPublickey:f,instructions:p},m]=await Promise.all([l(t,n,i,s),e.getEthereumAddress()]),h=await a.sendProxyV0Transaction({connection:u,chainId:d,subAccount:i,payerPublicKey:f,instructions:p});return o.emitTxPublicData(r.constructAdminData(c,d,[t.erc20TokenAddress],[n],m)),h};exports.hinkalSolanaProxySend=u;