@web3auth/modal 9.7.0 → 10.0.0-alpha.1
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/lib.cjs/node_modules/style-inject/dist/style-inject.es.js +28 -0
- package/dist/lib.cjs/{config.js → packages/modal/src/config.js} +17 -29
- package/dist/lib.cjs/{index.js → packages/modal/src/index.js} +7 -0
- package/dist/lib.cjs/packages/modal/src/modalManager.js +376 -0
- package/dist/lib.cjs/packages/modal/src/react/Web3AuthProvider.js +15 -0
- package/dist/lib.cjs/packages/modal/src/react/context/Web3AuthInnerContext.js +199 -0
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3Auth.js +15 -0
- package/dist/lib.cjs/packages/modal/src/react/index.js +12 -0
- package/dist/lib.cjs/packages/modal/src/ui/assets/arrow-left-dark.svg.js +7 -0
- package/dist/lib.cjs/packages/modal/src/ui/assets/arrow-left-light.svg.js +7 -0
- package/dist/lib.cjs/packages/modal/src/ui/assets/x-dark.svg.js +7 -0
- package/dist/lib.cjs/packages/modal/src/ui/assets/x-light.svg.js +7 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/AdapterLoader.js +108 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/Button.js +34 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/styles.css.js +8 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletButton.js +44 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletConnect.js +67 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletDetails.js +34 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletHeader.js +46 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletInstall.js +167 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallets.js +273 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Footer.js +20 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Header.js +81 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Icon.js +73 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Image.js +51 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Loader.js +59 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Modal.js +244 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/SelfCustodyViaWeb3Auth.js +30 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/SocialLoginPasswordless.js +141 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/SocialLogins.js +148 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/WalletConnect.js +84 -0
- package/dist/lib.cjs/packages/modal/src/ui/config.js +17 -0
- package/dist/lib.cjs/packages/modal/src/ui/context/ThemeContext.js +9 -0
- package/dist/lib.cjs/packages/modal/src/ui/css/web3auth.css.js +8 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/dutch.json.js +84 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/english.json.js +84 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/french.json.js +82 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/german.json.js +84 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/japanese.json.js +84 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/korean.json.js +84 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/mandarin.json.js +84 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/portuguese.json.js +84 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/spanish.json.js +84 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/turkish.json.js +84 -0
- package/dist/lib.cjs/packages/modal/src/ui/interfaces.js +26 -0
- package/dist/lib.cjs/packages/modal/src/ui/localeImport.js +25 -0
- package/dist/lib.cjs/packages/modal/src/ui/loginModal.js +309 -0
- package/dist/lib.cjs/packages/modal/src/ui/utils.js +71 -0
- package/dist/lib.cjs/packages/modal/src/vue/Web3AuthProvider.js +208 -0
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3Auth.js +12 -0
- package/dist/lib.cjs/packages/modal/src/vue/index.js +9 -0
- package/dist/lib.esm/node_modules/style-inject/dist/style-inject.es.js +26 -0
- package/dist/lib.esm/{config.js → packages/modal/src/config.js} +12 -24
- package/dist/lib.esm/{index.js → packages/modal/src/index.js} +1 -0
- package/dist/lib.esm/packages/modal/src/modalManager.js +374 -0
- package/dist/lib.esm/packages/modal/src/react/Web3AuthProvider.js +13 -0
- package/dist/lib.esm/packages/modal/src/react/context/Web3AuthInnerContext.js +196 -0
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3Auth.js +13 -0
- package/dist/lib.esm/packages/modal/src/react/index.js +3 -0
- package/dist/lib.esm/packages/modal/src/ui/assets/arrow-left-dark.svg.js +5 -0
- package/dist/lib.esm/packages/modal/src/ui/assets/arrow-left-light.svg.js +5 -0
- package/dist/lib.esm/packages/modal/src/ui/assets/x-dark.svg.js +5 -0
- package/dist/lib.esm/packages/modal/src/ui/assets/x-light.svg.js +5 -0
- package/dist/lib.esm/packages/modal/src/ui/components/AdapterLoader.js +106 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Button/Button.js +32 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Button/styles.css.js +6 -0
- package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletButton.js +42 -0
- package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletConnect.js +65 -0
- package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletDetails.js +32 -0
- package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletHeader.js +44 -0
- package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletInstall.js +165 -0
- package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallets.js +271 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Footer.js +18 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Header.js +79 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Icon.js +71 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Image.js +49 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Loader.js +57 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Modal.js +242 -0
- package/dist/lib.esm/packages/modal/src/ui/components/SelfCustodyViaWeb3Auth.js +28 -0
- package/dist/lib.esm/packages/modal/src/ui/components/SocialLoginPasswordless.js +139 -0
- package/dist/lib.esm/packages/modal/src/ui/components/SocialLogins.js +146 -0
- package/dist/lib.esm/packages/modal/src/ui/components/WalletConnect.js +82 -0
- package/dist/lib.esm/packages/modal/src/ui/config.js +13 -0
- package/dist/lib.esm/packages/modal/src/ui/context/ThemeContext.js +7 -0
- package/dist/lib.esm/packages/modal/src/ui/css/web3auth.css.js +6 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/dutch.json.js +79 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/english.json.js +79 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/french.json.js +77 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/german.json.js +79 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/japanese.json.js +79 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/korean.json.js +79 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/mandarin.json.js +79 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/portuguese.json.js +79 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/spanish.json.js +79 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/turkish.json.js +79 -0
- package/dist/lib.esm/packages/modal/src/ui/interfaces.js +20 -0
- package/dist/lib.esm/packages/modal/src/ui/localeImport.js +23 -0
- package/dist/lib.esm/packages/modal/src/ui/loginModal.js +307 -0
- package/dist/lib.esm/packages/modal/src/ui/utils.js +65 -0
- package/dist/lib.esm/packages/modal/src/vue/Web3AuthProvider.js +206 -0
- package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3Auth.js +10 -0
- package/dist/lib.esm/packages/modal/src/vue/index.js +2 -0
- package/dist/modal.cjs.js +5676 -470
- package/dist/modal.umd.min.js +1 -1
- package/dist/modal.umd.min.js.LICENSE.txt +45 -0
- package/dist/types/config.d.ts +6 -6
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interface.d.ts +5 -5
- package/dist/types/modalManager.d.ts +11 -12
- package/dist/types/react/Web3AuthProvider.d.ts +3 -0
- package/dist/types/react/context/Web3AuthInnerContext.d.ts +4 -0
- package/dist/types/react/context/index.d.ts +1 -0
- package/dist/types/react/hooks/index.d.ts +1 -0
- package/dist/types/react/hooks/useWeb3Auth.d.ts +2 -0
- package/dist/types/react/index.d.ts +4 -0
- package/dist/types/react/interfaces.d.ts +18 -0
- package/dist/types/ui/components/AdapterLoader.d.ts +11 -0
- package/dist/types/ui/components/Button/Button.d.ts +16 -0
- package/dist/types/ui/components/Button/index.d.ts +1 -0
- package/dist/types/ui/components/ExternalWallet/ExternalWalletButton.d.ts +7 -0
- package/dist/types/ui/components/ExternalWallet/ExternalWalletConnect.d.ts +9 -0
- package/dist/types/ui/components/ExternalWallet/ExternalWalletDetails.d.ts +9 -0
- package/dist/types/ui/components/ExternalWallet/ExternalWalletHeader.d.ts +8 -0
- package/dist/types/ui/components/ExternalWallet/ExternalWalletInstall.d.ts +8 -0
- package/dist/types/ui/components/ExternalWallets.d.ts +17 -0
- package/dist/types/ui/components/Footer.d.ts +1 -0
- package/dist/types/ui/components/Header.d.ts +8 -0
- package/dist/types/ui/components/Icon.d.ts +9 -0
- package/dist/types/ui/components/Image.d.ts +12 -0
- package/dist/types/ui/components/Loader.d.ts +10 -0
- package/dist/types/ui/components/Modal.d.ts +16 -0
- package/dist/types/ui/components/SelfCustodyViaWeb3Auth.d.ts +1 -0
- package/dist/types/ui/components/SocialLoginPasswordless.d.ts +16 -0
- package/dist/types/ui/components/SocialLogins.d.ts +14 -0
- package/dist/types/ui/components/WalletConnect.d.ts +8 -0
- package/dist/types/ui/config.d.ts +4 -0
- package/dist/types/ui/context/ThemeContext.d.ts +3 -0
- package/dist/types/ui/helper/countryData.d.ts +7 -0
- package/dist/types/ui/i18n/index.d.ts +11 -0
- package/dist/types/ui/index.d.ts +4 -0
- package/dist/types/ui/interfaces.d.ts +102 -0
- package/dist/types/ui/localeImport.d.ts +3 -0
- package/dist/types/ui/loginModal.d.ts +27 -0
- package/dist/types/ui/utils.d.ts +12 -0
- package/dist/types/vue/Web3AuthProvider.d.ts +13 -0
- package/dist/types/vue/composables/index.d.ts +1 -0
- package/dist/types/vue/composables/useWeb3Auth.d.ts +2 -0
- package/dist/types/vue/index.d.ts +3 -0
- package/dist/types/vue/interfaces.d.ts +42 -0
- package/package.json +100 -43
- package/dist/lib.cjs/modalManager.js +0 -441
- package/dist/lib.esm/modalManager.js +0 -439
- package/dist/modal.esm.js +0 -513
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function styleInject(css, ref) {
|
|
4
|
+
if (ref === void 0) ref = {};
|
|
5
|
+
var insertAt = ref.insertAt;
|
|
6
|
+
if (!css || typeof document === 'undefined') {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
10
|
+
var style = document.createElement('style');
|
|
11
|
+
style.type = 'text/css';
|
|
12
|
+
if (insertAt === 'top') {
|
|
13
|
+
if (head.firstChild) {
|
|
14
|
+
head.insertBefore(style, head.firstChild);
|
|
15
|
+
} else {
|
|
16
|
+
head.appendChild(style);
|
|
17
|
+
}
|
|
18
|
+
} else {
|
|
19
|
+
head.appendChild(style);
|
|
20
|
+
}
|
|
21
|
+
if (style.styleSheet) {
|
|
22
|
+
style.styleSheet.cssText = css;
|
|
23
|
+
} else {
|
|
24
|
+
style.appendChild(document.createTextNode(css));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
module.exports = styleInject;
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var noModal = require('@web3auth/no-modal');
|
|
4
4
|
|
|
5
5
|
const defaultSolanaDappModalConfig = {
|
|
6
|
-
chainNamespace:
|
|
7
|
-
|
|
8
|
-
[
|
|
9
|
-
label: "Torus Wallet",
|
|
10
|
-
showOnModal: true,
|
|
11
|
-
showOnMobile: true,
|
|
12
|
-
showOnDesktop: true
|
|
13
|
-
},
|
|
14
|
-
[base.SOLANA_ADAPTERS.AUTH]: {
|
|
6
|
+
chainNamespace: noModal.CHAIN_NAMESPACES.SOLANA,
|
|
7
|
+
connectors: {
|
|
8
|
+
[noModal.SOLANA_CONNECTORS.AUTH]: {
|
|
15
9
|
label: "Auth",
|
|
16
10
|
showOnModal: true,
|
|
17
11
|
showOnMobile: true,
|
|
@@ -20,21 +14,15 @@ const defaultSolanaDappModalConfig = {
|
|
|
20
14
|
}
|
|
21
15
|
};
|
|
22
16
|
const defaultEvmDappModalConfig = {
|
|
23
|
-
chainNamespace:
|
|
24
|
-
|
|
25
|
-
[
|
|
26
|
-
label: "Torus Wallet",
|
|
27
|
-
showOnModal: true,
|
|
28
|
-
showOnMobile: true,
|
|
29
|
-
showOnDesktop: true
|
|
30
|
-
},
|
|
31
|
-
[base.EVM_ADAPTERS.AUTH]: {
|
|
17
|
+
chainNamespace: noModal.CHAIN_NAMESPACES.EIP155,
|
|
18
|
+
connectors: {
|
|
19
|
+
[noModal.EVM_CONNECTORS.AUTH]: {
|
|
32
20
|
label: "Auth",
|
|
33
21
|
showOnModal: true,
|
|
34
22
|
showOnMobile: true,
|
|
35
23
|
showOnDesktop: true
|
|
36
24
|
},
|
|
37
|
-
[
|
|
25
|
+
[noModal.EVM_CONNECTORS.WALLET_CONNECT_V2]: {
|
|
38
26
|
label: "Wallet Connect",
|
|
39
27
|
showOnModal: true,
|
|
40
28
|
showOnMobile: true,
|
|
@@ -43,9 +31,9 @@ const defaultEvmDappModalConfig = {
|
|
|
43
31
|
}
|
|
44
32
|
};
|
|
45
33
|
const defaultSolanaWalletModalConfig = {
|
|
46
|
-
chainNamespace:
|
|
47
|
-
|
|
48
|
-
[
|
|
34
|
+
chainNamespace: noModal.CHAIN_NAMESPACES.SOLANA,
|
|
35
|
+
connectors: {
|
|
36
|
+
[noModal.SOLANA_CONNECTORS.AUTH]: {
|
|
49
37
|
label: "Auth",
|
|
50
38
|
showOnModal: true,
|
|
51
39
|
showOnMobile: true,
|
|
@@ -54,9 +42,9 @@ const defaultSolanaWalletModalConfig = {
|
|
|
54
42
|
}
|
|
55
43
|
};
|
|
56
44
|
const defaultEvmWalletModalConfig = {
|
|
57
|
-
chainNamespace:
|
|
58
|
-
|
|
59
|
-
[
|
|
45
|
+
chainNamespace: noModal.CHAIN_NAMESPACES.EIP155,
|
|
46
|
+
connectors: {
|
|
47
|
+
[noModal.EVM_CONNECTORS.AUTH]: {
|
|
60
48
|
label: "Auth",
|
|
61
49
|
showOnModal: true,
|
|
62
50
|
showOnMobile: true,
|
|
@@ -65,9 +53,9 @@ const defaultEvmWalletModalConfig = {
|
|
|
65
53
|
}
|
|
66
54
|
};
|
|
67
55
|
const defaultOtherModalConfig = {
|
|
68
|
-
chainNamespace:
|
|
69
|
-
|
|
70
|
-
[
|
|
56
|
+
chainNamespace: noModal.CHAIN_NAMESPACES.OTHER,
|
|
57
|
+
connectors: {
|
|
58
|
+
[noModal.EVM_CONNECTORS.AUTH]: {
|
|
71
59
|
label: "Auth",
|
|
72
60
|
showOnModal: true,
|
|
73
61
|
showOnMobile: true,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var config = require('./config.js');
|
|
4
4
|
var modalManager = require('./modalManager.js');
|
|
5
|
+
var noModal = require('@web3auth/no-modal');
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
|
|
@@ -12,3 +13,9 @@ exports.defaultSolanaDappModalConfig = config.defaultSolanaDappModalConfig;
|
|
|
12
13
|
exports.defaultSolanaWalletModalConfig = config.defaultSolanaWalletModalConfig;
|
|
13
14
|
exports.walletRegistryUrl = config.walletRegistryUrl;
|
|
14
15
|
exports.Web3Auth = modalManager.Web3Auth;
|
|
16
|
+
Object.keys(noModal).forEach(function (k) {
|
|
17
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return noModal[k]; }
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
4
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
|
+
var noModal = require('@web3auth/no-modal');
|
|
6
|
+
var deepmerge = require('deepmerge');
|
|
7
|
+
var config = require('./config.js');
|
|
8
|
+
var config$1 = require('./ui/config.js');
|
|
9
|
+
var interfaces = require('./ui/interfaces.js');
|
|
10
|
+
var loginModal = require('./ui/loginModal.js');
|
|
11
|
+
var utils = require('./ui/utils.js');
|
|
12
|
+
|
|
13
|
+
class Web3Auth extends noModal.Web3AuthNoModal {
|
|
14
|
+
constructor(options) {
|
|
15
|
+
super(options);
|
|
16
|
+
_defineProperty(this, "loginModal", void 0);
|
|
17
|
+
_defineProperty(this, "options", void 0);
|
|
18
|
+
_defineProperty(this, "modalConfig", noModal.cloneDeep(config.defaultOtherModalConfig));
|
|
19
|
+
this.options = _objectSpread({}, options);
|
|
20
|
+
if (!this.options.uiConfig) this.options.uiConfig = {};
|
|
21
|
+
}
|
|
22
|
+
setModalConfig(modalConfig) {
|
|
23
|
+
super.checkInitRequirements();
|
|
24
|
+
this.modalConfig = modalConfig;
|
|
25
|
+
}
|
|
26
|
+
async initModal(params) {
|
|
27
|
+
super.checkInitRequirements();
|
|
28
|
+
super.initCachedConnectorAndChainId();
|
|
29
|
+
// get project config and wallet registry
|
|
30
|
+
const {
|
|
31
|
+
projectConfig,
|
|
32
|
+
walletRegistry
|
|
33
|
+
} = await this.getProjectAndWalletConfig(params);
|
|
34
|
+
this.options.uiConfig = deepmerge(noModal.cloneDeep(projectConfig.whitelabel || {}), this.options.uiConfig || {});
|
|
35
|
+
if (!this.options.uiConfig.defaultLanguage) this.options.uiConfig.defaultLanguage = utils.getUserLanguage(this.options.uiConfig.defaultLanguage);
|
|
36
|
+
if (!this.options.uiConfig.mode) this.options.uiConfig.mode = "light";
|
|
37
|
+
|
|
38
|
+
// init login modal
|
|
39
|
+
this.loginModal = new loginModal.LoginModal(_objectSpread(_objectSpread({}, this.options.uiConfig), {}, {
|
|
40
|
+
connectorListener: this,
|
|
41
|
+
chainNamespace: this.currentChain.chainNamespace,
|
|
42
|
+
walletRegistry
|
|
43
|
+
}));
|
|
44
|
+
this.subscribeToLoginModalEvents();
|
|
45
|
+
await this.loginModal.initModal();
|
|
46
|
+
|
|
47
|
+
// setup common JRPC provider
|
|
48
|
+
await this.setupCommonJRPCProvider();
|
|
49
|
+
|
|
50
|
+
// initialize connectors
|
|
51
|
+
this.on(noModal.CONNECTOR_EVENTS.CONNECTORS_UPDATED, ({
|
|
52
|
+
connectors: newConnectors
|
|
53
|
+
}) => this.initConnectors({
|
|
54
|
+
connectors: newConnectors,
|
|
55
|
+
projectConfig,
|
|
56
|
+
modalConfig: params
|
|
57
|
+
}));
|
|
58
|
+
await this.loadConnectors({
|
|
59
|
+
projectConfig
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// initialize plugins
|
|
63
|
+
await this.initPlugins();
|
|
64
|
+
}
|
|
65
|
+
async connect() {
|
|
66
|
+
if (!this.loginModal) throw noModal.WalletInitializationError.notReady("Login modal is not initialized");
|
|
67
|
+
// if already connected return provider
|
|
68
|
+
if (this.connectedConnectorName && this.status === noModal.CONNECTOR_STATUS.CONNECTED && this.provider) return this.provider;
|
|
69
|
+
this.loginModal.open();
|
|
70
|
+
return new Promise((resolve, reject) => {
|
|
71
|
+
this.once(noModal.CONNECTOR_EVENTS.CONNECTED, () => {
|
|
72
|
+
return resolve(this.provider);
|
|
73
|
+
});
|
|
74
|
+
this.once(noModal.CONNECTOR_EVENTS.ERRORED, err => {
|
|
75
|
+
return reject(err);
|
|
76
|
+
});
|
|
77
|
+
this.once(interfaces.LOGIN_MODAL_EVENTS.MODAL_VISIBILITY, visibility => {
|
|
78
|
+
// modal is closed but user is not connected to any wallet.
|
|
79
|
+
if (!visibility && this.status !== noModal.CONNECTOR_STATUS.CONNECTED) {
|
|
80
|
+
return reject(new Error("User closed the modal"));
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
async getProjectAndWalletConfig(params) {
|
|
86
|
+
// get project config
|
|
87
|
+
let projectConfig;
|
|
88
|
+
try {
|
|
89
|
+
var _this$options$account;
|
|
90
|
+
projectConfig = await noModal.fetchProjectConfig(this.options.clientId, this.options.web3AuthNetwork, (_this$options$account = this.options.accountAbstractionConfig) === null || _this$options$account === void 0 ? void 0 : _this$options$account.smartAccountType);
|
|
91
|
+
} catch (e) {
|
|
92
|
+
noModal.log.error("Failed to fetch project configurations", e);
|
|
93
|
+
throw noModal.WalletInitializationError.notReady("failed to fetch project configurations", e);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// get wallet registry
|
|
97
|
+
let walletRegistry = {
|
|
98
|
+
others: {},
|
|
99
|
+
default: {}
|
|
100
|
+
};
|
|
101
|
+
if (!(params !== null && params !== void 0 && params.hideWalletDiscovery)) {
|
|
102
|
+
try {
|
|
103
|
+
walletRegistry = await noModal.fetchWalletRegistry(config.walletRegistryUrl);
|
|
104
|
+
} catch (e) {
|
|
105
|
+
noModal.log.error("Failed to fetch wallet registry", e);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
projectConfig,
|
|
110
|
+
walletRegistry
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
async initConnectors({
|
|
114
|
+
connectors,
|
|
115
|
+
projectConfig,
|
|
116
|
+
modalConfig
|
|
117
|
+
}) {
|
|
118
|
+
// filter connectors based on config
|
|
119
|
+
const filteredConnectorNames = await this.filterConnectors(modalConfig, projectConfig);
|
|
120
|
+
|
|
121
|
+
// initialize connectors based on availability
|
|
122
|
+
const {
|
|
123
|
+
hasInAppConnectors,
|
|
124
|
+
hasExternalConnectors
|
|
125
|
+
} = await this.checkConnectorAvailability(filteredConnectorNames, modalConfig);
|
|
126
|
+
if (hasInAppConnectors) {
|
|
127
|
+
await this.initInAppAndCachedConnectors(connectors, filteredConnectorNames);
|
|
128
|
+
// show connect button if external wallets are available
|
|
129
|
+
if (hasExternalConnectors) this.loginModal.initExternalWalletContainer();
|
|
130
|
+
} else if (hasExternalConnectors) {
|
|
131
|
+
// if no in app wallet is available then initialize external wallets in modal
|
|
132
|
+
await this.initExternalConnectors(connectors, false, {
|
|
133
|
+
showExternalWalletsOnly: true
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// emit ready event if connector is ready
|
|
138
|
+
if (this.status === noModal.CONNECTOR_STATUS.NOT_READY) {
|
|
139
|
+
this.status = noModal.CONNECTOR_STATUS.READY;
|
|
140
|
+
this.emit(noModal.CONNECTOR_EVENTS.READY);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
async filterConnectors(params, projectConfig) {
|
|
144
|
+
// update auth connector config
|
|
145
|
+
const {
|
|
146
|
+
sms_otp_enabled: smsOtpEnabled
|
|
147
|
+
} = projectConfig;
|
|
148
|
+
if (smsOtpEnabled !== undefined) {
|
|
149
|
+
var _params, _params$modalConfig$W;
|
|
150
|
+
// TODO: use the new login config method
|
|
151
|
+
const connectorConfig = {
|
|
152
|
+
[noModal.WALLET_CONNECTORS.AUTH]: {
|
|
153
|
+
label: noModal.WALLET_CONNECTORS.AUTH,
|
|
154
|
+
loginMethods: {
|
|
155
|
+
[noModal.LOGIN_PROVIDER.SMS_PASSWORDLESS]: {
|
|
156
|
+
name: noModal.LOGIN_PROVIDER.SMS_PASSWORDLESS,
|
|
157
|
+
showOnModal: smsOtpEnabled,
|
|
158
|
+
showOnDesktop: smsOtpEnabled,
|
|
159
|
+
showOnMobile: smsOtpEnabled
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
if (!((_params = params) !== null && _params !== void 0 && _params.modalConfig)) params = {
|
|
165
|
+
modalConfig: {}
|
|
166
|
+
};
|
|
167
|
+
const localSmsOtpEnabled = (_params$modalConfig$W = params.modalConfig[noModal.WALLET_CONNECTORS.AUTH]) === null || _params$modalConfig$W === void 0 || (_params$modalConfig$W = _params$modalConfig$W.loginMethods) === null || _params$modalConfig$W === void 0 || (_params$modalConfig$W = _params$modalConfig$W[noModal.LOGIN_PROVIDER.SMS_PASSWORDLESS]) === null || _params$modalConfig$W === void 0 ? void 0 : _params$modalConfig$W.showOnModal;
|
|
168
|
+
if (localSmsOtpEnabled === true && smsOtpEnabled === false) {
|
|
169
|
+
throw noModal.WalletInitializationError.invalidParams("must enable sms otp on dashboard in order to utilise it");
|
|
170
|
+
}
|
|
171
|
+
params.modalConfig = deepmerge(connectorConfig, noModal.cloneDeep(params.modalConfig));
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// merge default connectors with the custom configured connectors.
|
|
175
|
+
const allConnectorNames = [...new Set([...Object.keys(this.modalConfig.connectors || {}), ...this.connectors.map(connector => connector.name)])];
|
|
176
|
+
const connectorConfigurationPromises = allConnectorNames.map(async connectorName => {
|
|
177
|
+
var _this$modalConfig$con, _params2, _this$modalConfig$con2, _this$modalConfig$con3;
|
|
178
|
+
// start with the default config of connector.
|
|
179
|
+
let connectorConfig = ((_this$modalConfig$con = this.modalConfig.connectors) === null || _this$modalConfig$con === void 0 ? void 0 : _this$modalConfig$con[connectorName]) || {
|
|
180
|
+
label: noModal.CONNECTOR_NAMES[connectorName] || connectorName.split("-").map(config$1.capitalizeFirstLetter).join(" "),
|
|
181
|
+
showOnModal: true,
|
|
182
|
+
showOnMobile: true,
|
|
183
|
+
showOnDesktop: true
|
|
184
|
+
};
|
|
185
|
+
// override the default config of connector if some config is being provided by the user.
|
|
186
|
+
if ((_params2 = params) !== null && _params2 !== void 0 && (_params2 = _params2.modalConfig) !== null && _params2 !== void 0 && _params2[connectorName]) {
|
|
187
|
+
connectorConfig = _objectSpread(_objectSpread({}, connectorConfig), params.modalConfig[connectorName]);
|
|
188
|
+
}
|
|
189
|
+
this.modalConfig.connectors[connectorName] = connectorConfig;
|
|
190
|
+
|
|
191
|
+
// check if connector is configured/added by user and exist in connectors map.
|
|
192
|
+
const connector = this.getConnector(connectorName);
|
|
193
|
+
noModal.log.debug("connector config", connectorName, (_this$modalConfig$con2 = this.modalConfig.connectors) === null || _this$modalConfig$con2 === void 0 ? void 0 : _this$modalConfig$con2[connectorName].showOnModal, connector);
|
|
194
|
+
|
|
195
|
+
// if connector is not custom configured then check if it is available in default connectors.
|
|
196
|
+
// and if connector is not hidden by user
|
|
197
|
+
if (!connector && (_this$modalConfig$con3 = this.modalConfig.connectors) !== null && _this$modalConfig$con3 !== void 0 && _this$modalConfig$con3[connectorName].showOnModal) {
|
|
198
|
+
throw noModal.WalletInitializationError.invalidParams(`Connector ${connectorName} is not configured`);
|
|
199
|
+
} else if ((connector === null || connector === void 0 ? void 0 : connector.type) === noModal.CONNECTOR_CATEGORY.IN_APP || (connector === null || connector === void 0 ? void 0 : connector.type) === noModal.CONNECTOR_CATEGORY.EXTERNAL || connectorName === this.cachedConnector) {
|
|
200
|
+
var _this$modalConfig$con4;
|
|
201
|
+
if (!((_this$modalConfig$con4 = this.modalConfig.connectors) !== null && _this$modalConfig$con4 !== void 0 && _this$modalConfig$con4[connectorName].showOnModal)) return;
|
|
202
|
+
if (connectorName === noModal.WALLET_CONNECTORS.WALLET_CONNECT_V2) {
|
|
203
|
+
const {
|
|
204
|
+
wallet_connect_enabled: walletConnectEnabled
|
|
205
|
+
} = projectConfig;
|
|
206
|
+
if (walletConnectEnabled === false) {
|
|
207
|
+
var _this$modalConfig$con5, _this$modalConfig$con6, _this$modalConfig$con7;
|
|
208
|
+
// override user specified config by hiding wallet connect
|
|
209
|
+
this.modalConfig.connectors = _objectSpread(_objectSpread({}, (_this$modalConfig$con5 = this.modalConfig.connectors) !== null && _this$modalConfig$con5 !== void 0 ? _this$modalConfig$con5 : {}), {}, {
|
|
210
|
+
[noModal.WALLET_CONNECTORS.WALLET_CONNECT_V2]: _objectSpread(_objectSpread({}, (_this$modalConfig$con6 = (_this$modalConfig$con7 = this.modalConfig.connectors) === null || _this$modalConfig$con7 === void 0 ? void 0 : _this$modalConfig$con7[noModal.WALLET_CONNECTORS.WALLET_CONNECT_V2]) !== null && _this$modalConfig$con6 !== void 0 ? _this$modalConfig$con6 : {}), {}, {
|
|
211
|
+
showOnModal: false
|
|
212
|
+
})
|
|
213
|
+
});
|
|
214
|
+
this.modalConfig.connectors[noModal.WALLET_CONNECTORS.WALLET_CONNECT_V2].showOnModal = false;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return connectorName;
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
const connectorNames = await Promise.all(connectorConfigurationPromises);
|
|
221
|
+
return connectorNames.filter(name => name !== undefined);
|
|
222
|
+
}
|
|
223
|
+
async checkConnectorAvailability(connectorNames, modalConfig) {
|
|
224
|
+
// currently all default in app and external wallets can be hidden or shown based on config.
|
|
225
|
+
// check if in app connectors are available
|
|
226
|
+
const hasInAppConnectors = this.connectors.some(connector => {
|
|
227
|
+
var _this$modalConfig$con8, _this$modalConfig$con9, _connector$name;
|
|
228
|
+
if (connector.type !== noModal.CONNECTOR_CATEGORY.IN_APP) return false;
|
|
229
|
+
if (((_this$modalConfig$con8 = this.modalConfig.connectors) === null || _this$modalConfig$con8 === void 0 || (_this$modalConfig$con8 = _this$modalConfig$con8[connector.name]) === null || _this$modalConfig$con8 === void 0 ? void 0 : _this$modalConfig$con8.showOnModal) !== true) return false;
|
|
230
|
+
if (!((_this$modalConfig$con9 = this.modalConfig.connectors) !== null && _this$modalConfig$con9 !== void 0 && (_this$modalConfig$con9 = _this$modalConfig$con9[connector.name]) !== null && _this$modalConfig$con9 !== void 0 && _this$modalConfig$con9.loginMethods)) return true;
|
|
231
|
+
const mergedLoginMethods = utils.getConnectorSocialLogins(connector.name, (_connector$name = this.modalConfig.connectors[connector.name]) === null || _connector$name === void 0 ? void 0 : _connector$name.loginMethods);
|
|
232
|
+
if (Object.values(mergedLoginMethods).some(method => method.showOnModal)) return true;
|
|
233
|
+
return false;
|
|
234
|
+
});
|
|
235
|
+
noModal.log.debug(hasInAppConnectors, this.connectors, connectorNames, "hasInAppWallets");
|
|
236
|
+
|
|
237
|
+
// check if external connectors are available
|
|
238
|
+
const hasExternalConnectors = connectorNames.some(connectorName => {
|
|
239
|
+
var _this$getConnector, _this$modalConfig$con10;
|
|
240
|
+
// if wallet connect connector is available but hideWalletDiscovery is true then don't consider it as external wallet
|
|
241
|
+
if (connectorName === noModal.WALLET_CONNECTORS.WALLET_CONNECT_V2 && modalConfig !== null && modalConfig !== void 0 && modalConfig.hideWalletDiscovery) return false;
|
|
242
|
+
return ((_this$getConnector = this.getConnector(connectorName)) === null || _this$getConnector === void 0 ? void 0 : _this$getConnector.type) === noModal.CONNECTOR_CATEGORY.EXTERNAL && ((_this$modalConfig$con10 = this.modalConfig.connectors) === null || _this$modalConfig$con10 === void 0 ? void 0 : _this$modalConfig$con10[connectorName].showOnModal);
|
|
243
|
+
});
|
|
244
|
+
return {
|
|
245
|
+
hasInAppConnectors,
|
|
246
|
+
hasExternalConnectors
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
async initInAppAndCachedConnectors(connectors, connectorNames) {
|
|
250
|
+
await Promise.all(connectorNames.map(async connectorName => {
|
|
251
|
+
const connector = connectors.find(x => x.name === connectorName);
|
|
252
|
+
if (!connector) return;
|
|
253
|
+
try {
|
|
254
|
+
// skip if connector is already initialized
|
|
255
|
+
if (connector.status !== noModal.CONNECTOR_STATUS.NOT_READY) return;
|
|
256
|
+
|
|
257
|
+
// only initialize a external connectors here if it is a cached connector.
|
|
258
|
+
if (this.cachedConnector !== connectorName && connector.type === noModal.CONNECTOR_CATEGORY.EXTERNAL) return;
|
|
259
|
+
|
|
260
|
+
// in-app wallets or cached wallet (being connected or already connected) are initialized first.
|
|
261
|
+
// if connector is configured then only initialize in app or cached connector.
|
|
262
|
+
// external wallets are initialized on INIT_EXTERNAL_WALLET event.
|
|
263
|
+
this.subscribeToConnectorEvents(connector);
|
|
264
|
+
const initialChain = this.getInitialChainIdForConnector(connector);
|
|
265
|
+
await connector.init({
|
|
266
|
+
autoConnect: this.cachedConnector === connectorName,
|
|
267
|
+
chainId: initialChain.chainId
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
// note: not adding cachedWallet to modal if it is external wallet.
|
|
271
|
+
// adding it later if no in-app wallets are available.
|
|
272
|
+
if (connector.type === noModal.CONNECTOR_CATEGORY.IN_APP) {
|
|
273
|
+
var _connectorName, _this$options$uiConfi, _this$options$uiConfi2, _this$options$uiConfi3;
|
|
274
|
+
noModal.log.info("connectorInitResults", connectorName);
|
|
275
|
+
const loginMethods = utils.getConnectorSocialLogins(connectorName, (_connectorName = this.modalConfig.connectors[connectorName]) === null || _connectorName === void 0 ? void 0 : _connectorName.loginMethods);
|
|
276
|
+
this.loginModal.addSocialLogins(connectorName, loginMethods, ((_this$options$uiConfi = this.options.uiConfig) === null || _this$options$uiConfi === void 0 ? void 0 : _this$options$uiConfi.loginMethodsOrder) || config$1.AUTH_PROVIDERS, _objectSpread(_objectSpread({}, this.options.uiConfig), {}, {
|
|
277
|
+
loginGridCol: ((_this$options$uiConfi2 = this.options.uiConfig) === null || _this$options$uiConfi2 === void 0 ? void 0 : _this$options$uiConfi2.loginGridCol) || 3,
|
|
278
|
+
primaryButton: ((_this$options$uiConfi3 = this.options.uiConfig) === null || _this$options$uiConfi3 === void 0 ? void 0 : _this$options$uiConfi3.primaryButton) || "socialLogin"
|
|
279
|
+
}));
|
|
280
|
+
}
|
|
281
|
+
} catch (error) {
|
|
282
|
+
noModal.log.error(error, "error while initializing connector ", connectorName);
|
|
283
|
+
}
|
|
284
|
+
}));
|
|
285
|
+
}
|
|
286
|
+
async initExternalConnectors(connectors, externalWalletsInitialized, options) {
|
|
287
|
+
if (externalWalletsInitialized) return;
|
|
288
|
+
const connectorsConfig = {};
|
|
289
|
+
// we do it like this because we don't want one slow connector to delay the load of the entire external wallet section.
|
|
290
|
+
connectors.forEach(async connector => {
|
|
291
|
+
const connectorName = connector.name;
|
|
292
|
+
if ((connector === null || connector === void 0 ? void 0 : connector.type) === noModal.CONNECTOR_CATEGORY.EXTERNAL) {
|
|
293
|
+
noModal.log.debug("init external wallet", this.cachedConnector, connectorName, connector.status);
|
|
294
|
+
this.subscribeToConnectorEvents(connector);
|
|
295
|
+
// we are not initializing cached connector here as it is already being initialized in initModal before.
|
|
296
|
+
if (this.cachedConnector === connectorName) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
if (connector.status === noModal.CONNECTOR_STATUS.NOT_READY) {
|
|
300
|
+
try {
|
|
301
|
+
const initialChain = this.getInitialChainIdForConnector(connector);
|
|
302
|
+
await connector.init({
|
|
303
|
+
autoConnect: this.cachedConnector === connectorName,
|
|
304
|
+
chainId: initialChain.chainId
|
|
305
|
+
});
|
|
306
|
+
const connectorModalConfig = this.modalConfig.connectors[connectorName];
|
|
307
|
+
connectorsConfig[connectorName] = _objectSpread(_objectSpread({}, connectorModalConfig), {}, {
|
|
308
|
+
isInjected: connector.isInjected
|
|
309
|
+
});
|
|
310
|
+
this.loginModal.addWalletLogins(connectorsConfig, {
|
|
311
|
+
showExternalWalletsOnly: !!(options !== null && options !== void 0 && options.showExternalWalletsOnly)
|
|
312
|
+
});
|
|
313
|
+
} catch (error) {
|
|
314
|
+
noModal.log.error(error, "error while initializing connector", connectorName);
|
|
315
|
+
}
|
|
316
|
+
} else if (connector.status === noModal.CONNECTOR_STATUS.READY || connector.status === noModal.CONNECTOR_STATUS.CONNECTING) {
|
|
317
|
+
// we use connecting status for wallet connect
|
|
318
|
+
const connectorModalConfig = this.modalConfig.connectors[connectorName];
|
|
319
|
+
connectorsConfig[connectorName] = _objectSpread(_objectSpread({}, connectorModalConfig), {}, {
|
|
320
|
+
isInjected: connector.isInjected
|
|
321
|
+
});
|
|
322
|
+
this.loginModal.addWalletLogins(connectorsConfig, {
|
|
323
|
+
showExternalWalletsOnly: !!(options !== null && options !== void 0 && options.showExternalWalletsOnly)
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
subscribeToLoginModalEvents() {
|
|
330
|
+
this.loginModal.on(interfaces.LOGIN_MODAL_EVENTS.LOGIN, async params => {
|
|
331
|
+
try {
|
|
332
|
+
await this.connectTo(params.connector, params.loginParams);
|
|
333
|
+
} catch (error) {
|
|
334
|
+
noModal.log.error(`Error while connecting to connector: ${params.connector}`, error);
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
this.loginModal.on(interfaces.LOGIN_MODAL_EVENTS.INIT_EXTERNAL_WALLETS, async params => {
|
|
338
|
+
await this.initExternalConnectors(this.connectors, params.externalWalletsInitialized);
|
|
339
|
+
});
|
|
340
|
+
this.loginModal.on(interfaces.LOGIN_MODAL_EVENTS.DISCONNECT, async () => {
|
|
341
|
+
try {
|
|
342
|
+
await this.logout();
|
|
343
|
+
} catch (error) {
|
|
344
|
+
noModal.log.error(`Error while disconnecting`, error);
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
this.loginModal.on(interfaces.LOGIN_MODAL_EVENTS.MODAL_VISIBILITY, async visibility => {
|
|
348
|
+
noModal.log.debug("is login modal visible", visibility);
|
|
349
|
+
this.emit(interfaces.LOGIN_MODAL_EVENTS.MODAL_VISIBILITY, visibility);
|
|
350
|
+
const wcConnector = this.getConnector(noModal.WALLET_CONNECTORS.WALLET_CONNECT_V2);
|
|
351
|
+
if (wcConnector) {
|
|
352
|
+
const walletConnectStatus = wcConnector === null || wcConnector === void 0 ? void 0 : wcConnector.status;
|
|
353
|
+
noModal.log.debug("trying refreshing wc session", visibility, walletConnectStatus);
|
|
354
|
+
if (visibility && (walletConnectStatus === noModal.CONNECTOR_STATUS.READY || walletConnectStatus === noModal.CONNECTOR_STATUS.CONNECTING)) {
|
|
355
|
+
noModal.log.debug("refreshing wc session");
|
|
356
|
+
|
|
357
|
+
// refreshing session for wallet connect whenever modal is opened.
|
|
358
|
+
try {
|
|
359
|
+
const initialChain = this.getInitialChainIdForConnector(wcConnector);
|
|
360
|
+
wcConnector.connect({
|
|
361
|
+
chainId: initialChain.chainId
|
|
362
|
+
});
|
|
363
|
+
} catch (error) {
|
|
364
|
+
noModal.log.error(`Error while disconnecting to wallet connect in core`, error);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
if (!visibility && this.status === noModal.CONNECTOR_STATUS.CONNECTED && (walletConnectStatus === noModal.CONNECTOR_STATUS.READY || walletConnectStatus === noModal.CONNECTOR_STATUS.CONNECTING)) {
|
|
368
|
+
noModal.log.debug("this stops wc connector from trying to reconnect once proposal expires");
|
|
369
|
+
wcConnector.status = noModal.CONNECTOR_STATUS.READY;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
exports.Web3Auth = Web3Auth;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var Web3AuthInnerContext = require('./context/Web3AuthInnerContext.js');
|
|
5
|
+
|
|
6
|
+
function Web3AuthProvider({
|
|
7
|
+
config,
|
|
8
|
+
children
|
|
9
|
+
}) {
|
|
10
|
+
return /*#__PURE__*/React.createElement(Web3AuthInnerContext.Web3AuthInnerProvider, {
|
|
11
|
+
config
|
|
12
|
+
}, children);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
exports.Web3AuthProvider = Web3AuthProvider;
|