PageSourceSearch

https://0xmint.io/_next/static/chunks/8692.6a68a8241f03fd85.js

js 0xmint.io collected 2026-09-28 06:51:50 UTC 22,858 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8692],{4646:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{n:function(){return normalizeChainId}});function normalizeChainId(chainId){return"string"==typeof chainId?Number.parseInt(chainId,"0x"===chainId.trim().substring(0,2)?16:10):"bigint"==typeof chainId?Number(chainId):chainId}},38692:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{PaperWalletConnector:function(){return PaperWalletConnector}});var _dist_classPrivateFieldSet_a5db7c83_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(16074),_dist_defineProperty_c8ecdc07_browser_esm_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(42009),_dist_connector_c1e1817a_browser_esm_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(61322),_paperxyz_embedded_wallet_service_sdk__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(67885),ethers__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(19485),_dist_walletIds_1ea97411_browser_esm_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(23123),_dist_normalizeChainId_e4cc0175_browser_esm_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(4646);__webpack_require__(65007);var _paper=new WeakMap,_signer=new WeakMap;class PaperWalletConnector extends _dist_connector_c1e1817a_browser_esm_js__WEBPACK_IMPORTED_MODULE_2__.C{constructor(options){super(),(0,_dist_defineProperty_c8ecdc07_browser_esm_js__WEBPACK_IMPORTED_MODULE_3__._)(this,"id",_dist_walletIds_1ea97411_browser_esm_js__WEBPACK_IMPORTED_MODULE_4__.w.paper),(0,_dist_defineProperty_c8ecdc07_browser_esm_js__WEBPACK_IMPORTED_MODULE_3__._)(this,"name","Pa
1per Wallet"),(0,_dist_defineProperty_c8ecdc07_browser_esm_js__WEBPACK_IMPORTED_MODULE_3__._)(this,"ready",!0),(0,_dist_defineProperty_c8ecdc07_browser_esm_js__WEBPACK_IMPORTED_MODULE_3__._)(this,"user",null),(0,_dist_classPrivateFieldSet_a5db7c83_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__._)(this,_paper,{writable:!0,value:void 0}),(0,_dist_defineProperty_c8ecdc07_browser_esm_js__WEBPACK_IMPORTED_MODULE_3__._)(this,"options",void 0),(0,_dist_classPrivateFieldSet_a5db7c83_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__._)(this,_signer,{writable:!0,value:void 0}),(0,_dist_defineProperty_c8ecdc07_browser_esm_js__WEBPACK_IMPORTED_MODULE_3__._)(this,"onAccountsChanged",async accounts=>{0===accounts.length?await this.onDisconnect():this.emit("change",{account:ethers__WEBPACK_IMPORTED_MODULE_6__.getAddress(accounts[0])})}),(0,_dist_defineProperty_c8ecdc07_browser_esm_js__WEBPACK_IMPORTED_MODULE_3__._)(this,"onChainChanged",chainId=>{let id=(0,_dist_normalizeChainId_e4cc0175_browser_esm_js__WEBPACK_IMPORTED_MODULE_7__.n)(chainId),unsupported=-1===this.options.chains.findIndex(c=>c.chainId===id);this.emit("change",{chain:{id,unsupported}})}),(0,_dist_defineProperty_c8ecdc07_browser_esm_js__WEBPACK_IMPORTED_MODULE_3__._)(this,"onDisconnect",async()=>{this.emit("disconnect")}),this.options=options}getPaperSDK(){return(0,_dist_classPrivateFieldSet_a5db7c83_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__.b)(this,_paper)||(0,_dist_classPrivateFieldSet_a5db7c83_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__.a)(this,_paper,new Promise(async(resolve,reject)=>{try{let{PaperEmbeddedWalletSdk}=await Promise.resolve().then(__webpack_require__.bind(__webpack_require__,67885));resolve(new PaperEmbeddedWalletSdk({clientId:this.options.clientId,chain:"Ethereum"}))}catch(err){reject(err)}})),(0,_dist_classPrivateFieldSet_a5db7c83_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__.b)(this,_paper)}async connect(options){let paperSDK=await this.getPaperSDK();if(!paperSDK)throw Error("Paper SDK not initialized");let user=await paperSDK.getUser();switch(user.status){case _paperxyz_embedded_wallet_service_sdk__WEBPACK_IMPORTED_MODULE_0__.UserStatus.LOGGED_OUT:{let authResult;authResult=options?.email?await paperSDK.auth.loginWithPaperEmailOtp({email:options.email}):await paperSDK.auth.loginWithPaperModal(),this.user=authResult.user;break}case _paperxyz_embedded_wallet_service_sdk__WEBPACK_IMPORTED_MODULE_0__.UserStatus.LOGGED_IN_WALLET_INITIALIZED:this.user=user}if(!this.user)throw Error("Error connecting User");return this.setupListeners(),this.getAddress()}async disconnect(){let paper=await (0,_dist_classPrivateFieldSet_a5db7c83_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__.b)(this,_paper);await paper?.auth.logout(),this.user=null}
1async getAddress(){let signer=await this.getSigner();return signer.getAddress()}async isConnected(){try{let addr=await this.getAddress();return!!addr}catch(e){return!1}}async getProvider(){let signer=await this.getSigner();if(!signer.provider)throw Error("Provider not found");return signer.provider}async getSigner(){if((0,_dist_classPrivateFieldSet_a5db7c83_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__.b)(this,_signer))return(0,_dist_classPrivateFieldSet_a5db7c83_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__.b)(this,_signer);if(!this.user){let paperSDK=await this.getPaperSDK(),user=await paperSDK.getUser();user.status===_paperxyz_embedded_wallet_service_sdk__WEBPACK_IMPORTED_MODULE_0__.UserStatus.LOGGED_IN_WALLET_INITIALIZED&&(this.user=user)}let signer=await this.user?.wallet.getEthersJsSigner({rpcEndpoint:this.options.chain.rpc[0]});if(!signer)throw Error("Signer not found");return(0,_dist_classPrivateFieldSet_a5db7c83_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__.a)(this,_signer,signer),signer}async isAuthorized(){return!1}async switchChain(chainId){let chain=this.options.chains.find(c=>c.chainId===chainId);if(!chain)throw Error("Chain not configured");await this.user?.wallet.setChain({chain:"Ethereum"}),(0,_dist_classPrivateFieldSet_a5db7c83_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__.a)(this,_signer,await this.user?.wallet.getEthersJsSigner({rpcEndpoint:chain.rpc[0]})),this.emit("change",{chain:{id:chainId,unsupported:!1}})}async setupListeners(){let provider=await this.getProvider();provider.on&&(provider.on("accountsChanged",this.onAccountsChanged),provider.on("chainChanged",this.onChainChanged),provider.on("disconnect",this.onDisconnect))}updateChains(chains){this.options.chains=chains}async getEmail(){if(await this.getProvider(),!this.user)throw Error("No user found, Paper Wallet is not connected");return this.user.authDetails.email}}},67885:function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AUTH_TOKEN_LOCAL_STORAGE_NAME:function(){return T},AuthProvider:function(){return K},DEVICE_SHARE_LOCAL_STORAGE_NAME:function(){return I},DEVICE_SHARE_LOCAL_STORAGE_NAME_DEPRECATED:function(){return J},PaperEmbeddedWalletSdk:function(){return b},RecoveryShareManagement:function(){return f},UserStatus:function(){return F},UserWalletStatus:function(){return P},WALLET_USER_ID_LOCAL_STORAGE_NAME:function(){return A}});var t,n,t1,a,o={Ethereum:"https://rpc.ankr.com/eth",Goerli:"https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",Mumbai:"https://rpc-mumbai.maticvigil.com",Polygon:"https://rpc-mainnet.maticvigil.com",Avalanche:"https://api.avax.network/ext/bc/C/rpc",Optimism:"https://optimism.rpc.thirdweb.com",OptimismGoerli:"https://optimism-goerli.rpc.thirdweb.com",BSC:"https://binance.rpc.thirdweb.com",BSCTestnet:"https://binance-testnet.rpc.thirdweb.com",ArbitrumOne:"https://arbitrum.rpc.thirdweb.com",ArbitrumGoerli:"https://arbitrum-goerli.rpc.thirdweb.com",Fantom:"https://fantom.rpc.thirdweb.com",FantomTestnet:"https://fantom-testnet.rpc.thirdweb.com"},e=()=>"undefined"!=typeof window&&"true"===window.localStorage.getItem("IS_PAPER_DEV"),r=()=>"undefined"!=typeof window&&window.location.origin.includes("paper.xyz"),dist_i=()=>{var t;return e()?null!=(t=window.localStorage.getItem("PAPER_DEV_URL"))?t:"http://localhost:3000":r()?window.location.origin:"https://withpaper.com"},lib_esm=__webpack_require__(5897),abstract_signer_lib_esm=__webpack_require__(48088),properties_lib_esm=__webpack_require__(6881),V=Object.defineProperty,z=Object.defineProperties,q=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,k=(s,e,t)=>e in s?V(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,c=(s,e)=>{for(var t in e||(e={}))Z.call(e,t)&&k(s,t,e[t]);if(x)for(var t of x(e))$.call(e,t)&&k(s,t,e[t]);return s},W=(s,e)=>z(s,q(e)),dist_r=(s,e,t)=>new Promise((i,a)=>{var o=l=>{try{p(t.next(l))}catch(d){a(d)}},n=l=>{try{p(t.throw(l))}catch(d){a(d)}},p=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,n);p((t=t.apply(s,e)).next())}),E="/sdk/2022-08-12/embedded-wallet",A=s=>`paperEwsWalletUserId-${s}`,T=s=>`walletToken-${s}`,I=(s,e)=>`a-${s}-${e}`,J=s=>`a-${s}`,f=((t=f||{}).USER_MANAGED="USER_MANAGED",t.AWS_MANAGED="AWS_MANAGED",t),K=((n=K||{}).PAPER_EMAIL_OTP="PaperEmailOTP",n.GOOGLE="Google",n.TWITTER="Twitter",n.COGNITO="Cognito",n.AUTH0="Auth0",n.CUSTOM_JWT="CustomJWT",n),F=((t1=F||{}).LOGGED_OUT="Logged Out",t1.LOGGED_IN_WALLET_INITIALIZED="Logged In, Wallet Initialized",t1),P=((a=P||{}).LOGGED_OUT="Logged Out",a.LOGGED_IN_WALLET_UNINITIALIZED="Logged In, Wallet Uninitialized",a.LOGGED_IN_NEW_DEVICE="Logged In, New Device",a.LOGGED_IN_WALLET_INITIALIZED="Logged In, Wallet Initialized",a),H=new Map,u=class{constructor({clientId:e}){this.isSupported="undefined"!=typeof window&&!!window.localStorage,this.clientId=e}getItem(e){return dist_r(this,null,function*(){var t;return this.isSupported?window.localStorage.getItem(e):null!=(t=H.get(e))?t:null})}setItem(e,t){return dist_r(this,null,function*(){if(this.isSupported)return window.localStorage.setItem(e,t);H.set(e,t)})}removeItem(e){return dist_r(this,null,function*(){let t=yield this.getItem(e);return!!this.isSupported&&!!t&&(window.localStorage.removeItem(e),!0)})}saveAuthCookie(e){return dist_r(this,null,function*(){yield this.setItem(T(this.clientId),e)})}getAuthCookie(){return dist_r(this,null,function*(){return this.getItem(T(this.clientId))})}removeAuthCookie(){return dist_r(this,null,function*(){return this.removeItem(T(this.clientId))})}saveDeviceShare(e,t){return dist_r(this,null,function*(){yield this.saveWalletUserId(t),yield this.setItem(I(this.clientId,t),e)})}getDeviceShare(){return dist_r(this,null,function*(){let e=yield this.getWalletUserId();return e?this.getItem(I(this.clientId,e)):null})}removeDeviceShare(){return dist_r(this,null,function*(){let e=yield this.getWalletUserId();return!!e&&this.removeItem(I(this.clientId,e))})}getWalletUserId(){return dist_r(this,null,function*(){return this.getItem(A(this.clientId))})}saveWalletUserId(e){return dist_r(this,null,function*(){yield this.setItem(A(this.clientId),e)})}removeWalletUserId(){return dist_r(this,null,function*(){return this.removeItem(A(this.clientId))})}};function _(s){return new Promise(e=>{setTimeout(e,1e3*s)})}var X={height:"100%",width:"100%",border:"none",backgroundColor:"transparent",colorScheme:"light",position:"fixed",top:"0px",right:"0px",zIndex:"2147483646",display:"none"},N=new Map,v=class{constructor({link:e,iframeId:t,container:i=document.body,iframeStyles:a,onIframeInitialize:o}){this.POLLING_INTERVAL_SECONDS=1.4,this.POST_LOAD_BUFFER_SECONDS=1;let n=document.getElementById(t),p=new URL(e),l="1.1.0";if(!l)throw Error("Missing SDK_VERSION env var");if(p.searchParams.set("sdkVersion",l),!n||n.src!=p.href){if(!n){n=document.createElement("iframe");let d=c(c({},X),a);Object.assign(n.style,d),n.setAttribute("id",t),n.setAttribute("fetchpriority","high"),i.appendChild(n)}n.src=p.href,n.setAttribute("data-version",l),n.onload=this.onIframeLoadHandler(n,this.PO
1ST_LOAD_BUFFER_SECONDS,o)}this.iframe=n}onIframeLoadedInitVariables(){return dist_r(this,null,function*(){return{}})}onIframeLoadHandler(e,t,i){return()=>dist_r(this,null,function*(){yield new Promise((o,n)=>dist_r(this,null,function*(){var d;let p=new MessageChannel;p.port1.onmessage=R=>{let{data:g}=R;return p.port1.close(),g.success?(N.set(e.src,!0),i&&i(),o(!0)):n(Error(g.error))},yield _(t),null==(d=null==e?void 0:e.contentWindow)||d.postMessage({eventType:"initIframe",data:yield this.onIframeLoadedInitVariables()},`${dist_i()}${E}`,[p.port2])}))})}call(o){return dist_r(this,arguments,function*({procedureName:e,params:t,showIframe:i=!1,injectRecoveryCode:a={isInjectRecoveryCode:!1}}){for(;!N.get(this.iframe.src);)yield _(this.POLLING_INTERVAL_SECONDS);return i&&(this.iframe.style.display="block",yield _(.005)),new Promise((p,l)=>{var R;if(a.isInjectRecoveryCode){let g=m=>dist_r(this,null,function*(){var U,G;if(m.origin!==dist_i()||"paper_getRecoveryCode"!==m.data.type||"string"!=typeof m.data.userWalletId)return;let j=yield null==(U=a.getRecoveryCode)?void 0:U.call(a,m.data.userWalletId);null==(G=this.iframe.contentWindow)||G.postMessage({type:"paper_getRecoveryCode_response",recoveryCode:j},dist_i()),window.removeEventListener("message",g)});window.addEventListener("message",g)}let d=new MessageChannel;d.port1.onmessage=g=>dist_r(this,null,function*(){let{data:m}=g;d.port1.close(),i&&(yield _(.1),this.iframe.style.display="none"),m.success?p(m.data):l(Error(m.error))}),null==(R=this.iframe.contentWindow)||R.postMessage({eventType:e,data:t},`${dist_i()}${E}`,[d.port2])})})}destroy(){N.delete(this.iframe.src)}},C=class extends v{constructor({clientId:t,customizationOptions:i}){super({iframeId:te,link:function({clientId:s,path:e,queryParams:t}){var a;let i=new URL(e,dist_i());if(t)for(let o of Object.keys(t))i.searchParams.set(o,(null==(a=t[o])?void 0:a.toString())||"");return i.searchParams.set("clientId",s),i}({clientId:t,path:E,queryParams:i}).href,container:document.body}),this.clientId=t}onIframeLoadedInitVariables(){return dist_r(this,null,function*(){let t=new u({clientId:this.clientId});return{authCookie:yield t.getAuthCookie(),deviceShareStored:yield t.getDeviceShare(),walletUserId:yield t.getWalletUserId(),clientId:this.clientId}})}},te="paper-embedded-wallet-iframe",h=class{constructor({querier:e,preLogin:t,postLogin:i}){this.LoginQuerier=e,this.preLogin=t,this.postLogin=i}sendPaperEmailLoginOtp(i){return dist_r(this,arguments,function*({email:e,recoveryShareManagement:t}){yield this.preLogin();let{isNewUser:a,isNewDevice:o}=yield this.LoginQuerier.call({procedureName:"sendPaperEmailLoginOtp",params:{email:e,recoveryShareManagement:t}});return{isNewUser:a,isNewDevice:o}})}},D=class extends h{loginWithPaperModal(){return dist_r(this,null,function*(){yield this.preLogin();let e=yield this.LoginQuerier.call({procedureName:"loginWithPaperModal",params:{recoveryShareManagement:"AWS_MANAGED"},showIframe:!0,injectRecoveryCode:{isInjectRecoveryCode:!0}});return this.postLogin(e)})}loginWithPaperEmailOtp(t){return dist_r(this,arguments,function*({email:e}){yield this.preLogin();let i=yield this.LoginQuerier.call({procedureName:"loginWithPaperModal",params:{email:e,recoveryShareManagement:"AWS_MANAGED"},showIframe:!0,injectRecoveryCode:{isInjectRecoveryCode:!0}});return this.postLogin(i)})}verifyPaperEmailLoginOtp(i){return dist_r(this,arguments,function*({email:e,otp:t}){let a=yield this.LoginQuerier.call({procedureName:"verifyPaperEmailLoginOtp",params:{email:e,otp:t,recoveryShareManagement:"AWS_MANAGED"},injectRecoveryCode:{isInjectRecoveryCode:!0}});return this.postLogin(a)})}},w=class extends h{loginWithPaperModal(e){return dist_r(this,null,function*(){yield this.preLogin();let t=yield this.LoginQuerier.call({procedureName:"loginWithPaperModal",params:void 0,showIframe:!0,injectRecoveryCode:{isInjectRecoveryCode:!0,getRecoveryCode:null==e?void 0:e.getRecoveryCode}});return this.postLogin(t)})}loginWithPaperEmailOtp(i){return dist_r(this,arguments,function*({email:e,recoveryCode:t}){yield this.preLogin();let a=yield this.LoginQuerier.call({procedureName:"loginWithPaperModal",params:{email:e,recoveryCode:t},showIframe:!0,injectRecoveryCode:{isInjectRecoveryCode:!0}});return this.postLogin(a)})}verifyPaperEmailLoginOtp(a){return dist_r(this,arguments,function*({email:e,otp:t,recoveryCode:i}){let o=yield this.LoginQuerier.call({procedureName:"verifyPaperEmailLoginOtp",params:{email:e,otp:t,recoveryCode:i},injectRecoveryCode:{isInjectRecoveryCode:!0}});return this.postLogin(o)})}},O=class{constructor({clientId:e,advancedOptions:t,querier:i,onAuthSuccess:a}){var o;this.clientId=e,this.advancedOptions={recoveryShareManagement:null!=(o=null==t?void 0:t.recoveryShareManagement)?o:"AWS_MANAGED"},this.AuthQuerier=i,this.localStorage=new u({clientId:e}),this.onAuthSuccess=a,this.userManagedLogin=new w({postLogin:n=>dist_r(this,null,function*(){return this.postLogin(n)}),preLogin:()=>dist_r(this,null,function*(){yield this.preLogin()}),querier:i}),this.awsManagedLogin=new D({postLogin:n=>dist_r(this,null,function*(){return this.postLogin(n)}),preLogin:()=>dist_r(this,null,function*(){yield this.preLogin()}),querier:i})}preLogin(){return dist_r(this,null,function*(){yield this.logout()})}postLogin(i){return dist_r(this,arguments,function*({storedToken:e,walletDetails:t}){return e.shouldStoreCookieString&&(yield this.localStorage.saveAuthCookie(e.co
1okieString)),yield this.onAuthSuccess({storedToken:e,walletDetails:t})})}loginWithJwtAuth(a){return dist_r(this,arguments,function*({token:e,authProvider:t,recoveryCode:i}){yield this.preLogin();let o=yield this.AuthQuerier.call({procedureName:"loginWithJwtAuthCallback",params:{token:e,authProvider:t,recoveryCode:i}});return this.postLogin(o)})}loginWithPaperModal(e){return dist_r(this,null,function*(){return yield this.preLogin(),"AWS_MANAGED"===this.advancedOptions.recoveryShareManagement?this.awsManagedLogin.loginWithPaperModal():this.userManagedLogin.loginWithPaperModal(e)})}loginWithPaperEmailOtp(e){return dist_r(this,null,function*(){return"AWS_MANAGED"===this.advancedOptions.recoveryShareManagement?this.awsManagedLogin.loginWithPaperEmailOtp({email:e.email}):this.userManagedLogin.loginWithPaperEmailOtp(e)})}sendPaperEmailLoginOtp(t){return dist_r(this,arguments,function*({email:e}){return"AWS_MANAGED"===this.advancedOptions.recoveryShareManagement?this.awsManagedLogin.sendPaperEmailLoginOtp({email:e,recoveryShareManagement:"AWS_MANAGED"}):this.userManagedLogin.sendPaperEmailLoginOtp({email:e})})}verifyPaperEmailLoginOtp(e){return dist_r(this,null,function*(){return"AWS_MANAGED"===this.advancedOptions.recoveryShareManagement?this.awsManagedLogin.verifyPaperEmailLoginOtp(e):this.userManagedLogin.verifyPaperEmailLoginOtp(e)})}logout(){return dist_r(this,null,function*(){let{success:e}=yield this.AuthQuerier.call({procedureName:"logout",params:void 0}),t=yield this.localStorage.removeAuthCookie(),i=yield this.localStorage.removeWalletUserId();return{success:e||t||i}})}},L=class{constructor({chain:e,clientId:t,querier:i}){this.chain=e,this.clientId=t,this.gaslessTransactionQuerier=i}callContract(a){return dist_r(this,arguments,function*({contractAddress:e,methodArgs:t,methodInterface:i}){return yield this.gaslessTransactionQuerier.call({procedureName:"callContract",params:{chain:this.chain,contractAddress:e,method:{args:t,stub:i}}})})}},y=class extends abstract_signer_lib_esm.Signer{constructor({provider:t,clientId:i,querier:a}){var o;super(),this.DEFAULT_ETHEREUM_CHAIN_ID=5,this.clientId=i,this.querier=a,this.endpoint=null==(o=t.connection)?void 0:o.url,(0,properties_lib_esm.defineReadOnly)(this,"provider",t)}getAddress(){return dist_r(this,null,function*(){let{address:t}=yield this.querier.call({procedureName:"getAddress",params:void 0});return t})}signMessage(t){return dist_r(this,null,function*(){var o,n,p,l;let i=yield null==(o=this.provider)?void 0:o.getNetwork();i&&i._defaultProvider;let{signedMessage:a}=yield this.querier.call({procedureName:"signMessage",params:{message:t,chainId:null!=(l=null==(p=yield null==(n=this.provider)?void 0:n.getNetwork())?void 0:p.chainId)?l:this.DEFAULT_ETHEREUM_CHAIN_ID,rpcEndpoint:this.endpoint}});return a})}signTransaction(t){return dist_r(this,null,function*(){var a,o,n;let{signedTransaction:i}=yield this.querier.call({procedureName:"signTransaction",params:{transaction:t,chainId:null!=(n=null==(o=yield null==(a=this.provider)?void 0:a.getNetwork())?void 0:o.chainId)?n:this.DEFAULT_ETHEREUM_CHAIN_ID,rpcEndpoint:this.endpoint}});return i})}_signTypedData(t,i,a){return dist_r(this,null,function*(){var n,p,l;let{signedTypedData:o}=yield this.querier.call({procedureName:"signTypedDataV4",params:{domain:t,types:i,message:a,chainId:null!=(l=null==(p=yield null==(n=this.provider)?void 0:n.getNetwork())?void 0:p.chainId)?l:this.DEFAULT_ETHEREUM_CHAIN_ID,rpcEndpoint:this.endpoint}});return o})}connect(t){return new y({clientId:this.clientId,provider:t,querier:this.querier})}},M=class{constructor({clientId:e,chain:t,querier:i}){this.clientId=e,this.chain=t,this.walletManagerQuerier=i,this.gasless=new L({chain:t,clientId:e,querier:i}),this.localStorage=new u({clientId:e})}postWalletSetUp(o){return dist_r(this,arguments,function*({deviceShareStored:e,walletAddress:t,isIframeStorageEnabled:i,walletUserId:a}){return i||(yield this.localStorage.saveDeviceShare(e,a)),{walletAddress:t}})}getUserWalletStatus(){return dist_r(this,null,function*(){let e=yield this.walletManagerQuerier.call({procedureName:"getUserStatus",params:void 0});return"Logged In, Wallet Initialized"===e.status?{status:"Logged In, Wallet Initialized",user:W(c({},e.user),{wallet:this})}:e})}setChain(t){return dist_r(this,arguments,function*({chain:e}){this.chain=e,this.gasless=new L({chain:e,clientId:this.clientId,querier:this.walletManagerQuerier})})}getEthersJsSigner(e){return dist_r(this,null,function*(){var i;return new y({clientId:this.clientId,provider:(0,lib_esm.getDefaultProvider)(null!=(i=null==e?void 0:e.rpcEndpoint)?i:o[this.chain]),querier:this.walletManagerQuerier})})}},b=class{constructor({clientId:e,chain:t,styles:i,advancedOptions:a}){this.clientId=e,this.querier=new C({clientId:e,customizationOptions:i}),this.wallet=new M({clientId:e,chain:t,querier:this.querier}),this.auth=new O({clientId:e,advancedOptions:c({recoveryShareManagement:"USER_MANAGED"},null!=a?a:{}),querier:this.querier,onAuthSuccess:o=>dist_r(this,null,function*(){return yield this.wallet.postWalletSetUp(W(c({}
1,o.walletDetails),{walletUserId:o.storedToken.authDetails.userWalletId})),{user:{status:"Logged In, Wallet Initialized",authDetails:o.storedToken.authDetails,wallet:this.wallet,walletAddress:o.walletDetails.walletAddress}}})})}getUser(){return dist_r(this,null,function*(){let e=yield this.wallet.getUserWalletStatus();switch(e.status){case"Logged In, New Device":case"Logged In, Wallet Uninitialized":return yield this.auth.logout(),this.getUser();case"Logged Out":return{status:"Logged Out"};case"Logged In, Wallet Initialized":return c({status:"Logged In, Wallet Initialized"},e.user)}})}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.