diff --git a/nextjs-example-testing/404.html b/nextjs-example-testing/404.html index 2b8dba20..06feec0e 100644 --- a/nextjs-example-testing/404.html +++ b/nextjs-example-testing/404.html @@ -1 +1 @@ -404: This page could not be found.Aptos Wallet Adapter Example

404

This page could not be found.

    \ No newline at end of file +404: This page could not be found.Aptos Wallet Adapter Example

    404

    This page could not be found.

      \ No newline at end of file diff --git a/nextjs-example-testing/_next/static/BFcUVcma1i59CbGCHpCob/_buildManifest.js b/nextjs-example-testing/_next/static/NukkrhUvULy14v7ej06l4/_buildManifest.js similarity index 100% rename from nextjs-example-testing/_next/static/BFcUVcma1i59CbGCHpCob/_buildManifest.js rename to nextjs-example-testing/_next/static/NukkrhUvULy14v7ej06l4/_buildManifest.js diff --git a/nextjs-example-testing/_next/static/BFcUVcma1i59CbGCHpCob/_ssgManifest.js b/nextjs-example-testing/_next/static/NukkrhUvULy14v7ej06l4/_ssgManifest.js similarity index 100% rename from nextjs-example-testing/_next/static/BFcUVcma1i59CbGCHpCob/_ssgManifest.js rename to nextjs-example-testing/_next/static/NukkrhUvULy14v7ej06l4/_ssgManifest.js diff --git a/nextjs-example-testing/_next/static/chunks/860-b6f0cb90839296cc.js b/nextjs-example-testing/_next/static/chunks/860-b6f0cb90839296cc.js deleted file mode 100644 index 9b594bb3..00000000 --- a/nextjs-example-testing/_next/static/chunks/860-b6f0cb90839296cc.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[860],{23938:function(){},70992:function(t,e,n){"use strict";n.d(e,{AutoConnectProvider:function(){return l},v:function(){return o}});var a=n(3894),s=n(73473);let i="AptosWalletAutoConnect",r=(0,s.createContext)({});function o(){return(0,s.useContext)(r)}let l=t=>{let{children:e}=t,[n,o]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{try{let t=localStorage.getItem(i);if(t)return o(JSON.parse(t))}catch(t){console.error(t)}},[]),(0,s.useEffect)(()=>{try{n?localStorage.setItem(i,JSON.stringify(n)):localStorage.removeItem(i)}catch(t){console.error(t)}},[n]),(0,a.jsx)(r.Provider,{value:{autoConnect:n,setAutoConnect:o},children:e})}},6523:function(t,e,n){"use strict";n.d(e,{pm:function(){return h}});var a=n(73473);let s=0,i=new Map,r=t=>{if(i.has(t))return;let e=setTimeout(()=>{i.delete(t),u({type:"REMOVE_TOAST",toastId:t})},1e6);i.set(t,e)},o=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,1)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t)};case"DISMISS_TOAST":{let{toastId:n}=e;return n?r(n):t.toasts.forEach(t=>{r(t.id)}),{...t,toasts:t.toasts.map(t=>t.id===n||void 0===n?{...t,open:!1}:t)}}case"REMOVE_TOAST":if(void 0===e.toastId)return{...t,toasts:[]};return{...t,toasts:t.toasts.filter(t=>t.id!==e.toastId)}}},l=[],c={toasts:[]};function u(t){c=o(c,t),l.forEach(t=>{t(c)})}function d(t){let{...e}=t,n=(s=(s+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>u({type:"DISMISS_TOAST",toastId:n});return u({type:"ADD_TOAST",toast:{...e,id:n,open:!0,onOpenChange:t=>{t||a()}}}),{id:n,dismiss:a,update:t=>u({type:"UPDATE_TOAST",toast:{...t,id:n}})}}function h(){let[t,e]=a.useState(c);return a.useEffect(()=>(l.push(e),()=>{let t=l.indexOf(e);t>-1&&l.splice(t,1)}),[t]),{...t,toast:d,dismiss:t=>u({type:"DISMISS_TOAST",toastId:t})}}},2129:function(t,e,n){"use strict";n.d(e,{cn:function(){return i}});var a=n(81185),s=n(11812);function i(){for(var t=arguments.length,e=Array(t),n=0;n0!==t.length&&t.every(t=>t instanceof r.iVQ),U=(t,e)=>{if(!t)throw Error("Undefined network");return new r.ScN(Z(t)?{network:function(t){switch(null==t?void 0:t.name){case"mainnet":return r.ZcK.MAINNET;case"testnet":return r.ZcK.TESTNET;case"devnet":return r.ZcK.DEVNET;case"local":return r.ZcK.LOCAL;default:throw Error("Invalid Aptos network name")}}(t),clientConfig:{API_KEY:null==e?void 0:e.aptosApiKey}}:{network:r.ZcK.CUSTOM,fullnode:t.url,clientConfig:{API_KEY:null==e?void 0:e.aptosApiKey}})},Z=t=>{if(!t)throw Error("Undefined network");return void 0!==r.sAp[t.name]},Y=async()=>{let t=new r.gZG;return await t.getChainId()},B=t=>{let e=t.data.functionArguments[0];"string"==typeof e&&(e=r.pUe.fromHexInput(e).toUint8Array());let n=t.data.functionArguments[1];if(Array.isArray(n))n=n.map(t=>"string"==typeof t?r.pUe.fromHexInput(t).toUint8Array():t);else throw new E("The bytecode argument must be an array.").message;return{metadataBytes:e,byteCode:n}},H="AptosWalletName";function R(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K,n=[],a=[];for(let s of t)e(s)?n.push(s):a.push(s);return{defaultWallets:n,moreWallets:a}}function K(t){return"Installed"===t.readyState||"Loadable"===t.readyState}function J(t){let e=K(t);return!(!e&&O())&&!e}function G(t){if(t)return"".concat(t.toString().slice(0,6),"...").concat(t.toString().slice(-5))}function V(t){return!!t.url&&t.url.startsWith("https://aptosconnect.app")}function F(t,e){let{aptosConnectWallets:n,otherWallets:a}=function(t){let{defaultWallets:e,moreWallets:n}=R(t,V);return{aptosConnectWallets:e,otherWallets:n}}(t),{defaultWallets:s,moreWallets:i}=R(a);return(null==e?void 0:e.sortAptosConnectWallets)&&n.sort(e.sortAptosConnectWallets),(null==e?void 0:e.sortAvailableWallets)&&s.sort(e.sortAvailableWallets),(null==e?void 0:e.sortInstallableWallets)&&i.sort(e.sortInstallableWallets),{aptosConnectWallets:n,availableWallets:s,installableWallets:i}}var X=class extends o{async connect(t){return await t.connect()}async resolveSignAndSubmitTransaction(t,e,n,a,s){var o,l,c,u,d,h,g,w;if(P(t.functionArguments)){let d=U(e,s),h=function(t){let e=new i.Ce.Deserializer(t.bcsToBytes());return i.Kj.TransactionPayload.deserialize(e)}(await (0,r.yDq)({...t,aptosConfig:d}));return await this.signAndSubmitBCSTransaction(h,n,{max_gas_amount:(null==(o=a.options)?void 0:o.maxGasAmount)?BigInt(null==(l=a.options)?void 0:l.maxGasAmount):void 0,gas_unit_price:(null==(c=a.options)?void 0:c.gasUnitPrice)?BigInt(null==(u=a.options)?void 0:u.gasUnitPrice):void 0})}let M=function(t){var e,n;if("bytecode"in t)throw Error("script payload not supported");if("multisigAddress"in t){let n=null==(e=t.typeArguments)?void 0:e.map(t=>t instanceof r.O$S?t.toString():t);return{type:"multisig_payload",multisig_address:t.multisigAddress.toString(),function:t.function,type_arguments:n||[],arguments:t.functionArguments}}{let e=null==(n=t.typeArguments)?void 0:n.map(t=>t instanceof r.O$S?t.toString():t);return{type:"entry_function_payload",function:t.function,type_arguments:e||[],arguments:t.functionArguments}}}(t);return await this.signAndSubmitTransaction(M,n,{max_gas_amount:(null==(d=a.options)?void 0:d.maxGasAmount)?BigInt(null==(h=a.options)?void 0:h.maxGasAmount):void 0,gas_unit_price:(null==(g=a.options)?void 0:g.gasUnitPrice)?BigInt(null==(w=a.options)?void 0:w.gasUnitPrice):void 0})}async signAndSubmitTransaction(t,e,n){try{return await e.signAndSubmitTransaction(t,n)}catch(t){throw new E("object"==typeof t&&"message"in t?t.message:t).message}}async signAndSubmitBCSTransaction(t,e,n){if(!("signAndSubmitBCSTransaction"in e))throw new k("Submit a BCS Transaction is not supported by ".concat(e.name)).message;try{return await e.signAndSubmitBCSTransaction(t,n)}catch(t){throw new E("object"==typeof t&&"message"in t?t.message:t).message}}async signTransaction(t,e,n){try{return await e.signTransaction(t,n)}catch(t){throw new _("object"==typeof t&&"message"in t?t.message:t).message}}async signMessageAndVerify(t,e,n){try{let a=await e.signMessage(t);if(!a)throw new L("Failed to sign a message").message;console.log("signMessageAndVerify signMessage response",a);let s=!1;if(Array.isArray(a.signature)){let{fullMessage:t,signature:e,bitmap:i}=a;if(i){let a=n.minKeysRequired;if(e.lengthArray.from({length:8}).map((e,n)=>t>>n&1)),r=a.map((t,e)=>e).filter(t=>a[t]),o=n.publicKey.filter((t,e)=>r.includes(e));s=!0;for(let n=0;na.name===t.name);if((null==(i=null==c?void 0:c.features["aptos:signAndSubmitTransaction"])?void 0:i.version)!=="1.1.0"){let s=await e.transaction.build.simple({sender:n.address.toString(),data:t.data,options:t.options}),i=await a.signAndSubmitTransaction(s);if(i.status===l.qk.REJECTED)throw new I("User has rejected the request").message;return i.args}let u={gasUnitPrice:null==(r=t.options)?void 0:r.gasUnitPrice,maxGasAmount:null==(o=t.options)?void 0:o.maxGasAmount,payload:t.data},d=await a.signAndSubmitTransaction(u);if(d.status===l.qk.REJECTED)throw new I("User has rejected the request").message;return d.args}catch(t){throw new E(Q(t)).message}}async signTransaction(t,e,n){let a=await e.signTransaction(t,n);if(a.status===l.qk.REJECTED)throw new I("User has rejected the request").message;return a.args}async signMessage(t,e){try{let n=await e.signMessage(t);if(n.status===l.qk.REJECTED)throw new I("User has rejected the request").message;return n.args}catch(t){throw new x(Q(t)).message}}async signMessageAndVerify(t,e){try{let n=await e.signMessage(t),a=await e.account();if(n.status===l.qk.REJECTED)throw new I("Failed to sign a message").message;if(a.publicKey instanceof r.qxW&&a.publicKey.variant===r.OHP.Keyless)return!0;let s=!1;if(n.args.signature instanceof r.e6E){if(!(a.publicKey instanceof r.ZSy))throw new L("Public key and Signature type mismatch").message;let{fullMessage:t,signature:e}=n.args;if(e.bitmap){let n=a.publicKey.threshold;s=!(e.signatures.length{let e=this._standard_wallets.find(t=>"Pontem Wallet"==t.name);"Pontem"===t.name&&e||-1!==this._standard_wallets.findIndex(e=>e.name==t.name)||(this._all_wallets.push(t),t.readyState||(t.readyState="undefined"==typeof document?"Unsupported":"NotDetected"),function(t){if("undefined"==typeof document)return;let e=[];function n(){if(t())for(let t of e)t()}let a=setInterval(n,1e3);e.push(()=>clearInterval(a)),"loading"===document.readyState&&(document.addEventListener("DOMContentLoaded",n,{once:!0}),e.push(()=>document.removeEventListener("DOMContentLoaded",n))),"complete"!==document.readyState&&(window.addEventListener("load",n,{once:!0}),e.push(()=>window.removeEventListener("load",n))),n()}(()=>{let e=t.providerName||t.name.toLowerCase();return!!Object.keys(window).includes(e)&&(t.readyState="Installed",t.provider=window[e],this.emit("readyStateChange",t),!0)}))})}fetchExtensionAIP62AptosWallets(){let{aptosWallets:t,on:e}=(0,l.Wk)();this.setExtensionAIP62Wallets(t);let n=this;e("register",function(){let{aptosWallets:t}=(0,l.Wk)();n.setExtensionAIP62Wallets(t)}),e("unregister",function(){let{aptosWallets:t}=(0,l.Wk)();n.setExtensionAIP62Wallets(t)})}appendNotDetectedStandardSupportedWallets(){tt.map(t=>{if(-1!==this.wallets.findIndex(e=>e.name===t.name))return;let e=this.wallets.find(t=>"Pontem"==t.name);if("Pontem Wallet"===t.name&&e)return;let n=this._standard_wallets.find(e=>e.name==t.name);!(n&&this.excludeWallet(n))&&(n||(this._all_wallets.push(t),this.emit("standardWalletsAdded",t)))})}fetchSDKAIP62AptosWallets(){this._sdkWallets.map(t=>{this.standardizeAIP62WalletType(t)})}setExtensionAIP62Wallets(t){t.filter(t=>"Dev T wallet"!==t.name&&"T wallet"!==t.name).map(t=>{this.standardizeAIP62WalletType(t),this._standard_wallets.push(t)})}excludeWallet(t){return this._optInWallets.length>0&&!this._optInWallets.includes(t.name)}standardizeAIP62WalletType(t){!this.excludeWallet(t)&&(0,l.cE)(t)&&(t.readyState="Installed",this.standardizeStandardWalletToPluginWalletType(t),this._standard_wallets.push(t))}recordEvent(t,e){var n,a,s,i;null==(i=this.ga4)||i.gtag("event","wallet_adapter_".concat(t),{wallet:null==(n=this._wallet)?void 0:n.name,network:null==(a=this._network)?void 0:a.name,network_url:null==(s=this._network)?void 0:s.url,adapter_core_version:w,send_to:"G-GNVVWBL3J9",...e})}ensureWalletExists(t){if(!t)throw new D().name;if(!("Loadable"===t.readyState||"Installed"===t.readyState))throw new f("Wallet is not set").name}ensureAccountExists(t){if(!t)throw new C("Account is not set").name}doesWalletExist(){if(!this._connected||this._connecting||!this._wallet)throw new D().name;if(!("Loadable"===this._wallet.readyState||"Installed"===this._wallet.readyState))throw new f().name;return!0}clearData(){this._connected=!1,this.setWallet(null),this.setAccount(null),this.setNetwork(null),localStorage.removeItem(H)}async setAnsName(){var t;if((null==(t=this._network)?void 0:t.chainId)&&this._account){if(!A[this._network.chainId]||!Z(this._network)){this._account.ansName=void 0;return}let t=U(this._network,this._dappConfig),e=new r.gZG(t),n=await e.ans.getPrimaryName({address:this._account.address.toString()});this._account.ansName=n}}setWallet(t){this._wallet=t}setAccount(t){var e;if(null===t){this._account=null;return}if(null==(e=this._wallet)?void 0:e.isAIP62Standard){this._account={address:t.address,publicKey:t.publicKey,ansName:t.ansName};return}this._account={...t}}setNetwork(t){var e,n,a;if(null===t){this._network=null;return}if(null==(e=this._wallet)?void 0:e.isAIP62Standard){this.recordEvent("network_change",{from:null==(n=this._network)?void 0:n.name,to:t.name}),this._network={name:t.name.toLowerCase(),chainId:t.chainId.toString(),url:t.url};return}this.recordEvent("network_change",{from:null==(a=this._network)?void 0:a.name,to:t.name}),this._network={...t,name:t.name.toLowerCase()}}isConnected(){return this._connected}get wallets(){return this._all_wallets}get pluginWallets(){return this._wallets}get standardWallets(){return this._standard_wallets}get wallet(){try{if(!this._wallet)return null;return{name:this._wallet.name,icon:this._wallet.icon,url:this._wallet.url}}catch(t){throw new N(t).message}}get account(){var t;try{if(!this._account)return null;return{address:"string"==typeof this._account.address?r.kxK.from(this._account.address):this._account.address,publicKey:"string"==typeof this._account.publicKey?new r.EZS(this._account.publicKey):Array.isArray(this._account.publicKey)&&this._account.publicKey.every(t=>"string"==typeof t)?this._account.publicKey.map(t=>new r.EZS(t)):this._account.publicKey,minKeysRequired:null!=(t=this._account.minKeysRequired)?t:void 0,ansName:this._account.ansName}}catch(t){throw new C(t).message}}get network(){try{return this._network}catch(t){throw new T(t).message}}async connect(t){var e;let n=this._all_wallets.find(e=>e.name===t);if(n){if(this._connected&&(null==(e=this._wallet)?void 0:e.name)===t)throw new I("".concat(t," wallet is already connected")).message;if(O()&&"Installed"!==n.readyState){if(n.isAIP62Standard&&n.openInMobileApp){n.openInMobileApp();return}if(n.deeplinkProvider){let t=encodeURIComponent(window.location.href),e=n.deeplinkProvider({url:t});window.location.href=e}return}if("Installed"!==n.readyState&&"Loadable"!==n.readyState)return;await this.connectWallet(n)}}async connectWallet(t){try{var e;let n;this._connecting=!0,this.setWallet(t),n=t.isAIP62Standard?await this.walletStandardCore.connect(t):await this.walletCoreV1.connect(t),console.log("connectWallet account",n),this.setAccount(n);let a=await t.network();this.setNetwork(a),await this.setAnsName(),e=t.name,localStorage.setItem(H,e),this._connected=!0,this.recordEvent("wallet_connect"),this.emit("connect",n)}catch(t){throw this.clearData(),new I(Q(t)).message}finally{this._connecting=!1}}async disconnect(){try{this.ensureWalletExists(this._wallet),await this._wallet.disconnect(),this.clearData(),this.recordEvent("wallet_disconnect"),this.emit("disconnect")}catch(t){throw new j(Q(t)).message}}async signAndSubmitTransaction(t){try{if("function"in t.data){if("0x1::account::rotate_authentication_key_call"===t.data.function)throw new E("SCAM SITE DETECTED").message;"0x1::code::publish_package_txn"===t.data.function&&({metadataBytes:t.data.functionArguments[0],byteCode:t.data.functionArguments[1]}=B(t))}this.ensureWalletExists(this._wallet),this.ensureAccountExists(this._account),this.recordEvent("sign_and_submit_transaction");let e=t.data,n=U(this._network,this._dappConfig),a=new r.gZG(n);if(this._wallet.signAndSubmitTransaction){if(this._wallet.isAIP62Standard){let{hash:e,...n}=await this.walletStandardCore.signAndSubmitTransaction(t,a,this._account,this._wallet,this._standard_wallets);return{hash:e,output:n}}{let{hash:n,...a}=await this.walletCoreV1.resolveSignAndSubmitTransaction(e,this._network,this._wallet,t,this._dappConfig);return{hash:n,output:a}}}let s=await a.transaction.build.simple({sender:this._account.address,data:t.data,options:t.options}),i=await this.signTransaction(s);return await this.submitTransaction({transaction:s,senderAuthenticator:i})}catch(t){throw new E(Q(t)).message}}async signTransaction(t,e,n){var a,s,o,l,c,u,d;try{if(this.ensureWalletExists(this._wallet),this.recordEvent("sign_transaction"),this._wallet.signTransaction){if(this._wallet.isAIP62Standard){if("rawTransaction"in t)return await this.walletStandardCore.signTransaction(t,this._wallet,e);if(this._wallet.isSignTransactionV1_1){let e=b(t),{authenticator:i}=await this.walletStandardCore.signTransaction({payload:e,expirationTimestamp:null!=(a=null==n?void 0:n.expireTimestamp)?a:null==n?void 0:n.expirationTimestamp,expirationSecondsFromNow:null==n?void 0:n.expirationSecondsFromNow,gasUnitPrice:null!=(s=null==n?void 0:n.gasUnitPrice)?s:null==n?void 0:n.gas_unit_price,maxGasAmount:null!=(o=null==n?void 0:n.maxGasAmount)?o:null==n?void 0:n.max_gas_amount,sequenceNumber:null==n?void 0:n.sequenceNumber,sender:(null==n?void 0:n.sender)?{address:r.kxK.from(n.sender)}:void 0},this._wallet);return i}{let e=U(this._network,this._dappConfig);this.ensureAccountExists(this._account);let a=this._account.address,s=await W(e,t),i={accountSequenceNumber:null==n?void 0:n.sequenceNumber,expireTimestamp:null!=(l=null==n?void 0:n.expireTimestamp)?l:null==n?void 0:n.expirationTimestamp,gasUnitPrice:null!=(c=null==n?void 0:n.gasUnitPrice)?c:null==n?void 0:n.gas_unit_price,maxGasAmount:null!=(u=null==n?void 0:n.maxGasAmount)?u:null==n?void 0:n.max_gas_amount},o=await (0,r.VPS)({aptosConfig:e,payload:s,sender:a,options:i});return await this.walletStandardCore.signTransaction(new r._tO(o),this._wallet,!1)}}if("rawTransaction"in t)return await this._wallet.signTransaction(t,e);{let e=await this.walletCoreV1.signTransaction(t,this._wallet,{max_gas_amount:(null==n?void 0:n.maxGasAmount)?BigInt(null==n?void 0:n.maxGasAmount):void 0,gas_unit_price:(null==n?void 0:n.gasUnitPrice)?BigInt(null==n?void 0:n.gasUnitPrice):void 0});if(!e)throw Error("error");let a=new i.Ce.Deserializer(e),s=i.Kj.SignedTransaction.deserialize(a).authenticator,o=s.public_key.value,l=s.signature.value;return new r.rEE(new r.EZS(o),new r.AoU(l))}}throw new k("Sign Transaction is not supported by ".concat(null==(d=this.wallet)?void 0:d.name)).message}catch(t){throw new _(Q(t)).message}}async signMessage(t){try{if(this.ensureWalletExists(this._wallet),this.recordEvent("sign_message"),this._wallet.isAIP62Standard)return await this.walletStandardCore.signMessage(t,this._wallet);return await this._wallet.signMessage(t)}catch(t){throw new x(Q(t)).message}}async submitTransaction(t){try{this.ensureWalletExists(this._wallet);let{additionalSignersAuthenticators:e}=t;if(this.recordEvent("submit_transaction",{transaction_type:void 0!==e?"multi-agent":"simple"}),this._wallet.submitTransaction)return await this._wallet.submitTransaction(t);let n=U(this._network,this._dappConfig),a=new r.gZG(n);if(void 0===e)return a.transaction.submit.simple(t);{let n={...t,additionalSignersAuthenticators:e};return a.transaction.submit.multiAgent(n)}}catch(t){throw new _(Q(t)).message}}async onAccountChange(){try{this.ensureWalletExists(this._wallet),await this._wallet.onAccountChange(async t=>{this.setAccount(t),await this.setAnsName(),this.recordEvent("account_change"),this.emit("accountChange",this._account)})}catch(t){throw new S(Q(t)).message}}async onNetworkChange(){try{this.ensureWalletExists(this._wallet),await this._wallet.onNetworkChange(async t=>{this.setNetwork(t),await this.setAnsName(),this.emit("networkChange",this._network)})}catch(t){throw new v(Q(t)).message}}async changeNetwork(t){var e;try{this.ensureWalletExists(this._wallet),this.recordEvent("change_network_request",{from:null==(e=this._network)?void 0:e.name,to:t});let n=t===r.ZcK.DEVNET?await Y():r.mdu[t];if(this._wallet.changeNetwork){let e=await this._wallet.changeNetwork({name:t,chainId:n});if(e.status===l.qk.REJECTED)throw new I("User has rejected the request").message;return e.args}throw new z("".concat(this._wallet.name," does not support changing network request")).message}catch(t){throw new z(Q(t)).message}}async signMessageAndVerify(t){try{if(this.ensureWalletExists(this._wallet),this.ensureAccountExists(this._account),this.recordEvent("sign_message_and_verify"),this._wallet.isAIP62Standard)return this.walletStandardCore.signMessageAndVerify(t,this._wallet);return await this.walletCoreV1.signMessageAndVerify(t,this._wallet,this._account)}catch(t){throw new L(Q(t)).message}}constructor(t,e,n,a){super(),this._wallets=[],this._optInWallets=[],this._standard_wallets=[],this._all_wallets=[],this._wallet=null,this._account=null,this._network=null,this.walletCoreV1=new X,this.walletStandardCore=new q,this._connecting=!1,this._connected=!1,this.ga4=null,this._disableTelemetry=!1,this.standardizeStandardWalletToPluginWalletType=t=>{var e,n,a,s;let i={name:t.name,url:t.url,icon:t.icon,provider:t,connect:t.features["aptos:connect"].connect,disconnect:t.features["aptos:disconnect"].disconnect,network:t.features["aptos:network"].network,account:t.features["aptos:account"].account,signAndSubmitTransaction:null==(e=t.features["aptos:signAndSubmitTransaction"])?void 0:e.signAndSubmitTransaction,signMessage:t.features["aptos:signMessage"].signMessage,onAccountChange:t.features["aptos:onAccountChange"].onAccountChange,onNetworkChange:t.features["aptos:onNetworkChange"].onNetworkChange,signTransaction:t.features["aptos:signTransaction"].signTransaction,openInMobileApp:null==(n=t.features["aptos:openInMobileApp"])?void 0:n.openInMobileApp,changeNetwork:null==(a=t.features["aptos:changeNetwork"])?void 0:a.changeNetwork,readyState:"Installed",isAIP62Standard:!0,isSignTransactionV1_1:(null==(s=t.features["aptos:signTransaction"])?void 0:s.version)==="1.1"};this._all_wallets=this._all_wallets.filter(t=>t.name!==i.name),this._all_wallets.push(i),this.emit("standardWalletsAdded",i)},this._wallets=t,this._optInWallets=e,this._dappConfig=n,this._disableTelemetry=a,this._sdkWallets=function(t){let e=[];return e.push(new c.ux({network:null==t?void 0:t.network,dappId:null==t?void 0:t.aptosConnectDappId,...null==t?void 0:t.aptosConnect})),(null==t?void 0:t.mizuwallet)&&(null==t?void 0:t.network)&&[r.ZcK.MAINNET,r.ZcK.TESTNET].includes(t.network)&&e.push(new d.B({network:t.network,manifestURL:t.mizuwallet.manifestURL,appId:t.mizuwallet.appId})),(null==t?void 0:t.network)===r.ZcK.MAINNET?e.push(new u.kJ):e.push(new u.f1),e}(this._dappConfig),this._disableTelemetry||(this.ga4=new $),this.fetchExtensionAIP62AptosWallets(),this.fetchSDKAIP62AptosWallets(),this.scopePollingDetectionStrategy(),this.appendNotDetectedStandardSupportedWallets()}};window.WALLET_ADAPTER_CORE_VERSION=w},14563:function(t,e,n){"use strict";n.d(e,{Ay:function(){return u},FP:function(){return a.FP},LA:function(){return a.LA},Os:function(){return l},Tt:function(){return a.Tt},Z3:function(){return E},a6:function(){return N},cU:function(){return a.cU},od:function(){return a.od},pk:function(){return S},vV:function(){return a.vV}});var a=n(66802),s=n(73473),i=n(3894),r=n(49650),o=(0,s.createContext)({connected:!1});function l(){let t=(0,s.useContext)(o);if(!t)throw Error("useWallet must be used within a WalletContextState");return t}var c={connected:!1,account:null,network:null,wallet:null},u=t=>{let{children:e,plugins:n,optInWallets:r,autoConnect:l=!1,dappConfig:u,disableTelemetry:d=!1,onError:h}=t,[{connected:g,account:w,network:M,wallet:m},A]=(0,s.useState)(c),[y,p]=(0,s.useState)(!0),[N,f]=(0,s.useState)(),[I,j]=(0,s.useState)(null!=n?n:[]);(0,s.useEffect)(()=>{f(new a.V8(null!=n?n:[],null!=r?r:[],u,d))},[]),(0,s.useEffect)(()=>{var t;j(null!=(t=null==N?void 0:N.wallets)?t:[])},[N]);let C=async t=>{try{p(!0),await (null==N?void 0:N.connect(t))}catch(t){return h&&h(t),Promise.reject(t)}finally{p(!1)}},T=async()=>{try{await (null==N?void 0:N.disconnect())}catch(t){return h&&h(t),Promise.reject(t)}},S=async(t,e,n)=>{if(!N)throw Error("WalletCore is not initialized");try{return await (null==N?void 0:N.signTransaction(t,e,n))}catch(t){return h&&h(t),Promise.reject(t)}},v=async t=>{if(!N)throw Error("WalletCore is not initialized");try{return await (null==N?void 0:N.signMessage(t))}catch(t){return h&&h(t),Promise.reject(t)}},D=async t=>{if(!N)throw Error("WalletCore is not initialized");try{return await (null==N?void 0:N.signMessageAndVerify(t))}catch(t){return h&&h(t),Promise.reject(t)}},x=async t=>{if(!N)throw Error("WalletCore is not initialized");try{return await (null==N?void 0:N.submitTransaction(t))}catch(t){return h&&h(t),Promise.reject(t)}},L=async t=>{try{return await (null==N?void 0:N.signAndSubmitTransaction(t))}catch(t){return h&&h(t),Promise.reject(t)}},E=async t=>{if(!N)throw Error("WalletCore is not initialized");try{return await (null==N?void 0:N.changeNetwork(t))}catch(t){return h&&h(t),Promise.reject(t)}};(0,s.useEffect)(()=>{l&&(localStorage.getItem("AptosWalletName")&&!g?C(localStorage.getItem("AptosWalletName")):p(!1))},[l,I]),(0,s.useEffect)(()=>{g&&(null==N||N.onAccountChange(),null==N||N.onNetworkChange())},[g]);let _=()=>{A(t=>({...t,connected:!0,account:(null==N?void 0:N.account)||null,network:(null==N?void 0:N.network)||null,wallet:(null==N?void 0:N.wallet)||null}))},k=()=>{g&&A(t=>({...t,connected:!1,account:(null==N?void 0:N.account)||null,network:(null==N?void 0:N.network)||null,wallet:null}))},z=(0,s.useCallback)(()=>{g&&(null==N?void 0:N.wallet)&&A(t=>({...t,account:(null==N?void 0:N.account)||null}))},[g]),b=(0,s.useCallback)(()=>{g&&(null==N?void 0:N.wallet)&&A(t=>({...t,network:(null==N?void 0:N.network)||null}))},[g]),W=t=>{j(null==I?void 0:I.map(e=>e.name===t.name?{...e,readyState:t.readyState}:e))},O=t=>{let e=I.findIndex(e=>e.name==t.name);-1!==e?j(n=>[...n.slice(0,e),t,...n.slice(e+1)]):j(e=>[...e,t])};return(0,s.useEffect)(()=>(null==N||N.on("connect",_),null==N||N.on("disconnect",k),null==N||N.on("accountChange",z),null==N||N.on("networkChange",b),null==N||N.on("readyStateChange",W),null==N||N.on("standardWalletsAdded",O),()=>{null==N||N.off("connect",_),null==N||N.off("disconnect",k),null==N||N.off("accountChange",z),null==N||N.off("networkChange",b),null==N||N.off("readyStateChange",W),null==N||N.off("standardWalletsAdded",O)}),[I,w]),(0,i.jsx)(o.Provider,{value:{connect:C,account:w,network:M,connected:g,disconnect:T,wallet:m,wallets:I,signAndSubmitTransaction:L,signTransaction:S,signMessage:v,signMessageAndVerify:D,isLoading:y,submitTransaction:x,changeNetwork:E},children:e})},d=(0,s.forwardRef)((t,e)=>(0,i.jsx)("svg",{ref:e,width:"102",height:"132",viewBox:"0 0 102 132",fill:"none",...t,children:(0,i.jsxs)("g",{stroke:"currentColor",strokeMiterlimit:"10",children:[(0,i.jsx)("path",{d:"M59.633 80.66c11.742-2.814 17.48-7.018 20.925-13.254l17.518-31.69c6.257-11.317 2.142-25.55-9.189-31.798C82.737.53 75.723.188 69.593 2.398M60.7 69.565a14.09 14.09 0 0 1-6.907-1.767l-.228-.108"}),(0,i.jsx)("path",{d:"m52.365 41.075 12.507-22.627a14.146 14.146 0 0 1 4.727-5.062M32.407 118.619a14.139 14.139 0 0 1-7.034-1.768c-6.857-3.78-9.353-12.402-5.561-19.25l16.634-30.1a14.097 14.097 0 0 1 4.518-4.923"}),(0,i.jsx)("path",{d:"M41.211 78.85c11.332 6.248 25.583 2.14 31.84-9.177l17.518-31.691c6.256-11.317 2.142-25.55-9.19-31.798-6.085-3.357-13.018-3.724-19.104-1.59A23.31 23.31 0 0 0 49.541 15.36L36.863 38.298l7.989 5.036 12.506-22.627c3.786-6.848 12.419-9.34 19.276-5.554 6.856 3.78 9.353 12.402 5.561 19.25l-16.634 30.1c-3.785 6.848-12.418 9.341-19.275 5.555l-5.075 8.791ZM29.5 130.447c12.361-1.37 19.2-6.994 22.966-13.804l12.678-22.936-8.305-5.239"}),(0,i.jsx)("path",{d:"m55.72 61.947-.442.764 5.511-9.55c-6.901-3.806-18.65-3.124-27.105.814M44.85 43.523l7.635-2.486m-4.221 23.264 7.217-1.723m-9.316 7.517 7.59-2.405m-.562-12.156 7.508-2.221m10.136-51.32L62.761 4.43M49.642 90.778l7.514-2.26m.474 7.448 7.514-2.26m-50.306-60.13c7.135 0 12.918-5.776 12.918-12.9 0-7.126-5.783-12.902-12.918-12.902-7.134 0-12.917 5.776-12.917 12.901s5.783 12.901 12.918 12.901Z"}),(0,i.jsx)("path",{d:"M15.724 7.774h3.197c7.135 0 12.918 5.776 12.918 12.901 0 7.126-5.783 12.901-12.918 12.901h-3.425m65.112 66.935h3.198c7.135 0 12.918 5.775 12.918 12.901 0 7.125-5.783 12.9-12.918 12.9h-3.425"}),(0,i.jsx)("path",{d:"M79.717 126.312c7.135 0 12.918-5.775 12.918-12.9s-5.783-12.901-12.918-12.901c-7.134 0-12.917 5.776-12.917 12.901s5.783 12.9 12.917 12.9ZM53.281 55.414c-11.33-6.248-25.582-2.14-31.839 9.177L3.924 96.281c-6.257 11.318-2.142 25.55 9.189 31.799 11.331 6.248 25.582 2.139 31.839-9.177l12.677-22.937-7.988-5.036-12.507 22.627c-3.785 6.848-12.418 9.341-19.275 5.554-6.857-3.781-9.353-12.402-5.561-19.25l16.633-30.1c3.786-6.848 12.419-9.341 19.276-5.555l5.074-8.792Z"})]})}));d.displayName="LinkGraphic";var h=(0,s.forwardRef)((t,e)=>(0,i.jsxs)("svg",{ref:e,width:"128",height:"102",viewBox:"0 0 128 102",fill:"none",...t,children:[(0,i.jsx)("path",{fill:"currentColor",d:"m.96 25.93-.36-.35.36.85v-.5Zm7.79-7.81v-.5h-.21l-.15.15.36.35ZM1.3 26.28l7.79-7.8-.7-.71-7.8 7.8.7.71Zm7.44-7.66H10v-1H8.75v1Zm29.22 6.8h-37v1h37.01v-1Z"}),(0,i.jsx)("path",{stroke:"currentColor",strokeMiterlimit:"10",d:"M82.25 26.08c0 12.25-9.92 22.2-22.14 22.2a22.17 22.17 0 0 1-22.14-22.2H1.1v74.82h118.02V26.08H82.25Zm44.33 67.02h.33V18.27h-5.7"}),(0,i.jsx)("path",{stroke:"currentColor",strokeMiterlimit:"10",d:"M74.52 42.92a22.4 22.4 0 0 1-11.43 3.3 22.5 22.5 0 0 1-22.46-22.53H9.52M119.22 101l7.78-7.82m-7.88-67.1 7.79-7.81m-44.78 7.72 2.73-2.3m-46.89 2.39 2.39-2.4"}),(0,i.jsx)("path",{stroke:"currentColor",strokeMiterlimit:"10",d:"M9.86 23.69V5.72h107.97v18.04H84.65"}),(0,i.jsx)("path",{stroke:"currentColor",strokeMiterlimit:"10",d:"M117.83 20.46h3.39V1H13.25v4.72M9.36 23.69h31.78"})]}));h.displayName="WalletGraphic";var g=(0,s.forwardRef)((t,e)=>(0,i.jsx)("svg",{ref:e,width:"142",height:"108",viewBox:"0 0 142 108",fill:"none",...t,children:(0,i.jsxs)("g",{stroke:"currentColor",strokeLinejoin:"round",children:[(0,i.jsx)("path",{d:"m91.26 35.8.06-10.46L71.3 1v10.53L87 30.5m-36.11 5.24-.06-10.45L71.3 1v10.53L55 30.5"}),(0,i.jsx)("path",{d:"M71 59.55V49.17L50.83 25.3l.06 10.45L57 42.5m14 17.05V49.18l20.33-23.84-.07 10.45L86 42M1 59.68l.22-9.07 35.33-19.8-.1 9L9 55"}),(0,i.jsx)("path",{d:"M36.55 30.8s-.08 5.92-.1 9l.1-9ZM71 59.51v-9.07L36.55 30.8l-.1 9L63.5 55"}),(0,i.jsx)("path",{d:"M71 59.51v-9.07L36.44 70.78l-.1 9.14L55.5 68.5"}),(0,i.jsx)("path",{d:"M1.22 50.6a77387.2 77387.2 0 0 0 35.22 20.18l-.1 9.14L1 59.68l.23-9.07h-.01ZM141 59.68l-.23-9.07-35.33-19.8.11 9L133 55"}),(0,i.jsx)("path",{d:"m105.44 30.8.11 9-.1-9Z"}),(0,i.jsx)("path",{d:"M71 59.51v-9.07l34.44-19.64.11 9L78.5 55"}),(0,i.jsx)("path",{d:"M71 59.51v-9.07l34.56 20.34.1 9.14L87 69"}),(0,i.jsx)("path",{d:"M140.78 50.6a78487.3 78487.3 0 0 1-35.23 20.18l.11 9.14L141 59.68l-.23-9.07ZM50.83 80.15l.06-6.33 20.1-23.38H71v9.26L55 79"}),(0,i.jsx)("path",{d:"M71.3 97.6 50.89 73.81l-.06 9.33L71.3 107v-9.4Zm20.03-14.5-.07-9.33L71 50.44v9.26l16 18.8"}),(0,i.jsx)("path",{d:"m71.3 97.6 19.96-23.83.06 9.33L71.3 107v-9.4Z"})]})}));function w(t,e,n){let a=(0,s.forwardRef)((a,o)=>{let{className:l,asChild:c,children:u}=a,d=c?r.g7:e,{children:h,...g}="function"==typeof n?n(t):null!=n?n:{},w=c&&(0,s.isValidElement)(u)&&!u.props.children?(0,s.cloneElement)(u,{},h):null!=u?u:h;return(0,i.jsx)(d,{ref:o,className:l,...g,children:w})});return a.displayName=t,a}g.displayName="Web3Graphic";var M=(0,s.createContext)(null);function m(t){let e=(0,s.useContext)(M);if(!e)throw Error("`".concat(t,"` must be used within `AboutAptosConnect`"));return e}var A=[{Graphic:d,Title:w("EducationScreen.Title","h3",{children:"A better way to login."}),Description:w("EducationScreen.Description","p",{children:"Aptos Connect is a web3 wallet that uses a Social Login to create accounts on the Aptos blockchain."})},{Graphic:h,Title:w("EducationScreen.Title","h2",{children:"What is a wallet?"}),Description:w("EducationScreen.Description","p",{children:"Wallets are a secure way to send, receive, and interact with digital assets like cryptocurrencies & NFTs."})},{Graphic:g,Title:w("EducationScreen.Title","h2",{children:"Explore more of web3."}),Description:w("EducationScreen.Description","p",{children:(0,i.jsxs)(i.Fragment,{children:["Aptos Connect lets you take one account across any application built on Aptos."," ",(0,i.jsx)("a",{href:"https://aptosfoundation.org/ecosystem/projects/all",target:"_blank",rel:"noopener noreferrer",children:"Explore the ecosystem"}),"."]})})}],y=Array(A.length).fill(null).map((t,e)=>w("AboutAptosConnect.ScreenIndicator","button",t=>{let n=m(t),a=n.screenIndex-1===e;return{"aria-label":"Go to screen ".concat(e+1),"aria-current":a?"step":void 0,"data-active":a||void 0,onClick:()=>{n.setScreenIndex(e+1)}}})),p=t=>{let{renderEducationScreen:e,children:n}=t,[a,r]=(0,s.useState)(0),o=(0,s.useMemo)(()=>A.map((t,e)=>({...t,screenIndex:e,totalScreens:A.length,screenIndicators:y,back:()=>{r(a-1)},next:()=>{r(a===A.length?0:a+1)},cancel:()=>{r(0)}}))[a-1],[a]);return(0,i.jsx)(M.Provider,{value:{screenIndex:a,setScreenIndex:r},children:0===a?n:e(o)})};p.displayName="AboutAptosConnect";var N=Object.assign(p,{Trigger:w("AboutAptosConnect.Trigger","button",t=>{let e=m(t);return{onClick:()=>{e.setScreenIndex(1)}}})}),f=(0,s.forwardRef)((t,e)=>(0,i.jsx)("svg",{ref:e,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",...t,children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12ZM7.17547 3.67976C7.13401 3.72309 7.07649 3.74757 7.01648 3.74757H3.00775C3.69185 2.83824 4.77995 2.25 6.00569 2.25C7.23142 2.25 8.31953 2.83824 9.00362 3.74757H8.28524C8.20824 3.74757 8.13498 3.71468 8.08401 3.65701L7.81608 3.35416C7.77618 3.30896 7.71882 3.28308 7.6585 3.28308H7.6454C7.58805 3.28308 7.53318 3.30646 7.49343 3.34792L7.17547 3.67976ZM8.05656 4.75897H7.39569C7.31869 4.75897 7.24543 4.72593 7.19447 4.66842L6.92638 4.36557C6.88647 4.32036 6.82896 4.29465 6.7688 4.29465C6.70863 4.29465 6.65112 4.32052 6.61121 4.36557L6.38131 4.6254C6.30603 4.71034 6.19801 4.75913 6.08454 4.75913H2.46703C2.36401 5.05278 2.29683 5.36296 2.27002 5.68467H5.68505C5.74506 5.68467 5.80258 5.66019 5.84404 5.61686L6.16201 5.28502C6.20175 5.24356 6.25662 5.22018 6.31398 5.22018H6.32707C6.38739 5.22018 6.44475 5.24606 6.48465 5.29126L6.75258 5.59411C6.80355 5.65178 6.87681 5.68467 6.95381 5.68467H9.74133C9.71452 5.3628 9.64734 5.05263 9.54431 4.75913H8.05641L8.05656 4.75897ZM4.33651 7.63095C4.39652 7.63095 4.45404 7.60648 4.4955 7.56315L4.81347 7.23131C4.85321 7.18985 4.90808 7.16647 4.96544 7.16647H4.97853C5.03885 7.16647 5.09621 7.19234 5.13611 7.23739L5.40404 7.54024C5.45501 7.59791 5.52827 7.6308 5.60527 7.6308H9.38285C9.52438 7.33839 9.62803 7.02463 9.68975 6.69591H6.06383C5.98683 6.69591 5.91357 6.66287 5.8626 6.60535L5.59467 6.3025C5.55477 6.2573 5.49725 6.23158 5.43709 6.23158C5.37692 6.23158 5.31941 6.25746 5.27951 6.3025L5.0496 6.56233C4.97432 6.64728 4.86631 6.69606 4.75268 6.69606H2.32147C2.3832 7.02479 2.487 7.33855 2.62837 7.63095H4.33651ZM5.57359 8.55745H4.59116C4.51417 8.55745 4.44091 8.52441 4.38994 8.46689L4.12201 8.16404C4.0821 8.11884 4.02459 8.09312 3.96442 8.09312C3.90426 8.09312 3.84675 8.119 3.80684 8.16404L3.57694 8.42387C3.50166 8.50882 3.39364 8.55761 3.28001 8.55761H3.26474C3.94915 9.29096 4.92378 9.74998 6.00596 9.74998C7.08815 9.74998 8.06262 9.29096 8.74719 8.55761H5.57359V8.55745Z",fill:"currentColor"})}));f.displayName="SmallAptosLogo";var I=w("AptosPrivacyPolicy.Root","div"),j=w("AptosPrivacyPolicy.Disclaimer","span",{children:"By continuing, you agree to Aptos Labs'"}),C=w("AptosPrivacyPolicy.Disclaimer","a",{href:"https://aptoslabs.com/privacy",target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"}),T=(0,s.forwardRef)((t,e)=>{let{className:n}=t;return(0,i.jsxs)("div",{ref:e,className:n,children:[(0,i.jsx)("span",{children:"Powered by"}),(0,i.jsx)(f,{}),(0,i.jsx)("span",{children:"Aptos Labs"})]})});T.displayName="AptosPrivacyPolicy.PoweredBy";var S=Object.assign(I,{Disclaimer:j,Link:C,PoweredBy:T});function v(t){let e=(0,s.useContext)(D);if(!e)throw Error("`".concat(t,"` must be used within `WalletItem`"));return e}var D=(0,s.createContext)(null),x=(0,s.forwardRef)((t,e)=>{let{wallet:n,onConnect:o,className:c,asChild:u,children:d}=t,{connect:h}=l(),g=(0,s.useCallback)(()=>{h(n.name),null==o||o()},[h,n.name,o]),w=n.readyState===a.i1.Installed||n.readyState===a.i1.Loadable,M="deeplinkProvider"in n&&n.deeplinkProvider;if(!w&&(0,a.cX)()&&!M)return null;let m=u?r.g7:"div";return(0,i.jsx)(D.Provider,{value:{wallet:n,connectWallet:g},children:(0,i.jsx)(m,{ref:e,className:c,children:d})})});x.displayName="WalletItem";var L=w("WalletItem.Icon","img",t=>{let e=v(t);return{src:e.wallet.icon,alt:"".concat(e.wallet.name," icon")}}),E=Object.assign(x,{Icon:L,Name:w("WalletItem.Name","div",t=>({children:v(t).wallet.name})),ConnectButton:w("WalletItem.ConnectButton","button",t=>({onClick:v(t).connectWallet,children:"Connect"})),InstallLink:w("WalletItem.InstallLink","a",t=>({href:v(t).wallet.url,target:"_blank",rel:"noopener noreferrer",children:"Install"}))})}}]); \ No newline at end of file diff --git a/nextjs-example-testing/_next/static/chunks/860-c742d28e36f78b73.js b/nextjs-example-testing/_next/static/chunks/860-c742d28e36f78b73.js new file mode 100644 index 00000000..e433555a --- /dev/null +++ b/nextjs-example-testing/_next/static/chunks/860-c742d28e36f78b73.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[860],{23938:function(){},70992:function(t,e,n){"use strict";n.d(e,{AutoConnectProvider:function(){return l},v:function(){return o}});var a=n(3894),s=n(73473);let i="AptosWalletAutoConnect",r=(0,s.createContext)({});function o(){return(0,s.useContext)(r)}let l=t=>{let{children:e}=t,[n,o]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{try{let t=localStorage.getItem(i);if(t)return o(JSON.parse(t))}catch(t){console.error(t)}},[]),(0,s.useEffect)(()=>{try{n?localStorage.setItem(i,JSON.stringify(n)):localStorage.removeItem(i)}catch(t){console.error(t)}},[n]),(0,a.jsx)(r.Provider,{value:{autoConnect:n,setAutoConnect:o},children:e})}},6523:function(t,e,n){"use strict";n.d(e,{pm:function(){return h}});var a=n(73473);let s=0,i=new Map,r=t=>{if(i.has(t))return;let e=setTimeout(()=>{i.delete(t),u({type:"REMOVE_TOAST",toastId:t})},1e6);i.set(t,e)},o=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,1)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t)};case"DISMISS_TOAST":{let{toastId:n}=e;return n?r(n):t.toasts.forEach(t=>{r(t.id)}),{...t,toasts:t.toasts.map(t=>t.id===n||void 0===n?{...t,open:!1}:t)}}case"REMOVE_TOAST":if(void 0===e.toastId)return{...t,toasts:[]};return{...t,toasts:t.toasts.filter(t=>t.id!==e.toastId)}}},l=[],c={toasts:[]};function u(t){c=o(c,t),l.forEach(t=>{t(c)})}function d(t){let{...e}=t,n=(s=(s+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>u({type:"DISMISS_TOAST",toastId:n});return u({type:"ADD_TOAST",toast:{...e,id:n,open:!0,onOpenChange:t=>{t||a()}}}),{id:n,dismiss:a,update:t=>u({type:"UPDATE_TOAST",toast:{...t,id:n}})}}function h(){let[t,e]=a.useState(c);return a.useEffect(()=>(l.push(e),()=>{let t=l.indexOf(e);t>-1&&l.splice(t,1)}),[t]),{...t,toast:d,dismiss:t=>u({type:"DISMISS_TOAST",toastId:t})}}},2129:function(t,e,n){"use strict";n.d(e,{cn:function(){return i}});var a=n(81185),s=n(11812);function i(){for(var t=arguments.length,e=Array(t),n=0;n0!==t.length&&t.every(t=>t instanceof r.iVQ),U=(t,e)=>{if(!t)throw Error("Undefined network");return new r.ScN(Z(t)?{network:function(t){switch(null==t?void 0:t.name){case"mainnet":return r.ZcK.MAINNET;case"testnet":return r.ZcK.TESTNET;case"devnet":return r.ZcK.DEVNET;case"local":return r.ZcK.LOCAL;default:throw Error("Invalid Aptos network name")}}(t),clientConfig:{API_KEY:null==e?void 0:e.aptosApiKey}}:{network:r.ZcK.CUSTOM,fullnode:t.url,clientConfig:{API_KEY:null==e?void 0:e.aptosApiKey}})},Z=t=>{if(!t)throw Error("Undefined network");return void 0!==r.sAp[t.name]},Y=async()=>{let t=new r.gZG;return await t.getChainId()},B=t=>{let e=t.data.functionArguments[0];"string"==typeof e&&(e=r.pUe.fromHexInput(e).toUint8Array());let n=t.data.functionArguments[1];if(Array.isArray(n))n=n.map(t=>"string"==typeof t?r.pUe.fromHexInput(t).toUint8Array():t);else throw new E("The bytecode argument must be an array.").message;return{metadataBytes:e,byteCode:n}},H="AptosWalletName";function R(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K,n=[],a=[];for(let s of t)e(s)?n.push(s):a.push(s);return{defaultWallets:n,moreWallets:a}}function K(t){return"Installed"===t.readyState||"Loadable"===t.readyState}function J(t){let e=K(t);return!(!e&&O())&&!e}function G(t){if(t)return"".concat(t.toString().slice(0,6),"...").concat(t.toString().slice(-5))}function V(t){return!!t.url&&t.url.startsWith("https://aptosconnect.app")}function F(t,e){let{aptosConnectWallets:n,otherWallets:a}=function(t){let{defaultWallets:e,moreWallets:n}=R(t,V);return{aptosConnectWallets:e,otherWallets:n}}(t),{defaultWallets:s,moreWallets:i}=R(a);return(null==e?void 0:e.sortAptosConnectWallets)&&n.sort(e.sortAptosConnectWallets),(null==e?void 0:e.sortAvailableWallets)&&s.sort(e.sortAvailableWallets),(null==e?void 0:e.sortInstallableWallets)&&i.sort(e.sortInstallableWallets),{aptosConnectWallets:n,availableWallets:s,installableWallets:i}}var X=class extends o{async connect(t){return await t.connect()}async resolveSignAndSubmitTransaction(t,e,n,a,s){var o,l,c,u,d,h,g,w;if(P(t.functionArguments)){let d=U(e,s),h=function(t){let e=new i.Ce.Deserializer(t.bcsToBytes());return i.Kj.TransactionPayload.deserialize(e)}(await (0,r.yDq)({...t,aptosConfig:d}));return await this.signAndSubmitBCSTransaction(h,n,{max_gas_amount:(null==(o=a.options)?void 0:o.maxGasAmount)?BigInt(null==(l=a.options)?void 0:l.maxGasAmount):void 0,gas_unit_price:(null==(c=a.options)?void 0:c.gasUnitPrice)?BigInt(null==(u=a.options)?void 0:u.gasUnitPrice):void 0})}let M=function(t){var e,n;if("bytecode"in t)throw Error("script payload not supported");if("multisigAddress"in t){let n=null==(e=t.typeArguments)?void 0:e.map(t=>t instanceof r.O$S?t.toString():t);return{type:"multisig_payload",multisig_address:t.multisigAddress.toString(),function:t.function,type_arguments:n||[],arguments:t.functionArguments}}{let e=null==(n=t.typeArguments)?void 0:n.map(t=>t instanceof r.O$S?t.toString():t);return{type:"entry_function_payload",function:t.function,type_arguments:e||[],arguments:t.functionArguments}}}(t);return await this.signAndSubmitTransaction(M,n,{max_gas_amount:(null==(d=a.options)?void 0:d.maxGasAmount)?BigInt(null==(h=a.options)?void 0:h.maxGasAmount):void 0,gas_unit_price:(null==(g=a.options)?void 0:g.gasUnitPrice)?BigInt(null==(w=a.options)?void 0:w.gasUnitPrice):void 0})}async signAndSubmitTransaction(t,e,n){try{return await e.signAndSubmitTransaction(t,n)}catch(t){throw new E("object"==typeof t&&"message"in t?t.message:t).message}}async signAndSubmitBCSTransaction(t,e,n){if(!("signAndSubmitBCSTransaction"in e))throw new k("Submit a BCS Transaction is not supported by ".concat(e.name)).message;try{return await e.signAndSubmitBCSTransaction(t,n)}catch(t){throw new E("object"==typeof t&&"message"in t?t.message:t).message}}async signTransaction(t,e,n){try{return await e.signTransaction(t,n)}catch(t){throw new _("object"==typeof t&&"message"in t?t.message:t).message}}async signMessageAndVerify(t,e,n){try{let a=await e.signMessage(t);if(!a)throw new L("Failed to sign a message").message;console.log("signMessageAndVerify signMessage response",a);let s=!1;if(Array.isArray(a.signature)){let{fullMessage:t,signature:e,bitmap:i}=a;if(i){let a=n.minKeysRequired;if(e.lengthArray.from({length:8}).map((e,n)=>t>>n&1)),r=a.map((t,e)=>e).filter(t=>a[t]),o=n.publicKey.filter((t,e)=>r.includes(e));s=!0;for(let n=0;na.name===t.name);if((null==(i=null==c?void 0:c.features["aptos:signAndSubmitTransaction"])?void 0:i.version)!=="1.1.0"){let s=await e.transaction.build.simple({sender:n.address.toString(),data:t.data,options:t.options}),i=await a.signAndSubmitTransaction(s);if(i.status===l.qk.REJECTED)throw new I("User has rejected the request").message;return i.args}let u={gasUnitPrice:null==(r=t.options)?void 0:r.gasUnitPrice,maxGasAmount:null==(o=t.options)?void 0:o.maxGasAmount,payload:t.data},d=await a.signAndSubmitTransaction(u);if(d.status===l.qk.REJECTED)throw new I("User has rejected the request").message;return d.args}catch(t){throw new E(Q(t)).message}}async signTransaction(t,e,n){let a=await e.signTransaction(t,n);if(a.status===l.qk.REJECTED)throw new I("User has rejected the request").message;return a.args}async signMessage(t,e){try{let n=await e.signMessage(t);if(n.status===l.qk.REJECTED)throw new I("User has rejected the request").message;return n.args}catch(t){throw new x(Q(t)).message}}async signMessageAndVerify(t,e){try{let n=await e.signMessage(t),a=await e.account();if(n.status===l.qk.REJECTED)throw new I("Failed to sign a message").message;if(a.publicKey instanceof r.qxW&&a.publicKey.variant===r.OHP.Keyless)return!0;let s=!1;if(n.args.signature instanceof r.e6E){if(!(a.publicKey instanceof r.ZSy))throw new L("Public key and Signature type mismatch").message;let{fullMessage:t,signature:e}=n.args;if(e.bitmap){let n=a.publicKey.threshold;s=!(e.signatures.length{let e=this._standard_wallets.find(t=>"Pontem Wallet"==t.name);"Pontem"===t.name&&e||-1!==this._standard_wallets.findIndex(e=>e.name==t.name)||(this._all_wallets.push(t),t.readyState||(t.readyState="undefined"==typeof document?"Unsupported":"NotDetected"),function(t){if("undefined"==typeof document)return;let e=[];function n(){if(t())for(let t of e)t()}let a=setInterval(n,1e3);e.push(()=>clearInterval(a)),"loading"===document.readyState&&(document.addEventListener("DOMContentLoaded",n,{once:!0}),e.push(()=>document.removeEventListener("DOMContentLoaded",n))),"complete"!==document.readyState&&(window.addEventListener("load",n,{once:!0}),e.push(()=>window.removeEventListener("load",n))),n()}(()=>{let e=t.providerName||t.name.toLowerCase();return!!Object.keys(window).includes(e)&&(t.readyState="Installed",t.provider=window[e],this.emit("readyStateChange",t),!0)}))})}fetchExtensionAIP62AptosWallets(){let{aptosWallets:t,on:e}=(0,l.Wk)();this.setExtensionAIP62Wallets(t);let n=this;e("register",function(){let{aptosWallets:t}=(0,l.Wk)();n.setExtensionAIP62Wallets(t)}),e("unregister",function(){let{aptosWallets:t}=(0,l.Wk)();n.setExtensionAIP62Wallets(t)})}appendNotDetectedStandardSupportedWallets(){tt.map(t=>{if(-1!==this.wallets.findIndex(e=>e.name===t.name))return;let e=this.wallets.find(t=>"Pontem"==t.name);if("Pontem Wallet"===t.name&&e)return;let n=this._standard_wallets.find(e=>e.name==t.name);!(n&&this.excludeWallet(n))&&(n||(this._all_wallets.push(t),this.emit("standardWalletsAdded",t)))})}fetchSDKAIP62AptosWallets(){this._sdkWallets.map(t=>{this.standardizeAIP62WalletType(t)})}setExtensionAIP62Wallets(t){t.filter(t=>"Dev T wallet"!==t.name&&"T wallet"!==t.name).map(t=>{this.standardizeAIP62WalletType(t),this._standard_wallets.push(t)})}excludeWallet(t){return this._optInWallets.length>0&&!this._optInWallets.includes(t.name)}standardizeAIP62WalletType(t){!this.excludeWallet(t)&&(0,l.cE)(t)&&(t.readyState="Installed",this.standardizeStandardWalletToPluginWalletType(t),this._standard_wallets.push(t))}recordEvent(t,e){var n,a,s,i;null==(i=this.ga4)||i.gtag("event","wallet_adapter_".concat(t),{wallet:null==(n=this._wallet)?void 0:n.name,network:null==(a=this._network)?void 0:a.name,network_url:null==(s=this._network)?void 0:s.url,adapter_core_version:w,send_to:"G-GNVVWBL3J9",...e})}ensureWalletExists(t){if(!t)throw new D().name;if(!("Loadable"===t.readyState||"Installed"===t.readyState))throw new f("Wallet is not set").name}ensureAccountExists(t){if(!t)throw new C("Account is not set").name}doesWalletExist(){if(!this._connected||this._connecting||!this._wallet)throw new D().name;if(!("Loadable"===this._wallet.readyState||"Installed"===this._wallet.readyState))throw new f().name;return!0}clearData(){this._connected=!1,this.setWallet(null),this.setAccount(null),this.setNetwork(null),localStorage.removeItem(H)}async setAnsName(){var t;if((null==(t=this._network)?void 0:t.chainId)&&this._account){if(!A[this._network.chainId]||!Z(this._network)){this._account.ansName=void 0;return}let t=U(this._network,this._dappConfig),e=new r.gZG(t),n=await e.ans.getPrimaryName({address:this._account.address.toString()});this._account.ansName=n}}setWallet(t){this._wallet=t}setAccount(t){this._account=t}setNetwork(t){var e,n,a;if(null===t){this._network=null;return}if(null==(e=this._wallet)?void 0:e.isAIP62Standard){this.recordEvent("network_change",{from:null==(n=this._network)?void 0:n.name,to:t.name}),this._network={name:t.name.toLowerCase(),chainId:t.chainId.toString(),url:t.url};return}this.recordEvent("network_change",{from:null==(a=this._network)?void 0:a.name,to:t.name}),this._network={...t,name:t.name.toLowerCase()}}isConnected(){return this._connected}get wallets(){return this._all_wallets}get pluginWallets(){return this._wallets}get standardWallets(){return this._standard_wallets}get wallet(){try{if(!this._wallet)return null;return{name:this._wallet.name,icon:this._wallet.icon,url:this._wallet.url}}catch(t){throw new N(t).message}}get account(){var t;try{if(!this._account)return null;return{address:"string"==typeof this._account.address?r.kxK.from(this._account.address):this._account.address,publicKey:"string"==typeof this._account.publicKey?new r.EZS(this._account.publicKey):Array.isArray(this._account.publicKey)&&this._account.publicKey.every(t=>"string"==typeof t)?this._account.publicKey.map(t=>new r.EZS(t)):this._account.publicKey,minKeysRequired:null!=(t=this._account.minKeysRequired)?t:void 0,ansName:this._account.ansName}}catch(t){throw new C(t).message}}get network(){try{return this._network}catch(t){throw new T(t).message}}async connect(t){var e;let n=this._all_wallets.find(e=>e.name===t);if(n){if(this._connected&&(null==(e=this._wallet)?void 0:e.name)===t)throw new I("".concat(t," wallet is already connected")).message;if(O()&&"Installed"!==n.readyState){if(n.isAIP62Standard&&n.openInMobileApp){n.openInMobileApp();return}if(n.deeplinkProvider){let t=encodeURIComponent(window.location.href),e=n.deeplinkProvider({url:t});window.location.href=e}return}if("Installed"!==n.readyState&&"Loadable"!==n.readyState)return;await this.connectWallet(n)}}async connectWallet(t){try{var e;let n;this._connecting=!0,this.setWallet(t),n=t.isAIP62Standard?await this.walletStandardCore.connect(t):await this.walletCoreV1.connect(t),console.log("connectWallet account",n),this.setAccount(n);let a=await t.network();this.setNetwork(a),await this.setAnsName(),e=t.name,localStorage.setItem(H,e),this._connected=!0,this.recordEvent("wallet_connect"),this.emit("connect",n)}catch(t){throw this.clearData(),new I(Q(t)).message}finally{this._connecting=!1}}async disconnect(){try{this.ensureWalletExists(this._wallet),await this._wallet.disconnect(),this.clearData(),this.recordEvent("wallet_disconnect"),this.emit("disconnect")}catch(t){throw new j(Q(t)).message}}async signAndSubmitTransaction(t){try{if("function"in t.data){if("0x1::account::rotate_authentication_key_call"===t.data.function)throw new E("SCAM SITE DETECTED").message;"0x1::code::publish_package_txn"===t.data.function&&({metadataBytes:t.data.functionArguments[0],byteCode:t.data.functionArguments[1]}=B(t))}this.ensureWalletExists(this._wallet),this.ensureAccountExists(this._account),this.recordEvent("sign_and_submit_transaction");let e=t.data,n=U(this._network,this._dappConfig),a=new r.gZG(n);if(this._wallet.signAndSubmitTransaction){if(this._wallet.isAIP62Standard){let{hash:e,...n}=await this.walletStandardCore.signAndSubmitTransaction(t,a,this._account,this._wallet,this._standard_wallets);return{hash:e,output:n}}{let{hash:n,...a}=await this.walletCoreV1.resolveSignAndSubmitTransaction(e,this._network,this._wallet,t,this._dappConfig);return{hash:n,output:a}}}let s=await a.transaction.build.simple({sender:this._account.address,data:t.data,options:t.options}),i=await this.signTransaction(s);return await this.submitTransaction({transaction:s,senderAuthenticator:i})}catch(t){throw new E(Q(t)).message}}async signTransaction(t,e,n){var a,s,o,l,c,u,d;try{if(this.ensureWalletExists(this._wallet),this.recordEvent("sign_transaction"),this._wallet.signTransaction){if(this._wallet.isAIP62Standard){if("rawTransaction"in t)return await this.walletStandardCore.signTransaction(t,this._wallet,e);if(this._wallet.isSignTransactionV1_1){let e=b(t),{authenticator:i}=await this.walletStandardCore.signTransaction({payload:e,expirationTimestamp:null!=(a=null==n?void 0:n.expireTimestamp)?a:null==n?void 0:n.expirationTimestamp,expirationSecondsFromNow:null==n?void 0:n.expirationSecondsFromNow,gasUnitPrice:null!=(s=null==n?void 0:n.gasUnitPrice)?s:null==n?void 0:n.gas_unit_price,maxGasAmount:null!=(o=null==n?void 0:n.maxGasAmount)?o:null==n?void 0:n.max_gas_amount,sequenceNumber:null==n?void 0:n.sequenceNumber,sender:(null==n?void 0:n.sender)?{address:r.kxK.from(n.sender)}:void 0},this._wallet);return i}{let e=U(this._network,this._dappConfig);this.ensureAccountExists(this._account);let a=this._account.address,s=await W(e,t),i={accountSequenceNumber:null==n?void 0:n.sequenceNumber,expireTimestamp:null!=(l=null==n?void 0:n.expireTimestamp)?l:null==n?void 0:n.expirationTimestamp,gasUnitPrice:null!=(c=null==n?void 0:n.gasUnitPrice)?c:null==n?void 0:n.gas_unit_price,maxGasAmount:null!=(u=null==n?void 0:n.maxGasAmount)?u:null==n?void 0:n.max_gas_amount},o=await (0,r.VPS)({aptosConfig:e,payload:s,sender:a,options:i});return await this.walletStandardCore.signTransaction(new r._tO(o),this._wallet,!1)}}if("rawTransaction"in t)return await this._wallet.signTransaction(t,e);{let e=await this.walletCoreV1.signTransaction(t,this._wallet,{max_gas_amount:(null==n?void 0:n.maxGasAmount)?BigInt(null==n?void 0:n.maxGasAmount):void 0,gas_unit_price:(null==n?void 0:n.gasUnitPrice)?BigInt(null==n?void 0:n.gasUnitPrice):void 0});if(!e)throw Error("error");let a=new i.Ce.Deserializer(e),s=i.Kj.SignedTransaction.deserialize(a).authenticator,o=s.public_key.value,l=s.signature.value;return new r.rEE(new r.EZS(o),new r.AoU(l))}}throw new k("Sign Transaction is not supported by ".concat(null==(d=this.wallet)?void 0:d.name)).message}catch(t){throw new _(Q(t)).message}}async signMessage(t){try{if(this.ensureWalletExists(this._wallet),this.recordEvent("sign_message"),this._wallet.isAIP62Standard)return await this.walletStandardCore.signMessage(t,this._wallet);return await this._wallet.signMessage(t)}catch(t){throw new x(Q(t)).message}}async submitTransaction(t){try{this.ensureWalletExists(this._wallet);let{additionalSignersAuthenticators:e}=t;if(this.recordEvent("submit_transaction",{transaction_type:void 0!==e?"multi-agent":"simple"}),this._wallet.submitTransaction)return await this._wallet.submitTransaction(t);let n=U(this._network,this._dappConfig),a=new r.gZG(n);if(void 0===e)return a.transaction.submit.simple(t);{let n={...t,additionalSignersAuthenticators:e};return a.transaction.submit.multiAgent(n)}}catch(t){throw new _(Q(t)).message}}async onAccountChange(){try{this.ensureWalletExists(this._wallet),await this._wallet.onAccountChange(async t=>{this.setAccount(t),await this.setAnsName(),this.recordEvent("account_change"),this.emit("accountChange",this._account)})}catch(t){throw new S(Q(t)).message}}async onNetworkChange(){try{this.ensureWalletExists(this._wallet),await this._wallet.onNetworkChange(async t=>{this.setNetwork(t),await this.setAnsName(),this.emit("networkChange",this._network)})}catch(t){throw new v(Q(t)).message}}async changeNetwork(t){var e;try{this.ensureWalletExists(this._wallet),this.recordEvent("change_network_request",{from:null==(e=this._network)?void 0:e.name,to:t});let n=t===r.ZcK.DEVNET?await Y():r.mdu[t];if(this._wallet.changeNetwork){let e=await this._wallet.changeNetwork({name:t,chainId:n});if(e.status===l.qk.REJECTED)throw new I("User has rejected the request").message;return e.args}throw new z("".concat(this._wallet.name," does not support changing network request")).message}catch(t){throw new z(Q(t)).message}}async signMessageAndVerify(t){try{if(this.ensureWalletExists(this._wallet),this.ensureAccountExists(this._account),this.recordEvent("sign_message_and_verify"),this._wallet.isAIP62Standard)return this.walletStandardCore.signMessageAndVerify(t,this._wallet);return await this.walletCoreV1.signMessageAndVerify(t,this._wallet,this._account)}catch(t){throw new L(Q(t)).message}}constructor(t,e,n,a){super(),this._wallets=[],this._optInWallets=[],this._standard_wallets=[],this._all_wallets=[],this._wallet=null,this._account=null,this._network=null,this.walletCoreV1=new X,this.walletStandardCore=new q,this._connecting=!1,this._connected=!1,this.ga4=null,this._disableTelemetry=!1,this.standardizeStandardWalletToPluginWalletType=t=>{var e,n,a,s;let i={name:t.name,url:t.url,icon:t.icon,provider:t,connect:t.features["aptos:connect"].connect,disconnect:t.features["aptos:disconnect"].disconnect,network:t.features["aptos:network"].network,account:t.features["aptos:account"].account,signAndSubmitTransaction:null==(e=t.features["aptos:signAndSubmitTransaction"])?void 0:e.signAndSubmitTransaction,signMessage:t.features["aptos:signMessage"].signMessage,onAccountChange:t.features["aptos:onAccountChange"].onAccountChange,onNetworkChange:t.features["aptos:onNetworkChange"].onNetworkChange,signTransaction:t.features["aptos:signTransaction"].signTransaction,openInMobileApp:null==(n=t.features["aptos:openInMobileApp"])?void 0:n.openInMobileApp,changeNetwork:null==(a=t.features["aptos:changeNetwork"])?void 0:a.changeNetwork,readyState:"Installed",isAIP62Standard:!0,isSignTransactionV1_1:(null==(s=t.features["aptos:signTransaction"])?void 0:s.version)==="1.1"};this._all_wallets=this._all_wallets.filter(t=>t.name!==i.name),this._all_wallets.push(i),this.emit("standardWalletsAdded",i)},this._wallets=t,this._optInWallets=e,this._dappConfig=n,this._disableTelemetry=a,this._sdkWallets=function(t){let e=[];return e.push(new c.ux({network:null==t?void 0:t.network,dappId:null==t?void 0:t.aptosConnectDappId,...null==t?void 0:t.aptosConnect})),(null==t?void 0:t.mizuwallet)&&(null==t?void 0:t.network)&&[r.ZcK.MAINNET,r.ZcK.TESTNET].includes(t.network)&&e.push(new d.B({network:t.network,manifestURL:t.mizuwallet.manifestURL,appId:t.mizuwallet.appId})),(null==t?void 0:t.network)===r.ZcK.MAINNET?e.push(new u.kJ):e.push(new u.f1),e}(this._dappConfig),this._disableTelemetry||(this.ga4=new $),this.fetchExtensionAIP62AptosWallets(),this.fetchSDKAIP62AptosWallets(),this.scopePollingDetectionStrategy(),this.appendNotDetectedStandardSupportedWallets()}};window.WALLET_ADAPTER_CORE_VERSION=w},14563:function(t,e,n){"use strict";n.d(e,{Ay:function(){return u},FP:function(){return a.FP},LA:function(){return a.LA},Os:function(){return l},Tt:function(){return a.Tt},Z3:function(){return E},a6:function(){return N},cU:function(){return a.cU},od:function(){return a.od},pk:function(){return S},vV:function(){return a.vV}});var a=n(66802),s=n(73473),i=n(3894),r=n(49650),o=(0,s.createContext)({connected:!1});function l(){let t=(0,s.useContext)(o);if(!t)throw Error("useWallet must be used within a WalletContextState");return t}var c={connected:!1,account:null,network:null,wallet:null},u=t=>{let{children:e,plugins:n,optInWallets:r,autoConnect:l=!1,dappConfig:u,disableTelemetry:d=!1,onError:h}=t,[{connected:g,account:w,network:M,wallet:m},A]=(0,s.useState)(c),[y,p]=(0,s.useState)(!0),[N,f]=(0,s.useState)(),[I,j]=(0,s.useState)(null!=n?n:[]);(0,s.useEffect)(()=>{f(new a.V8(null!=n?n:[],null!=r?r:[],u,d))},[]),(0,s.useEffect)(()=>{var t;j(null!=(t=null==N?void 0:N.wallets)?t:[])},[N]);let C=async t=>{try{p(!0),await (null==N?void 0:N.connect(t))}catch(t){return h&&h(t),Promise.reject(t)}finally{p(!1)}},T=async()=>{try{await (null==N?void 0:N.disconnect())}catch(t){return h&&h(t),Promise.reject(t)}},S=async(t,e,n)=>{if(!N)throw Error("WalletCore is not initialized");try{return await (null==N?void 0:N.signTransaction(t,e,n))}catch(t){return h&&h(t),Promise.reject(t)}},v=async t=>{if(!N)throw Error("WalletCore is not initialized");try{return await (null==N?void 0:N.signMessage(t))}catch(t){return h&&h(t),Promise.reject(t)}},D=async t=>{if(!N)throw Error("WalletCore is not initialized");try{return await (null==N?void 0:N.signMessageAndVerify(t))}catch(t){return h&&h(t),Promise.reject(t)}},x=async t=>{if(!N)throw Error("WalletCore is not initialized");try{return await (null==N?void 0:N.submitTransaction(t))}catch(t){return h&&h(t),Promise.reject(t)}},L=async t=>{try{return await (null==N?void 0:N.signAndSubmitTransaction(t))}catch(t){return h&&h(t),Promise.reject(t)}},E=async t=>{if(!N)throw Error("WalletCore is not initialized");try{return await (null==N?void 0:N.changeNetwork(t))}catch(t){return h&&h(t),Promise.reject(t)}};(0,s.useEffect)(()=>{l&&(localStorage.getItem("AptosWalletName")&&!g?C(localStorage.getItem("AptosWalletName")):p(!1))},[l,I]),(0,s.useEffect)(()=>{g&&(null==N||N.onAccountChange(),null==N||N.onNetworkChange())},[g]);let _=()=>{A(t=>({...t,connected:!0,account:(null==N?void 0:N.account)||null,network:(null==N?void 0:N.network)||null,wallet:(null==N?void 0:N.wallet)||null}))},k=()=>{g&&A(t=>({...t,connected:!1,account:(null==N?void 0:N.account)||null,network:(null==N?void 0:N.network)||null,wallet:null}))},z=(0,s.useCallback)(()=>{g&&(null==N?void 0:N.wallet)&&A(t=>({...t,account:(null==N?void 0:N.account)||null}))},[g]),b=(0,s.useCallback)(()=>{g&&(null==N?void 0:N.wallet)&&A(t=>({...t,network:(null==N?void 0:N.network)||null}))},[g]),W=t=>{j(null==I?void 0:I.map(e=>e.name===t.name?{...e,readyState:t.readyState}:e))},O=t=>{let e=I.findIndex(e=>e.name==t.name);-1!==e?j(n=>[...n.slice(0,e),t,...n.slice(e+1)]):j(e=>[...e,t])};return(0,s.useEffect)(()=>(null==N||N.on("connect",_),null==N||N.on("disconnect",k),null==N||N.on("accountChange",z),null==N||N.on("networkChange",b),null==N||N.on("readyStateChange",W),null==N||N.on("standardWalletsAdded",O),()=>{null==N||N.off("connect",_),null==N||N.off("disconnect",k),null==N||N.off("accountChange",z),null==N||N.off("networkChange",b),null==N||N.off("readyStateChange",W),null==N||N.off("standardWalletsAdded",O)}),[I,w]),(0,i.jsx)(o.Provider,{value:{connect:C,account:w,network:M,connected:g,disconnect:T,wallet:m,wallets:I,signAndSubmitTransaction:L,signTransaction:S,signMessage:v,signMessageAndVerify:D,isLoading:y,submitTransaction:x,changeNetwork:E},children:e})},d=(0,s.forwardRef)((t,e)=>(0,i.jsx)("svg",{ref:e,width:"102",height:"132",viewBox:"0 0 102 132",fill:"none",...t,children:(0,i.jsxs)("g",{stroke:"currentColor",strokeMiterlimit:"10",children:[(0,i.jsx)("path",{d:"M59.633 80.66c11.742-2.814 17.48-7.018 20.925-13.254l17.518-31.69c6.257-11.317 2.142-25.55-9.189-31.798C82.737.53 75.723.188 69.593 2.398M60.7 69.565a14.09 14.09 0 0 1-6.907-1.767l-.228-.108"}),(0,i.jsx)("path",{d:"m52.365 41.075 12.507-22.627a14.146 14.146 0 0 1 4.727-5.062M32.407 118.619a14.139 14.139 0 0 1-7.034-1.768c-6.857-3.78-9.353-12.402-5.561-19.25l16.634-30.1a14.097 14.097 0 0 1 4.518-4.923"}),(0,i.jsx)("path",{d:"M41.211 78.85c11.332 6.248 25.583 2.14 31.84-9.177l17.518-31.691c6.256-11.317 2.142-25.55-9.19-31.798-6.085-3.357-13.018-3.724-19.104-1.59A23.31 23.31 0 0 0 49.541 15.36L36.863 38.298l7.989 5.036 12.506-22.627c3.786-6.848 12.419-9.34 19.276-5.554 6.856 3.78 9.353 12.402 5.561 19.25l-16.634 30.1c-3.785 6.848-12.418 9.341-19.275 5.555l-5.075 8.791ZM29.5 130.447c12.361-1.37 19.2-6.994 22.966-13.804l12.678-22.936-8.305-5.239"}),(0,i.jsx)("path",{d:"m55.72 61.947-.442.764 5.511-9.55c-6.901-3.806-18.65-3.124-27.105.814M44.85 43.523l7.635-2.486m-4.221 23.264 7.217-1.723m-9.316 7.517 7.59-2.405m-.562-12.156 7.508-2.221m10.136-51.32L62.761 4.43M49.642 90.778l7.514-2.26m.474 7.448 7.514-2.26m-50.306-60.13c7.135 0 12.918-5.776 12.918-12.9 0-7.126-5.783-12.902-12.918-12.902-7.134 0-12.917 5.776-12.917 12.901s5.783 12.901 12.918 12.901Z"}),(0,i.jsx)("path",{d:"M15.724 7.774h3.197c7.135 0 12.918 5.776 12.918 12.901 0 7.126-5.783 12.901-12.918 12.901h-3.425m65.112 66.935h3.198c7.135 0 12.918 5.775 12.918 12.901 0 7.125-5.783 12.9-12.918 12.9h-3.425"}),(0,i.jsx)("path",{d:"M79.717 126.312c7.135 0 12.918-5.775 12.918-12.9s-5.783-12.901-12.918-12.901c-7.134 0-12.917 5.776-12.917 12.901s5.783 12.9 12.917 12.9ZM53.281 55.414c-11.33-6.248-25.582-2.14-31.839 9.177L3.924 96.281c-6.257 11.318-2.142 25.55 9.189 31.799 11.331 6.248 25.582 2.139 31.839-9.177l12.677-22.937-7.988-5.036-12.507 22.627c-3.785 6.848-12.418 9.341-19.275 5.554-6.857-3.781-9.353-12.402-5.561-19.25l16.633-30.1c3.786-6.848 12.419-9.341 19.276-5.555l5.074-8.792Z"})]})}));d.displayName="LinkGraphic";var h=(0,s.forwardRef)((t,e)=>(0,i.jsxs)("svg",{ref:e,width:"128",height:"102",viewBox:"0 0 128 102",fill:"none",...t,children:[(0,i.jsx)("path",{fill:"currentColor",d:"m.96 25.93-.36-.35.36.85v-.5Zm7.79-7.81v-.5h-.21l-.15.15.36.35ZM1.3 26.28l7.79-7.8-.7-.71-7.8 7.8.7.71Zm7.44-7.66H10v-1H8.75v1Zm29.22 6.8h-37v1h37.01v-1Z"}),(0,i.jsx)("path",{stroke:"currentColor",strokeMiterlimit:"10",d:"M82.25 26.08c0 12.25-9.92 22.2-22.14 22.2a22.17 22.17 0 0 1-22.14-22.2H1.1v74.82h118.02V26.08H82.25Zm44.33 67.02h.33V18.27h-5.7"}),(0,i.jsx)("path",{stroke:"currentColor",strokeMiterlimit:"10",d:"M74.52 42.92a22.4 22.4 0 0 1-11.43 3.3 22.5 22.5 0 0 1-22.46-22.53H9.52M119.22 101l7.78-7.82m-7.88-67.1 7.79-7.81m-44.78 7.72 2.73-2.3m-46.89 2.39 2.39-2.4"}),(0,i.jsx)("path",{stroke:"currentColor",strokeMiterlimit:"10",d:"M9.86 23.69V5.72h107.97v18.04H84.65"}),(0,i.jsx)("path",{stroke:"currentColor",strokeMiterlimit:"10",d:"M117.83 20.46h3.39V1H13.25v4.72M9.36 23.69h31.78"})]}));h.displayName="WalletGraphic";var g=(0,s.forwardRef)((t,e)=>(0,i.jsx)("svg",{ref:e,width:"142",height:"108",viewBox:"0 0 142 108",fill:"none",...t,children:(0,i.jsxs)("g",{stroke:"currentColor",strokeLinejoin:"round",children:[(0,i.jsx)("path",{d:"m91.26 35.8.06-10.46L71.3 1v10.53L87 30.5m-36.11 5.24-.06-10.45L71.3 1v10.53L55 30.5"}),(0,i.jsx)("path",{d:"M71 59.55V49.17L50.83 25.3l.06 10.45L57 42.5m14 17.05V49.18l20.33-23.84-.07 10.45L86 42M1 59.68l.22-9.07 35.33-19.8-.1 9L9 55"}),(0,i.jsx)("path",{d:"M36.55 30.8s-.08 5.92-.1 9l.1-9ZM71 59.51v-9.07L36.55 30.8l-.1 9L63.5 55"}),(0,i.jsx)("path",{d:"M71 59.51v-9.07L36.44 70.78l-.1 9.14L55.5 68.5"}),(0,i.jsx)("path",{d:"M1.22 50.6a77387.2 77387.2 0 0 0 35.22 20.18l-.1 9.14L1 59.68l.23-9.07h-.01ZM141 59.68l-.23-9.07-35.33-19.8.11 9L133 55"}),(0,i.jsx)("path",{d:"m105.44 30.8.11 9-.1-9Z"}),(0,i.jsx)("path",{d:"M71 59.51v-9.07l34.44-19.64.11 9L78.5 55"}),(0,i.jsx)("path",{d:"M71 59.51v-9.07l34.56 20.34.1 9.14L87 69"}),(0,i.jsx)("path",{d:"M140.78 50.6a78487.3 78487.3 0 0 1-35.23 20.18l.11 9.14L141 59.68l-.23-9.07ZM50.83 80.15l.06-6.33 20.1-23.38H71v9.26L55 79"}),(0,i.jsx)("path",{d:"M71.3 97.6 50.89 73.81l-.06 9.33L71.3 107v-9.4Zm20.03-14.5-.07-9.33L71 50.44v9.26l16 18.8"}),(0,i.jsx)("path",{d:"m71.3 97.6 19.96-23.83.06 9.33L71.3 107v-9.4Z"})]})}));function w(t,e,n){let a=(0,s.forwardRef)((a,o)=>{let{className:l,asChild:c,children:u}=a,d=c?r.g7:e,{children:h,...g}="function"==typeof n?n(t):null!=n?n:{},w=c&&(0,s.isValidElement)(u)&&!u.props.children?(0,s.cloneElement)(u,{},h):null!=u?u:h;return(0,i.jsx)(d,{ref:o,className:l,...g,children:w})});return a.displayName=t,a}g.displayName="Web3Graphic";var M=(0,s.createContext)(null);function m(t){let e=(0,s.useContext)(M);if(!e)throw Error("`".concat(t,"` must be used within `AboutAptosConnect`"));return e}var A=[{Graphic:d,Title:w("EducationScreen.Title","h3",{children:"A better way to login."}),Description:w("EducationScreen.Description","p",{children:"Aptos Connect is a web3 wallet that uses a Social Login to create accounts on the Aptos blockchain."})},{Graphic:h,Title:w("EducationScreen.Title","h2",{children:"What is a wallet?"}),Description:w("EducationScreen.Description","p",{children:"Wallets are a secure way to send, receive, and interact with digital assets like cryptocurrencies & NFTs."})},{Graphic:g,Title:w("EducationScreen.Title","h2",{children:"Explore more of web3."}),Description:w("EducationScreen.Description","p",{children:(0,i.jsxs)(i.Fragment,{children:["Aptos Connect lets you take one account across any application built on Aptos."," ",(0,i.jsx)("a",{href:"https://aptosfoundation.org/ecosystem/projects/all",target:"_blank",rel:"noopener noreferrer",children:"Explore the ecosystem"}),"."]})})}],y=Array(A.length).fill(null).map((t,e)=>w("AboutAptosConnect.ScreenIndicator","button",t=>{let n=m(t),a=n.screenIndex-1===e;return{"aria-label":"Go to screen ".concat(e+1),"aria-current":a?"step":void 0,"data-active":a||void 0,onClick:()=>{n.setScreenIndex(e+1)}}})),p=t=>{let{renderEducationScreen:e,children:n}=t,[a,r]=(0,s.useState)(0),o=(0,s.useMemo)(()=>A.map((t,e)=>({...t,screenIndex:e,totalScreens:A.length,screenIndicators:y,back:()=>{r(a-1)},next:()=>{r(a===A.length?0:a+1)},cancel:()=>{r(0)}}))[a-1],[a]);return(0,i.jsx)(M.Provider,{value:{screenIndex:a,setScreenIndex:r},children:0===a?n:e(o)})};p.displayName="AboutAptosConnect";var N=Object.assign(p,{Trigger:w("AboutAptosConnect.Trigger","button",t=>{let e=m(t);return{onClick:()=>{e.setScreenIndex(1)}}})}),f=(0,s.forwardRef)((t,e)=>(0,i.jsx)("svg",{ref:e,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",...t,children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12ZM7.17547 3.67976C7.13401 3.72309 7.07649 3.74757 7.01648 3.74757H3.00775C3.69185 2.83824 4.77995 2.25 6.00569 2.25C7.23142 2.25 8.31953 2.83824 9.00362 3.74757H8.28524C8.20824 3.74757 8.13498 3.71468 8.08401 3.65701L7.81608 3.35416C7.77618 3.30896 7.71882 3.28308 7.6585 3.28308H7.6454C7.58805 3.28308 7.53318 3.30646 7.49343 3.34792L7.17547 3.67976ZM8.05656 4.75897H7.39569C7.31869 4.75897 7.24543 4.72593 7.19447 4.66842L6.92638 4.36557C6.88647 4.32036 6.82896 4.29465 6.7688 4.29465C6.70863 4.29465 6.65112 4.32052 6.61121 4.36557L6.38131 4.6254C6.30603 4.71034 6.19801 4.75913 6.08454 4.75913H2.46703C2.36401 5.05278 2.29683 5.36296 2.27002 5.68467H5.68505C5.74506 5.68467 5.80258 5.66019 5.84404 5.61686L6.16201 5.28502C6.20175 5.24356 6.25662 5.22018 6.31398 5.22018H6.32707C6.38739 5.22018 6.44475 5.24606 6.48465 5.29126L6.75258 5.59411C6.80355 5.65178 6.87681 5.68467 6.95381 5.68467H9.74133C9.71452 5.3628 9.64734 5.05263 9.54431 4.75913H8.05641L8.05656 4.75897ZM4.33651 7.63095C4.39652 7.63095 4.45404 7.60648 4.4955 7.56315L4.81347 7.23131C4.85321 7.18985 4.90808 7.16647 4.96544 7.16647H4.97853C5.03885 7.16647 5.09621 7.19234 5.13611 7.23739L5.40404 7.54024C5.45501 7.59791 5.52827 7.6308 5.60527 7.6308H9.38285C9.52438 7.33839 9.62803 7.02463 9.68975 6.69591H6.06383C5.98683 6.69591 5.91357 6.66287 5.8626 6.60535L5.59467 6.3025C5.55477 6.2573 5.49725 6.23158 5.43709 6.23158C5.37692 6.23158 5.31941 6.25746 5.27951 6.3025L5.0496 6.56233C4.97432 6.64728 4.86631 6.69606 4.75268 6.69606H2.32147C2.3832 7.02479 2.487 7.33855 2.62837 7.63095H4.33651ZM5.57359 8.55745H4.59116C4.51417 8.55745 4.44091 8.52441 4.38994 8.46689L4.12201 8.16404C4.0821 8.11884 4.02459 8.09312 3.96442 8.09312C3.90426 8.09312 3.84675 8.119 3.80684 8.16404L3.57694 8.42387C3.50166 8.50882 3.39364 8.55761 3.28001 8.55761H3.26474C3.94915 9.29096 4.92378 9.74998 6.00596 9.74998C7.08815 9.74998 8.06262 9.29096 8.74719 8.55761H5.57359V8.55745Z",fill:"currentColor"})}));f.displayName="SmallAptosLogo";var I=w("AptosPrivacyPolicy.Root","div"),j=w("AptosPrivacyPolicy.Disclaimer","span",{children:"By continuing, you agree to Aptos Labs'"}),C=w("AptosPrivacyPolicy.Disclaimer","a",{href:"https://aptoslabs.com/privacy",target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"}),T=(0,s.forwardRef)((t,e)=>{let{className:n}=t;return(0,i.jsxs)("div",{ref:e,className:n,children:[(0,i.jsx)("span",{children:"Powered by"}),(0,i.jsx)(f,{}),(0,i.jsx)("span",{children:"Aptos Labs"})]})});T.displayName="AptosPrivacyPolicy.PoweredBy";var S=Object.assign(I,{Disclaimer:j,Link:C,PoweredBy:T});function v(t){let e=(0,s.useContext)(D);if(!e)throw Error("`".concat(t,"` must be used within `WalletItem`"));return e}var D=(0,s.createContext)(null),x=(0,s.forwardRef)((t,e)=>{let{wallet:n,onConnect:o,className:c,asChild:u,children:d}=t,{connect:h}=l(),g=(0,s.useCallback)(()=>{h(n.name),null==o||o()},[h,n.name,o]),w=n.readyState===a.i1.Installed||n.readyState===a.i1.Loadable,M="deeplinkProvider"in n&&n.deeplinkProvider;if(!w&&(0,a.cX)()&&!M)return null;let m=u?r.g7:"div";return(0,i.jsx)(D.Provider,{value:{wallet:n,connectWallet:g},children:(0,i.jsx)(m,{ref:e,className:c,children:d})})});x.displayName="WalletItem";var L=w("WalletItem.Icon","img",t=>{let e=v(t);return{src:e.wallet.icon,alt:"".concat(e.wallet.name," icon")}}),E=Object.assign(x,{Icon:L,Name:w("WalletItem.Name","div",t=>({children:v(t).wallet.name})),ConnectButton:w("WalletItem.ConnectButton","button",t=>({onClick:v(t).connectWallet,children:"Connect"})),InstallLink:w("WalletItem.InstallLink","a",t=>({href:v(t).wallet.url,target:"_blank",rel:"noopener noreferrer",children:"Install"}))})}}]); \ No newline at end of file diff --git a/nextjs-example-testing/index.html b/nextjs-example-testing/index.html index 750655c2..0b750568 100644 --- a/nextjs-example-testing/index.html +++ b/nextjs-example-testing/index.html @@ -1 +1 @@ -Aptos Wallet Adapter Example

      Aptos Wallet Adapter Tester

      Demo App Source Code

      Wallet Selection

      Connect a wallet using one of the following wallet selectors.

      shadcn/ui
      Ant Design
      Material UI
        \ No newline at end of file +Aptos Wallet Adapter Example

        Aptos Wallet Adapter Tester

        Demo App Source Code

        Wallet Selection

        Connect a wallet using one of the following wallet selectors.

        shadcn/ui
        Ant Design
        Material UI
          \ No newline at end of file diff --git a/nextjs-example-testing/index.txt b/nextjs-example-testing/index.txt index 10e4c43d..8e49fda8 100644 --- a/nextjs-example-testing/index.txt +++ b/nextjs-example-testing/index.txt @@ -1,11 +1,11 @@ 2:I[47708,[],"ClientPageRoot"] -3:I[93291,["603","static/chunks/60df695f-72e1a48c58a3b385.js","942","static/chunks/942-8d70e24c19592742.js","81","static/chunks/81-f62fda049def042a.js","860","static/chunks/860-b6f0cb90839296cc.js","931","static/chunks/app/page-1a050e02d8529b25.js"],"default"] -4:I[72159,["603","static/chunks/60df695f-72e1a48c58a3b385.js","942","static/chunks/942-8d70e24c19592742.js","414","static/chunks/414-04c1d52647e135c6.js","860","static/chunks/860-b6f0cb90839296cc.js","185","static/chunks/app/layout-c5ae3a7c13916f86.js"],"ThemeProvider"] -5:I[70992,["603","static/chunks/60df695f-72e1a48c58a3b385.js","942","static/chunks/942-8d70e24c19592742.js","414","static/chunks/414-04c1d52647e135c6.js","860","static/chunks/860-b6f0cb90839296cc.js","185","static/chunks/app/layout-c5ae3a7c13916f86.js"],"AutoConnectProvider"] -6:I[24391,["603","static/chunks/60df695f-72e1a48c58a3b385.js","942","static/chunks/942-8d70e24c19592742.js","414","static/chunks/414-04c1d52647e135c6.js","860","static/chunks/860-b6f0cb90839296cc.js","185","static/chunks/app/layout-c5ae3a7c13916f86.js"],"WalletProvider"] +3:I[93291,["603","static/chunks/60df695f-72e1a48c58a3b385.js","942","static/chunks/942-8d70e24c19592742.js","81","static/chunks/81-f62fda049def042a.js","860","static/chunks/860-c742d28e36f78b73.js","931","static/chunks/app/page-1a050e02d8529b25.js"],"default"] +4:I[72159,["603","static/chunks/60df695f-72e1a48c58a3b385.js","942","static/chunks/942-8d70e24c19592742.js","414","static/chunks/414-04c1d52647e135c6.js","860","static/chunks/860-c742d28e36f78b73.js","185","static/chunks/app/layout-c5ae3a7c13916f86.js"],"ThemeProvider"] +5:I[70992,["603","static/chunks/60df695f-72e1a48c58a3b385.js","942","static/chunks/942-8d70e24c19592742.js","414","static/chunks/414-04c1d52647e135c6.js","860","static/chunks/860-c742d28e36f78b73.js","185","static/chunks/app/layout-c5ae3a7c13916f86.js"],"AutoConnectProvider"] +6:I[24391,["603","static/chunks/60df695f-72e1a48c58a3b385.js","942","static/chunks/942-8d70e24c19592742.js","414","static/chunks/414-04c1d52647e135c6.js","860","static/chunks/860-c742d28e36f78b73.js","185","static/chunks/app/layout-c5ae3a7c13916f86.js"],"WalletProvider"] 7:I[96472,[],""] 8:I[29190,[],""] -9:I[88480,["603","static/chunks/60df695f-72e1a48c58a3b385.js","942","static/chunks/942-8d70e24c19592742.js","414","static/chunks/414-04c1d52647e135c6.js","860","static/chunks/860-b6f0cb90839296cc.js","185","static/chunks/app/layout-c5ae3a7c13916f86.js"],"Toaster"] -0:["BFcUVcma1i59CbGCHpCob",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}]],null],null]},[["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"flex justify-center min-h-screen bg-background font-sans antialiased __variable_9c8dd2","children":["$","$L4",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"disableTransitionOnChange":true,"children":["$","$L5",null,{"children":["$","$L6",null,{"children":[["$","$L7",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L8",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],["$","$L9",null,{}]]}]}]}]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/aptos-wallet-adapter/nextjs-example-testing/_next/static/css/82591428700ec1b9.css","precedence":"next","crossOrigin":"$undefined"}]],"$La"]]]] +9:I[88480,["603","static/chunks/60df695f-72e1a48c58a3b385.js","942","static/chunks/942-8d70e24c19592742.js","414","static/chunks/414-04c1d52647e135c6.js","860","static/chunks/860-c742d28e36f78b73.js","185","static/chunks/app/layout-c5ae3a7c13916f86.js"],"Toaster"] +0:["NukkrhUvULy14v7ej06l4",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}]],null],null]},[["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"flex justify-center min-h-screen bg-background font-sans antialiased __variable_9c8dd2","children":["$","$L4",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"disableTransitionOnChange":true,"children":["$","$L5",null,{"children":["$","$L6",null,{"children":[["$","$L7",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L8",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],["$","$L9",null,{}]]}]}]}]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/aptos-wallet-adapter/nextjs-example-testing/_next/static/css/82591428700ec1b9.css","precedence":"next","crossOrigin":"$undefined"}]],"$La"]]]] a:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Aptos Wallet Adapter Example"}],["$","meta","3",{"name":"description","content":"An example of how to use Aptos Wallet Adapter with React and Next.js."}],["$","link","4",{"rel":"icon","href":"/aptos-wallet-adapter/nextjs-example-testing/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","meta","5",{"name":"next-size-adjust"}]] 1:null