@dodoex/wallet-web3 0.0.12-0 → 0.0.12-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{blocto-e7c2fffa.js → blocto-ece92390.js} +1 -1
- package/dist/cjs/{blocto-8692263a.cjs → blocto-a9b060cc.cjs} +1 -1
- package/dist/cjs/{index-083c9ae8.cjs → index-2540f88f.cjs} +1 -1
- package/dist/cjs/{index-7a0f19c2.cjs → index-60af0b6e.cjs} +1 -1
- package/dist/cjs/{index-70b1a747.cjs → index-d96a0849.cjs} +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{portis-676d66b4.cjs → portis-9eae679c.cjs} +1 -1
- package/dist/cjs/{provider-756f9bd9.cjs → provider-3e386201.cjs} +1 -1
- package/dist/cjs/{rainbow-a09900c4.cjs → rainbow-4f3f5c78.cjs} +1 -1
- package/dist/cjs/{uAuth-0fd50d2f.cjs → uAuth-6db4558d.cjs} +1 -1
- package/dist/cjs/{walletConnect-c080e418.cjs → walletConnect-cde84070.cjs} +1 -1
- package/dist/cjs/{walletLink-e53ab5f6.cjs → walletLink-a2962a3f.cjs} +1 -1
- package/dist/{index-74eef131.js → index-45a67762.js} +1 -1
- package/dist/{index-73e5bd29.js → index-89320c5d.js} +1 -1
- package/dist/{index-43869561.js → index-e5b084ed.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{portis-780f51cf.js → portis-f6a52b6b.js} +1 -1
- package/dist/{provider-e8a4dd31.js → provider-8b8d140e.js} +1 -1
- package/dist/{rainbow-39b40961.js → rainbow-d32de822.js} +1 -1
- package/dist/{uAuth-cd67bbca.js → uAuth-82052693.js} +1 -1
- package/dist/{walletConnect-5e542018.js → walletConnect-e0badd47.js} +1 -1
- package/dist/{walletLink-29765284.js → walletLink-98217059.js} +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,i as e}from"./index-
|
|
1
|
+
import{_ as t,i as e}from"./index-89320c5d.js";import r from"@uauth/js";import"@ethersproject/providers";import"zustand";import"@ethersproject/strings";import"@ethersproject/bytes";import"@ethersproject/constants";import"@ethersproject/contracts";import"@ethersproject/address";import"@ethersproject/properties";import"@ethersproject/transactions";import"@ethersproject/keccak256";let o,i=!1;function n(n,s){return t(this,void 0,void 0,(function*(){if(i)return;const{uAuthParams:t}=n;if(!(null==t?void 0:t.clientID))throw new Error("uAuthParams is not valid.");i=!0;try{const n=Object.assign(Object.assign({},t),{redirectUri:t.redirectUri||window.location.origin});let c,l;o=new r(n);try{c=yield o.user()}catch(t){if(!o.fallbackLoginOptions.scope.includes("wallet"))throw new Error('Must request the "wallet" scope for connector to work.');if(n.shouldLoginWithRedirect)throw yield o.login(),yield new Promise((()=>{})),new Error("Should never get here.");yield o.loginWithPopup(),c=yield o.user()}if(null==c.wallet_type_hint)throw new Error("no wallet type present");if(["web3","injected"].includes(c.wallet_type_hint))l=e(void 0,s);else{if("walletconnect"!==c.wallet_type_hint||!n.walletConnect)throw new Error("Connector not supported");l=n.walletConnect()}return i=!1,l}catch(t){i=!1}}))}function s(){return null==o?void 0:o.logout()}export{n as default,s as disconnectWallet};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t}from"./index-
|
|
1
|
+
import{_ as e,a as t}from"./index-89320c5d.js";import{EthereumProvider as o}from"@walletconnect/ethereum-provider";import"@ethersproject/providers";import"zustand";import"@ethersproject/strings";import"@ethersproject/bytes";import"@ethersproject/constants";import"@ethersproject/contracts";import"@ethersproject/address";import"@ethersproject/properties";import"@ethersproject/transactions";import"@ethersproject/keccak256";function r({chainId:r,rpcUrl:n,rpc:c,walletConnectParams:a,darkMode:s},i){return e(this,void 0,void 0,(function*(){let e,d,p="wss://relay.walletconnect.com",l=!0;a&&(p=a.bridge||p,l=void 0!==a.qrcode?a.qrcode:l,a.infuraId,d=a.qrModalOptions||void 0),c?e=c:r&&n&&(e={[r]:n});const h=yield o.init({projectId:"59e050d1f27ed617e65bb9637c9498d6",chains:r?[r]:[],showQrModal:!0,rpcMap:e,qrModalOptions:Object.assign({themeMode:s?"dark":"light"},d)});return h.on("display_uri",(e=>{(null==d?void 0:d.openCallback)&&d.openCallback(e)})),yield h.enable(),h.on("connect",i.connect),h.on("disconnect",(e=>{i.disconnect(e),i.accountsChanged([])})),h.on("accountsChanged",i.accountsChanged),h.on("chainChanged",i.chainChanged),h.on("message",(({type:e,data:t})=>i.message(e,t))),t(h)}))}export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,i as r,a as t}from"./index-
|
|
1
|
+
import{_ as e,i as r,a as t}from"./index-89320c5d.js";import o from"@coinbase/wallet-sdk";import"@ethersproject/providers";import"zustand";import"@ethersproject/strings";import"@ethersproject/bytes";import"@ethersproject/constants";import"@ethersproject/contracts";import"@ethersproject/address";import"@ethersproject/properties";import"@ethersproject/transactions";import"@ethersproject/keccak256";function n({chainId:n,rpcUrl:i,appName:s,appLogoUrl:a,darkMode:c},p){return e(this,void 0,void 0,(function*(){if(window.ethereum&&(window.ethereum.isWalletLink||window.ethereum.isToshi))return r(window.ethereum,p);if(!s)throw new Error("walletLink need appName");const e=new o({appName:s,appLogoUrl:a,darkMode:c}).makeWeb3Provider(i,n);return yield e.enable(),e.on("connect",p.connect),e.on("disconnect",p.disconnect),e.on("accountsChanged",p.accountsChanged),e.on("chainChanged",p.chainChanged),e.on("message",p.message),t(e)}))}export{n as default};
|
package/package.json
CHANGED