@web3auth/no-modal 10.14.1 → 10.16.0
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/base/analytics.js +4 -1
- package/dist/lib.cjs/base/utils.js +1 -1
- package/dist/lib.cjs/connectors/wallet-connect-v2-connector/WalletConnectV2Provider.js +1 -0
- package/dist/lib.cjs/connectors/wallet-connect-v2-connector/walletConnectV2Utils.js +20 -0
- package/dist/lib.cjs/index.js +63 -63
- package/dist/lib.cjs/noModal.js +3 -0
- package/dist/lib.cjs/providers/ethereum-mpc-provider/providers/signingProviders/EthereumSigningProvider.js +1 -0
- package/dist/lib.cjs/providers/ethereum-provider/rpc/ethRpcMiddlewares.js +10 -2
- package/dist/lib.cjs/providers/ethereum-provider/rpc/walletMidddleware.js +82 -2
- package/dist/lib.cjs/types/base/core/IWeb3Auth.d.ts +5 -0
- package/dist/lib.cjs/types/providers/ethereum-provider/rpc/interfaces.d.ts +6 -0
- package/dist/lib.cjs/types/providers/ethereum-provider/rpc/walletMidddleware.d.ts +1 -1
- package/dist/lib.esm/base/analytics.js +4 -1
- package/dist/lib.esm/base/utils.js +1 -1
- package/dist/lib.esm/connectors/injected-evm-connector/index.js +6 -1
- package/dist/lib.esm/connectors/injected-solana-connector/index.js +3 -2
- package/dist/lib.esm/connectors/wallet-connect-v2-connector/index.js +5 -1
- package/dist/lib.esm/connectors/wallet-connect-v2-connector/walletConnectV2Utils.js +20 -0
- package/dist/lib.esm/index.js +36 -36
- package/dist/lib.esm/noModal.js +3 -0
- package/dist/lib.esm/providers/account-abstraction-provider/index.js +5 -1
- package/dist/lib.esm/providers/base-provider/index.js +5 -1
- package/dist/lib.esm/providers/ethereum-provider/rpc/ethRpcMiddlewares.js +11 -3
- package/dist/lib.esm/providers/ethereum-provider/rpc/walletMidddleware.js +83 -2
- package/dist/lib.esm/react/context/WalletServicesInnerContext.js +1 -1
- package/dist/lib.esm/vue/index.js +1 -1
- package/dist/noModal.umd.min.js +1 -1
- package/dist/noModal.umd.min.js.LICENSE.txt +0 -4
- package/package.json +4 -4
package/dist/lib.esm/index.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
export { Web3AuthNoModal } from './noModal.js';
|
|
2
|
-
export { cookieToWeb3AuthState } from './base/cookie.js';
|
|
3
2
|
export { ANALYTICS_EVENTS, ANALYTICS_INTEGRATION_TYPE, ANALYTICS_SDK_TYPE, Analytics } from './base/analytics.js';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export { Web3AuthContextKey } from './base/composables/index.js';
|
|
3
|
+
export { AUTH_CONNECTION, MFA_FACTOR, MFA_LEVELS, UX_MODE, WEB3AUTH_NETWORK, getED25519Key } from '@web3auth/auth';
|
|
4
|
+
export { BUTTON_POSITION, CONFIRMATION_STRATEGY } from '@web3auth/ws-embed';
|
|
7
5
|
export { BaseConnector } from './base/connector/baseConnector.js';
|
|
6
|
+
export { BaseEvmConnector } from './connectors/base-evm-connector/baseEvmConnector.js';
|
|
7
|
+
export { BaseProvider } from './providers/base-provider/baseProvider.js';
|
|
8
|
+
export { BaseSolanaConnector } from './connectors/base-solana-connector/baseSolanaConnector.js';
|
|
9
|
+
export { BiconomySmartAccount, KernelSmartAccount, MetamaskSmartAccount, NexusSmartAccount, SMART_ACCOUNT, SafeSmartAccount, TrustSmartAccount } from '@toruslabs/ethereum-controllers';
|
|
8
10
|
export { CAN_AUTHORIZE_STATUSES, CONNECTED_STATUSES } from './base/connector/connectorStatus.js';
|
|
11
|
+
export { CHAIN_NAMESPACES, cloneDeep } from '@toruslabs/base-controllers';
|
|
9
12
|
export { CONNECTOR_CATEGORY, CONNECTOR_EVENTS, CONNECTOR_INITIAL_AUTHENTICATION_MODE, CONNECTOR_STATUS } from './base/connector/constants.js';
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
13
|
+
export { CONNECTOR_NAMES, EVM_CONNECTORS, MULTI_CHAIN_CONNECTORS, SOLANA_CONNECTORS, WALLET_CONNECTORS } from './base/wallet/index.js';
|
|
14
|
+
export { CONNECTOR_NAMESPACES } from './base/chain/IChainInterface.js';
|
|
15
|
+
export { CommonJRPCProvider } from './providers/base-provider/CommonJRPCProvider.js';
|
|
16
|
+
export { CommonPrivateKeyProvider } from './providers/base-provider/commonPrivateKeyProvider.js';
|
|
17
|
+
export { DEFAULT_EIP155_METHODS, DEFAULT_EIP_155_EVENTS, DEFAULT_SOLANA_EVENTS, DEFAULT_SOLANA_METHODS, getNamespacesFromChains, getRequiredNamespaces, getSupportedEventsByNamespace, getSupportedMethodsByNamespace, getWalletConnectV2Settings } from './connectors/wallet-connect-v2-connector/config.js';
|
|
18
|
+
export { EIP1193_EVENTS, createRandomId } from './providers/base-provider/utils.js';
|
|
19
|
+
export { EIP1559APIEndpoint, GAS_ESTIMATE_TYPES, LegacyGasAPIEndpoint, TRANSACTION_ENVELOPE_TYPES, TRANSACTION_TYPES } from './providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/constants.js';
|
|
20
|
+
export { EVM_PLUGINS, PLUGIN_EVENTS, PLUGIN_NAMESPACES, PLUGIN_STATUS, SOLANA_PLUGINS, WALLET_PLUGINS } from './base/plugin/IPlugin.js';
|
|
12
21
|
export { LOGIN_MODE, MODAL_SIGN_IN_METHODS, SMART_ACCOUNT_WALLET_SCOPE, SOLANA_CAIP_CHAIN_MAP, WALLET_REGISTRY_URL, WEB3AUTH_STATE_STORAGE_KEY, WIDGET_TYPE } from './base/constants.js';
|
|
22
|
+
export { PROVIDER_EVENTS } from './base/provider/IProvider.js';
|
|
23
|
+
export { SignTypedDataVersion } from './providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/interfaces.js';
|
|
24
|
+
export { SolanaWallet } from './providers/solana-provider/solanaWallet.js';
|
|
25
|
+
export { TransactionFormatter } from './providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/formatter.js';
|
|
26
|
+
export { WalletConnectV2Provider } from './connectors/wallet-connect-v2-connector/WalletConnectV2Provider.js';
|
|
13
27
|
export { WalletInitializationError, WalletLoginError, WalletOperationsError, WalletProviderError, Web3AuthError } from './base/errors/index.js';
|
|
14
|
-
export { log } from './base/loglevel.js';
|
|
15
28
|
export { WalletServicesPluginError } from './base/plugin/errors.js';
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export { CONNECTOR_NAMES, EVM_CONNECTORS, MULTI_CHAIN_CONNECTORS, SOLANA_CONNECTORS, WALLET_CONNECTORS } from './base/wallet/index.js';
|
|
29
|
+
export { WalletStandardProvider } from './providers/solana-provider/providers/injectedProviders/walletStandardProvider.js';
|
|
30
|
+
export { Web3AuthContextKey } from './base/composables/index.js';
|
|
31
|
+
export { accountAbstractionProvider, toEoaProvider } from './providers/account-abstraction-provider/providers/AccountAbstractionProvider.js';
|
|
20
32
|
export { authConnector } from './connectors/auth-connector/authConnector.js';
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
33
|
+
export { checkIfTokenIsExpired, clearToken, getSavedToken, saveToken, storageAvailable } from './base/connector/utils.js';
|
|
34
|
+
export { cookieToWeb3AuthState } from './base/cookie.js';
|
|
35
|
+
export { createConfigMiddleware, createSolanaChainIdMiddleware, createSolanaJsonRpcClient, createSolanaProviderConfigMiddleware } from './providers/solana-provider/rpc/JrpcClient.js';
|
|
36
|
+
export { createEthChainIdMiddleware, createEthJsonRpcClient, createEthProviderConfigMiddleware } from './providers/ethereum-provider/rpc/jrpcClient.js';
|
|
37
|
+
export { createEthChainSwitchMiddleware, createEthMiddleware } from './providers/ethereum-provider/rpc/ethRpcMiddlewares.js';
|
|
38
|
+
export { createGenericJRPCMiddleware, createGetAccountsMiddleware, createGetPublicKeyMiddleware, createRequestAccountsMiddleware, createSolanaAccountMiddleware, createSolanaChainSwitchMiddleware, createSolanaMiddleware } from './providers/solana-provider/rpc/solanaRpcMiddlewares.js';
|
|
24
39
|
export { createStore as createMipd } from 'mipd';
|
|
25
40
|
export { getWallets as createSolanaMipd } from '@wallet-standard/app';
|
|
41
|
+
export { createWalletMiddleware } from './providers/ethereum-provider/rpc/walletMidddleware.js';
|
|
42
|
+
export { fetchEip1159GasEstimates, fetchLegacyGasPriceEstimates, normalizeGWEIDecimalNumbers, validateAddress, validateTypedSignMessageDataV4 } from './providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/utils.js';
|
|
43
|
+
export { fetchProjectConfig, fetchWalletRegistry, fromViemChain, fromWagmiChain, getAaAnalyticsProperties, getCaipChainId, getErrorAnalyticsProperties, getHostname, getWalletServicesAnalyticsProperties, getWhitelabelAnalyticsProperties, isBrowser, isHexStrict, normalizeWalletName, sdkVersion, signerHost, withAbort } from './base/utils.js';
|
|
44
|
+
export { getSolanaChainByChainConfig } from './providers/solana-provider/providers/injectedProviders/utils.js';
|
|
26
45
|
export { hasSolanaWalletStandardFeatures } from './connectors/injected-solana-connector/index.js';
|
|
27
|
-
export {
|
|
46
|
+
export { injectedEvmConnector } from './connectors/injected-evm-connector/injectedEvmConnector.js';
|
|
47
|
+
export { log } from './base/loglevel.js';
|
|
28
48
|
export { metaMaskConnector } from './connectors/metamask-connector/metamaskConnector.js';
|
|
29
|
-
export { DEFAULT_EIP155_METHODS, DEFAULT_EIP_155_EVENTS, DEFAULT_SOLANA_EVENTS, DEFAULT_SOLANA_METHODS, getNamespacesFromChains, getRequiredNamespaces, getSupportedEventsByNamespace, getSupportedMethodsByNamespace, getWalletConnectV2Settings } from './connectors/wallet-connect-v2-connector/config.js';
|
|
30
49
|
export { walletConnectV2Connector } from './connectors/wallet-connect-v2-connector/walletConnectV2Connector.js';
|
|
31
|
-
export { WalletConnectV2Provider } from './connectors/wallet-connect-v2-connector/WalletConnectV2Provider.js';
|
|
32
|
-
export { BUTTON_POSITION, CONFIRMATION_STRATEGY } from '@web3auth/ws-embed';
|
|
33
50
|
export { walletServicesPlugin } from './plugins/wallet-services-plugin/plugin.js';
|
|
34
|
-
export {
|
|
35
|
-
export { BiconomySmartAccount, KernelSmartAccount, MetamaskSmartAccount, NexusSmartAccount, SMART_ACCOUNT, SafeSmartAccount, TrustSmartAccount } from '@toruslabs/ethereum-controllers';
|
|
36
|
-
export { BaseProvider } from './providers/base-provider/baseProvider.js';
|
|
37
|
-
export { CommonJRPCProvider } from './providers/base-provider/CommonJRPCProvider.js';
|
|
38
|
-
export { CommonPrivateKeyProvider } from './providers/base-provider/commonPrivateKeyProvider.js';
|
|
39
|
-
export { EIP1193_EVENTS, createRandomId } from './providers/base-provider/utils.js';
|
|
40
|
-
export { EIP1559APIEndpoint, GAS_ESTIMATE_TYPES, LegacyGasAPIEndpoint, TRANSACTION_ENVELOPE_TYPES, TRANSACTION_TYPES } from './providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/constants.js';
|
|
41
|
-
export { TransactionFormatter } from './providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/formatter.js';
|
|
42
|
-
export { SignTypedDataVersion } from './providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/interfaces.js';
|
|
43
|
-
export { fetchEip1159GasEstimates, fetchLegacyGasPriceEstimates, normalizeGWEIDecimalNumbers, validateAddress, validateTypedSignMessageDataV4 } from './providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/utils.js';
|
|
44
|
-
export { createEthChainSwitchMiddleware, createEthMiddleware } from './providers/ethereum-provider/rpc/ethRpcMiddlewares.js';
|
|
45
|
-
export { createEthChainIdMiddleware, createEthJsonRpcClient, createEthProviderConfigMiddleware } from './providers/ethereum-provider/rpc/jrpcClient.js';
|
|
46
|
-
export { createWalletMiddleware } from './providers/ethereum-provider/rpc/walletMidddleware.js';
|
|
47
|
-
export { getSolanaChainByChainConfig } from './providers/solana-provider/providers/injectedProviders/utils.js';
|
|
48
|
-
export { WalletStandardProvider } from './providers/solana-provider/providers/injectedProviders/walletStandardProvider.js';
|
|
49
|
-
export { createConfigMiddleware, createSolanaChainIdMiddleware, createSolanaJsonRpcClient, createSolanaProviderConfigMiddleware } from './providers/solana-provider/rpc/JrpcClient.js';
|
|
50
|
-
export { createGenericJRPCMiddleware, createGetAccountsMiddleware, createGetPublicKeyMiddleware, createRequestAccountsMiddleware, createSolanaAccountMiddleware, createSolanaChainSwitchMiddleware, createSolanaMiddleware } from './providers/solana-provider/rpc/solanaRpcMiddlewares.js';
|
|
51
|
-
export { SolanaWallet } from './providers/solana-provider/solanaWallet.js';
|
|
51
|
+
export { walletStandardConnector } from './connectors/injected-solana-connector/walletStandardConnector.js';
|
package/dist/lib.esm/noModal.js
CHANGED
|
@@ -47,6 +47,9 @@ class Web3AuthNoModal extends SafeEventEmitter {
|
|
|
47
47
|
this.coreOptions = options;
|
|
48
48
|
this.storage = this.getStorageMethod();
|
|
49
49
|
this.analytics = new Analytics();
|
|
50
|
+
if (options.disableAnalytics) {
|
|
51
|
+
this.analytics.disable();
|
|
52
|
+
}
|
|
50
53
|
this.analytics.setGlobalProperties({
|
|
51
54
|
integration_type: ANALYTICS_INTEGRATION_TYPE.NATIVE_SDK
|
|
52
55
|
});
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { toEoaProvider, accountAbstractionProvider } from './providers/AccountAbstractionProvider.js';
|
|
2
2
|
export { BiconomySmartAccount, KernelSmartAccount, MetamaskSmartAccount, NexusSmartAccount, SMART_ACCOUNT, SafeSmartAccount, TrustSmartAccount } from '@toruslabs/ethereum-controllers';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export { accountAbstractionProvider, toEoaProvider };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { BaseProvider } from './baseProvider.js';
|
|
2
2
|
export { CommonJRPCProvider } from './CommonJRPCProvider.js';
|
|
3
|
-
|
|
3
|
+
import { CommonPrivateKeyProvider } from './commonPrivateKeyProvider.js';
|
|
4
4
|
export { EIP1193_EVENTS, createRandomId } from './utils.js';
|
|
5
5
|
export { getED25519Key } from '@web3auth/auth';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export { CommonPrivateKeyProvider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createScaffoldMiddleware, createAsyncMiddleware, mergeMiddleware, rpcErrors } from '@web3auth/auth';
|
|
2
2
|
import { createWalletMiddleware } from './walletMidddleware.js';
|
|
3
3
|
|
|
4
4
|
function createEthMiddleware(providerHandlers) {
|
|
@@ -10,7 +10,11 @@ function createEthMiddleware(providerHandlers) {
|
|
|
10
10
|
processSignTransaction,
|
|
11
11
|
processEthSignMessage,
|
|
12
12
|
processTypedMessageV4,
|
|
13
|
-
processPersonalMessage
|
|
13
|
+
processPersonalMessage,
|
|
14
|
+
processGetCapabilities,
|
|
15
|
+
processSendCalls,
|
|
16
|
+
processGetCallsStatus,
|
|
17
|
+
processShowCallsStatus
|
|
14
18
|
} = providerHandlers;
|
|
15
19
|
const ethMiddleware = mergeMiddleware([createScaffoldMiddleware({
|
|
16
20
|
eth_syncing: false
|
|
@@ -22,7 +26,11 @@ function createEthMiddleware(providerHandlers) {
|
|
|
22
26
|
processEthSignMessage,
|
|
23
27
|
processSignTransaction,
|
|
24
28
|
processTypedMessageV4,
|
|
25
|
-
processPersonalMessage
|
|
29
|
+
processPersonalMessage,
|
|
30
|
+
processGetCapabilities,
|
|
31
|
+
processSendCalls,
|
|
32
|
+
processGetCallsStatus,
|
|
33
|
+
processShowCallsStatus
|
|
26
34
|
})]);
|
|
27
35
|
return ethMiddleware;
|
|
28
36
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import { createScaffoldMiddleware, createAsyncMiddleware, rpcErrors } from '@web3auth/auth';
|
|
3
|
+
import { isHex, toHex } from 'viem';
|
|
3
4
|
|
|
4
5
|
function createWalletMiddleware({
|
|
5
6
|
getAccounts,
|
|
@@ -9,7 +10,11 @@ function createWalletMiddleware({
|
|
|
9
10
|
processPersonalMessage,
|
|
10
11
|
processTransaction,
|
|
11
12
|
processSignTransaction,
|
|
12
|
-
processTypedMessageV4
|
|
13
|
+
processTypedMessageV4,
|
|
14
|
+
processGetCapabilities,
|
|
15
|
+
processSendCalls,
|
|
16
|
+
processGetCallsStatus,
|
|
17
|
+
processShowCallsStatus
|
|
13
18
|
}) {
|
|
14
19
|
if (!getAccounts) {
|
|
15
20
|
throw new Error("opts.getAccounts is required");
|
|
@@ -156,6 +161,77 @@ function createWalletMiddleware({
|
|
|
156
161
|
}
|
|
157
162
|
res.result = await getPublicKey(req);
|
|
158
163
|
}
|
|
164
|
+
async function getWalletCapabilitiesMiddleware(req, res) {
|
|
165
|
+
if (!processGetCapabilities) {
|
|
166
|
+
throw rpcErrors.methodNotSupported();
|
|
167
|
+
}
|
|
168
|
+
if (!Array.isArray(req.params) || req.params.length === 0) {
|
|
169
|
+
throw rpcErrors.invalidParams("Invalid parameters");
|
|
170
|
+
}
|
|
171
|
+
const account = req.params[0];
|
|
172
|
+
if (!isHex(account)) {
|
|
173
|
+
throw rpcErrors.invalidParams("Invalid account address");
|
|
174
|
+
}
|
|
175
|
+
let chainIds = req.params[1] || []; // if empty array is provided, the wallet will return capabilities for all supported chains
|
|
176
|
+
if (!Array.isArray(chainIds)) {
|
|
177
|
+
throw rpcErrors.invalidParams(`Invalid params, received: ${chainIds}. expected: Array`);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// format chain ids
|
|
181
|
+
chainIds = chainIds.map(chainId => isHex(chainId) ? chainId : toHex(chainId));
|
|
182
|
+
const getCapabilitiesParams = [account,
|
|
183
|
+
// account address
|
|
184
|
+
chainIds // [`0xstring`, `0xstring`, ...]
|
|
185
|
+
];
|
|
186
|
+
res.result = await processGetCapabilities(getCapabilitiesParams);
|
|
187
|
+
}
|
|
188
|
+
async function walletSendCallsMiddleware(req, res) {
|
|
189
|
+
if (!processSendCalls) {
|
|
190
|
+
throw rpcErrors.methodNotSupported();
|
|
191
|
+
}
|
|
192
|
+
const params = Array.isArray(req.params) ? req.params[0] : req.params;
|
|
193
|
+
if (!params || typeof params !== "object") {
|
|
194
|
+
throw rpcErrors.invalidParams("Missing or invalid params for wallet_sendCalls");
|
|
195
|
+
}
|
|
196
|
+
if (!params.version || typeof params.version !== "string") {
|
|
197
|
+
throw rpcErrors.invalidParams(`Invalid version: expected string, got "${params.version || "undefined"}"`);
|
|
198
|
+
}
|
|
199
|
+
if (!params.chainId) {
|
|
200
|
+
throw rpcErrors.invalidParams("Missing required field: chainId");
|
|
201
|
+
}
|
|
202
|
+
if (!Array.isArray(params.calls) || params.calls.length === 0) {
|
|
203
|
+
throw rpcErrors.invalidParams("calls must be a non-empty array");
|
|
204
|
+
}
|
|
205
|
+
const from = params.from;
|
|
206
|
+
if (from) {
|
|
207
|
+
await validateAndNormalizeKeyholder(from, req);
|
|
208
|
+
}
|
|
209
|
+
const walletSendCallsParams = _objectSpread(_objectSpread({}, params), {}, {
|
|
210
|
+
chainId: isHex(params.chainId) ? params.chainId : toHex(params.chainId)
|
|
211
|
+
});
|
|
212
|
+
res.result = await processSendCalls(walletSendCallsParams);
|
|
213
|
+
}
|
|
214
|
+
async function walletBatchCallStatusMiddleware(req, res) {
|
|
215
|
+
if (!processGetCallsStatus) {
|
|
216
|
+
throw rpcErrors.methodNotSupported();
|
|
217
|
+
}
|
|
218
|
+
const batchId = Array.isArray(req.params) ? req.params[0] : req.params;
|
|
219
|
+
if (!batchId || typeof batchId !== "string") {
|
|
220
|
+
throw rpcErrors.invalidParams("Missing or invalid batchId");
|
|
221
|
+
}
|
|
222
|
+
res.result = await processGetCallsStatus(batchId);
|
|
223
|
+
}
|
|
224
|
+
async function walletShowCallsStatusMiddleware(req, res) {
|
|
225
|
+
if (!processShowCallsStatus) {
|
|
226
|
+
throw rpcErrors.methodNotSupported();
|
|
227
|
+
}
|
|
228
|
+
const batchId = Array.isArray(req.params) ? req.params[0] : req.params;
|
|
229
|
+
if (!batchId || typeof batchId !== "string") {
|
|
230
|
+
throw rpcErrors.invalidParams("Missing or invalid batchId");
|
|
231
|
+
}
|
|
232
|
+
await processShowCallsStatus(batchId);
|
|
233
|
+
res.result = true;
|
|
234
|
+
}
|
|
159
235
|
return createScaffoldMiddleware({
|
|
160
236
|
// account lookups
|
|
161
237
|
eth_accounts: createAsyncMiddleware(lookupAccounts),
|
|
@@ -170,7 +246,12 @@ function createWalletMiddleware({
|
|
|
170
246
|
// message signatures
|
|
171
247
|
eth_sign: createAsyncMiddleware(ethSign),
|
|
172
248
|
eth_signTypedData_v4: createAsyncMiddleware(signTypedDataV4),
|
|
173
|
-
personal_sign: createAsyncMiddleware(personalSign)
|
|
249
|
+
personal_sign: createAsyncMiddleware(personalSign),
|
|
250
|
+
// EIP-5792
|
|
251
|
+
wallet_getCapabilities: createAsyncMiddleware(getWalletCapabilitiesMiddleware),
|
|
252
|
+
wallet_sendCalls: createAsyncMiddleware(walletSendCallsMiddleware),
|
|
253
|
+
wallet_getCallsStatus: createAsyncMiddleware(walletBatchCallStatusMiddleware),
|
|
254
|
+
wallet_showCallsStatus: createAsyncMiddleware(walletShowCallsStatusMiddleware)
|
|
174
255
|
});
|
|
175
256
|
}
|
|
176
257
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useContext, useState, useEffect, useMemo, createElement, createContext } from 'react';
|
|
2
2
|
import { EVM_PLUGINS, PLUGIN_EVENTS } from '../../base/plugin/IPlugin.js';
|
|
3
3
|
import { CONNECTOR_STATUS } from '../../base/connector/constants.js';
|
|
4
4
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { Web3AuthProvider } from './Web3AuthProvider.js';
|
|
2
|
+
export { WalletServicesContextKey } from './context/WalletServicesContext.js';
|
|
2
3
|
export { useChain } from './composables/useChain.js';
|
|
3
4
|
export { useCheckout } from './composables/useCheckout.js';
|
|
4
5
|
export { useEnableMFA } from './composables/useEnableMFA.js';
|
|
@@ -15,4 +16,3 @@ export { useWeb3Auth } from './composables/useWeb3Auth.js';
|
|
|
15
16
|
export { useWeb3AuthConnect } from './composables/useWeb3AuthConnect.js';
|
|
16
17
|
export { useWeb3AuthDisconnect } from './composables/useWeb3AuthDisconnect.js';
|
|
17
18
|
export { useWeb3AuthUser } from './composables/useWeb3AuthUser.js';
|
|
18
|
-
export { WalletServicesContextKey } from './context/WalletServicesContext.js';
|