require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`./caseInsensitive.utils.cjs`);let r=require(`ethers`),i=require(`@solana/web3.js`),a=require(`tronweb`);var o=[`http://`,`https://`,`/payment/`,`.app/`,`.com/`,`.netlify.`],s=e=>{if(o.some(t=>e.includes(t)))return!1;let[t,n,r,i,a]=e.split(`,`),s=!t||!a||!n||!r||!i,c=t?.substring(0,2)!==`0x`||a?.substring(0,2)!==`0x`,l=a?.length!==66||t?.length>66||t?.length<64,u=e?.includes(`"`);return!(s||c||l||u)},c=e=>{if(o.some(t=>e.includes(t)))return!1;let[t,n,r,i,a]=e.split(`,`),s=!t||!n||!r||!i||!a,c=n?.substring(0,2)!==`0x`||r?.substring(0,2)!==`0x`,l=r?.length!==66||n?.length>66||n?.length<64,u=e?.includes(`"`);return!(s||c||l||u)},l=e=>{let[t,n,r,i]=e.split(`,`);return{extraRandomization:BigInt(n)|1n<<255n,stealthAddress:BigInt(t),H0:BigInt(r),H1:BigInt(i)}},u=e=>r.ethers.keccak256(r.ethers.toUtf8Bytes(e.toLowerCase())),d=e=>r.ethers.keccak256(r.ethers.toUtf8Bytes(e)),f=e=>{try{return new i.PublicKey(e).toBase58()===e}catch{return!1}},p=(r,i)=>r?i===void 0?n.caseInsensitiveEqual(r,t.zeroAddress)||n.caseInsensitiveEqual(r,`11111111111111111111111111111111`):e.isSolanaLike(i)?n.caseInsensitiveEqual(r,t.solanaNativeAddress):n.caseInsensitiveEqual(r,t.zeroAddress):!1,m=e=>e?e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`:``,h=e=>{try{return a.TronWeb.isAddress(e)}catch{return!1}},g=(e,t,n)=>e.trim()===``?!1:t?!f(e):n?!h(e):!r.ethers.isAddress(e);exports.constructStealthAddressStructure=l,exports.formatAddress=m,exports.hashEthereumAddress=u,exports.hashString=d,exports.isNativePlaceholderAddress=p,exports.isRecipientAddressInvalid=g,exports.isValidOldStylePrivateAddress=c,exports.isValidPrivateAddress=s,exports.isValidSolanaPublicKey=f,exports.isValidTronAddress=h;