PageSourceSearch

https://sideshift.ai/_next/static/chunks/2456.8f101049d8738a72.js

js sideshift.ai collected 2026-09-24 09:03:03 UTC 12,412 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="519a42ae-0393-40f2-97be-612055cfd742",e._sentryDebugIdIdentifier="sentry-dbid-519a42ae-0393-40f2-97be-612055cfd742")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2456],{52456:(e,t,n)=>{n.r(t),n.d(t,{config:()=>f});var i=n(86917),a=n(69617),s=n(48),r=n(2886),c=n(70079),o=n(78375),h=n(63502);function d(e={}){var t,i;let a,l,u,m,w,g,p,v,C;return"3"===e.version||e.headlessMode?(t=e,(0,s.U)(e=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:d.type,async connect({chainId:e}={}){try{let t=await this.getProvider(),n=(await t.request({method:"eth_requestAccounts"})).map(e=>(0,c.b)(e));u||(u=this.onAccountsChanged.bind(this),t.on("accountsChanged",u)),m||(m=this.onChainChanged.bind(this),t.on("chainChanged",m)),w||(w=this.onDisconnect.bind(this),t.on("disconnect",w));let i=await this.getChainId();if(e&&i!==e){let t=await this.switchChain({chainId:e}).catch(e=>{if(e.code===o.vx.code)throw e;return{id:i}});i=t?.id??i}return{accounts:n,chainId:i}}catch(e){if(/(user closed modal|accounts received is empty|user denied account)/i.test(e.message))throw new o.vx(e);throw e}},async disconnect(){let e=await this.getProvider();u&&(e.removeListener("accountsChanged",u),u=void 0),m&&(e.removeListener("chainChanged",m),m=void 0),w&&(e.removeListener("disconnect",w),w=void 0),e.disconnect(),e.close()},async getAccounts(){let e=await this.getProvider();return(await e.request({method:"eth_accounts"})).map(e=>(0,c.b)(e))},async getChainId(){let e=await this.getProvider();return Number(await e.request({method:"eth_chainId"}))}
1,async getProvider(){if(!l){a=new(await (async()=>{let{default:e}=await Promise.all([n.e(5599),n.e(7265),n.e(8466),n.e(376)]).then(n.t.bind(n,28466,19));return"function"!=typeof e&&"function"==typeof e.default?e.default:e})())({...t,reloadOnDisconnect:!1});let i=a.walletExtension?.getChainId(),s=e.chains.find(e=>t.chainId?e.id===t.chainId:e.id===i)||e.chains[0],r=t.chainId||s?.id,c=t.jsonRpcUrl||s?.rpcUrls.default.http[0];l=a.makeWeb3Provider(c,r)}return l},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:t,chainId:n}){let i=e.chains.find(e=>e.id===n);if(!i)throw new o.ch(new r.nk);let a=await this.getProvider();try{return await a.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,h.cK)(i.id)}]}),i}catch(e){if(4902===e.code)try{let e,s;e=t?.blockExplorerUrls?t.blockExplorerUrls:i.blockExplorers?.default.url?[i.blockExplorers?.default.url]:[],s=t?.rpcUrls?.length?t.rpcUrls:[i.rpcUrls.default?.http[0]??""];let r={blockExplorerUrls:e,chainId:(0,h.cK)(n),chainName:t?.chainName??i.name,iconUrls:t?.iconUrls,nativeCurrency:t?.nativeCurrency??i.nativeCurrency,rpcUrls:s};return await a.request({method:"wallet_addEthereumChain",params:[r]}),i}catch(e){throw new o.vx(e)}throw new o.ch(e)}},onAccountsChanged(t){0===t.length?this.onDisconnect():e.emitter.emit("change",{accounts:t.map(e=>(0,c.b)(e))})},onChainChanged(t){let n=Number(t);e.emitter.emit("change",{chainId:n})},async onDisconnect(t){e.emitter.emit("disconnect");let n=await this.getProvider();u&&(n.removeListener("accountsChanged",u),u=void 0),m&&(n.removeListener("chainChanged",m),m=void 0),w&&(n.removeListener("disconnect",w),w=void 0)}}))):(i=e,(0,s.U)(e=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:d.type,async connect({chainId:e,...t}={}){try{let n=await this.getProvider(),i=(await n.request({method:"eth_requestAccounts",params:"instantOnboarding"in t&&t.instantOnboarding?[{onboarding:"instant"}]:[]})).map(e=>(0,c.b)(e));p||(p=this.onAccountsChanged.bind(this),n.on("accountsChanged",p)),v||(v=this.onChainChanged.bind(this),n.on("chainChanged",v)),C||(C=this.onDisconnect.bind(this),n.on("disconnect",C));let a=await this.getChainId();if(e&&a!==e){let t=await this.switchChain({chainId:e}).catch(e=>{if(e.code===o.vx.code)throw e;return{id:a}});a=t?.id??a}return{accounts:i,chainId:a}}catch(e){if(/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(e.message))throw new o.vx(e);throw e}},async disconnect(){let e=await this.getProvider();p&&(e.removeListener("accountsChanged",p),p=void 0),v&&(e.removeListener("chainChanged",v),v=void 0),C&&(e.removeListener("disconnect",C),C=void 0),e.disconnect(),e.close?.()},async getAccounts(){let e=await this.getProvider();return(await e.request({method:"eth_accounts"})).map(e=>(0,c.b)(e))},async getChainId(){let e=await this.getProvider();return Number(await e.request({method:"eth_chainId"}))}
1,async getProvider(){if(!g){let t="string"==typeof i.preference?{options:i.preference}:{...i.preference,options:i.preference?.options??"all"},{createCoinbaseWalletSDK:a}=await Promise.all([n.e(2145),n.e(9079),n.e(164),n.e(5599),n.e(8132),n.e(1703),n.e(7542),n.e(2321),n.e(7346),n.e(706),n.e(4491)]).then(n.bind(n,74491));g=a({...i,appChainIds:e.chains.map(e=>e.id),preference:t}).getProvider()}return g},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:t,chainId:n}){let i=e.chains.find(e=>e.id===n);if(!i)throw new o.ch(new r.nk);let a=await this.getProvider();try{return await a.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,h.cK)(i.id)}]}),i}catch(e){if(4902===e.code)try{let e,s;e=t?.blockExplorerUrls?t.blockExplorerUrls:i.blockExplorers?.default.url?[i.blockExplorers?.default.url]:[],s=t?.rpcUrls?.length?t.rpcUrls:[i.rpcUrls.default?.http[0]??""];let r={blockExplorerUrls:e,chainId:(0,h.cK)(n),chainName:t?.chainName??i.name,iconUrls:t?.iconUrls,nativeCurrency:t?.nativeCurrency??i.nativeCurrency,rpcUrls:s};return await a.request({method:"wallet_addEthereumChain",params:[r]}),i}catch(e){throw new o.vx(e)}throw new o.ch(e)}},onAccountsChanged(t){0===t.length?this.onDisconnect():e.emitter.emit("change",{accounts:t.map(e=>(0,c.b)(e))})},onChainChanged(t){let n=Number(t);e.emitter.emit("change",{chainId:n})},async onDisconnect(t){e.emitter.emit("disconnect");let n=await this.getProvider();p&&(n.removeListener("accountsChanged",p),p=void 0),v&&(n.removeListener("chainChanged",v),v=void 0),C&&(n.removeListener("disconnect",C),C=void 0)}})))}d.type="coinbaseWallet";var l=n(52215);function u(e){let t,i,a,d,m,w,g,p,v=e.isNewChainsStale??!0;return(0,s.U)(s=>({id:"walletConnect",name:"WalletConnect",type:u.type,async setup(){let e=await this.getProvider().catch(()=>null);e&&(m||(m=this.onConnect.bind(this),e.on("connect",m)),g||(g=this.onSessionDelete.bind(this),e.on("session_delete",g)))},async connect({chainId:e,...t}={}){try{let n=await this.getProvider();if(!n)throw new l.N;w||(w=this.onDisplayUri,n.on("display_uri",w));let i=e;if(!i){let e=await s.storage?.getItem("state")??{};i=s.chains.some(t=>t.id===e.chainId)?e.chainId:s.chains[0]?.id}if(!i)throw Error("No chains found on connector.");let r=await this.isChainsStale();if(n.session&&r&&await n.disconnect(),!n.session||r){let e=s.chains.filter(e=>e.id!==i).map(e=>e.id);await n.connect({optionalChains:[i,...e],..."pairingTopic"in t?{pairingTopic:t.pairingTopic}:{}}),this.setRequestedChainsIds(s.chains.map(e=>e.id))}let h=(await n.enable()).map(e=>(0,c.b)(e)),u=await this.getChainId();if(e&&u!==e){let t=await this.switchChain({chainId:e}).catch(e=>{if(e.code===o.vx.code&&e.cause?.message!=="Missing or invalid. request() method: wallet_addEthereumChain")throw e;return{id:u}});u=t?.id??u}return w&&(n.removeListener("display_uri",w),w=void 0),m&&(n.removeListener("connect",m),m=void 0),a||(a=this.onAccountsChanged.bind(this),n.on("accountsChanged",a)),d||(d=this.onChainChanged.bind(this),n.on("chainChanged",d)),p||(p=this.onDisconnect.bind(this),n.on("disconnect",p)),g||(g=this.onSessionDelete.bind(this),n.on("session_delete",g)),{accounts:h,chainId:u}}catch(e){if(/(user rejected|connection request reset)/i.test(e?.message))throw new o.vx(e);throw e}},async disconnect(){let e=await this.getProvider();try{await e?.disconnect()}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{d&&(e?.removeListener("chainChanged",d),d=void 0),p&&(e?.removeListener("disconnect",p),p=void 0),m||(m=this.onConnect.bind(this),e?.on("connect",m)),a&&(e?.removeListener("accountsChanged",a),a=void 0),g&&(e?.removeListener("session_delete",g),g=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(e=>(0,c.b)(e))},async getProvider(){async function a(){let t=s.chains.map(e=>e.id);if(!t.length)return;let{EthereumProvider:i}=await Promise.all([n.e(5599),n.e(7717)]).then(n.bind(n,17717));return await i.init({...e,disableProviderPing:!0,optionalChains:t,projectId:e.projectId,rpcMap:Object.fromEntries(s.chains.map(e=>{let[t]=function(e){let{chain:t}=e,n=t.rpcUrls.default.http[0];if(!e.transports)return[n];let i=e.transports?.[t.id]?.({chain:t});return(i?.value?.transports||[i]).map(({value:e})=>e?.url||n)}({chain:e,transports:s.transports});return[e.id,t]})),showQrModal:e.showQrModal??!0})}return t||(i||(i=a()),t=await i,t?.events.setMaxListeners(1/0)),t},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{let[e,t]=await Promise.all([this.getAccounts(),this.getProvider()]);if(!e.length)return!1;if(await this.isChainsStale()&&t.session)return await t.disconnect().catch(()=>{}),!1;return!0}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:t}){let n=await this.getProvider();if(!n)throw new l.N;let i=s.chains.find(e=>e.id===t);if(!i)throw new o.ch(new r.nk);try{await Promise.all([new Promise(e=>{let n=({chainId:i})=>{i===t&&(s.emitter.off("change",n),e())};s.emitter.on("change",n)}),n.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,h.cK)(t)}]})]);let e=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...e,t]),i}catch(a){if(/(user rejected)/i.test(a.message))throw new o.vx(a);try{let a,s;a=e?.blockExplorerUrls?e.blockExplorerUrls:i.blockExplorers?.default.url?[i.blockExplorers?.default.url]:[],s=e?.rpcUrls?.length?e.rpcUrls:[...i.rpcUrls.default.http];let r={blockExplorerUrls:a,chainId:(0,h.cK)(t),chainName:e?.chainName??i.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??i.nativeCurrency,rpcUrls:s};await n.request({method:"wallet_addEthereumChain",params:[r]});let c=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...c,t]),i}catch(e){throw new o.vx(e)}}},onAccountsChanged(e){0===e.length?this.onDisconnect():s.emitter.emit("change",{accounts:e.map(e=>(0,c.b)(e))})},onChainChanged(e){let t=Number(e);s.emitter.emit("change",{chainId:t})},async onConnect(e){let t=Number(e.chainId),n=await this.getAccounts();s.emitter.emit("connect",{accounts:n,chainId:t})},async onDisconnect(e){this.setRequestedChainsIds([]),s.emitter.emit("disconnect");let t=await this.getProvider();a&&(t.removeListener("accountsChanged",a),a=void 0),d&&(t.removeListener("chainChanged",d),d=void 0),p&&(t.removeListener("disconnect",p),p=void 0),g&&(t.removeListener("session_delete",g),g=void 0),m||(m=this.onConnect.bind(this),t.on("connect",m))},onDisplayUri(e){s.emitter.emit("message",{type:"display_uri",data:e})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds:()=>t?t.session?.namespaces.eip155?.accounts?.map(e=>Number.parseInt(e.split(":")[1]||""))??[]:[],async getRequestedChainsIds(){return await s.storage?.getItem(this.requestedChainsStorageKey)??[]},async isChainsStale(){if(!v)return!1;let e=s.chains.map(e=>e.id),t=this.getNamespaceChainsIds();if(t.length&&!t.some(t=>e.includes(t)))return!1;let n=await this.getRequestedChainsIds();return!e.every(e=>n.includes(e))},async setRequestedChainsIds(e){await s.storage?.setItem(this.requestedChainsStorageKey,e)},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}}))}u.type="walletConnect";var m=n(31520);let w=(0,a.b)(),g=d((0,i._)({version:"4",appName:"SideShift.ai"},{})),p=m.i7?u({showQrModal:!n.g.IS_VITEST,projectId:m.i7}):void 0,v=n.g.IS_VITEST?{injected:w}:(0,i._)({coinbaseWallet:g},p?{walletConnect:p}:{});var C=n(84644),y=n(47634);let f=(0,C.Z)({chains:y.jI,multiInjectedProviderDiscovery:!0,ssr:!1,client:y.x4,connectors:Object.values(v)})}}]);

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.