react-web3-storage 2.0.34 → 2.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ReownAuthentication-ZWJVb5u8.mjs → ReownAuthentication-IhVJYqnP.mjs} +1 -1
- package/dist/{ReownAuthentication-_EMKUe4O.js → ReownAuthentication-mFlHuQF9.js} +1 -1
- package/dist/{SwapController-75y039lY.js → SwapController-0_P4clNx.js} +1 -1
- package/dist/{SwapController-CNHVjC6V.mjs → SwapController-NnYCnoFw.mjs} +1 -1
- package/dist/{ccip-BgoVuN3u.js → ccip-D2VFJAhC.js} +1 -1
- package/dist/{ccip-CQrFYKlN.mjs → ccip-ZSuVrwCG.mjs} +2 -2
- package/dist/{data-capture-CgKKCS0j.mjs → data-capture-CLJwxRBH.mjs} +3 -3
- package/dist/{data-capture-hbDyOOyJ.js → data-capture-dc_Whn4Z.js} +1 -1
- package/dist/{email-DYvAHYik.js → email-DoxkEz98.js} +1 -1
- package/dist/{email-C2N4HkZQ.mjs → email-qs7k6ScS.mjs} +2 -2
- package/dist/{embedded-wallet-_7JcZAOC.mjs → embedded-wallet-BmNohUt-.mjs} +1 -1
- package/dist/{embedded-wallet-CYNDQvBG.js → embedded-wallet-S-rCa1Qm.js} +1 -1
- package/dist/{features-BA8f0aFu.js → features-Bwo8Q7_g.js} +1 -1
- package/dist/{features-JvQHn7sG.mjs → features-EquCD-MD.mjs} +1 -1
- package/dist/{index-CASDFBE7.js → index-3d3KczX_.js} +1 -1
- package/dist/{index-B7Og0OLg.js → index-BIL0FR2Q.js} +1 -1
- package/dist/{index-DIxai2A2.mjs → index-BItXAkEh.mjs} +1 -1
- package/dist/{index-DnKQlXMR.mjs → index-BTa_umXt.mjs} +1 -1
- package/dist/{index-B--AiWBy.mjs → index-BsxJaSgz.mjs} +1 -1
- package/dist/{index-DVNi_N99.mjs → index-CKFp87R6.mjs} +2 -2
- package/dist/{index-C_fopi0u.js → index-CXjPgxv2.js} +1 -1
- package/dist/{index-BNobBA-8.js → index-CdIV01LF.js} +500 -505
- package/dist/{index-CgI_Ukj5.mjs → index-CeFUueh5.mjs} +3 -3
- package/dist/{index-xYJPqvul.js → index-CoAc7gZY.js} +1 -1
- package/dist/{index-mvH0tD6I.js → index-D1QbBXRl.js} +1 -1
- package/dist/{index-CjS2YG3n.js → index-D6viTtcq.js} +1 -1
- package/dist/{index-Bxg-paEQ.mjs → index-DbxRFFAw.mjs} +2 -2
- package/dist/{index-CLUlCRLy.js → index-DqUT4OE3.js} +1 -1
- package/dist/{index-DzjJtqrG.js → index-DsRT5quU.js} +1 -1
- package/dist/{index-BHukHFIh.mjs → index-QUe_zD7Z.mjs} +13048 -13064
- package/dist/{index-Clu0wU1d.mjs → index-_YA065ZZ.mjs} +1 -1
- package/dist/{index-Ccy2zz9q.mjs → index-sUqYAg-v.mjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{onramp-DlA5BSaX.js → onramp-DAQw2noR.js} +1 -1
- package/dist/{onramp-zhj-U9X5.mjs → onramp-DyXR4eQ5.mjs} +1 -1
- package/dist/{parseSignature-CWAxHYP1.js → parseSignature-BtVZgWuu.js} +2 -2
- package/dist/{parseSignature-ZB66mPGB.mjs → parseSignature-SdquqcCh.mjs} +2 -2
- package/dist/{pay-with-exchange-Czbx9cbv.mjs → pay-with-exchange--_6h2lox.mjs} +2 -2
- package/dist/{pay-with-exchange-BQaMDGKp.js → pay-with-exchange-CIfCJvQ0.js} +1 -1
- package/dist/{receive-BA736NNd.js → receive-BK0-Kk9B.js} +1 -1
- package/dist/{receive-VPGRuO6J.mjs → receive-CkD3BB5M.mjs} +1 -1
- package/dist/{send-BhagKj7q.js → send-8TYDu08g.js} +1 -1
- package/dist/{send-xiZMc6dE.mjs → send-DPCf3P1K.mjs} +4 -4
- package/dist/{socials-BX3hluqS.mjs → socials-CsqBxtLX.mjs} +1 -1
- package/dist/{socials-B-mhVCLM.js → socials-DaZ_7onq.js} +1 -1
- package/dist/{swaps-BFl7r_MZ.mjs → swaps-ByIwZvPd.mjs} +3 -3
- package/dist/{swaps-DQYnz8sb.js → swaps-DMe3L3jV.js} +1 -1
- package/dist/{transactions-DWsNckfd.js → transactions-CTxod1fH.js} +1 -1
- package/dist/{transactions-BooVIWm5.mjs → transactions-D5rPgaG4.mjs} +1 -1
- package/dist/{w3m-modal-D6NKq8XS.js → w3m-modal-BdQb2i41.js} +1 -1
- package/dist/{w3m-modal-BLoHPTsO.mjs → w3m-modal-z4IyrTgg.mjs} +3 -3
- package/package.json +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cc as g, cn as w, co as y, cp as A, c8 as k, cq as u, cd as N, cr as p } from "./index-
|
|
1
|
+
import { cc as g, cn as w, co as y, cp as A, c8 as k, cq as u, cd as N, cr as p } from "./index-QUe_zD7Z.mjs";
|
|
2
2
|
class m {
|
|
3
3
|
constructor(e) {
|
|
4
4
|
this.getNonce = e.getNonce;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const s=require("./index-
|
|
1
|
+
"use strict";const s=require("./index-CdIV01LF.js");class f{constructor(e){this.getNonce=e.getNonce}async createMessage(e){const t={accountAddress:e.accountAddress,chainId:e.chainId,version:"1",domain:typeof document>"u"?"Unknown Domain":document.location.host,uri:typeof document>"u"?"Unknown URI":document.location.href,resources:this.resources,nonce:await this.getNonce(e),issuedAt:this.stringifyDate(new Date),statement:void 0,expirationTime:void 0,notBefore:void 0};return Object.assign(t,{toString:()=>this.stringify(t)})}stringify(e){var n;const t=this.getNetworkName(e.chainId);return[`${e.domain} wants you to sign in with your ${t} account:`,e.accountAddress,e.statement?`
|
|
2
2
|
${e.statement}
|
|
3
3
|
`:"",`URI: ${e.uri}`,`Version: ${e.version}`,`Chain ID: ${e.chainId}`,`Nonce: ${e.nonce}`,e.issuedAt&&`Issued At: ${e.issuedAt}`,e.expirationTime&&`Expiration Time: ${e.expirationTime}`,e.notBefore&&`Not Before: ${e.notBefore}`,e.requestId&&`Request ID: ${e.requestId}`,((n=e.resources)==null?void 0:n.length)&&e.resources.reduce((o,r)=>`${o}
|
|
4
4
|
- ${r}`,"Resources:")].filter(o=>typeof o=="string").join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./index-BNobBA-8.js"),A={getGasPriceInEther(n,r){const t=r*n;return Number(t)/1e18},getGasPriceInUSD(n,r,t){const s=A.getGasPriceInEther(r,t);return o.NumberUtil.bigNumber(n).times(s).toNumber()},getPriceImpact({sourceTokenAmount:n,sourceTokenPriceInUSD:r,toTokenPriceInUSD:t,toTokenAmount:s}){const l=o.NumberUtil.bigNumber(n).times(r),i=o.NumberUtil.bigNumber(s).times(t);return l.minus(i).div(l).times(100).toNumber()},getMaxSlippage(n,r){const t=o.NumberUtil.bigNumber(n).div(100);return o.NumberUtil.multiply(r,t).toNumber()},getProviderFee(n,r=.0085){return o.NumberUtil.bigNumber(n).times(r).toString()},isInsufficientNetworkTokenForGas(n,r){const t=r||"0";return o.NumberUtil.bigNumber(n).eq(0)?!0:o.NumberUtil.bigNumber(o.NumberUtil.bigNumber(t)).gt(n)},isInsufficientSourceTokenForSwap(n,r,t){var i,d;const s=(d=(i=t==null?void 0:t.find(k=>k.address===r))==null?void 0:i.quantity)==null?void 0:d.numeric;return o.NumberUtil.bigNumber(s||"0").lt(n)}},N=15e4,y=6,T={initializing:!1,initialized:!1,loadingPrices:!1,loadingQuote:!1,loadingApprovalTransaction:!1,loadingBuildTransaction:!1,loadingTransaction:!1,switchingTokens:!1,fetchError:!1,approvalTransaction:void 0,swapTransaction:void 0,transactionError:void 0,sourceToken:void 0,sourceTokenAmount:"",sourceTokenPriceInUSD:0,toToken:void 0,toTokenAmount:"",toTokenPriceInUSD:0,networkPrice:"0",networkBalanceInUSD:"0",networkTokenSymbol:"",inputError:void 0,slippage:o.ConstantsUtil$1.CONVERT_SLIPPAGE_TOLERANCE,tokens:void 0,popularTokens:void 0,suggestedTokens:void 0,foundTokens:void 0,myTokensWithBalance:void 0,tokensPriceMap:{},gasFee:"0",gasPriceInUSD:0,priceImpact:void 0,maxSlippage:void 0,providerFee:void 0},e=o.proxy({...T}),h={state:e,subscribe(n){return o.subscribe(e,()=>n(e))},subscribeKey(n,r){return o.subscribeKey(e,n,r)},getParams(){var c,u,p,g,w,f,S,C,P;const n=o.ChainController.state.activeChain,r=((c=o.ChainController.getAccountData(n))==null?void 0:c.caipAddress)??o.ChainController.state.activeCaipAddress,t=o.CoreHelperUtil.getPlainAddress(r),s=o.getActiveNetworkTokenAddress(),l=o.ConnectorController.getConnectorId(o.ChainController.state.activeChain);if(!t)throw new Error("No address found to swap the tokens from.");const i=!((u=e.toToken)!=null&&u.address)||!((p=e.toToken)!=null&&p.decimals),d=!((g=e.sourceToken)!=null&&g.address)||!((w=e.sourceToken)!=null&&w.decimals)||!o.NumberUtil.bigNumber(e.sourceTokenAmount).gt(0),k=!e.sourceTokenAmount;return{networkAddress:s,fromAddress:t,fromCaipAddress:r,sourceTokenAddress:(f=e.sourceToken)==null?void 0:f.address,toTokenAddress:(S=e.toToken)==null?void 0:S.address,toTokenAmount:e.toTokenAmount,toTokenDecimals:(C=e.toToken)==null?void 0:C.decimals,sourceTokenAmount:e.sourceTokenAmount,sourceTokenDecimals:(P=e.sourceToken)==null?void 0:P.decimals,invalidToToken:i,invalidSourceToken:d,invalidSourceTokenAmount:k,availableToSwap:r&&!i&&!d&&!k,isAuthConnector:l===o.ConstantsUtil.CONNECTOR_ID.AUTH}},async setSourceToken(n){if(!n){e.sourceToken=n,e.sourceTokenAmount="",e.sourceTokenPriceInUSD=0;return}e.sourceToken=n,await a.setTokenPrice(n.address,"sourceToken")},setSourceTokenAmount(n){e.sourceTokenAmount=n},async setToToken(n){if(!n){e.toToken=n,e.toTokenAmount="",e.toTokenPriceInUSD=0;return}e.toToken=n,await a.setTokenPrice(n.address,"toToken")},setToTokenAmount(n){e.toTokenAmount=n?o.NumberUtil.toFixed(n,y):""},async setTokenPrice(n,r){let t=e.tokensPriceMap[n]||0;t||(e.loadingPrices=!0,t=await a.getAddressPrice(n)),r==="sourceToken"?e.sourceTokenPriceInUSD=t:r==="toToken"&&(e.toTokenPriceInUSD=t),e.loadingPrices&&(e.loadingPrices=!1),a.getParams().availableToSwap&&!e.switchingTokens&&a.swapTokens()},async switchTokens(){if(!(e.initializing||!e.initialized||e.switchingTokens)){e.switchingTokens=!0;try{const n=e.toToken?{...e.toToken}:void 0,r=e.sourceToken?{...e.sourceToken}:void 0,t=n&&e.toTokenAmount===""?"1":e.toTokenAmount;a.setSourceTokenAmount(t),a.setToTokenAmount(""),await a.setSourceToken(n),await a.setToToken(r),e.switchingTokens=!1,a.swapTokens()}catch(n){throw e.switchingTokens=!1,n}}},resetState(){e.myTokensWithBalance=T.myTokensWithBalance,e.tokensPriceMap=T.tokensPriceMap,e.initialized=T.initialized,e.initializing=T.initializing,e.switchingTokens=T.switchingTokens,e.sourceToken=T.sourceToken,e.sourceTokenAmount=T.sourceTokenAmount,e.sourceTokenPriceInUSD=T.sourceTokenPriceInUSD,e.toToken=T.toToken,e.toTokenAmount=T.toTokenAmount,e.toTokenPriceInUSD=T.toTokenPriceInUSD,e.networkPrice=T.networkPrice,e.networkTokenSymbol=T.networkTokenSymbol,e.networkBalanceInUSD=T.networkBalanceInUSD,e.inputError=T.inputError},resetValues(){var t;const{networkAddress:n}=a.getParams(),r=(t=e.tokens)==null?void 0:t.find(s=>s.address===n);a.setSourceToken(r),a.setToToken(void 0)},getApprovalLoadingState(){return e.loadingApprovalTransaction},clearError(){e.transactionError=void 0},async initializeState(){if(!e.initializing){if(e.initializing=!0,!e.initialized)try{await a.fetchTokens(),e.initialized=!0}catch{e.initialized=!1,o.SnackController.showError("Failed to initialize swap"),o.RouterController.goBack()}e.initializing=!1}},async fetchTokens(){var t;const{networkAddress:n}=a.getParams();await a.getNetworkTokenPrice(),await a.getMyTokensWithBalance();const r=(t=e.myTokensWithBalance)==null?void 0:t.find(s=>s.address===n);r&&(e.networkTokenSymbol=r.symbol,a.setSourceToken(r),a.setSourceTokenAmount("0"))},async getTokenList(){var r,t;const n=(r=o.ChainController.state.activeCaipNetwork)==null?void 0:r.caipNetworkId;if(!(e.caipNetworkId===n&&e.tokens))try{e.tokensLoading=!0;const s=await o.SwapApiUtil.getTokenList(n);e.tokens=s,e.caipNetworkId=n,e.popularTokens=s.sort((c,u)=>c.symbol<u.symbol?-1:c.symbol>u.symbol?1:0);const i=(n&&((t=o.ConstantsUtil$1.SUGGESTED_TOKENS_BY_CHAIN)==null?void 0:t[n])||[]).map(c=>s.find(u=>u.symbol===c)).filter(c=>!!c),k=(o.ConstantsUtil$1.SWAP_SUGGESTED_TOKENS||[]).map(c=>s.find(u=>u.symbol===c)).filter(c=>!!c).filter(c=>!i.some(u=>u.address===c.address));e.suggestedTokens=[...i,...k]}catch{e.tokens=[],e.popularTokens=[],e.suggestedTokens=[]}finally{e.tokensLoading=!1}},async getAddressPrice(n){var c,u;const r=e.tokensPriceMap[n];if(r)return r;const t=await o.BlockchainApiController.fetchTokenPrice({addresses:[n]}),s=(t==null?void 0:t.fungibles)||[],l=[...e.tokens||[],...e.myTokensWithBalance||[]],i=(c=l==null?void 0:l.find(p=>p.address===n))==null?void 0:c.symbol,d=((u=s.find(p=>p.symbol.toLowerCase()===(i==null?void 0:i.toLowerCase())))==null?void 0:u.price)||0,k=parseFloat(d.toString());return e.tokensPriceMap[n]=k,k},async getNetworkTokenPrice(){var l;const{networkAddress:n}=a.getParams(),t=(l=(await o.BlockchainApiController.fetchTokenPrice({addresses:[n]}).catch(()=>(o.SnackController.showError("Failed to fetch network token price"),{fungibles:[]}))).fungibles)==null?void 0:l[0],s=(t==null?void 0:t.price.toString())||"0";e.tokensPriceMap[n]=parseFloat(s),e.networkTokenSymbol=(t==null?void 0:t.symbol)||"",e.networkPrice=s},async getMyTokensWithBalance(n){var s;const r=await o.BalanceUtil.getMyTokensWithBalance({forceUpdate:n,caipNetwork:o.ChainController.state.activeCaipNetwork,address:(s=o.ChainController.getAccountData())==null?void 0:s.address}),t=o.SwapApiUtil.mapBalancesToSwapTokens(r);t&&(await a.getInitialGasPrice(),a.setBalances(t))},setBalances(n){const{networkAddress:r}=a.getParams(),t=o.ChainController.state.activeCaipNetwork;if(!t)return;const s=n.find(l=>l.address===r);n.forEach(l=>{e.tokensPriceMap[l.address]=l.price||0}),e.myTokensWithBalance=n.filter(l=>l.address.startsWith(t.caipNetworkId)),e.networkBalanceInUSD=s?o.NumberUtil.multiply(s.quantity.numeric,s.price).toString():"0"},async getInitialGasPrice(){var r,t;const n=await o.SwapApiUtil.fetchGasPrice();if(!n)return{gasPrice:null,gasPriceInUSD:null};switch((t=(r=o.ChainController.state)==null?void 0:r.activeCaipNetwork)==null?void 0:t.chainNamespace){case o.ConstantsUtil.CHAIN.SOLANA:return e.gasFee=n.standard??"0",e.gasPriceInUSD=o.NumberUtil.multiply(n.standard,e.networkPrice).div(1e9).toNumber(),{gasPrice:BigInt(e.gasFee),gasPriceInUSD:Number(e.gasPriceInUSD)};case o.ConstantsUtil.CHAIN.EVM:default:const s=n.standard??"0",l=BigInt(s),i=BigInt(N),d=A.getGasPriceInUSD(e.networkPrice,i,l);return e.gasFee=s,e.gasPriceInUSD=d,{gasPrice:l,gasPriceInUSD:d}}},async swapTokens(){var i,d,k;const n=(i=o.ChainController.getAccountData())==null?void 0:i.address,r=e.sourceToken,t=e.toToken,s=o.NumberUtil.bigNumber(e.sourceTokenAmount).gt(0);if(s||a.setToTokenAmount(""),!t||!r||e.loadingPrices||!s||!n)return;e.loadingQuote=!0;const l=o.NumberUtil.bigNumber(e.sourceTokenAmount).times(10**r.decimals).round(0);try{const c=await o.BlockchainApiController.fetchSwapQuote({userAddress:n,from:r.address,to:t.address,gasPrice:e.gasFee,amount:l.toString()});e.loadingQuote=!1;const u=(k=(d=c==null?void 0:c.quotes)==null?void 0:d[0])==null?void 0:k.toAmount;if(!u){o.AlertController.open({displayMessage:"Incorrect amount",debugMessage:"Please enter a valid amount"},"error");return}const p=o.NumberUtil.bigNumber(u).div(10**t.decimals).toString();a.setToTokenAmount(p),a.hasInsufficientToken(e.sourceTokenAmount,r.address)?e.inputError="Insufficient balance":(e.inputError=void 0,a.setTransactionDetails())}catch(c){const u=await o.SwapApiUtil.handleSwapError(c);e.loadingQuote=!1,e.inputError=u||"Insufficient balance"}},async getTransaction(){const{fromCaipAddress:n,availableToSwap:r}=a.getParams(),t=e.sourceToken,s=e.toToken;if(!(!n||!r||!t||!s||e.loadingQuote))try{e.loadingBuildTransaction=!0;const l=await o.SwapApiUtil.fetchSwapAllowance({userAddress:n,tokenAddress:t.address,sourceTokenAmount:e.sourceTokenAmount,sourceTokenDecimals:t.decimals});let i;return l?i=await a.createSwapTransaction():i=await a.createAllowanceTransaction(),e.loadingBuildTransaction=!1,e.fetchError=!1,i}catch{o.RouterController.goBack(),o.SnackController.showError("Failed to check allowance"),e.loadingBuildTransaction=!1,e.approvalTransaction=void 0,e.swapTransaction=void 0,e.fetchError=!0;return}},async createAllowanceTransaction(){const{fromCaipAddress:n,sourceTokenAddress:r,toTokenAddress:t}=a.getParams();if(!(!n||!t)){if(!r)throw new Error("createAllowanceTransaction - No source token address found.");try{const s=await o.BlockchainApiController.generateApproveCalldata({from:r,to:t,userAddress:n}),l=o.CoreHelperUtil.getPlainAddress(s.tx.from);if(!l)throw new Error("SwapController:createAllowanceTransaction - address is required");const i={data:s.tx.data,to:l,gasPrice:BigInt(s.tx.eip155.gasPrice),value:BigInt(s.tx.value),toAmount:e.toTokenAmount};return e.swapTransaction=void 0,e.approvalTransaction={data:i.data,to:i.to,gasPrice:i.gasPrice,value:i.value,toAmount:i.toAmount},{data:i.data,to:i.to,gasPrice:i.gasPrice,value:i.value,toAmount:i.toAmount}}catch{o.RouterController.goBack(),o.SnackController.showError("Failed to create approval transaction"),e.approvalTransaction=void 0,e.swapTransaction=void 0,e.fetchError=!0;return}}},async createSwapTransaction(){var d;const{networkAddress:n,fromCaipAddress:r,sourceTokenAmount:t}=a.getParams(),s=e.sourceToken,l=e.toToken;if(!r||!t||!s||!l)return;const i=(d=o.ConnectionController.parseUnits(t,s.decimals))==null?void 0:d.toString();try{const k=await o.BlockchainApiController.generateSwapCalldata({userAddress:r,from:s.address,to:l.address,amount:i,disableEstimate:!0}),c=s.address===n,u=BigInt(k.tx.eip155.gas),p=BigInt(k.tx.eip155.gasPrice),g=o.CoreHelperUtil.getPlainAddress(k.tx.to);if(!g)throw new Error("SwapController:createSwapTransaction - address is required");const w={data:k.tx.data,to:g,gas:u,gasPrice:p,value:BigInt(c?i??"0":"0"),toAmount:e.toTokenAmount};return e.gasPriceInUSD=A.getGasPriceInUSD(e.networkPrice,u,p),e.approvalTransaction=void 0,e.swapTransaction=w,w}catch{o.RouterController.goBack(),o.SnackController.showError("Failed to create transaction"),e.approvalTransaction=void 0,e.swapTransaction=void 0,e.fetchError=!0;return}},onEmbeddedWalletApprovalSuccess(){o.SnackController.showLoading("Approve limit increase in your wallet"),o.RouterController.replace("SwapPreview")},async sendTransactionForApproval(n){var l,i,d;const{fromAddress:r,isAuthConnector:t}=a.getParams();e.loadingApprovalTransaction=!0,t?o.RouterController.pushTransactionStack({onSuccess:a.onEmbeddedWalletApprovalSuccess}):o.SnackController.showLoading("Approve limit increase in your wallet");try{await o.ConnectionController.sendTransaction({address:r,to:n.to,data:n.data,value:n.value,chainNamespace:o.ConstantsUtil.CHAIN.EVM}),await a.swapTokens(),await a.getTransaction(),e.approvalTransaction=void 0,e.loadingApprovalTransaction=!1}catch(k){const c=k;e.transactionError=c==null?void 0:c.displayMessage,e.loadingApprovalTransaction=!1,o.SnackController.showError((c==null?void 0:c.displayMessage)||"Transaction error"),o.EventsController.sendEvent({type:"track",event:"SWAP_APPROVAL_ERROR",properties:{message:(c==null?void 0:c.displayMessage)||(c==null?void 0:c.message)||"Unknown",network:((l=o.ChainController.state.activeCaipNetwork)==null?void 0:l.caipNetworkId)||"",swapFromToken:((i=a.state.sourceToken)==null?void 0:i.symbol)||"",swapToToken:((d=a.state.toToken)==null?void 0:d.symbol)||"",swapFromAmount:a.state.sourceTokenAmount||"",swapToAmount:a.state.toTokenAmount||"",isSmartAccount:o.getPreferredAccountType(o.ConstantsUtil.CHAIN.EVM)===o.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}})}},async sendTransactionForSwap(n){var d,k,c,u,p,g,w,f,S,C,P,b;if(!n)return;const{fromAddress:r,toTokenAmount:t,isAuthConnector:s}=a.getParams();e.loadingTransaction=!0;const l=`Swapping ${(d=e.sourceToken)==null?void 0:d.symbol} to ${o.NumberUtil.formatNumberToLocalString(t,3)} ${(k=e.toToken)==null?void 0:k.symbol}`,i=`Swapped ${(c=e.sourceToken)==null?void 0:c.symbol} to ${o.NumberUtil.formatNumberToLocalString(t,3)} ${(u=e.toToken)==null?void 0:u.symbol}`;s?o.RouterController.pushTransactionStack({onSuccess(){o.RouterController.replace("Account"),o.SnackController.showLoading(l),h.resetState()}}):o.SnackController.showLoading("Confirm transaction in your wallet");try{const I=[(p=e.sourceToken)==null?void 0:p.address,(g=e.toToken)==null?void 0:g.address].join(","),m=await o.ConnectionController.sendTransaction({address:r,to:n.to,data:n.data,value:n.value,chainNamespace:o.ConstantsUtil.CHAIN.EVM});return e.loadingTransaction=!1,o.SnackController.showSuccess(i),o.EventsController.sendEvent({type:"track",event:"SWAP_SUCCESS",properties:{network:((w=o.ChainController.state.activeCaipNetwork)==null?void 0:w.caipNetworkId)||"",swapFromToken:((f=a.state.sourceToken)==null?void 0:f.symbol)||"",swapToToken:((S=a.state.toToken)==null?void 0:S.symbol)||"",swapFromAmount:a.state.sourceTokenAmount||"",swapToAmount:a.state.toTokenAmount||"",isSmartAccount:o.getPreferredAccountType(o.ConstantsUtil.CHAIN.EVM)===o.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}}),h.resetState(),s||o.RouterController.replace("Account"),h.getMyTokensWithBalance(I),m}catch(I){const m=I;e.transactionError=m==null?void 0:m.displayMessage,e.loadingTransaction=!1,o.SnackController.showError((m==null?void 0:m.displayMessage)||"Transaction error"),o.EventsController.sendEvent({type:"track",event:"SWAP_ERROR",properties:{message:(m==null?void 0:m.displayMessage)||(m==null?void 0:m.message)||"Unknown",network:((C=o.ChainController.state.activeCaipNetwork)==null?void 0:C.caipNetworkId)||"",swapFromToken:((P=a.state.sourceToken)==null?void 0:P.symbol)||"",swapToToken:((b=a.state.toToken)==null?void 0:b.symbol)||"",swapFromAmount:a.state.sourceTokenAmount||"",swapToAmount:a.state.toTokenAmount||"",isSmartAccount:o.getPreferredAccountType(o.ConstantsUtil.CHAIN.EVM)===o.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}});return}},hasInsufficientToken(n,r){return A.isInsufficientSourceTokenForSwap(n,r,e.myTokensWithBalance)},setTransactionDetails(){const{toTokenAddress:n,toTokenDecimals:r}=a.getParams();!n||!r||(e.gasPriceInUSD=A.getGasPriceInUSD(e.networkPrice,BigInt(e.gasFee),BigInt(N)),e.priceImpact=A.getPriceImpact({sourceTokenAmount:e.sourceTokenAmount,sourceTokenPriceInUSD:e.sourceTokenPriceInUSD,toTokenPriceInUSD:e.toTokenPriceInUSD,toTokenAmount:e.toTokenAmount}),e.maxSlippage=A.getMaxSlippage(e.slippage,e.toTokenAmount),e.providerFee=A.getProviderFee(e.sourceTokenAmount))}},a=o.withErrorBoundary(h);exports.SwapController=a;
|
|
1
|
+
"use strict";const o=require("./index-CdIV01LF.js"),A={getGasPriceInEther(n,r){const t=r*n;return Number(t)/1e18},getGasPriceInUSD(n,r,t){const s=A.getGasPriceInEther(r,t);return o.NumberUtil.bigNumber(n).times(s).toNumber()},getPriceImpact({sourceTokenAmount:n,sourceTokenPriceInUSD:r,toTokenPriceInUSD:t,toTokenAmount:s}){const l=o.NumberUtil.bigNumber(n).times(r),i=o.NumberUtil.bigNumber(s).times(t);return l.minus(i).div(l).times(100).toNumber()},getMaxSlippage(n,r){const t=o.NumberUtil.bigNumber(n).div(100);return o.NumberUtil.multiply(r,t).toNumber()},getProviderFee(n,r=.0085){return o.NumberUtil.bigNumber(n).times(r).toString()},isInsufficientNetworkTokenForGas(n,r){const t=r||"0";return o.NumberUtil.bigNumber(n).eq(0)?!0:o.NumberUtil.bigNumber(o.NumberUtil.bigNumber(t)).gt(n)},isInsufficientSourceTokenForSwap(n,r,t){var i,d;const s=(d=(i=t==null?void 0:t.find(k=>k.address===r))==null?void 0:i.quantity)==null?void 0:d.numeric;return o.NumberUtil.bigNumber(s||"0").lt(n)}},N=15e4,y=6,T={initializing:!1,initialized:!1,loadingPrices:!1,loadingQuote:!1,loadingApprovalTransaction:!1,loadingBuildTransaction:!1,loadingTransaction:!1,switchingTokens:!1,fetchError:!1,approvalTransaction:void 0,swapTransaction:void 0,transactionError:void 0,sourceToken:void 0,sourceTokenAmount:"",sourceTokenPriceInUSD:0,toToken:void 0,toTokenAmount:"",toTokenPriceInUSD:0,networkPrice:"0",networkBalanceInUSD:"0",networkTokenSymbol:"",inputError:void 0,slippage:o.ConstantsUtil$1.CONVERT_SLIPPAGE_TOLERANCE,tokens:void 0,popularTokens:void 0,suggestedTokens:void 0,foundTokens:void 0,myTokensWithBalance:void 0,tokensPriceMap:{},gasFee:"0",gasPriceInUSD:0,priceImpact:void 0,maxSlippage:void 0,providerFee:void 0},e=o.proxy({...T}),h={state:e,subscribe(n){return o.subscribe(e,()=>n(e))},subscribeKey(n,r){return o.subscribeKey(e,n,r)},getParams(){var c,u,p,g,w,f,S,C,P;const n=o.ChainController.state.activeChain,r=((c=o.ChainController.getAccountData(n))==null?void 0:c.caipAddress)??o.ChainController.state.activeCaipAddress,t=o.CoreHelperUtil.getPlainAddress(r),s=o.getActiveNetworkTokenAddress(),l=o.ConnectorController.getConnectorId(o.ChainController.state.activeChain);if(!t)throw new Error("No address found to swap the tokens from.");const i=!((u=e.toToken)!=null&&u.address)||!((p=e.toToken)!=null&&p.decimals),d=!((g=e.sourceToken)!=null&&g.address)||!((w=e.sourceToken)!=null&&w.decimals)||!o.NumberUtil.bigNumber(e.sourceTokenAmount).gt(0),k=!e.sourceTokenAmount;return{networkAddress:s,fromAddress:t,fromCaipAddress:r,sourceTokenAddress:(f=e.sourceToken)==null?void 0:f.address,toTokenAddress:(S=e.toToken)==null?void 0:S.address,toTokenAmount:e.toTokenAmount,toTokenDecimals:(C=e.toToken)==null?void 0:C.decimals,sourceTokenAmount:e.sourceTokenAmount,sourceTokenDecimals:(P=e.sourceToken)==null?void 0:P.decimals,invalidToToken:i,invalidSourceToken:d,invalidSourceTokenAmount:k,availableToSwap:r&&!i&&!d&&!k,isAuthConnector:l===o.ConstantsUtil.CONNECTOR_ID.AUTH}},async setSourceToken(n){if(!n){e.sourceToken=n,e.sourceTokenAmount="",e.sourceTokenPriceInUSD=0;return}e.sourceToken=n,await a.setTokenPrice(n.address,"sourceToken")},setSourceTokenAmount(n){e.sourceTokenAmount=n},async setToToken(n){if(!n){e.toToken=n,e.toTokenAmount="",e.toTokenPriceInUSD=0;return}e.toToken=n,await a.setTokenPrice(n.address,"toToken")},setToTokenAmount(n){e.toTokenAmount=n?o.NumberUtil.toFixed(n,y):""},async setTokenPrice(n,r){let t=e.tokensPriceMap[n]||0;t||(e.loadingPrices=!0,t=await a.getAddressPrice(n)),r==="sourceToken"?e.sourceTokenPriceInUSD=t:r==="toToken"&&(e.toTokenPriceInUSD=t),e.loadingPrices&&(e.loadingPrices=!1),a.getParams().availableToSwap&&!e.switchingTokens&&a.swapTokens()},async switchTokens(){if(!(e.initializing||!e.initialized||e.switchingTokens)){e.switchingTokens=!0;try{const n=e.toToken?{...e.toToken}:void 0,r=e.sourceToken?{...e.sourceToken}:void 0,t=n&&e.toTokenAmount===""?"1":e.toTokenAmount;a.setSourceTokenAmount(t),a.setToTokenAmount(""),await a.setSourceToken(n),await a.setToToken(r),e.switchingTokens=!1,a.swapTokens()}catch(n){throw e.switchingTokens=!1,n}}},resetState(){e.myTokensWithBalance=T.myTokensWithBalance,e.tokensPriceMap=T.tokensPriceMap,e.initialized=T.initialized,e.initializing=T.initializing,e.switchingTokens=T.switchingTokens,e.sourceToken=T.sourceToken,e.sourceTokenAmount=T.sourceTokenAmount,e.sourceTokenPriceInUSD=T.sourceTokenPriceInUSD,e.toToken=T.toToken,e.toTokenAmount=T.toTokenAmount,e.toTokenPriceInUSD=T.toTokenPriceInUSD,e.networkPrice=T.networkPrice,e.networkTokenSymbol=T.networkTokenSymbol,e.networkBalanceInUSD=T.networkBalanceInUSD,e.inputError=T.inputError},resetValues(){var t;const{networkAddress:n}=a.getParams(),r=(t=e.tokens)==null?void 0:t.find(s=>s.address===n);a.setSourceToken(r),a.setToToken(void 0)},getApprovalLoadingState(){return e.loadingApprovalTransaction},clearError(){e.transactionError=void 0},async initializeState(){if(!e.initializing){if(e.initializing=!0,!e.initialized)try{await a.fetchTokens(),e.initialized=!0}catch{e.initialized=!1,o.SnackController.showError("Failed to initialize swap"),o.RouterController.goBack()}e.initializing=!1}},async fetchTokens(){var t;const{networkAddress:n}=a.getParams();await a.getNetworkTokenPrice(),await a.getMyTokensWithBalance();const r=(t=e.myTokensWithBalance)==null?void 0:t.find(s=>s.address===n);r&&(e.networkTokenSymbol=r.symbol,a.setSourceToken(r),a.setSourceTokenAmount("0"))},async getTokenList(){var r,t;const n=(r=o.ChainController.state.activeCaipNetwork)==null?void 0:r.caipNetworkId;if(!(e.caipNetworkId===n&&e.tokens))try{e.tokensLoading=!0;const s=await o.SwapApiUtil.getTokenList(n);e.tokens=s,e.caipNetworkId=n,e.popularTokens=s.sort((c,u)=>c.symbol<u.symbol?-1:c.symbol>u.symbol?1:0);const i=(n&&((t=o.ConstantsUtil$1.SUGGESTED_TOKENS_BY_CHAIN)==null?void 0:t[n])||[]).map(c=>s.find(u=>u.symbol===c)).filter(c=>!!c),k=(o.ConstantsUtil$1.SWAP_SUGGESTED_TOKENS||[]).map(c=>s.find(u=>u.symbol===c)).filter(c=>!!c).filter(c=>!i.some(u=>u.address===c.address));e.suggestedTokens=[...i,...k]}catch{e.tokens=[],e.popularTokens=[],e.suggestedTokens=[]}finally{e.tokensLoading=!1}},async getAddressPrice(n){var c,u;const r=e.tokensPriceMap[n];if(r)return r;const t=await o.BlockchainApiController.fetchTokenPrice({addresses:[n]}),s=(t==null?void 0:t.fungibles)||[],l=[...e.tokens||[],...e.myTokensWithBalance||[]],i=(c=l==null?void 0:l.find(p=>p.address===n))==null?void 0:c.symbol,d=((u=s.find(p=>p.symbol.toLowerCase()===(i==null?void 0:i.toLowerCase())))==null?void 0:u.price)||0,k=parseFloat(d.toString());return e.tokensPriceMap[n]=k,k},async getNetworkTokenPrice(){var l;const{networkAddress:n}=a.getParams(),t=(l=(await o.BlockchainApiController.fetchTokenPrice({addresses:[n]}).catch(()=>(o.SnackController.showError("Failed to fetch network token price"),{fungibles:[]}))).fungibles)==null?void 0:l[0],s=(t==null?void 0:t.price.toString())||"0";e.tokensPriceMap[n]=parseFloat(s),e.networkTokenSymbol=(t==null?void 0:t.symbol)||"",e.networkPrice=s},async getMyTokensWithBalance(n){var s;const r=await o.BalanceUtil.getMyTokensWithBalance({forceUpdate:n,caipNetwork:o.ChainController.state.activeCaipNetwork,address:(s=o.ChainController.getAccountData())==null?void 0:s.address}),t=o.SwapApiUtil.mapBalancesToSwapTokens(r);t&&(await a.getInitialGasPrice(),a.setBalances(t))},setBalances(n){const{networkAddress:r}=a.getParams(),t=o.ChainController.state.activeCaipNetwork;if(!t)return;const s=n.find(l=>l.address===r);n.forEach(l=>{e.tokensPriceMap[l.address]=l.price||0}),e.myTokensWithBalance=n.filter(l=>l.address.startsWith(t.caipNetworkId)),e.networkBalanceInUSD=s?o.NumberUtil.multiply(s.quantity.numeric,s.price).toString():"0"},async getInitialGasPrice(){var r,t;const n=await o.SwapApiUtil.fetchGasPrice();if(!n)return{gasPrice:null,gasPriceInUSD:null};switch((t=(r=o.ChainController.state)==null?void 0:r.activeCaipNetwork)==null?void 0:t.chainNamespace){case o.ConstantsUtil.CHAIN.SOLANA:return e.gasFee=n.standard??"0",e.gasPriceInUSD=o.NumberUtil.multiply(n.standard,e.networkPrice).div(1e9).toNumber(),{gasPrice:BigInt(e.gasFee),gasPriceInUSD:Number(e.gasPriceInUSD)};case o.ConstantsUtil.CHAIN.EVM:default:const s=n.standard??"0",l=BigInt(s),i=BigInt(N),d=A.getGasPriceInUSD(e.networkPrice,i,l);return e.gasFee=s,e.gasPriceInUSD=d,{gasPrice:l,gasPriceInUSD:d}}},async swapTokens(){var i,d,k;const n=(i=o.ChainController.getAccountData())==null?void 0:i.address,r=e.sourceToken,t=e.toToken,s=o.NumberUtil.bigNumber(e.sourceTokenAmount).gt(0);if(s||a.setToTokenAmount(""),!t||!r||e.loadingPrices||!s||!n)return;e.loadingQuote=!0;const l=o.NumberUtil.bigNumber(e.sourceTokenAmount).times(10**r.decimals).round(0);try{const c=await o.BlockchainApiController.fetchSwapQuote({userAddress:n,from:r.address,to:t.address,gasPrice:e.gasFee,amount:l.toString()});e.loadingQuote=!1;const u=(k=(d=c==null?void 0:c.quotes)==null?void 0:d[0])==null?void 0:k.toAmount;if(!u){o.AlertController.open({displayMessage:"Incorrect amount",debugMessage:"Please enter a valid amount"},"error");return}const p=o.NumberUtil.bigNumber(u).div(10**t.decimals).toString();a.setToTokenAmount(p),a.hasInsufficientToken(e.sourceTokenAmount,r.address)?e.inputError="Insufficient balance":(e.inputError=void 0,a.setTransactionDetails())}catch(c){const u=await o.SwapApiUtil.handleSwapError(c);e.loadingQuote=!1,e.inputError=u||"Insufficient balance"}},async getTransaction(){const{fromCaipAddress:n,availableToSwap:r}=a.getParams(),t=e.sourceToken,s=e.toToken;if(!(!n||!r||!t||!s||e.loadingQuote))try{e.loadingBuildTransaction=!0;const l=await o.SwapApiUtil.fetchSwapAllowance({userAddress:n,tokenAddress:t.address,sourceTokenAmount:e.sourceTokenAmount,sourceTokenDecimals:t.decimals});let i;return l?i=await a.createSwapTransaction():i=await a.createAllowanceTransaction(),e.loadingBuildTransaction=!1,e.fetchError=!1,i}catch{o.RouterController.goBack(),o.SnackController.showError("Failed to check allowance"),e.loadingBuildTransaction=!1,e.approvalTransaction=void 0,e.swapTransaction=void 0,e.fetchError=!0;return}},async createAllowanceTransaction(){const{fromCaipAddress:n,sourceTokenAddress:r,toTokenAddress:t}=a.getParams();if(!(!n||!t)){if(!r)throw new Error("createAllowanceTransaction - No source token address found.");try{const s=await o.BlockchainApiController.generateApproveCalldata({from:r,to:t,userAddress:n}),l=o.CoreHelperUtil.getPlainAddress(s.tx.from);if(!l)throw new Error("SwapController:createAllowanceTransaction - address is required");const i={data:s.tx.data,to:l,gasPrice:BigInt(s.tx.eip155.gasPrice),value:BigInt(s.tx.value),toAmount:e.toTokenAmount};return e.swapTransaction=void 0,e.approvalTransaction={data:i.data,to:i.to,gasPrice:i.gasPrice,value:i.value,toAmount:i.toAmount},{data:i.data,to:i.to,gasPrice:i.gasPrice,value:i.value,toAmount:i.toAmount}}catch{o.RouterController.goBack(),o.SnackController.showError("Failed to create approval transaction"),e.approvalTransaction=void 0,e.swapTransaction=void 0,e.fetchError=!0;return}}},async createSwapTransaction(){var d;const{networkAddress:n,fromCaipAddress:r,sourceTokenAmount:t}=a.getParams(),s=e.sourceToken,l=e.toToken;if(!r||!t||!s||!l)return;const i=(d=o.ConnectionController.parseUnits(t,s.decimals))==null?void 0:d.toString();try{const k=await o.BlockchainApiController.generateSwapCalldata({userAddress:r,from:s.address,to:l.address,amount:i,disableEstimate:!0}),c=s.address===n,u=BigInt(k.tx.eip155.gas),p=BigInt(k.tx.eip155.gasPrice),g=o.CoreHelperUtil.getPlainAddress(k.tx.to);if(!g)throw new Error("SwapController:createSwapTransaction - address is required");const w={data:k.tx.data,to:g,gas:u,gasPrice:p,value:BigInt(c?i??"0":"0"),toAmount:e.toTokenAmount};return e.gasPriceInUSD=A.getGasPriceInUSD(e.networkPrice,u,p),e.approvalTransaction=void 0,e.swapTransaction=w,w}catch{o.RouterController.goBack(),o.SnackController.showError("Failed to create transaction"),e.approvalTransaction=void 0,e.swapTransaction=void 0,e.fetchError=!0;return}},onEmbeddedWalletApprovalSuccess(){o.SnackController.showLoading("Approve limit increase in your wallet"),o.RouterController.replace("SwapPreview")},async sendTransactionForApproval(n){var l,i,d;const{fromAddress:r,isAuthConnector:t}=a.getParams();e.loadingApprovalTransaction=!0,t?o.RouterController.pushTransactionStack({onSuccess:a.onEmbeddedWalletApprovalSuccess}):o.SnackController.showLoading("Approve limit increase in your wallet");try{await o.ConnectionController.sendTransaction({address:r,to:n.to,data:n.data,value:n.value,chainNamespace:o.ConstantsUtil.CHAIN.EVM}),await a.swapTokens(),await a.getTransaction(),e.approvalTransaction=void 0,e.loadingApprovalTransaction=!1}catch(k){const c=k;e.transactionError=c==null?void 0:c.displayMessage,e.loadingApprovalTransaction=!1,o.SnackController.showError((c==null?void 0:c.displayMessage)||"Transaction error"),o.EventsController.sendEvent({type:"track",event:"SWAP_APPROVAL_ERROR",properties:{message:(c==null?void 0:c.displayMessage)||(c==null?void 0:c.message)||"Unknown",network:((l=o.ChainController.state.activeCaipNetwork)==null?void 0:l.caipNetworkId)||"",swapFromToken:((i=a.state.sourceToken)==null?void 0:i.symbol)||"",swapToToken:((d=a.state.toToken)==null?void 0:d.symbol)||"",swapFromAmount:a.state.sourceTokenAmount||"",swapToAmount:a.state.toTokenAmount||"",isSmartAccount:o.getPreferredAccountType(o.ConstantsUtil.CHAIN.EVM)===o.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}})}},async sendTransactionForSwap(n){var d,k,c,u,p,g,w,f,S,C,P,b;if(!n)return;const{fromAddress:r,toTokenAmount:t,isAuthConnector:s}=a.getParams();e.loadingTransaction=!0;const l=`Swapping ${(d=e.sourceToken)==null?void 0:d.symbol} to ${o.NumberUtil.formatNumberToLocalString(t,3)} ${(k=e.toToken)==null?void 0:k.symbol}`,i=`Swapped ${(c=e.sourceToken)==null?void 0:c.symbol} to ${o.NumberUtil.formatNumberToLocalString(t,3)} ${(u=e.toToken)==null?void 0:u.symbol}`;s?o.RouterController.pushTransactionStack({onSuccess(){o.RouterController.replace("Account"),o.SnackController.showLoading(l),h.resetState()}}):o.SnackController.showLoading("Confirm transaction in your wallet");try{const I=[(p=e.sourceToken)==null?void 0:p.address,(g=e.toToken)==null?void 0:g.address].join(","),m=await o.ConnectionController.sendTransaction({address:r,to:n.to,data:n.data,value:n.value,chainNamespace:o.ConstantsUtil.CHAIN.EVM});return e.loadingTransaction=!1,o.SnackController.showSuccess(i),o.EventsController.sendEvent({type:"track",event:"SWAP_SUCCESS",properties:{network:((w=o.ChainController.state.activeCaipNetwork)==null?void 0:w.caipNetworkId)||"",swapFromToken:((f=a.state.sourceToken)==null?void 0:f.symbol)||"",swapToToken:((S=a.state.toToken)==null?void 0:S.symbol)||"",swapFromAmount:a.state.sourceTokenAmount||"",swapToAmount:a.state.toTokenAmount||"",isSmartAccount:o.getPreferredAccountType(o.ConstantsUtil.CHAIN.EVM)===o.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}}),h.resetState(),s||o.RouterController.replace("Account"),h.getMyTokensWithBalance(I),m}catch(I){const m=I;e.transactionError=m==null?void 0:m.displayMessage,e.loadingTransaction=!1,o.SnackController.showError((m==null?void 0:m.displayMessage)||"Transaction error"),o.EventsController.sendEvent({type:"track",event:"SWAP_ERROR",properties:{message:(m==null?void 0:m.displayMessage)||(m==null?void 0:m.message)||"Unknown",network:((C=o.ChainController.state.activeCaipNetwork)==null?void 0:C.caipNetworkId)||"",swapFromToken:((P=a.state.sourceToken)==null?void 0:P.symbol)||"",swapToToken:((b=a.state.toToken)==null?void 0:b.symbol)||"",swapFromAmount:a.state.sourceTokenAmount||"",swapToAmount:a.state.toTokenAmount||"",isSmartAccount:o.getPreferredAccountType(o.ConstantsUtil.CHAIN.EVM)===o.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}});return}},hasInsufficientToken(n,r){return A.isInsufficientSourceTokenForSwap(n,r,e.myTokensWithBalance)},setTransactionDetails(){const{toTokenAddress:n,toTokenDecimals:r}=a.getParams();!n||!r||(e.gasPriceInUSD=A.getGasPriceInUSD(e.networkPrice,BigInt(e.gasFee),BigInt(N)),e.priceImpact=A.getPriceImpact({sourceTokenAmount:e.sourceTokenAmount,sourceTokenPriceInUSD:e.sourceTokenPriceInUSD,toTokenPriceInUSD:e.toTokenPriceInUSD,toTokenAmount:e.toTokenAmount}),e.maxSlippage=A.getMaxSlippage(e.slippage,e.toTokenAmount),e.providerFee=A.getProviderFee(e.sourceTokenAmount))}},a=o.withErrorBoundary(h);exports.SwapController=a;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c2 as T, c3 as W, c4 as x, c5 as A, c6 as w, c7 as D, c8 as P, c9 as B, ca as M, cb as F, cc as g, cd as v, ce as L, cf as N, cg as z, ch as R, ci as _, cj as H, ck as V, cl as $, cm as q } from "./index-
|
|
1
|
+
import { c2 as T, c3 as W, c4 as x, c5 as A, c6 as w, c7 as D, c8 as P, c9 as B, ca as M, cb as F, cc as g, cd as v, ce as L, cf as N, cg as z, ch as R, ci as _, cj as H, ck as V, cl as $, cm as q } from "./index-QUe_zD7Z.mjs";
|
|
2
2
|
const I = {
|
|
3
3
|
getGasPriceInEther(n, t) {
|
|
4
4
|
const o = t * n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./parseSignature-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./parseSignature-BtVZgWuu.js"),s=require("./index-CdIV01LF.js");class k extends s.BaseError{constructor({callbackSelector:o,cause:t,data:c,extraData:u,sender:d,urls:a}){var n;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(n=t.metaMessages)!=null&&n.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(f=>` ${s.getUrl(f)}`)],` Sender: ${d}`,` Data: ${c}`,` Callback selector: ${o}`,` Extra data: ${u}`].flat(),name:"OffchainLookupError"})}}class b extends s.BaseError{constructor({result:o,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${s.getUrl(t)}`,`Response: ${s.stringify(o)}`],name:"OffchainLookupResponseMalformedError"})}}class L extends s.BaseError{constructor({sender:o,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${o}`],name:"OffchainLookupSenderMismatchError"})}}const E="0x556f1830",m={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function O(i,{blockNumber:o,blockTag:t,data:c,to:u}){const{args:d}=l.decodeErrorResult({data:c,abi:[m]}),[a,n,f,p,r]=d,{ccipRead:e}=i,y=e&&typeof(e==null?void 0:e.request)=="function"?e.request:g;try{if(!l.isAddressEqual(u,a))throw new L({sender:a,to:u});const h=n.includes(l.localBatchGatewayUrl)?await l.localBatchGatewayRequest({data:f,ccipRequest:y}):await y({data:f,sender:a,urls:n}),{data:w}=await l.call(i,{blockNumber:o,blockTag:t,data:s.concat([p,s.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[h,r])]),to:u});return w}catch(h){throw new k({callbackSelector:p,cause:h,data:c,extraData:r,sender:a,urls:n})}}async function g({data:i,sender:o,urls:t}){var u;let c=new Error("An unknown error occurred.");for(let d=0;d<t.length;d++){const a=t[d],n=a.includes("{data}")?"GET":"POST",f=n==="POST"?{data:i,sender:o}:void 0,p=n==="POST"?{"Content-Type":"application/json"}:{};try{const r=await fetch(a.replace("{sender}",o.toLowerCase()).replace("{data}",i),{body:JSON.stringify(f),headers:p,method:n});let e;if((u=r.headers.get("Content-Type"))!=null&&u.startsWith("application/json")?e=(await r.json()).data:e=await r.text(),!r.ok){c=new s.HttpRequestError({body:f,details:e!=null&&e.error?s.stringify(e.error):r.statusText,headers:r.headers,status:r.status,url:a});continue}if(!s.isHex(e)){c=new b({result:e,url:a});continue}return e}catch(r){c=new s.HttpRequestError({body:f,details:r.message,url:a})}}throw c}exports.ccipRequest=g;exports.offchainLookup=O;exports.offchainLookupAbiItem=m;exports.offchainLookupSignature=E;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a1 as g, ab as k, aR as L, aS as O, aT as E } from "./parseSignature-
|
|
2
|
-
import { ad as p, cs as y, bN as w, bb as R, b3 as x, aw as m, be as M } from "./index-
|
|
1
|
+
import { a1 as g, ab as k, aR as L, aS as O, aT as E } from "./parseSignature-SdquqcCh.mjs";
|
|
2
|
+
import { ad as p, cs as y, bN as w, bb as R, b3 as x, aw as m, be as M } from "./index-QUe_zD7Z.mjs";
|
|
3
3
|
class S extends p {
|
|
4
4
|
constructor({ callbackSelector: r, cause: a, data: n, extraData: i, sender: f, urls: t }) {
|
|
5
5
|
var o;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c1 as y, bX as $, bY as l, bV as S, bW as x, cz as m, c5 as p, cc as f, c6 as h, cw as u, c0 as _, cq as E, co as R } from "./index-
|
|
2
|
-
import { W as C } from "./index-
|
|
3
|
-
import { R as v } from "./ReownAuthentication-
|
|
1
|
+
import { c1 as y, bX as $, bY as l, bV as S, bW as x, cz as m, c5 as p, cc as f, c6 as h, cw as u, c0 as _, cq as E, co as R } from "./index-QUe_zD7Z.mjs";
|
|
2
|
+
import { W as C } from "./index-BsxJaSgz.mjs";
|
|
3
|
+
import { R as v } from "./ReownAuthentication-IhVJYqnP.mjs";
|
|
4
4
|
const D = y`
|
|
5
5
|
.email-sufixes {
|
|
6
6
|
display: flex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CdIV01LF.js"),d=require("./index-CoAc7gZY.js"),u=require("./ReownAuthentication-mFlHuQF9.js"),g=e.i$1`
|
|
2
2
|
.email-sufixes {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: row;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CdIV01LF.js"),c=require("./index-CoAc7gZY.js");var p=function(l,e,i,o){var n=arguments.length,r=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,i):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(l,e,i,o);else for(var s=l.length-1;s>=0;s--)(a=l[s])&&(r=(n<3?a(r):n>3?a(e,i,r):a(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};exports.W3mEmailVerifyOtpView=class extends c.W3mEmailOtpWidget{constructor(){super(...arguments),this.onOtpSubmit=async e=>{var i,o;try{if(this.authConnector){const n=t.ChainController.state.activeChain,r=t.ConnectionController.getConnections(n),a=(i=t.OptionsController.state.remoteFeatures)==null?void 0:i.multiWallet,s=r.length>0;if(await this.authConnector.provider.connectOtp({otp:e}),t.EventsController.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),n)await t.ConnectionController.connectExternal(this.authConnector,n);else throw new Error("Active chain is not set on ChainController");if((o=t.OptionsController.state.remoteFeatures)!=null&&o.emailCapture)return;if(t.OptionsController.state.siwx){t.ModalController.close();return}if(s&&a){t.RouterController.replace("ProfileWallets"),t.SnackController.showSuccess("New Wallet Added");return}t.ModalController.close()}}catch(n){throw t.EventsController.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:t.CoreHelperUtil.parseError(n)}}),n}},this.onOtpResend=async e=>{this.authConnector&&(await this.authConnector.provider.connectEmail({email:e}),t.EventsController.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}))}}};exports.W3mEmailVerifyOtpView=p([t.customElement("w3m-email-verify-otp-view")],exports.W3mEmailVerifyOtpView);const h=t.css`
|
|
2
2
|
wui-icon-box {
|
|
3
3
|
height: ${({spacing:l})=>l[16]};
|
|
4
4
|
width: ${({spacing:l})=>l[16]};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cc as S, c7 as g, cz as p, c9 as c, cA as _, c5 as s, c6 as f, ce as b, bW as u, bS as D, bX as C, ck as d, bY as m, cw as E, c1 as $, bZ as W, b$ as P, cB as N, c8 as T } from "./index-
|
|
2
|
-
import { W as y } from "./index-
|
|
1
|
+
import { cc as S, c7 as g, cz as p, c9 as c, cA as _, c5 as s, c6 as f, ce as b, bW as u, bS as D, bX as C, ck as d, bY as m, cw as E, c1 as $, bZ as W, b$ as P, cB as N, c8 as T } from "./index-QUe_zD7Z.mjs";
|
|
2
|
+
import { W as y } from "./index-BsxJaSgz.mjs";
|
|
3
3
|
var F = function(a, e, t, r) {
|
|
4
4
|
var n = arguments.length, i = n < 3 ? e : r === null ? r = Object.getOwnPropertyDescriptor(e, t) : r, o;
|
|
5
5
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(a, e, t, r);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c1 as B, bX as g, cA as W, cz as K, bY as c, ck as _, cu as V, cI as G, cw as d, bW as w, bS as E, bT as z, bU as H, bV as l, ci as N, cc as h, cJ as j, c8 as k, ca as A, cb as m, c7 as L, cK as X, cv as q, bZ as Z, cL as v, ce as U, cM as O, b$ as J, c9 as I, c6 as Q, cN as ee, c5 as te } from "./index-
|
|
1
|
+
import { c1 as B, bX as g, cA as W, cz as K, bY as c, ck as _, cu as V, cI as G, cw as d, bW as w, bS as E, bT as z, bU as H, bV as l, ci as N, cc as h, cJ as j, c8 as k, ca as A, cb as m, c7 as L, cK as X, cv as q, bZ as Z, cL as v, ce as U, cM as O, b$ as J, c9 as I, c6 as Q, cN as ee, c5 as te } from "./index-QUe_zD7Z.mjs";
|
|
2
2
|
const ie = B`
|
|
3
3
|
div {
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CdIV01LF.js"),x=e.i$1`
|
|
2
2
|
div {
|
|
3
3
|
width: 100%;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ReownAuthentication-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ReownAuthentication-mFlHuQF9.js");exports.ReownAuthentication=e.ReownAuthentication;exports.ReownAuthenticationMessenger=e.ReownAuthenticationMessenger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DqUT4OE3.js"),P=3e5;async function u(t){return e.PayController.handleOpenPay(t)}async function D(t,s=P){if(s<=0)throw new e.AppKitPayError(e.AppKitPayErrorCodes.INVALID_PAYMENT_CONFIG,"Timeout must be greater than 0");try{await u(t)}catch(r){throw r instanceof e.AppKitPayError?r:new e.AppKitPayError(e.AppKitPayErrorCodes.UNABLE_TO_INITIATE_PAYMENT,r.message)}return new Promise((r,y)=>{let n=!1;const i=setTimeout(()=>{n||(n=!0,c(),y(new e.AppKitPayError(e.AppKitPayErrorCodes.GENERIC_PAYMENT_ERROR,"Payment timeout")))},s);function o(){if(n)return;const a=e.PayController.state.currentPayment,m=e.PayController.state.error,C=e.PayController.state.isPaymentInProgress;if((a==null?void 0:a.status)==="SUCCESS"){n=!0,c(),clearTimeout(i),r({success:!0,result:a.result});return}if((a==null?void 0:a.status)==="FAILED"){n=!0,c(),clearTimeout(i),r({success:!1,error:m||"Payment failed"});return}m&&!C&&!a&&(n=!0,c(),clearTimeout(i),r({success:!1,error:m}))}const d=l("currentPayment",o),b=l("error",o),S=l("isPaymentInProgress",o),c=f([d,b,S]);o()})}function p(){return e.PayController.getExchanges()}function U(){var t;return(t=e.PayController.state.currentPayment)==null?void 0:t.result}function E(){return e.PayController.state.error}function T(){return e.PayController.state.isPaymentInProgress}function l(t,s){return e.PayController.subscribeKey(t,s)}function f(t){return()=>{t.forEach(s=>{try{s()}catch{}})}}const g={network:"eip155:8453",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},w={network:"eip155:8453",asset:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},h={network:"eip155:84532",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},A={network:"eip155:1",asset:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},k={network:"eip155:10",asset:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},I={network:"eip155:42161",asset:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},K={network:"eip155:137",asset:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},N={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},v={network:"eip155:1",asset:"0xdAC17F958D2ee523a2206206994597C13D831ec7",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},x={network:"eip155:10",asset:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},F={network:"eip155:42161",asset:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},O={network:"eip155:137",asset:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},R={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},q={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"native",metadata:{name:"Solana",symbol:"SOL",decimals:9}};exports.PayController=e.PayController;Object.defineProperty(exports,"W3mPayLoadingView",{enumerable:!0,get:()=>e.W3mPayLoadingView});Object.defineProperty(exports,"W3mPayQuoteView",{enumerable:!0,get:()=>e.W3mPayQuoteView});Object.defineProperty(exports,"W3mPayView",{enumerable:!0,get:()=>e.W3mPayView});exports.arbitrumUSDC=I;exports.arbitrumUSDT=F;exports.baseETH=g;exports.baseSepoliaETH=h;exports.baseUSDC=w;exports.ethereumUSDC=A;exports.ethereumUSDT=v;exports.getExchanges=p;exports.getIsPaymentInProgress=T;exports.getPayError=E;exports.getPayResult=U;exports.openPay=u;exports.optimismUSDC=k;exports.optimismUSDT=x;exports.pay=D;exports.polygonUSDC=K;exports.polygonUSDT=O;exports.solanaSOL=q;exports.solanaUSDC=N;exports.solanaUSDT=R;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./parseSignature-CWAxHYP1.js"),r=require("./index-BNobBA-8.js"),o=require("./ccip-BgoVuN3u.js");exports.AccountStateConflictError=e.AccountStateConflictError;exports.BaseFeeScalarError=e.BaseFeeScalarError;exports.BlockNotFoundError=e.BlockNotFoundError;exports.BundleFailedError=e.BundleFailedError;exports.CallExecutionError=e.CallExecutionError;exports.ChainDoesNotSupportContract=e.ChainDoesNotSupportContract;exports.CircularReferenceError=e.CircularReferenceError;exports.ClientChainNotConfiguredError=e.ClientChainNotConfiguredError;exports.ContractFunctionExecutionError=e.ContractFunctionExecutionError;exports.ContractFunctionRevertedError=e.ContractFunctionRevertedError;exports.ContractFunctionZeroDataError=e.ContractFunctionZeroDataError;exports.CounterfactualDeploymentFailedError=e.CounterfactualDeploymentFailedError;exports.Eip1559FeesNotSupportedError=e.Eip1559FeesNotSupportedError;exports.EnsAvatarInvalidNftUriError=e.EnsAvatarInvalidNftUriError;exports.EnsAvatarUnsupportedNamespaceError=e.EnsAvatarUnsupportedNamespaceError;exports.EnsAvatarUriResolutionError=e.EnsAvatarUriResolutionError;exports.EstimateGasExecutionError=e.EstimateGasExecutionError;exports.FilterTypeNotSupportedError=e.FilterTypeNotSupportedError;exports.InvalidAbiItemError=e.InvalidAbiItemError;exports.InvalidAbiParametersError=e.InvalidAbiParametersError;exports.InvalidAbiTypeParameterError=e.InvalidAbiTypeParameterError;exports.InvalidChainIdError=e.InvalidChainIdError;exports.InvalidFunctionModifierError=e.InvalidFunctionModifierError;exports.InvalidLegacyVError=e.InvalidLegacyVError;exports.InvalidModifierError=e.InvalidModifierError;exports.InvalidParameterError=e.InvalidParameterError;exports.InvalidParenthesisError=e.InvalidParenthesisError;exports.InvalidSerializableTransactionError=e.InvalidSerializableTransactionError;exports.InvalidSignatureError=e.InvalidSignatureError;exports.InvalidStorageKeySizeError=e.InvalidStorageKeySizeError;exports.InvalidStructSignatureError=e.InvalidStructSignatureError;exports.MaxFeePerGasTooLowError=e.MaxFeePerGasTooLowError;exports.RawContractError=e.RawContractError;exports.SolidityProtectedKeywordError=e.SolidityProtectedKeywordError;exports.StateAssignmentConflictError=e.StateAssignmentConflictError;exports.TransactionExecutionError=e.TransactionExecutionError;exports.TransactionNotFoundError=e.TransactionNotFoundError;exports.TransactionReceiptNotFoundError=e.TransactionReceiptNotFoundError;exports.UnknownSignatureError=e.UnknownSignatureError;exports.UnknownTypeError=e.UnknownTypeError;exports.WaitForCallsStatusTimeoutError=e.WaitForCallsStatusTimeoutError;exports.WaitForTransactionReceiptTimeoutError=e.WaitForTransactionReceiptTimeoutError;exports.assertRequest=e.assertRequest;exports.assertTransactionEIP1559=e.assertTransactionEIP1559;exports.assertTransactionEIP2930=e.assertTransactionEIP2930;exports.assertTransactionLegacy=e.assertTransactionLegacy;exports.blobsToCommitments=e.blobsToCommitments;exports.blobsToProofs=e.blobsToProofs;exports.bytesToBigInt=e.bytesToBigInt;exports.bytesToBool=e.bytesToBool;exports.bytesToNumber=e.bytesToNumber;exports.bytesToString=e.bytesToString;exports.commitmentToVersionedHash=e.commitmentToVersionedHash;exports.commitmentsToVersionedHashes=e.commitmentsToVersionedHashes;exports.createClient=e.createClient;exports.createNonceManager=e.createNonceManager;exports.createPublicClient=e.createPublicClient;exports.decodeAbiParameters=e.decodeAbiParameters;exports.decodeErrorResult=e.decodeErrorResult;exports.decodeEventLog=e.decodeEventLog;exports.decodeFunctionData=e.decodeFunctionData;exports.decodeFunctionResult=e.decodeFunctionResult;exports.defineBlock=e.defineBlock;exports.defineTransaction=e.defineTransaction;exports.defineTransactionReceipt=e.defineTransactionReceipt;exports.deploylessCallViaBytecodeBytecode=e.deploylessCallViaBytecodeBytecode;exports.deploylessCallViaFactoryBytecode=e.deploylessCallViaFactoryBytecode;exports.encodeDeployData=e.encodeDeployData;exports.encodeErrorResult=e.encodeErrorResult;exports.encodeEventTopics=e.encodeEventTopics;exports.encodeFunctionResult=e.encodeFunctionResult;exports.encodePacked=e.encodePacked;exports.erc6492SignatureValidatorByteCode=e.erc6492SignatureValidatorByteCode;exports.ethAddress=e.ethAddress;exports.formatBlock=e.formatBlock;exports.formatEther=e.formatEther;exports.formatLog=e.formatLog;exports.formatTransaction=e.formatTransaction;exports.formatTransactionReceipt=e.formatTransactionReceipt;exports.formatTransactionRequest=e.formatTransactionRequest;exports.getChainContractAddress=e.getChainContractAddress;exports.getContractError=e.getContractError;exports.getTransactionType=e.getTransactionType;exports.hexToSignature=e.parseSignature;exports.isAddressEqual=e.isAddressEqual;exports.labelhash=e.labelhash;exports.maxUint256=e.maxUint256;exports.namehash=e.namehash;exports.parseAbi=e.parseAbi;exports.parseAbiItem=e.parseAbiItem;exports.parseAbiParameters=e.parseAbiParameters;exports.parseEventLogs=e.parseEventLogs;exports.parseSignature=e.parseSignature;exports.publicActions=e.publicActions;exports.recoverAddress=e.recoverAddress;exports.recoverPublicKey=e.recoverPublicKey;exports.rpcTransactionType=e.rpcTransactionType;exports.serializeAccessList=e.serializeAccessList;exports.serializeErc6492Signature=e.serializeErc6492Signature;exports.serializeSignature=e.serializeSignature;exports.serializeTransaction=e.serializeTransaction;exports.sha256=e.sha256;exports.signatureToHex=e.serializeSignature;exports.toBlobSidecars=e.toBlobSidecars;exports.toBlobs=e.toBlobs;exports.toRlp=e.toRlp;exports.transactionType=e.transactionType;exports.universalSignatureValidatorByteCode=e.erc6492SignatureValidatorByteCode;exports.withCache=e.withCache;exports.zeroAddress=e.zeroAddress;exports.AbiConstructorNotFoundError=r.AbiConstructorNotFoundError;exports.AbiConstructorParamsNotFoundError=r.AbiConstructorParamsNotFoundError;exports.AbiDecodingDataSizeTooSmallError=r.AbiDecodingDataSizeTooSmallError;exports.AbiDecodingZeroDataError=r.AbiDecodingZeroDataError;exports.AbiEncodingArrayLengthMismatchError=r.AbiEncodingArrayLengthMismatchError;exports.AbiEncodingBytesSizeMismatchError=r.AbiEncodingBytesSizeMismatchError;exports.AbiEncodingLengthMismatchError=r.AbiEncodingLengthMismatchError;exports.AbiErrorInputsNotFoundError=r.AbiErrorInputsNotFoundError;exports.AbiErrorNotFoundError=r.AbiErrorNotFoundError;exports.AbiErrorSignatureNotFoundError=r.AbiErrorSignatureNotFoundError;exports.AbiEventNotFoundError=r.AbiEventNotFoundError;exports.AbiEventSignatureEmptyTopicsError=r.AbiEventSignatureEmptyTopicsError;exports.AbiEventSignatureNotFoundError=r.AbiEventSignatureNotFoundError;exports.AbiFunctionNotFoundError=r.AbiFunctionNotFoundError;exports.AbiFunctionOutputsNotFoundError=r.AbiFunctionOutputsNotFoundError;exports.AbiFunctionSignatureNotFoundError=r.AbiFunctionSignatureNotFoundError;exports.AtomicReadyWalletRejectedUpgradeError=r.AtomicReadyWalletRejectedUpgradeError;exports.AtomicityNotSupportedError=r.AtomicityNotSupportedError;exports.BaseError=r.BaseError;exports.BundleTooLargeError=r.BundleTooLargeError;exports.BytesSizeMismatchError=r.BytesSizeMismatchError;exports.ChainDisconnectedError=r.ChainDisconnectedError;exports.DecodeLogDataMismatch=r.DecodeLogDataMismatch;exports.DecodeLogTopicsMismatch=r.DecodeLogTopicsMismatch;exports.DuplicateIdError=r.DuplicateIdError;exports.ExecutionRevertedError=r.ExecutionRevertedError;exports.FeeCapTooHighError=r.FeeCapTooHighError;exports.FeeCapTooLowError=r.FeeCapTooLowError;exports.HttpRequestError=r.HttpRequestError;exports.InsufficientFundsError=r.InsufficientFundsError;exports.IntegerOutOfRangeError=r.IntegerOutOfRangeError;exports.InternalRpcError=r.InternalRpcError;exports.IntrinsicGasTooHighError=r.IntrinsicGasTooHighError;exports.IntrinsicGasTooLowError=r.IntrinsicGasTooLowError;exports.InvalidAbiDecodingTypeError=r.InvalidAbiDecodingTypeError;exports.InvalidAbiEncodingTypeError=r.InvalidAbiEncodingTypeError;exports.InvalidAddressError=r.InvalidAddressError;exports.InvalidArrayError=r.InvalidArrayError;exports.InvalidBytesBooleanError=r.InvalidBytesBooleanError;exports.InvalidDefinitionTypeError=r.InvalidDefinitionTypeError;exports.InvalidDomainError=r.InvalidDomainError;exports.InvalidHexBooleanError=r.InvalidHexBooleanError;exports.InvalidInputRpcError=r.InvalidInputRpcError;exports.InvalidParamsRpcError=r.InvalidParamsRpcError;exports.InvalidPrimaryTypeError=r.InvalidPrimaryTypeError;exports.InvalidRequestRpcError=r.InvalidRequestRpcError;exports.InvalidStructTypeError=r.InvalidStructTypeError;exports.JsonRpcVersionUnsupportedError=r.JsonRpcVersionUnsupportedError;exports.LimitExceededRpcError=r.LimitExceededRpcError;exports.MethodNotFoundRpcError=r.MethodNotFoundRpcError;exports.MethodNotSupportedRpcError=r.MethodNotSupportedRpcError;exports.NonceMaxValueError=r.NonceMaxValueError;exports.NonceTooHighError=r.NonceTooHighError;exports.NonceTooLowError=r.NonceTooLowError;exports.ParseRpcError=r.ParseRpcError;exports.ProviderDisconnectedError=r.ProviderDisconnectedError;exports.ProviderRpcError=r.ProviderRpcError;exports.ResourceNotFoundRpcError=r.ResourceNotFoundRpcError;exports.ResourceUnavailableRpcError=r.ResourceUnavailableRpcError;exports.RpcError=r.RpcError;exports.RpcRequestError=r.RpcRequestError;exports.SizeExceedsPaddingSizeError=r.SizeExceedsPaddingSizeError;exports.SizeOverflowError=r.SizeOverflowError;exports.SliceOffsetOutOfBoundsError=r.SliceOffsetOutOfBoundsError;exports.SwitchChainError=r.SwitchChainError;exports.TimeoutError=r.TimeoutError;exports.TipAboveFeeCapError=r.TipAboveFeeCapError;exports.TransactionRejectedRpcError=r.TransactionRejectedRpcError;exports.TransactionTypeNotSupportedError=r.TransactionTypeNotSupportedError;exports.UnauthorizedProviderError=r.UnauthorizedProviderError;exports.UnknownBundleIdError=r.UnknownBundleIdError;exports.UnknownNodeError=r.UnknownNodeError;exports.UnknownRpcError=r.UnknownRpcError;exports.UnsupportedChainIdError=r.UnsupportedChainIdError;exports.UnsupportedNonOptionalCapabilityError=r.UnsupportedNonOptionalCapabilityError;exports.UnsupportedPackedAbiType=r.UnsupportedPackedAbiType;exports.UnsupportedProviderMethodError=r.UnsupportedProviderMethodError;exports.UrlRequiredError=r.UrlRequiredError;exports.UserRejectedRequestError=r.UserRejectedRequestError;exports.boolToBytes=r.boolToBytes;exports.boolToHex=r.boolToHex;exports.bytesToHex=r.bytesToHex;exports.checksumAddress=r.checksumAddress;exports.concat=r.concat;exports.concatBytes=r.concatBytes;exports.concatHex=r.concatHex;exports.createTransport=r.createTransport;exports.defineChain=r.defineChain;exports.encodeAbiParameters=r.encodeAbiParameters;exports.encodeFunctionData=r.encodeFunctionData;exports.erc20Abi=r.erc20Abi;exports.erc6492SignatureValidatorAbi=r.erc6492SignatureValidatorAbi;exports.etherUnits=r.etherUnits;exports.fallback=r.fallback;exports.formatGwei=r.formatGwei;exports.formatUnits=r.formatUnits;exports.getAbiItem=r.getAbiItem;exports.getAddress=r.getAddress;exports.getEventSelector=r.toEventSelector;exports.getEventSignature=r.toSignature;exports.getFunctionSelector=r.toFunctionSelector;exports.getFunctionSignature=r.toSignature;exports.getTypesForEIP712Domain=r.getTypesForEIP712Domain;exports.gweiUnits=r.gweiUnits;exports.hashDomain=r.hashDomain;exports.hashMessage=r.hashMessage;exports.hashStruct=r.hashStruct;exports.hashTypedData=r.hashTypedData;exports.hexToBigInt=r.hexToBigInt;exports.hexToBool=r.hexToBool;exports.hexToBytes=r.hexToBytes;exports.hexToNumber=r.hexToNumber;exports.hexToString=r.hexToString;exports.http=r.http;exports.isAddress=r.isAddress;exports.isHex=r.isHex;exports.keccak256=r.keccak256;exports.multicall3Abi=r.multicall3Abi;exports.numberToBytes=r.numberToBytes;exports.numberToHex=r.numberToHex;exports.pad=r.pad;exports.padBytes=r.padBytes;exports.padHex=r.padHex;exports.prepareEncodeFunctionData=r.prepareEncodeFunctionData;exports.presignMessagePrefix=r.presignMessagePrefix;exports.shouldThrow=r.shouldThrow;exports.size=r.size;exports.slice=r.slice;exports.sliceBytes=r.sliceBytes;exports.sliceHex=r.sliceHex;exports.stringToBytes=r.stringToBytes;exports.stringToHex=r.stringToHex;exports.stringify=r.stringify;exports.toBytes=r.toBytes;exports.toEventHash=r.toSignatureHash;exports.toEventSelector=r.toEventSelector;exports.toEventSignature=r.toSignature;exports.toFunctionHash=r.toSignatureHash;exports.toFunctionSelector=r.toFunctionSelector;exports.toFunctionSignature=r.toSignature;exports.toHex=r.toHex;exports.toPrefixedMessage=r.toPrefixedMessage;exports.trim=r.trim;exports.universalSignatureValidatorAbi=r.erc6492SignatureValidatorAbi;exports.validateTypedData=r.validateTypedData;exports.withRetry=r.withRetry;exports.withTimeout=r.withTimeout;exports.ccipFetch=o.ccipRequest;exports.ccipRequest=o.ccipRequest;exports.offchainLookup=o.offchainLookup;exports.offchainLookupAbiItem=o.offchainLookupAbiItem;exports.offchainLookupSignature=o.offchainLookupSignature;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./parseSignature-BtVZgWuu.js"),r=require("./index-CdIV01LF.js"),o=require("./ccip-D2VFJAhC.js");exports.AccountStateConflictError=e.AccountStateConflictError;exports.BaseFeeScalarError=e.BaseFeeScalarError;exports.BlockNotFoundError=e.BlockNotFoundError;exports.BundleFailedError=e.BundleFailedError;exports.CallExecutionError=e.CallExecutionError;exports.ChainDoesNotSupportContract=e.ChainDoesNotSupportContract;exports.CircularReferenceError=e.CircularReferenceError;exports.ClientChainNotConfiguredError=e.ClientChainNotConfiguredError;exports.ContractFunctionExecutionError=e.ContractFunctionExecutionError;exports.ContractFunctionRevertedError=e.ContractFunctionRevertedError;exports.ContractFunctionZeroDataError=e.ContractFunctionZeroDataError;exports.CounterfactualDeploymentFailedError=e.CounterfactualDeploymentFailedError;exports.Eip1559FeesNotSupportedError=e.Eip1559FeesNotSupportedError;exports.EnsAvatarInvalidNftUriError=e.EnsAvatarInvalidNftUriError;exports.EnsAvatarUnsupportedNamespaceError=e.EnsAvatarUnsupportedNamespaceError;exports.EnsAvatarUriResolutionError=e.EnsAvatarUriResolutionError;exports.EstimateGasExecutionError=e.EstimateGasExecutionError;exports.FilterTypeNotSupportedError=e.FilterTypeNotSupportedError;exports.InvalidAbiItemError=e.InvalidAbiItemError;exports.InvalidAbiParametersError=e.InvalidAbiParametersError;exports.InvalidAbiTypeParameterError=e.InvalidAbiTypeParameterError;exports.InvalidChainIdError=e.InvalidChainIdError;exports.InvalidFunctionModifierError=e.InvalidFunctionModifierError;exports.InvalidLegacyVError=e.InvalidLegacyVError;exports.InvalidModifierError=e.InvalidModifierError;exports.InvalidParameterError=e.InvalidParameterError;exports.InvalidParenthesisError=e.InvalidParenthesisError;exports.InvalidSerializableTransactionError=e.InvalidSerializableTransactionError;exports.InvalidSignatureError=e.InvalidSignatureError;exports.InvalidStorageKeySizeError=e.InvalidStorageKeySizeError;exports.InvalidStructSignatureError=e.InvalidStructSignatureError;exports.MaxFeePerGasTooLowError=e.MaxFeePerGasTooLowError;exports.RawContractError=e.RawContractError;exports.SolidityProtectedKeywordError=e.SolidityProtectedKeywordError;exports.StateAssignmentConflictError=e.StateAssignmentConflictError;exports.TransactionExecutionError=e.TransactionExecutionError;exports.TransactionNotFoundError=e.TransactionNotFoundError;exports.TransactionReceiptNotFoundError=e.TransactionReceiptNotFoundError;exports.UnknownSignatureError=e.UnknownSignatureError;exports.UnknownTypeError=e.UnknownTypeError;exports.WaitForCallsStatusTimeoutError=e.WaitForCallsStatusTimeoutError;exports.WaitForTransactionReceiptTimeoutError=e.WaitForTransactionReceiptTimeoutError;exports.assertRequest=e.assertRequest;exports.assertTransactionEIP1559=e.assertTransactionEIP1559;exports.assertTransactionEIP2930=e.assertTransactionEIP2930;exports.assertTransactionLegacy=e.assertTransactionLegacy;exports.blobsToCommitments=e.blobsToCommitments;exports.blobsToProofs=e.blobsToProofs;exports.bytesToBigInt=e.bytesToBigInt;exports.bytesToBool=e.bytesToBool;exports.bytesToNumber=e.bytesToNumber;exports.bytesToString=e.bytesToString;exports.commitmentToVersionedHash=e.commitmentToVersionedHash;exports.commitmentsToVersionedHashes=e.commitmentsToVersionedHashes;exports.createClient=e.createClient;exports.createNonceManager=e.createNonceManager;exports.createPublicClient=e.createPublicClient;exports.decodeAbiParameters=e.decodeAbiParameters;exports.decodeErrorResult=e.decodeErrorResult;exports.decodeEventLog=e.decodeEventLog;exports.decodeFunctionData=e.decodeFunctionData;exports.decodeFunctionResult=e.decodeFunctionResult;exports.defineBlock=e.defineBlock;exports.defineTransaction=e.defineTransaction;exports.defineTransactionReceipt=e.defineTransactionReceipt;exports.deploylessCallViaBytecodeBytecode=e.deploylessCallViaBytecodeBytecode;exports.deploylessCallViaFactoryBytecode=e.deploylessCallViaFactoryBytecode;exports.encodeDeployData=e.encodeDeployData;exports.encodeErrorResult=e.encodeErrorResult;exports.encodeEventTopics=e.encodeEventTopics;exports.encodeFunctionResult=e.encodeFunctionResult;exports.encodePacked=e.encodePacked;exports.erc6492SignatureValidatorByteCode=e.erc6492SignatureValidatorByteCode;exports.ethAddress=e.ethAddress;exports.formatBlock=e.formatBlock;exports.formatEther=e.formatEther;exports.formatLog=e.formatLog;exports.formatTransaction=e.formatTransaction;exports.formatTransactionReceipt=e.formatTransactionReceipt;exports.formatTransactionRequest=e.formatTransactionRequest;exports.getChainContractAddress=e.getChainContractAddress;exports.getContractError=e.getContractError;exports.getTransactionType=e.getTransactionType;exports.hexToSignature=e.parseSignature;exports.isAddressEqual=e.isAddressEqual;exports.labelhash=e.labelhash;exports.maxUint256=e.maxUint256;exports.namehash=e.namehash;exports.parseAbi=e.parseAbi;exports.parseAbiItem=e.parseAbiItem;exports.parseAbiParameters=e.parseAbiParameters;exports.parseEventLogs=e.parseEventLogs;exports.parseSignature=e.parseSignature;exports.publicActions=e.publicActions;exports.recoverAddress=e.recoverAddress;exports.recoverPublicKey=e.recoverPublicKey;exports.rpcTransactionType=e.rpcTransactionType;exports.serializeAccessList=e.serializeAccessList;exports.serializeErc6492Signature=e.serializeErc6492Signature;exports.serializeSignature=e.serializeSignature;exports.serializeTransaction=e.serializeTransaction;exports.sha256=e.sha256;exports.signatureToHex=e.serializeSignature;exports.toBlobSidecars=e.toBlobSidecars;exports.toBlobs=e.toBlobs;exports.toRlp=e.toRlp;exports.transactionType=e.transactionType;exports.universalSignatureValidatorByteCode=e.erc6492SignatureValidatorByteCode;exports.withCache=e.withCache;exports.zeroAddress=e.zeroAddress;exports.AbiConstructorNotFoundError=r.AbiConstructorNotFoundError;exports.AbiConstructorParamsNotFoundError=r.AbiConstructorParamsNotFoundError;exports.AbiDecodingDataSizeTooSmallError=r.AbiDecodingDataSizeTooSmallError;exports.AbiDecodingZeroDataError=r.AbiDecodingZeroDataError;exports.AbiEncodingArrayLengthMismatchError=r.AbiEncodingArrayLengthMismatchError;exports.AbiEncodingBytesSizeMismatchError=r.AbiEncodingBytesSizeMismatchError;exports.AbiEncodingLengthMismatchError=r.AbiEncodingLengthMismatchError;exports.AbiErrorInputsNotFoundError=r.AbiErrorInputsNotFoundError;exports.AbiErrorNotFoundError=r.AbiErrorNotFoundError;exports.AbiErrorSignatureNotFoundError=r.AbiErrorSignatureNotFoundError;exports.AbiEventNotFoundError=r.AbiEventNotFoundError;exports.AbiEventSignatureEmptyTopicsError=r.AbiEventSignatureEmptyTopicsError;exports.AbiEventSignatureNotFoundError=r.AbiEventSignatureNotFoundError;exports.AbiFunctionNotFoundError=r.AbiFunctionNotFoundError;exports.AbiFunctionOutputsNotFoundError=r.AbiFunctionOutputsNotFoundError;exports.AbiFunctionSignatureNotFoundError=r.AbiFunctionSignatureNotFoundError;exports.AtomicReadyWalletRejectedUpgradeError=r.AtomicReadyWalletRejectedUpgradeError;exports.AtomicityNotSupportedError=r.AtomicityNotSupportedError;exports.BaseError=r.BaseError;exports.BundleTooLargeError=r.BundleTooLargeError;exports.BytesSizeMismatchError=r.BytesSizeMismatchError;exports.ChainDisconnectedError=r.ChainDisconnectedError;exports.DecodeLogDataMismatch=r.DecodeLogDataMismatch;exports.DecodeLogTopicsMismatch=r.DecodeLogTopicsMismatch;exports.DuplicateIdError=r.DuplicateIdError;exports.ExecutionRevertedError=r.ExecutionRevertedError;exports.FeeCapTooHighError=r.FeeCapTooHighError;exports.FeeCapTooLowError=r.FeeCapTooLowError;exports.HttpRequestError=r.HttpRequestError;exports.InsufficientFundsError=r.InsufficientFundsError;exports.IntegerOutOfRangeError=r.IntegerOutOfRangeError;exports.InternalRpcError=r.InternalRpcError;exports.IntrinsicGasTooHighError=r.IntrinsicGasTooHighError;exports.IntrinsicGasTooLowError=r.IntrinsicGasTooLowError;exports.InvalidAbiDecodingTypeError=r.InvalidAbiDecodingTypeError;exports.InvalidAbiEncodingTypeError=r.InvalidAbiEncodingTypeError;exports.InvalidAddressError=r.InvalidAddressError;exports.InvalidArrayError=r.InvalidArrayError;exports.InvalidBytesBooleanError=r.InvalidBytesBooleanError;exports.InvalidDefinitionTypeError=r.InvalidDefinitionTypeError;exports.InvalidDomainError=r.InvalidDomainError;exports.InvalidHexBooleanError=r.InvalidHexBooleanError;exports.InvalidInputRpcError=r.InvalidInputRpcError;exports.InvalidParamsRpcError=r.InvalidParamsRpcError;exports.InvalidPrimaryTypeError=r.InvalidPrimaryTypeError;exports.InvalidRequestRpcError=r.InvalidRequestRpcError;exports.InvalidStructTypeError=r.InvalidStructTypeError;exports.JsonRpcVersionUnsupportedError=r.JsonRpcVersionUnsupportedError;exports.LimitExceededRpcError=r.LimitExceededRpcError;exports.MethodNotFoundRpcError=r.MethodNotFoundRpcError;exports.MethodNotSupportedRpcError=r.MethodNotSupportedRpcError;exports.NonceMaxValueError=r.NonceMaxValueError;exports.NonceTooHighError=r.NonceTooHighError;exports.NonceTooLowError=r.NonceTooLowError;exports.ParseRpcError=r.ParseRpcError;exports.ProviderDisconnectedError=r.ProviderDisconnectedError;exports.ProviderRpcError=r.ProviderRpcError;exports.ResourceNotFoundRpcError=r.ResourceNotFoundRpcError;exports.ResourceUnavailableRpcError=r.ResourceUnavailableRpcError;exports.RpcError=r.RpcError;exports.RpcRequestError=r.RpcRequestError;exports.SizeExceedsPaddingSizeError=r.SizeExceedsPaddingSizeError;exports.SizeOverflowError=r.SizeOverflowError;exports.SliceOffsetOutOfBoundsError=r.SliceOffsetOutOfBoundsError;exports.SwitchChainError=r.SwitchChainError;exports.TimeoutError=r.TimeoutError;exports.TipAboveFeeCapError=r.TipAboveFeeCapError;exports.TransactionRejectedRpcError=r.TransactionRejectedRpcError;exports.TransactionTypeNotSupportedError=r.TransactionTypeNotSupportedError;exports.UnauthorizedProviderError=r.UnauthorizedProviderError;exports.UnknownBundleIdError=r.UnknownBundleIdError;exports.UnknownNodeError=r.UnknownNodeError;exports.UnknownRpcError=r.UnknownRpcError;exports.UnsupportedChainIdError=r.UnsupportedChainIdError;exports.UnsupportedNonOptionalCapabilityError=r.UnsupportedNonOptionalCapabilityError;exports.UnsupportedPackedAbiType=r.UnsupportedPackedAbiType;exports.UnsupportedProviderMethodError=r.UnsupportedProviderMethodError;exports.UrlRequiredError=r.UrlRequiredError;exports.UserRejectedRequestError=r.UserRejectedRequestError;exports.boolToBytes=r.boolToBytes;exports.boolToHex=r.boolToHex;exports.bytesToHex=r.bytesToHex;exports.checksumAddress=r.checksumAddress;exports.concat=r.concat;exports.concatBytes=r.concatBytes;exports.concatHex=r.concatHex;exports.createTransport=r.createTransport;exports.defineChain=r.defineChain;exports.encodeAbiParameters=r.encodeAbiParameters;exports.encodeFunctionData=r.encodeFunctionData;exports.erc20Abi=r.erc20Abi;exports.erc6492SignatureValidatorAbi=r.erc6492SignatureValidatorAbi;exports.etherUnits=r.etherUnits;exports.fallback=r.fallback;exports.formatGwei=r.formatGwei;exports.formatUnits=r.formatUnits;exports.getAbiItem=r.getAbiItem;exports.getAddress=r.getAddress;exports.getEventSelector=r.toEventSelector;exports.getEventSignature=r.toSignature;exports.getFunctionSelector=r.toFunctionSelector;exports.getFunctionSignature=r.toSignature;exports.getTypesForEIP712Domain=r.getTypesForEIP712Domain;exports.gweiUnits=r.gweiUnits;exports.hashDomain=r.hashDomain;exports.hashMessage=r.hashMessage;exports.hashStruct=r.hashStruct;exports.hashTypedData=r.hashTypedData;exports.hexToBigInt=r.hexToBigInt;exports.hexToBool=r.hexToBool;exports.hexToBytes=r.hexToBytes;exports.hexToNumber=r.hexToNumber;exports.hexToString=r.hexToString;exports.http=r.http;exports.isAddress=r.isAddress;exports.isHex=r.isHex;exports.keccak256=r.keccak256;exports.multicall3Abi=r.multicall3Abi;exports.numberToBytes=r.numberToBytes;exports.numberToHex=r.numberToHex;exports.pad=r.pad;exports.padBytes=r.padBytes;exports.padHex=r.padHex;exports.prepareEncodeFunctionData=r.prepareEncodeFunctionData;exports.presignMessagePrefix=r.presignMessagePrefix;exports.shouldThrow=r.shouldThrow;exports.size=r.size;exports.slice=r.slice;exports.sliceBytes=r.sliceBytes;exports.sliceHex=r.sliceHex;exports.stringToBytes=r.stringToBytes;exports.stringToHex=r.stringToHex;exports.stringify=r.stringify;exports.toBytes=r.toBytes;exports.toEventHash=r.toSignatureHash;exports.toEventSelector=r.toEventSelector;exports.toEventSignature=r.toSignature;exports.toFunctionHash=r.toSignatureHash;exports.toFunctionSelector=r.toFunctionSelector;exports.toFunctionSignature=r.toSignature;exports.toHex=r.toHex;exports.toPrefixedMessage=r.toPrefixedMessage;exports.trim=r.trim;exports.universalSignatureValidatorAbi=r.erc6492SignatureValidatorAbi;exports.validateTypedData=r.validateTypedData;exports.withRetry=r.withRetry;exports.withTimeout=r.withTimeout;exports.ccipFetch=o.ccipRequest;exports.ccipRequest=o.ccipRequest;exports.offchainLookup=o.offchainLookup;exports.offchainLookupAbiItem=o.offchainLookupAbiItem;exports.offchainLookupSignature=o.offchainLookupSignature;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bS as d, bT as c, bU as m, bV as r, bW as f, bX as v, bZ as b, b_ as y, bY as h, b$ as g, c0 as w } from "./index-
|
|
1
|
+
import { bS as d, bT as c, bU as m, bV as r, bW as f, bX as v, bZ as b, b_ as y, bY as h, b$ as g, c0 as w } from "./index-QUe_zD7Z.mjs";
|
|
2
2
|
const x = d`
|
|
3
3
|
:host {
|
|
4
4
|
position: relative;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bS as C, bT as O, bU as P, bV as h, bW as w, bX as v, bY as l, c1 as E, cw as d, c0 as I, cx as g, c5 as S, ck as $, ce as R, c6 as T } from "./index-
|
|
1
|
+
import { bS as C, bT as O, bU as P, bV as h, bW as w, bX as v, bY as l, c1 as E, cw as d, c0 as I, cx as g, c5 as S, ck as $, ce as R, c6 as T } from "./index-QUe_zD7Z.mjs";
|
|
2
2
|
const L = C`
|
|
3
3
|
:host {
|
|
4
4
|
position: relative;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as t, A as m, a as d } from "./index-
|
|
2
|
-
import { b as z, c as B, W as G } from "./index-
|
|
1
|
+
import { P as t, A as m, a as d } from "./index-_YA065ZZ.mjs";
|
|
2
|
+
import { b as z, c as B, W as G } from "./index-_YA065ZZ.mjs";
|
|
3
3
|
const U = 3e5;
|
|
4
4
|
async function E(e) {
|
|
5
5
|
return t.handleOpenPay(e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CdIV01LF.js");Object.defineProperty(exports,"AppKitAccountButton",{enumerable:!0,get:()=>e.AppKitAccountButton});Object.defineProperty(exports,"AppKitButton",{enumerable:!0,get:()=>e.AppKitButton});Object.defineProperty(exports,"AppKitConnectButton",{enumerable:!0,get:()=>e.AppKitConnectButton});Object.defineProperty(exports,"AppKitNetworkButton",{enumerable:!0,get:()=>e.AppKitNetworkButton});Object.defineProperty(exports,"W3mAccountButton",{enumerable:!0,get:()=>e.W3mAccountButton});Object.defineProperty(exports,"W3mAccountSettingsView",{enumerable:!0,get:()=>e.W3mAccountSettingsView});Object.defineProperty(exports,"W3mAccountView",{enumerable:!0,get:()=>e.W3mAccountView});Object.defineProperty(exports,"W3mAllWalletsView",{enumerable:!0,get:()=>e.W3mAllWalletsView});Object.defineProperty(exports,"W3mButton",{enumerable:!0,get:()=>e.W3mButton});Object.defineProperty(exports,"W3mChooseAccountNameView",{enumerable:!0,get:()=>e.W3mChooseAccountNameView});Object.defineProperty(exports,"W3mConnectButton",{enumerable:!0,get:()=>e.W3mConnectButton});Object.defineProperty(exports,"W3mConnectView",{enumerable:!0,get:()=>e.W3mConnectView});Object.defineProperty(exports,"W3mConnectWalletsView",{enumerable:!0,get:()=>e.W3mConnectWalletsView});Object.defineProperty(exports,"W3mConnectingExternalView",{enumerable:!0,get:()=>e.W3mConnectingExternalView});Object.defineProperty(exports,"W3mConnectingMultiChainView",{enumerable:!0,get:()=>e.W3mConnectingMultiChainView});Object.defineProperty(exports,"W3mConnectingWcBasicView",{enumerable:!0,get:()=>e.W3mConnectingWcBasicView});Object.defineProperty(exports,"W3mConnectingWcView",{enumerable:!0,get:()=>e.W3mConnectingWcView});Object.defineProperty(exports,"W3mDownloadsView",{enumerable:!0,get:()=>e.W3mDownloadsView});Object.defineProperty(exports,"W3mFooter",{enumerable:!0,get:()=>e.W3mFooter});Object.defineProperty(exports,"W3mFundWalletView",{enumerable:!0,get:()=>e.W3mFundWalletView});Object.defineProperty(exports,"W3mGetWalletView",{enumerable:!0,get:()=>e.W3mGetWalletView});Object.defineProperty(exports,"W3mNetworkButton",{enumerable:!0,get:()=>e.W3mNetworkButton});Object.defineProperty(exports,"W3mNetworkSwitchView",{enumerable:!0,get:()=>e.W3mNetworkSwitchView});Object.defineProperty(exports,"W3mNetworksView",{enumerable:!0,get:()=>e.W3mNetworksView});Object.defineProperty(exports,"W3mProfileWalletsView",{enumerable:!0,get:()=>e.W3mProfileWalletsView});Object.defineProperty(exports,"W3mRouter",{enumerable:!0,get:()=>e.W3mRouter});Object.defineProperty(exports,"W3mSIWXSignMessageView",{enumerable:!0,get:()=>e.W3mSIWXSignMessageView});Object.defineProperty(exports,"W3mSwitchActiveChainView",{enumerable:!0,get:()=>e.W3mSwitchActiveChainView});Object.defineProperty(exports,"W3mUnsupportedChainView",{enumerable:!0,get:()=>e.W3mUnsupportedChainView});Object.defineProperty(exports,"W3mWalletCompatibleNetworksView",{enumerable:!0,get:()=>e.W3mWalletCompatibleNetworksView});Object.defineProperty(exports,"W3mWhatIsANetworkView",{enumerable:!0,get:()=>e.W3mWhatIsANetworkView});Object.defineProperty(exports,"W3mWhatIsAWalletView",{enumerable:!0,get:()=>e.W3mWhatIsAWalletView});
|