const e=require(`./caseInsensitive.utils.cjs`),t=require(`../../API/API.cjs`),n=require(`../../constants/token-data/ERC20Registry.cjs`),r=require(`../../error-handling/error-codes.constants.cjs`);var i=async(e,n)=>{let r=await t.API.tokensInfoCall(e,n),i=[];return r.forEach((e,t)=>{(!e||!e.balanceStorageOffset||!e.allowanceStorageOffset)&&i.push(n[t])}),i},a=e=>{if(e.length===0)throw Error(`Token array cannot be empty`);let t=e.map(e=>e.chainId),n=t[0];if(!t.every(e=>e===n))throw Error(r.transactionErrorCodes.TOKENS_DO_NOT_BELONG_SAME_CHAIN);return n},o=(t,n)=>!t||!n?!1:e.caseInsensitiveEqual(t.erc20TokenAddress,n.erc20TokenAddress)&&t.chainId===n.chainId,s=(t,r)=>r.every(r=>n.getERC20Registry(t).some(({erc20TokenAddress:t})=>e.caseInsensitiveEqual(t,r)));exports.areErc20TokensInRegistry=s,exports.checkTokensForShielding=i,exports.isSameERC20Token=o,exports.validateAndGetChainId=a;