@web3auth/no-modal 11.0.0-beta.2 → 11.0.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/account-linking/errors.js +111 -0
- package/dist/lib.cjs/account-linking/index.js +4 -0
- package/dist/lib.cjs/account-linking/rest.js +6 -6
- package/dist/lib.cjs/account-linking/vue.js +0 -1
- package/dist/lib.cjs/base/connector/constants.js +2 -0
- package/dist/lib.cjs/base/errors/index.js +21 -50
- package/dist/lib.cjs/base/utils.js +1 -1
- package/dist/lib.cjs/connectors/auth-connector/authConnector.js +47 -34
- package/dist/lib.cjs/connectors/base-evm-connector/baseEvmConnector.js +3 -2
- package/dist/lib.cjs/connectors/metamask-connector/metamaskConnector.js +40 -31
- package/dist/lib.cjs/index.js +21 -16
- package/dist/lib.cjs/noModal.js +29 -11
- package/dist/lib.cjs/providers/account-abstraction-provider/providers/AccountAbstractionProvider.js +20 -6
- package/dist/lib.cjs/providers/account-abstraction-provider/providers/utils.js +0 -17
- package/dist/lib.cjs/providers/account-abstraction-provider/rpc/ethRpcMiddlewares.js +15 -0
- package/dist/lib.cjs/react/context/useWeb3AuthInnerContextValue.js +11 -4
- package/dist/lib.cjs/react/wagmi/index.js +6 -0
- package/dist/lib.cjs/react/wagmi/provider.js +60 -41
- package/dist/lib.cjs/types/account-linking/errors.d.ts +17 -0
- package/dist/lib.cjs/types/account-linking/index.d.ts +1 -0
- package/dist/lib.cjs/types/base/connector/constants.d.ts +1 -0
- package/dist/lib.cjs/types/base/connector/interfaces.d.ts +1 -1
- package/dist/lib.cjs/types/base/errors/index.d.ts +2 -13
- package/dist/lib.cjs/types/connectors/auth-connector/authConnector.d.ts +2 -2
- package/dist/lib.cjs/types/providers/account-abstraction-provider/rpc/ethRpcMiddlewares.d.ts +1 -0
- package/dist/lib.cjs/types/react/wagmi/constants.d.ts +2 -0
- package/dist/lib.cjs/types/react/wagmi/provider.d.ts +7 -0
- package/dist/lib.cjs/types/vue/wagmi/constants.d.ts +2 -0
- package/dist/lib.cjs/types/vue/wagmi/provider.d.ts +7 -1
- package/dist/lib.cjs/vue/useWeb3AuthInnerContextValue.js +13 -6
- package/dist/lib.cjs/vue/wagmi/index.js +6 -0
- package/dist/lib.cjs/vue/wagmi/provider.js +53 -26
- package/dist/lib.esm/account-linking/errors.js +92 -0
- package/dist/lib.esm/account-linking/index.js +1 -0
- package/dist/lib.esm/account-linking/rest.js +3 -3
- package/dist/lib.esm/account-linking/vue.js +0 -1
- package/dist/lib.esm/base/connector/constants.js +2 -1
- package/dist/lib.esm/base/errors/index.js +21 -50
- package/dist/lib.esm/base/utils.js +1 -1
- package/dist/lib.esm/connectors/auth-connector/authConnector.js +29 -15
- package/dist/lib.esm/connectors/base-evm-connector/baseEvmConnector.js +3 -2
- package/dist/lib.esm/connectors/base-solana-connector/baseSolanaConnector.js +1 -1
- package/dist/lib.esm/connectors/metamask-connector/metamaskConnector.js +42 -33
- package/dist/lib.esm/index.js +3 -2
- package/dist/lib.esm/noModal.js +25 -5
- package/dist/lib.esm/providers/account-abstraction-provider/providers/AccountAbstractionProvider.js +22 -7
- package/dist/lib.esm/providers/account-abstraction-provider/providers/utils.js +0 -3
- package/dist/lib.esm/providers/account-abstraction-provider/rpc/ethRpcMiddlewares.js +17 -3
- package/dist/lib.esm/react/context/useWeb3AuthInnerContextValue.js +11 -4
- package/dist/lib.esm/react/wagmi/index.js +1 -1
- package/dist/lib.esm/react/wagmi/provider.js +59 -42
- package/dist/lib.esm/vue/useWeb3AuthInnerContextValue.js +11 -4
- package/dist/lib.esm/vue/wagmi/index.js +1 -1
- package/dist/lib.esm/vue/wagmi/provider.js +48 -25
- package/package.json +19 -19
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import { Web3AuthError } from '../base/errors/index.js';
|
|
3
|
+
|
|
4
|
+
class AccountLinkingError extends Web3AuthError {
|
|
5
|
+
constructor(code, message, cause) {
|
|
6
|
+
super(code, message, cause);
|
|
7
|
+
Object.defineProperty(this, "name", {
|
|
8
|
+
value: "AccountLinkingError",
|
|
9
|
+
configurable: true
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
static fromCode(code, extraMessage = "", cause) {
|
|
13
|
+
return new AccountLinkingError(code, `${AccountLinkingError.messages[code]}. ${extraMessage}`, cause);
|
|
14
|
+
}
|
|
15
|
+
static requestFailed(extraMessage = "", cause) {
|
|
16
|
+
return AccountLinkingError.fromCode(5401, extraMessage, cause);
|
|
17
|
+
}
|
|
18
|
+
static serverNotConfigured(extraMessage = "", cause) {
|
|
19
|
+
return AccountLinkingError.fromCode(5402, extraMessage, cause);
|
|
20
|
+
}
|
|
21
|
+
static primaryTokenNotAvailable(extraMessage = "", cause) {
|
|
22
|
+
return AccountLinkingError.fromCode(5403, extraMessage, cause);
|
|
23
|
+
}
|
|
24
|
+
static walletProofFailed(extraMessage = "", cause) {
|
|
25
|
+
return AccountLinkingError.fromCode(5404, extraMessage, cause);
|
|
26
|
+
}
|
|
27
|
+
static unsupportedConnector(extraMessage = "", cause) {
|
|
28
|
+
return AccountLinkingError.fromCode(5405, extraMessage, cause);
|
|
29
|
+
}
|
|
30
|
+
static cannotUnlinkActiveAccount() {
|
|
31
|
+
return AccountLinkingError.fromCode(5406);
|
|
32
|
+
}
|
|
33
|
+
static accountNotLinked(message = "", cause) {
|
|
34
|
+
return AccountLinkingError.fromCode(5407, message, cause);
|
|
35
|
+
}
|
|
36
|
+
static cannotUnlinkPrimaryAccount() {
|
|
37
|
+
return AccountLinkingError.fromCode(5408);
|
|
38
|
+
}
|
|
39
|
+
toString() {
|
|
40
|
+
return `[${this.code}] ${this.message}`;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
_defineProperty(AccountLinkingError, "messages", {
|
|
44
|
+
5000: "Custom",
|
|
45
|
+
5401: "Account linking request failed",
|
|
46
|
+
5402: "Citadel server URL is not configured",
|
|
47
|
+
5403: "Primary identity token is not available",
|
|
48
|
+
5404: "Failed to obtain wallet proof token",
|
|
49
|
+
5405: "Connector is not supported for wallet linking",
|
|
50
|
+
5406: "Cannot unlink active account",
|
|
51
|
+
5407: "Account not linked",
|
|
52
|
+
5408: "Cannot unlink primary account"
|
|
53
|
+
});
|
|
54
|
+
async function getAccountLinkingRequestError(error) {
|
|
55
|
+
if (error instanceof AccountLinkingError) {
|
|
56
|
+
return error;
|
|
57
|
+
}
|
|
58
|
+
if (error instanceof Response) {
|
|
59
|
+
if (error.status === 409) {
|
|
60
|
+
return AccountLinkingError.requestFailed("This wallet address is already registered on this dApp");
|
|
61
|
+
}
|
|
62
|
+
if (error.json && typeof error.json === "function") {
|
|
63
|
+
try {
|
|
64
|
+
var _json$message;
|
|
65
|
+
const json = await error.json();
|
|
66
|
+
return AccountLinkingError.requestFailed((_json$message = json.message) !== null && _json$message !== void 0 ? _json$message : "Failed to link account");
|
|
67
|
+
} catch {
|
|
68
|
+
// continue
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return AccountLinkingError.requestFailed(error instanceof Error ? error.message : JSON.stringify(error), error);
|
|
73
|
+
}
|
|
74
|
+
function formatAccountLinkingErrorMessage(error, fallbackMessage = "Unknown error during the operation.") {
|
|
75
|
+
if (error instanceof AccountLinkingError) {
|
|
76
|
+
return error.toString();
|
|
77
|
+
}
|
|
78
|
+
if (error instanceof Web3AuthError) {
|
|
79
|
+
return `[${error.code}] Account linking error: ${error.message || fallbackMessage}`;
|
|
80
|
+
}
|
|
81
|
+
if (error instanceof Error) {
|
|
82
|
+
return `Account linking error: ${error.message || fallbackMessage}`;
|
|
83
|
+
}
|
|
84
|
+
try {
|
|
85
|
+
const stringifiedError = JSON.stringify(error);
|
|
86
|
+
return stringifiedError;
|
|
87
|
+
} catch {
|
|
88
|
+
return fallbackMessage;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export { AccountLinkingError, formatAccountLinkingErrorMessage, getAccountLinkingRequestError };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { post } from '@toruslabs/http-helpers';
|
|
2
|
-
import { AccountLinkingError } from '
|
|
2
|
+
import { getAccountLinkingRequestError, AccountLinkingError } from './errors.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Send both identity proofs to the Citadel account-linking endpoint and
|
|
@@ -17,8 +17,8 @@ async function makeAccountLinkingRequest(authServerUrl, accessToken, payload) {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
} catch (cause) {
|
|
20
|
-
const
|
|
21
|
-
throw
|
|
20
|
+
const accountLinkingError = await getAccountLinkingRequestError(cause);
|
|
21
|
+
throw accountLinkingError;
|
|
22
22
|
}
|
|
23
23
|
if (!result.success) {
|
|
24
24
|
var _result$message;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
|
|
3
|
+
const WEB3AUTH_CONNECTOR_ID = "web3auth";
|
|
3
4
|
const CONNECTOR_STATUS = {
|
|
4
5
|
NOT_READY: "not_ready",
|
|
5
6
|
READY: "ready",
|
|
@@ -31,4 +32,4 @@ const CONNECTOR_INITIAL_AUTHENTICATION_MODE = {
|
|
|
31
32
|
CONNECT_AND_SIGN: "connect-and-sign"
|
|
32
33
|
};
|
|
33
34
|
|
|
34
|
-
export { CONNECTOR_CATEGORY, CONNECTOR_EVENTS, CONNECTOR_INITIAL_AUTHENTICATION_MODE, CONNECTOR_STATUS };
|
|
35
|
+
export { CONNECTOR_CATEGORY, CONNECTOR_EVENTS, CONNECTOR_INITIAL_AUTHENTICATION_MODE, CONNECTOR_STATUS, WEB3AUTH_CONNECTOR_ID };
|
|
@@ -188,7 +188,11 @@ class WalletOperationsError extends Web3AuthError {
|
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
190
|
static fromCode(code, extraMessage = "", cause) {
|
|
191
|
-
|
|
191
|
+
let message = WalletOperationsError.messages[code];
|
|
192
|
+
if (extraMessage) {
|
|
193
|
+
message = `${message}, ${extraMessage}`;
|
|
194
|
+
}
|
|
195
|
+
return new WalletOperationsError(code, message, cause);
|
|
192
196
|
}
|
|
193
197
|
|
|
194
198
|
// Custom methods
|
|
@@ -201,58 +205,16 @@ class WalletOperationsError extends Web3AuthError {
|
|
|
201
205
|
static chainNamespaceNotAllowed(extraMessage = "", cause) {
|
|
202
206
|
return WalletOperationsError.fromCode(5203, extraMessage, cause);
|
|
203
207
|
}
|
|
208
|
+
static userRejected(extraMessage = "", cause) {
|
|
209
|
+
return WalletOperationsError.fromCode(5204, extraMessage, cause);
|
|
210
|
+
}
|
|
204
211
|
}
|
|
205
212
|
_defineProperty(WalletOperationsError, "messages", {
|
|
206
213
|
5000: "Custom",
|
|
207
214
|
5201: "Provided chainId is not allowed",
|
|
208
|
-
5202: "This operation is not allowed"
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
constructor(code, message, cause) {
|
|
212
|
-
super(code, message, cause);
|
|
213
|
-
Object.defineProperty(this, "name", {
|
|
214
|
-
value: "AccountLinkingError",
|
|
215
|
-
configurable: true
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
static fromCode(code, extraMessage = "", cause) {
|
|
219
|
-
return new AccountLinkingError(code, `${AccountLinkingError.messages[code]}. ${extraMessage}`, cause);
|
|
220
|
-
}
|
|
221
|
-
static requestFailed(extraMessage = "", cause) {
|
|
222
|
-
return AccountLinkingError.fromCode(5401, extraMessage, cause);
|
|
223
|
-
}
|
|
224
|
-
static serverNotConfigured(extraMessage = "", cause) {
|
|
225
|
-
return AccountLinkingError.fromCode(5402, extraMessage, cause);
|
|
226
|
-
}
|
|
227
|
-
static primaryTokenNotAvailable(extraMessage = "", cause) {
|
|
228
|
-
return AccountLinkingError.fromCode(5403, extraMessage, cause);
|
|
229
|
-
}
|
|
230
|
-
static walletProofFailed(extraMessage = "", cause) {
|
|
231
|
-
return AccountLinkingError.fromCode(5404, extraMessage, cause);
|
|
232
|
-
}
|
|
233
|
-
static unsupportedConnector(extraMessage = "", cause) {
|
|
234
|
-
return AccountLinkingError.fromCode(5405, extraMessage, cause);
|
|
235
|
-
}
|
|
236
|
-
static cannotUnlinkActiveAccount() {
|
|
237
|
-
return AccountLinkingError.fromCode(5406);
|
|
238
|
-
}
|
|
239
|
-
static accountNotLinked(message = "", cause) {
|
|
240
|
-
return AccountLinkingError.fromCode(5407, message, cause);
|
|
241
|
-
}
|
|
242
|
-
static cannotUnlinkPrimaryAccount() {
|
|
243
|
-
return AccountLinkingError.fromCode(5408);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
_defineProperty(AccountLinkingError, "messages", {
|
|
247
|
-
5000: "Custom",
|
|
248
|
-
5401: "Account linking request failed",
|
|
249
|
-
5402: "Citadel server URL is not configured",
|
|
250
|
-
5403: "Primary identity token is not available",
|
|
251
|
-
5404: "Failed to obtain wallet proof token",
|
|
252
|
-
5405: "Connector is not supported for wallet linking",
|
|
253
|
-
5406: "Cannot unlink active account",
|
|
254
|
-
5407: "Account not linked",
|
|
255
|
-
5408: "Cannot unlink primary account"
|
|
215
|
+
5202: "This operation is not allowed",
|
|
216
|
+
5203: "Chain namespace is not allowed",
|
|
217
|
+
5204: "User rejected the request"
|
|
256
218
|
});
|
|
257
219
|
class WalletProviderError extends Web3AuthError {
|
|
258
220
|
constructor(code, message, cause) {
|
|
@@ -286,5 +248,14 @@ _defineProperty(WalletProviderError, "messages", {
|
|
|
286
248
|
5302: "'args.method' must be a non-empty string.",
|
|
287
249
|
5303: "'args.params' must be an object or array if provided."
|
|
288
250
|
});
|
|
251
|
+
function isUserRejectedError(error) {
|
|
252
|
+
if (error instanceof Web3AuthError && error.code === 5203) return true;
|
|
253
|
+
if (error instanceof Error) {
|
|
254
|
+
var _error$message;
|
|
255
|
+
const normalizedMessage = ((_error$message = error.message) === null || _error$message === void 0 ? void 0 : _error$message.toLowerCase()) || "";
|
|
256
|
+
return normalizedMessage.includes("user rejected the request");
|
|
257
|
+
}
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
289
260
|
|
|
290
|
-
export {
|
|
261
|
+
export { WalletInitializationError, WalletLoginError, WalletOperationsError, WalletProviderError, Web3AuthError, isUserRejectedError };
|
|
@@ -149,7 +149,7 @@ const getWalletServicesAnalyticsProperties = walletServicesConfig => {
|
|
|
149
149
|
ws_default_portfolio: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig10 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig10 === void 0 ? void 0 : _walletServicesConfig10.defaultPortfolio
|
|
150
150
|
};
|
|
151
151
|
};
|
|
152
|
-
const sdkVersion = "11.0.
|
|
152
|
+
const sdkVersion = "11.0.1";
|
|
153
153
|
const getErrorAnalyticsProperties = error => {
|
|
154
154
|
try {
|
|
155
155
|
const code = error instanceof Web3AuthError ? error.code : error === null || error === void 0 ? void 0 : error.code;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
|
+
import { CHAIN_NAMESPACES, getCaipChainId, cloneDeep } from '@toruslabs/base-controllers';
|
|
3
4
|
import { CITADEL_SERVER_MAP } from '@toruslabs/constants';
|
|
4
5
|
import { get, put } from '@toruslabs/http-helpers';
|
|
5
6
|
import { SecurePubSub } from '@toruslabs/secure-pub-sub';
|
|
6
7
|
import { BUILD_ENV, UX_MODE, Auth, SDK_MODE, SUPPORTED_KEY_CURVES, generateRecordId, version, createHandler, PopupHandler, getUserId } from '@web3auth/auth';
|
|
7
8
|
import { WS_EMBED_LOGIN_MODE } from '@web3auth/ws-embed';
|
|
8
9
|
import deepmerge from 'deepmerge';
|
|
9
|
-
import { numberToHex } from 'viem';
|
|
10
10
|
import { generateNonce, parseToken } from '../utils.js';
|
|
11
11
|
import { AuthSolanaWallet } from './authSolanaWallet.js';
|
|
12
|
-
import { WalletLoginError, WalletInitializationError, Web3AuthError
|
|
12
|
+
import { WalletLoginError, WalletInitializationError, Web3AuthError } from '../../base/errors/index.js';
|
|
13
13
|
import { WALLET_CONNECTORS } from '../../base/wallet/index.js';
|
|
14
14
|
import { BaseConnector } from '../../base/connector/baseConnector.js';
|
|
15
15
|
import { CONNECTOR_NAMESPACES } from '../../base/chain/IChainInterface.js';
|
|
@@ -18,8 +18,8 @@ import { CONNECTED_STATUSES } from '../../base/connector/connectorStatus.js';
|
|
|
18
18
|
import { log } from '../../base/loglevel.js';
|
|
19
19
|
import { Analytics, ANALYTICS_EVENTS } from '../../base/analytics.js';
|
|
20
20
|
import { citadelServerUrl, getErrorAnalyticsProperties, parseChainNamespaceFromCitadelResponse } from '../../base/utils.js';
|
|
21
|
+
import { AccountLinkingError } from '../../account-linking/errors.js';
|
|
21
22
|
import { makeAccountLinkingRequest, makeAccountUnlinkingRequest } from '../../account-linking/rest.js';
|
|
22
|
-
import { CHAIN_NAMESPACES, cloneDeep } from '@toruslabs/base-controllers';
|
|
23
23
|
|
|
24
24
|
// Auth connections that have been deprecated and are no longer supported by the SDK.
|
|
25
25
|
// Passing any of these as `authConnection` results in a hard error so consumers
|
|
@@ -312,6 +312,7 @@ class AuthConnector extends BaseConnector {
|
|
|
312
312
|
});
|
|
313
313
|
}
|
|
314
314
|
async getLinkedAccounts() {
|
|
315
|
+
var _citadelUserInfo$acco, _this$solanaWallet;
|
|
315
316
|
const accessToken = await this.authInstance.authSessionManager.getAccessToken();
|
|
316
317
|
if (!accessToken) throw WalletLoginError.connectionError("Could not obtain an access token from the current AUTH session.");
|
|
317
318
|
const citadelUserInfo = await get(`${citadelServerUrl(this.coreOptions.authBuildEnv)}/v1/user`, {
|
|
@@ -319,11 +320,28 @@ class AuthConnector extends BaseConnector {
|
|
|
319
320
|
Authorization: `Bearer ${accessToken}`
|
|
320
321
|
}
|
|
321
322
|
});
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
323
|
+
if (!(citadelUserInfo !== null && citadelUserInfo !== void 0 && (_citadelUserInfo$acco = citadelUserInfo.accounts) !== null && _citadelUserInfo$acco !== void 0 && _citadelUserInfo$acco.length)) return [];
|
|
324
|
+
const currentChainNamespace = ((_this$solanaWallet = this.solanaWallet) === null || _this$solanaWallet === void 0 ? void 0 : _this$solanaWallet.accounts.length) > 0 ? CHAIN_NAMESPACES.SOLANA : "evm"; // Note: citadel chain namespace is "evm" for EVM chains
|
|
325
|
+
const filteredLinkedAccounts = [];
|
|
326
|
+
for (const account of citadelUserInfo.accounts) {
|
|
327
|
+
const {
|
|
328
|
+
chainNamespace,
|
|
329
|
+
isPrimary,
|
|
330
|
+
accountType
|
|
331
|
+
} = account;
|
|
332
|
+
|
|
333
|
+
// for now, we will take all primary accounts as a **SINGLE** linked account
|
|
334
|
+
// we don't wanna populate the multiple primary accounts as different linked accounts
|
|
335
|
+
// so, we hide the primary accounts for other chain namespaces
|
|
336
|
+
// also, linked `account_abstraction` accounts are derived from the primary account, so we don't need to show them separately
|
|
337
|
+
// TODO: revisit this logic once we have a concrete plan for handling multiple primary accounts
|
|
338
|
+
if (isPrimary && chainNamespace && chainNamespace !== currentChainNamespace || accountType === "account_abstraction") continue;
|
|
339
|
+
filteredLinkedAccounts.push(_objectSpread(_objectSpread({}, account), {}, {
|
|
340
|
+
// by default, the primary account is the active account
|
|
341
|
+
active: isPrimary
|
|
342
|
+
}));
|
|
343
|
+
}
|
|
344
|
+
return filteredLinkedAccounts;
|
|
327
345
|
}
|
|
328
346
|
async switchChain(params, init = false) {
|
|
329
347
|
super.checkSwitchChainRequirements(params, init);
|
|
@@ -339,13 +357,11 @@ class AuthConnector extends BaseConnector {
|
|
|
339
357
|
if (newChainConfig.chainNamespace === CHAIN_NAMESPACES.SOLANA || newChainConfig.chainNamespace === CHAIN_NAMESPACES.EIP155) {
|
|
340
358
|
var _this$wsEmbedInstance;
|
|
341
359
|
if (!((_this$wsEmbedInstance = this.wsEmbedInstance) !== null && _this$wsEmbedInstance !== void 0 && _this$wsEmbedInstance.provider)) throw WalletInitializationError.notReady("Wallet embed is not ready");
|
|
342
|
-
const
|
|
343
|
-
// WsEmbed expects the chainId in hex format
|
|
344
|
-
const chainIdHex = numberToHex(chainIdNum);
|
|
360
|
+
const caipChainId = getCaipChainId(newChainConfig);
|
|
345
361
|
await this.wsEmbedInstance.provider.request({
|
|
346
362
|
method: "wallet_switchChain",
|
|
347
363
|
params: {
|
|
348
|
-
chainId:
|
|
364
|
+
chainId: caipChainId
|
|
349
365
|
}
|
|
350
366
|
});
|
|
351
367
|
} else {
|
|
@@ -460,9 +476,7 @@ class AuthConnector extends BaseConnector {
|
|
|
460
476
|
}
|
|
461
477
|
}
|
|
462
478
|
} catch (error) {
|
|
463
|
-
if (error instanceof
|
|
464
|
-
throw error;
|
|
465
|
-
}
|
|
479
|
+
if (error instanceof Web3AuthError) throw error;
|
|
466
480
|
throw AccountLinkingError.walletProofFailed(error instanceof Error ? error.message : String(error), error);
|
|
467
481
|
}
|
|
468
482
|
const trackData = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { signChallenge } from '@toruslabs/base-controllers';
|
|
2
2
|
import { bytesToHexPrefixedString, utf8ToBytes } from '@toruslabs/metadata-helpers';
|
|
3
3
|
import { EVM_METHOD_TYPES } from '@web3auth/ws-embed';
|
|
4
|
+
import { checksumAddress } from 'viem';
|
|
4
5
|
import { generateSiweNonce } from 'viem/siwe';
|
|
5
6
|
import { WalletLoginError, WalletInitializationError } from '../../base/errors/index.js';
|
|
6
7
|
import { citadelServerUrl } from '../../base/utils.js';
|
|
@@ -54,9 +55,9 @@ class BaseEvmConnector extends BaseConnector {
|
|
|
54
55
|
} = currentChainConfig;
|
|
55
56
|
const authServer = authServerUrl || citadelServerUrl(this.coreOptions.authBuildEnv);
|
|
56
57
|
const payload = {
|
|
57
|
-
domain: window.location.
|
|
58
|
+
domain: window.location.host,
|
|
58
59
|
uri: window.location.href,
|
|
59
|
-
address: accountsToUse[0],
|
|
60
|
+
address: checksumAddress(accountsToUse[0]),
|
|
60
61
|
chainId: parseInt(chainId, 16),
|
|
61
62
|
version: "1",
|
|
62
63
|
nonce: generateSiweNonce(),
|
|
@@ -2,9 +2,9 @@ import { CHAIN_NAMESPACES, signChallenge } from '@toruslabs/base-controllers';
|
|
|
2
2
|
import { generateSiweNonce } from 'viem/siwe';
|
|
3
3
|
import { WalletLoginError, WalletInitializationError } from '../../base/errors/index.js';
|
|
4
4
|
import { citadelServerUrl } from '../../base/utils.js';
|
|
5
|
-
import { getSolanaChainByChainConfig, walletSignMessage } from '../../base/wallet/solana.js';
|
|
6
5
|
import { BaseConnector } from '../../base/connector/baseConnector.js';
|
|
7
6
|
import { CONNECTOR_STATUS, CONNECTOR_EVENTS } from '../../base/connector/constants.js';
|
|
7
|
+
import { getSolanaChainByChainConfig, walletSignMessage } from '../../base/wallet/solana.js';
|
|
8
8
|
|
|
9
9
|
class BaseSolanaConnector extends BaseConnector {
|
|
10
10
|
async init(_) {}
|
|
@@ -12,11 +12,11 @@ import { getSiteName } from '../utils.js';
|
|
|
12
12
|
import { CONNECTOR_NAMESPACES } from '../../base/chain/IChainInterface.js';
|
|
13
13
|
import { WALLET_CONNECTORS } from '../../base/wallet/index.js';
|
|
14
14
|
import { getCaipChainId, citadelServerUrl } from '../../base/utils.js';
|
|
15
|
-
import { WalletLoginError, Web3AuthError } from '../../base/errors/index.js';
|
|
15
|
+
import { WalletLoginError, isUserRejectedError, WalletOperationsError, Web3AuthError } from '../../base/errors/index.js';
|
|
16
16
|
import { ANALYTICS_EVENTS } from '../../base/analytics.js';
|
|
17
|
+
import { getSolanaChainByChainConfig, walletSignMessage } from '../../base/wallet/solana.js';
|
|
17
18
|
import { BaseConnector } from '../../base/connector/baseConnector.js';
|
|
18
19
|
import { CONNECTOR_CATEGORY, CONNECTOR_STATUS, CONNECTOR_EVENTS } from '../../base/connector/constants.js';
|
|
19
|
-
import { getSolanaChainByChainConfig, walletSignMessage } from '../../base/wallet/solana.js';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Configuration options for the MetaMask connector using \@metamask/connect-evm
|
|
@@ -113,7 +113,11 @@ class MetaMaskConnector extends BaseConnector {
|
|
|
113
113
|
supportedNetworks: caipSupportedNetworks
|
|
114
114
|
},
|
|
115
115
|
ui,
|
|
116
|
-
debug: (_this$connectorSettin0 = this.connectorSettings) === null || _this$connectorSettin0 === void 0 ? void 0 : _this$connectorSettin0.debug
|
|
116
|
+
debug: (_this$connectorSettin0 = this.connectorSettings) === null || _this$connectorSettin0 === void 0 ? void 0 : _this$connectorSettin0.debug,
|
|
117
|
+
analytics: {
|
|
118
|
+
integrationType: "web3auth",
|
|
119
|
+
enabled: !this.coreOptions.disableAnalytics
|
|
120
|
+
}
|
|
117
121
|
});
|
|
118
122
|
|
|
119
123
|
// Listen for QR code URI from the multichain client (for mobile wallet connection)
|
|
@@ -133,19 +137,27 @@ class MetaMaskConnector extends BaseConnector {
|
|
|
133
137
|
dapp,
|
|
134
138
|
eventHandlers: {
|
|
135
139
|
accountsChanged: _accounts => {
|
|
136
|
-
if (_accounts.length === 0) {
|
|
140
|
+
if (_accounts.length === 0 && this.connected) {
|
|
137
141
|
this.disconnect();
|
|
138
142
|
}
|
|
139
143
|
},
|
|
140
144
|
chainChanged: _chainId => {},
|
|
141
145
|
connect: _result => {},
|
|
142
|
-
disconnect: () =>
|
|
146
|
+
disconnect: () => {
|
|
147
|
+
if (this.connected) {
|
|
148
|
+
this.disconnect();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
143
151
|
},
|
|
144
152
|
api: {
|
|
145
153
|
supportedNetworks: hexSupportedNetworks
|
|
146
154
|
},
|
|
147
155
|
ui,
|
|
148
|
-
debug: (_this$connectorSettin1 = this.connectorSettings) === null || _this$connectorSettin1 === void 0 ? void 0 : _this$connectorSettin1.debug
|
|
156
|
+
debug: (_this$connectorSettin1 = this.connectorSettings) === null || _this$connectorSettin1 === void 0 ? void 0 : _this$connectorSettin1.debug,
|
|
157
|
+
analytics: {
|
|
158
|
+
integrationType: "web3auth",
|
|
159
|
+
enabled: !this.coreOptions.disableAnalytics
|
|
160
|
+
}
|
|
149
161
|
});
|
|
150
162
|
this.evmProvider = this.evmClient.getProvider();
|
|
151
163
|
}
|
|
@@ -157,7 +169,11 @@ class MetaMaskConnector extends BaseConnector {
|
|
|
157
169
|
api: {
|
|
158
170
|
supportedNetworks: solanaSupportedNetworks
|
|
159
171
|
},
|
|
160
|
-
skipAutoRegister: true
|
|
172
|
+
skipAutoRegister: true,
|
|
173
|
+
analytics: {
|
|
174
|
+
integrationType: "web3auth",
|
|
175
|
+
enabled: !this.coreOptions.disableAnalytics
|
|
176
|
+
}
|
|
161
177
|
});
|
|
162
178
|
this.solanaProvider = this.solanaClient.getWallet();
|
|
163
179
|
}
|
|
@@ -172,32 +188,20 @@ class MetaMaskConnector extends BaseConnector {
|
|
|
172
188
|
return;
|
|
173
189
|
}
|
|
174
190
|
const coreStatus = this.multichainClient.status;
|
|
175
|
-
if (
|
|
191
|
+
// only connect if the multichain client is connected and autoConnect is true (i.e during the rehydration)
|
|
192
|
+
if (coreStatus === "connected" && options.autoConnect) {
|
|
176
193
|
this.status = CONNECTOR_STATUS.CONNECTED;
|
|
177
194
|
this.rehydrated = true;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
await this.getAuthTokenInfo();
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
} else if (coreStatus === "loaded" || coreStatus === "disconnected") {
|
|
190
|
-
this.status = CONNECTOR_STATUS.READY;
|
|
191
|
-
this.emit(CONNECTOR_EVENTS.READY, WALLET_CONNECTORS.METAMASK);
|
|
192
|
-
} else if (coreStatus === "pending") {
|
|
193
|
-
// 'pending' implies that a transport failed to resume the connection
|
|
194
|
-
// if (options.autoConnect) {
|
|
195
|
-
// this.rehydrated = false;
|
|
196
|
-
// this.emit(CONNECTOR_EVENTS.REHYDRATION_ERROR, new Error("Failed to resume existing MetaMask Connect session.") as Web3AuthError);
|
|
197
|
-
// } else {
|
|
195
|
+
this.emit(CONNECTOR_EVENTS.CONNECTED, {
|
|
196
|
+
connectorName: WALLET_CONNECTORS.METAMASK,
|
|
197
|
+
reconnected: true,
|
|
198
|
+
ethereumProvider: this.evmProvider,
|
|
199
|
+
solanaWallet: this.solanaProvider
|
|
200
|
+
});
|
|
201
|
+
if (options.getAuthTokenInfo) await this.getAuthTokenInfo();
|
|
202
|
+
} else if (coreStatus === "connected" || coreStatus === "loaded" || coreStatus === "disconnected" || coreStatus === "pending") {
|
|
198
203
|
this.status = CONNECTOR_STATUS.READY;
|
|
199
204
|
this.emit(CONNECTOR_EVENTS.READY, WALLET_CONNECTORS.METAMASK);
|
|
200
|
-
// }
|
|
201
205
|
} else {
|
|
202
206
|
// Something unexpected happened
|
|
203
207
|
this.status = CONNECTOR_STATUS.ERRORED;
|
|
@@ -234,11 +238,15 @@ class MetaMaskConnector extends BaseConnector {
|
|
|
234
238
|
connector: WALLET_CONNECTORS.METAMASK
|
|
235
239
|
});
|
|
236
240
|
const evmConnectedPromise = new Promise(resolve => {
|
|
237
|
-
|
|
238
|
-
// Wait for EVM provider to be ready
|
|
239
|
-
(_this$evmProvider = this.evmProvider) === null || _this$evmProvider === void 0 || _this$evmProvider.once("connect", () => {
|
|
241
|
+
if (this.evmClient.status === "connected") {
|
|
240
242
|
resolve();
|
|
241
|
-
}
|
|
243
|
+
} else {
|
|
244
|
+
var _this$evmProvider;
|
|
245
|
+
// Wait for EVM provider to be ready
|
|
246
|
+
(_this$evmProvider = this.evmProvider) === null || _this$evmProvider === void 0 || _this$evmProvider.once("connect", () => {
|
|
247
|
+
resolve();
|
|
248
|
+
});
|
|
249
|
+
}
|
|
242
250
|
});
|
|
243
251
|
|
|
244
252
|
// Connect using the multichain client
|
|
@@ -308,6 +316,7 @@ class MetaMaskConnector extends BaseConnector {
|
|
|
308
316
|
duration: Date.now() - startTime
|
|
309
317
|
}));
|
|
310
318
|
}
|
|
319
|
+
if (isUserRejectedError(error)) throw WalletOperationsError.userRejected();
|
|
311
320
|
if (error instanceof Web3AuthError) throw error;
|
|
312
321
|
throw WalletLoginError.connectionError("Failed to login with MetaMask wallet", error);
|
|
313
322
|
}
|
package/dist/lib.esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Web3AuthNoModal } from './noModal.js';
|
|
2
2
|
export { ANALYTICS_EVENTS, ANALYTICS_INTEGRATION_TYPE, ANALYTICS_SDK_TYPE, Analytics } from './base/analytics.js';
|
|
3
3
|
export { AUTH_CONNECTION, MFA_FACTOR, MFA_LEVELS, UX_MODE, WEB3AUTH_NETWORK, getED25519Key } from '@web3auth/auth';
|
|
4
|
-
export { AccountLinkingError,
|
|
4
|
+
export { AccountLinkingError, formatAccountLinkingErrorMessage, getAccountLinkingRequestError } from './account-linking/errors.js';
|
|
5
5
|
export { BUTTON_POSITION, CONFIRMATION_STRATEGY } from '@web3auth/ws-embed';
|
|
6
6
|
export { BaseConnector } from './base/connector/baseConnector.js';
|
|
7
7
|
export { BaseEvmConnector } from './connectors/base-evm-connector/baseEvmConnector.js';
|
|
@@ -10,7 +10,7 @@ export { BaseSolanaConnector } from './connectors/base-solana-connector/baseSola
|
|
|
10
10
|
export { BiconomySmartAccount, KernelSmartAccount, MetamaskSmartAccount, NexusSmartAccount, SMART_ACCOUNT, SafeSmartAccount, TrustSmartAccount } from '@toruslabs/ethereum-controllers';
|
|
11
11
|
export { CAN_AUTHORIZE_STATUSES, CAN_LOGOUT_STATUSES, CONNECTED_STATUSES } from './base/connector/connectorStatus.js';
|
|
12
12
|
export { CHAIN_NAMESPACES, cloneDeep } from '@toruslabs/base-controllers';
|
|
13
|
-
export { CONNECTOR_CATEGORY, CONNECTOR_EVENTS, CONNECTOR_INITIAL_AUTHENTICATION_MODE, CONNECTOR_STATUS } from './base/connector/constants.js';
|
|
13
|
+
export { CONNECTOR_CATEGORY, CONNECTOR_EVENTS, CONNECTOR_INITIAL_AUTHENTICATION_MODE, CONNECTOR_STATUS, WEB3AUTH_CONNECTOR_ID } from './base/connector/constants.js';
|
|
14
14
|
export { CONNECTOR_NAMES, EVM_CONNECTORS, MULTI_CHAIN_CONNECTORS, SOLANA_CONNECTORS, WALLET_CONNECTORS, WEB3AUTH_ICON } from './base/wallet/index.js';
|
|
15
15
|
export { CONNECTOR_NAMESPACES } from './base/chain/IChainInterface.js';
|
|
16
16
|
export { CommonJRPCProvider } from './providers/base-provider/CommonJRPCProvider.js';
|
|
@@ -21,6 +21,7 @@ export { EIP_7702_SUPPORTED_SMART_ACCOUNTS, LOGIN_MODE, MODAL_SIGN_IN_METHODS, S
|
|
|
21
21
|
export { EVM_PLUGINS, PLUGIN_EVENTS, PLUGIN_NAMESPACES, PLUGIN_STATUS, SOLANA_PLUGINS, WALLET_PLUGINS } from './base/plugin/IPlugin.js';
|
|
22
22
|
export { PROVIDER_EVENTS } from './base/provider/IProvider.js';
|
|
23
23
|
export { WalletConnectV2Provider } from './connectors/wallet-connect-v2-connector/WalletConnectV2Provider.js';
|
|
24
|
+
export { WalletInitializationError, WalletLoginError, WalletOperationsError, WalletProviderError, Web3AuthError, isUserRejectedError } from './base/errors/index.js';
|
|
24
25
|
export { WalletServicesPluginError } from './base/plugin/errors.js';
|
|
25
26
|
export { Web3AuthContextKey } from './base/composables/index.js';
|
|
26
27
|
export { accountAbstractionProvider, toEoaProvider } from './providers/account-abstraction-provider/providers/AccountAbstractionProvider.js';
|
package/dist/lib.esm/noModal.js
CHANGED
|
@@ -3,11 +3,11 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
4
|
import { CHAIN_NAMESPACES, BUTTON_POSITION, CONFIRMATION_STRATEGY } from '@toruslabs/base-controllers';
|
|
5
5
|
import { SMART_ACCOUNT_EIP_STANDARD, EIP7702_SUPPORTED_SMART_ACCOUNT_TYPES } from '@toruslabs/ethereum-controllers';
|
|
6
|
-
import { SafeEventEmitter, serializeError, UX_MODE, cloneDeep, CookieStorage, LocalStorageAdapter, MemoryStorage } from '@web3auth/auth';
|
|
6
|
+
import { SafeEventEmitter, BUILD_ENV, serializeError, UX_MODE, cloneDeep, CookieStorage, LocalStorageAdapter, MemoryStorage } from '@web3auth/auth';
|
|
7
7
|
import deepmerge from 'deepmerge';
|
|
8
8
|
import { deserialize } from './base/deserialize.js';
|
|
9
|
-
import { WalletInitializationError, WalletLoginError, AccountLinkingError } from './base/errors/index.js';
|
|
10
9
|
import { LOGIN_MODE, SMART_ACCOUNT_WALLET_SCOPE, WEB3AUTH_STATE_STORAGE_KEY } from './base/constants.js';
|
|
10
|
+
import { WalletInitializationError, WalletLoginError } from './base/errors/index.js';
|
|
11
11
|
import { log } from './base/loglevel.js';
|
|
12
12
|
import { CONNECTOR_STATUS, CONNECTOR_INITIAL_AUTHENTICATION_MODE, CONNECTOR_EVENTS } from './base/connector/constants.js';
|
|
13
13
|
import { Analytics, ANALYTICS_INTEGRATION_TYPE, ANALYTICS_SDK_TYPE, ANALYTICS_EVENTS } from './base/analytics.js';
|
|
@@ -16,6 +16,7 @@ import { WALLET_CONNECTORS } from './base/wallet/index.js';
|
|
|
16
16
|
import { CONNECTOR_NAMESPACES } from './base/chain/IChainInterface.js';
|
|
17
17
|
import { CONNECTED_STATUSES, CAN_LOGOUT_STATUSES, CAN_AUTHORIZE_STATUSES } from './base/connector/connectorStatus.js';
|
|
18
18
|
import { assertAuthConnector, authConnector, isAuthConnector } from './connectors/auth-connector/authConnector.js';
|
|
19
|
+
import { AccountLinkingError } from './account-linking/errors.js';
|
|
19
20
|
import { CommonJRPCProvider } from './providers/base-provider/CommonJRPCProvider.js';
|
|
20
21
|
import { walletServicesPlugin } from './plugins/wallet-services-plugin/plugin.js';
|
|
21
22
|
import { metaMaskConnector } from './connectors/metamask-connector/metamaskConnector.js';
|
|
@@ -54,7 +55,9 @@ class Web3AuthNoModal extends SafeEventEmitter {
|
|
|
54
55
|
if (!options.clientId) throw WalletInitializationError.invalidParams("Please provide a valid clientId in constructor");
|
|
55
56
|
if (options.enableLogging) log.enableAll();else log.setLevel("error");
|
|
56
57
|
if (!options.initialAuthenticationMode) options.initialAuthenticationMode = CONNECTOR_INITIAL_AUTHENTICATION_MODE.CONNECT_AND_SIGN;
|
|
57
|
-
this.coreOptions = options
|
|
58
|
+
this.coreOptions = _objectSpread(_objectSpread({}, options), {}, {
|
|
59
|
+
authBuildEnv: options.authBuildEnv || BUILD_ENV.PRODUCTION
|
|
60
|
+
});
|
|
58
61
|
this.storage = this.getStorageMethod();
|
|
59
62
|
this.analytics = new Analytics();
|
|
60
63
|
if (options.disableAnalytics) {
|
|
@@ -952,7 +955,8 @@ class Web3AuthNoModal extends SafeEventEmitter {
|
|
|
952
955
|
activeAccount,
|
|
953
956
|
currentChainId
|
|
954
957
|
} = this.state;
|
|
955
|
-
|
|
958
|
+
let rehydrateWithLinkedAccount = false;
|
|
959
|
+
// for rehydration, if the active account is not the primary account, i.e. not `null`, create an isolated connector and connect to the chain
|
|
956
960
|
if (activeAccount && !activeAccount.isPrimary && activeAccount.connector !== WALLET_CONNECTORS.AUTH) {
|
|
957
961
|
var _ref3, _walletConnector$prov, _linkedAccountConnect, _ref4, _walletConnector$sola, _linkedAccountConnect2;
|
|
958
962
|
const accountLinkingConnector = isAuthConnector(connector) ? connector : this.getConnector(WALLET_CONNECTORS.AUTH);
|
|
@@ -977,6 +981,7 @@ class Web3AuthNoModal extends SafeEventEmitter {
|
|
|
977
981
|
});
|
|
978
982
|
this.setConnectedWalletConnectorState(connectedWalletState, activeAccount);
|
|
979
983
|
this.setActiveWalletConnectorKey(activeAccount);
|
|
984
|
+
rehydrateWithLinkedAccount = true;
|
|
980
985
|
}
|
|
981
986
|
if (ethereumProvider) {
|
|
982
987
|
await this.bindPrimaryEthereumSigningProxy(ethereumProvider, data.connectorName);
|
|
@@ -1014,12 +1019,19 @@ class Web3AuthNoModal extends SafeEventEmitter {
|
|
|
1014
1019
|
connector: data.connectorName
|
|
1015
1020
|
}));
|
|
1016
1021
|
}
|
|
1022
|
+
|
|
1017
1023
|
// `pendingUserConsent` signals listeners (LoginModal, React/Vue contexts) to skip processing this CONNECTED event,
|
|
1018
1024
|
// so the upcoming AUTHORIZED -> CONSENT_REQUIRING transition is not overridden by a late CONNECTED handler in CONNECT_AND_SIGN mode.
|
|
1019
1025
|
this.emit(CONNECTOR_EVENTS.CONNECTED, _objectSpread(_objectSpread({}, data), {}, {
|
|
1020
1026
|
loginMode: this.loginMode,
|
|
1021
1027
|
pendingUserConsent
|
|
1022
1028
|
}));
|
|
1029
|
+
|
|
1030
|
+
// if we're rehydrating with a linked account, we need to emit a CONNECTION_UPDATED event
|
|
1031
|
+
// so that upstream listeners and context are updated with the linked connection.
|
|
1032
|
+
if (rehydrateWithLinkedAccount) {
|
|
1033
|
+
this.emit(CONNECTOR_EVENTS.CONNECTION_UPDATED, this.connection);
|
|
1034
|
+
}
|
|
1023
1035
|
}
|
|
1024
1036
|
});
|
|
1025
1037
|
connector.on(CONNECTOR_EVENTS.DISCONNECTED, async data => {
|
|
@@ -1239,7 +1251,15 @@ class Web3AuthNoModal extends SafeEventEmitter {
|
|
|
1239
1251
|
return activeChainId;
|
|
1240
1252
|
}
|
|
1241
1253
|
async createLinkingWalletConnector(connectorName, chainId, config) {
|
|
1242
|
-
|
|
1254
|
+
try {
|
|
1255
|
+
const linkingConnector = await this.createIsolatedWalletConnector(connectorName, chainId, config);
|
|
1256
|
+
return linkingConnector;
|
|
1257
|
+
} catch (error) {
|
|
1258
|
+
if (error instanceof AccountLinkingError && error.code === 5405) {
|
|
1259
|
+
throw error;
|
|
1260
|
+
}
|
|
1261
|
+
throw AccountLinkingError.walletProofFailed(error instanceof Error ? error.message : String(error), error);
|
|
1262
|
+
}
|
|
1243
1263
|
}
|
|
1244
1264
|
async createSwitchingWalletConnector(connectorName, chainId, config) {
|
|
1245
1265
|
return this.createIsolatedWalletConnector(connectorName, chainId, config);
|