import{P as t,A as i,a as u}from"./index-CNJFw4fr.js";import{b as be,c as ye,W as Se}from"./index-CNJFw4fr.js";import"./index-BtkLjfUl.js";import"./thirdweb-Co3M1EyP.js";import"./W3MFrameProviderSingleton-wWRZhxvX.js";import"./ui-BJj_Hssx.js";import"./vendor-64qtqz3S.js";import"./index-DnKfU2ei.js";import"./index-BNXDN8h1.js";import"./browser-ponyfill-C_jrGRjm.js";import"./NetworkUtil-hITH22p_.js";import"./index-DSskmJfT.js";import"./index-nibyPLVP.js";import"./index.es-D2QysWlh.js";import"./fromHex-CMtWckFK.js";import"./index-CS3EBeRI.js";import"./if-defined-CH4hoZfT.js";import"./index-C_pdwOHD.js";import"./index-BbQ2-1cW.js";import"./index-khh2YPAE.js";import"./index-BDK13jGf.js";import"./index-CPQHa-3V.js";import"./index-xye2MsWH.js";import"./index-MI9ohl66.js";import"./index-CEb_77KV.js";import"./index-B80Yhpfe.js";import"./MathUtil-BGCe3rZ3.js";const C=3e5;async function U(e){return t.handleOpenPay(e)}async function J(e,r=C){if(r<=0)throw new i(u.INVALID_PAYMENT_CONFIG,"Timeout must be greater than 0");try{await U(e)}catch(s){throw s instanceof i?s:new i(u.UNABLE_TO_INITIATE_PAYMENT,s.message)}return new Promise((s,l)=>{let o=!1;const c=setTimeout(()=>{o||(o=!0,m(),l(new i(u.GENERIC_PAYMENT_ERROR,"Payment timeout")))},r);function n(){if(o)return;const a=t.state.currentPayment,p=t.state.error,D=t.state.isPaymentInProgress;if((a==null?void 0:a.status)==="SUCCESS"){o=!0,m(),clearTimeout(c),s({success:!0,result:a.result});return}if((a==null?void 0:a.status)==="FAILED"){o=!0,m(),clearTimeout(c),s({success:!1,error:p||"Payment failed"});return}p&&!D&&!a&&(o=!0,m(),clearTimeout(c),s({success:!1,error:p}))}const b=d("currentPayment",n),y=d("error",n),S=d("isPaymentInProgress",n),m=E([b,y,S]);n()})}function V(){return t.getExchanges()}function Z(){var e;return(e=t.state.currentPayment)==null?void 0:e.result}function j(){return t.state.error}function Q(){return t.state.isPaymentInProgress}function d(e,r){return t.subscribeKey(e,r)}function E(e){return()=>{e.forEach(r=>{try{r()}catch{}})}}const X={network:"eip155:8453",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},$={network:"eip155:8453",asset:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ee={network:"eip155:84532",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},te={network:"eip155:1",asset:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ae={network:"eip155:10",asset:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},se={network:"eip155:42161",asset:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},re={network:"eip155:137",asset:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},oe={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ne={network:"eip155:1",asset:"0xdAC17F958D2ee523a2206206994597C13D831ec7",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},me={network:"eip155:10",asset:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ie={network:"eip155:42161",asset:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ce={network:"eip155:137",asset:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},pe={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ue={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"native",metadata:{name:"Solana",symbol:"SOL",decimals:9}};export{t as PayController,be as W3mPayLoadingView,ye as W3mPayQuoteView,Se as W3mPayView,se as arbitrumUSDC,ie as arbitrumUSDT,X as baseETH,ee as baseSepoliaETH,$ as baseUSDC,te as ethereumUSDC,ne as ethereumUSDT,V as getExchanges,Q as getIsPaymentInProgress,j as getPayError,Z as getPayResult,U as openPay,ae as optimismUSDC,me as optimismUSDT,J as pay,re as polygonUSDC,ce as polygonUSDT,ue as solanaSOL,oe as solanaUSDC,pe as solanaUSDT};
