PageSourceSearch

https://goatible.io/static/app/10803.e87495d5eabf0e030f08.js

js goatible.io collected 2026-10-06 21:35:43 UTC 3,053 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_rarible_int_whitelabel_app=self.webpackChunk_rarible_int_whitelabel_app||[]).push([[10803],{10803:(e,t,a)=>{a.r(t),a.d(t,{autoConnectInjectedWallet:()=>w,connectInjectedWallet:()=>l,getInjectedProvider:()=>m,isInjectedWallet:()=>u});var n=a(322802),r=a(76309),s=a(35279),i=a(296111),c=a(299063),o=a(998058),d=a(842599),h=a(481803);function u(e){return!!(0,d.injectedProvider)(e.id)}function m(e){const t=(0,d.injectedProvider)(e);if(!t)throw new Error(`No injected provider found for wallet: "${e}"`);return t}async function l(e,t,a){const n=m(e),i=(await n.request({method:"eth_requestAccounts"}))[0];if(!i)throw new Error("no accounts available");const c=(0,s.Kn)(i),d=await n.request({method:"eth_chainId"}).then(o.J);let h=t.chain&&t.chain.id===d?t.chain:(0,r.XY)(d);return t.chain&&t.chain.id!==d&&(await f(n,t.chain),h=t.chain),y(n,c,h,a)}async function w(e,t,a){const n=m(e),i=(await n.request({method:"eth_accounts"}))[0];if(!i)throw new Error("no accounts available");const c=(0,s.Kn)(i),d=await n.request({method:"eth_chainId"}).then(o.J);return y(n,c,a&&a.id===d?a:(0,r.XY)(d),t)}function p(e,t){const a={address:(0,s.Kn)(t),async sendTransaction(t){return{transactionHash:await e.request({method:"eth_sendTransaction",params:[{accessList:t.accessList,value:t.value?(0,i.eC)(t.value):void 0,gas:t.gas?(0,i.eC)(t.gas):void 0,from:this.address,to:t.to,data:t.data}]})}},async signMessage({message:t}){if(!a.address)throw new Error("Provider not setup");const n="string"==typeof t?(0,i.$G)(t):t.raw instanceof Uint8Array?(0,i.dg)(t.raw):t.raw;return await e.request({method:"personal_sign",params:[n,a.address]})},async signTypedData(t){if(!e||!a.address)throw new Error("Provider not setup");const r=(0,h.t)(t),{domain:s,message:i,primaryType:c}=r,o={EIP712Domain:(0,n.cj)({domain:s}),...r.types};(0,n.iC)({domain:s,message:i,primaryType:c,types:o});const d=(0,n.H6)({domain:s??{},message:i,primaryType:c,types:o});return await e.request({method:"eth_signTypedData_v4",params:[a.address,d]})},watchAsset:async t=>await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})};return a}async function y(e,t,a,n){const i=p(e,t);async function c(){!async function(){e.removeListener("accountsChanged",d),e.removeListener("chainChanged",h),e.removeListener("disconnect",c)}(),n.emit("disconnect",void 0)}function d(t){if(t[0]){const a=p(e,(0,s.Kn)(t[0]));n.emit("accountChanged",a),n.emit("accountsChanged",t)}else c()}function h(e){const t=(0,r.XY)((0,o.J)(e));n.emit("chainChanged",t)}return e.on&&(e.on("accountsChanged",d),e.on("chainChanged",h),e.on("disconnect",c)),[i,a,c,t=>f(e,t)]}async function f(e,t){const a=(0,i.eC)(t.id);try{await e.request({method:"wallet_switchEthereumChain",params:[{chainId:a}]})}catch(n){if(4902!==n?.code&&4902!==n?.data?.originalError?.code)throw n;{const n=await(0,r.ZN)(t);await e.request({method:"wallet_addEthereumChain",params:[{chainId:a,chainName:n.name,nativeCurrency:n.nativeCurrency,rpcUrls:(0,c.w)(n),blockExplorerUrls:n.explorers?.map((e=>e.url))}]})}}}}}]);

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.