@web3auth/no-modal 10.10.0 → 10.11.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.
Files changed (36) hide show
  1. package/dist/lib.cjs/base/plugin/IPlugin.js +1 -2
  2. package/dist/lib.cjs/base/plugin/errors.js +0 -36
  3. package/dist/lib.cjs/base/utils.js +1 -1
  4. package/dist/lib.cjs/index.js +2 -7
  5. package/dist/lib.cjs/noModal.js +3 -3
  6. package/dist/lib.cjs/react/context/WalletServicesInnerContext.js +3 -3
  7. package/dist/lib.cjs/react/context/Web3AuthInnerContext.js +10 -10
  8. package/dist/lib.cjs/types/base/plugin/IPlugin.d.ts +0 -2
  9. package/dist/lib.cjs/types/base/plugin/errors.d.ts +0 -10
  10. package/dist/lib.cjs/types/plugins/index.d.ts +0 -1
  11. package/dist/lib.cjs/vue/WalletServicesInnerProvider.js +3 -3
  12. package/dist/lib.cjs/vue/Web3AuthProvider.js +9 -9
  13. package/dist/lib.esm/base/plugin/IPlugin.js +1 -2
  14. package/dist/lib.esm/base/plugin/errors.js +1 -37
  15. package/dist/lib.esm/base/utils.js +1 -1
  16. package/dist/lib.esm/index.js +1 -3
  17. package/dist/lib.esm/noModal.js +3 -3
  18. package/dist/lib.esm/react/context/WalletServicesInnerContext.js +3 -3
  19. package/dist/lib.esm/react/context/Web3AuthInnerContext.js +10 -10
  20. package/dist/lib.esm/vue/WalletServicesInnerProvider.js +3 -3
  21. package/dist/lib.esm/vue/Web3AuthProvider.js +9 -9
  22. package/dist/noModal.umd.min.js +1 -1
  23. package/package.json +2 -2
  24. package/dist/lib.cjs/plugins/nft-checkout-plugin/embed.js +0 -131
  25. package/dist/lib.cjs/plugins/nft-checkout-plugin/enums.js +0 -24
  26. package/dist/lib.cjs/plugins/nft-checkout-plugin/plugin.js +0 -86
  27. package/dist/lib.cjs/plugins/nft-checkout-plugin/utils.js +0 -18
  28. package/dist/lib.cjs/types/plugins/nft-checkout-plugin/embed.d.ts +0 -24
  29. package/dist/lib.cjs/types/plugins/nft-checkout-plugin/enums.d.ts +0 -14
  30. package/dist/lib.cjs/types/plugins/nft-checkout-plugin/index.d.ts +0 -2
  31. package/dist/lib.cjs/types/plugins/nft-checkout-plugin/plugin.d.ts +0 -27
  32. package/dist/lib.cjs/types/plugins/nft-checkout-plugin/utils.d.ts +0 -3
  33. package/dist/lib.esm/plugins/nft-checkout-plugin/embed.js +0 -132
  34. package/dist/lib.esm/plugins/nft-checkout-plugin/enums.js +0 -20
  35. package/dist/lib.esm/plugins/nft-checkout-plugin/plugin.js +0 -75
  36. package/dist/lib.esm/plugins/nft-checkout-plugin/utils.js +0 -15
@@ -15,8 +15,7 @@ const PLUGIN_STATUS = {
15
15
  };
16
16
  const PLUGIN_EVENTS = _objectSpread({}, PLUGIN_STATUS);
17
17
  const EVM_PLUGINS = {
18
- WALLET_SERVICES: "wallet-services",
19
- NFT_CHECKOUT: "nft-checkout"
18
+ WALLET_SERVICES: "wallet-services"
20
19
  };
21
20
  const SOLANA_PLUGINS = {
22
21
  SOLANA: "solana"
@@ -65,41 +65,5 @@ _defineProperty(WalletServicesPluginError, "messages", {
65
65
  5222: "Invalid session inside wallet services. Please report this issue.",
66
66
  5223: "Wallet plugin is not connected Yet. Please wait for plugin to connect and listen via `connected` event on the plugin"
67
67
  });
68
- class NFTCheckoutPluginError extends index.Web3AuthError {
69
- constructor(code, message, cause) {
70
- // takes care of stack and proto
71
- super(code, message, cause);
72
- // Set name explicitly as minification can mangle class names
73
- Object.defineProperty(this, "name", {
74
- value: "NFTCheckoutPluginError"
75
- });
76
- }
77
- static fromCode(code, extraMessage = "", cause) {
78
- return new NFTCheckoutPluginError(code, `${NFTCheckoutPluginError.messages[code]}${extraMessage}`, cause);
79
- }
80
- static notInitialized(extraMessage = "", cause) {
81
- return NFTCheckoutPluginError.fromCode(6210, extraMessage, cause);
82
- }
83
- static providerRequired(extraMessage = "", cause) {
84
- return NFTCheckoutPluginError.fromCode(6212, extraMessage, cause);
85
- }
86
- static web3authRequired(extraMessage = "", cause) {
87
- return NFTCheckoutPluginError.fromCode(6213, extraMessage, cause);
88
- }
89
- static web3AuthNotConnected(extraMessage = "", cause) {
90
- return NFTCheckoutPluginError.fromCode(6214, extraMessage, cause);
91
- }
92
- static pluginNotConnected(extraMessage = "", cause) {
93
- return NFTCheckoutPluginError.fromCode(6223, extraMessage, cause);
94
- }
95
- }
96
- _defineProperty(NFTCheckoutPluginError, "messages", {
97
- 6210: "NFT Checkout Plugin is not initialized",
98
- 6212: "Provider is required..",
99
- 6213: "Web3Auth instance is required while initialization.",
100
- 6214: "Web3Auth is not connected.",
101
- 6223: "NFT Checkout plugin is not connected Yet. Please wait for plugin to connect and listen via `connected` event on the plugin"
102
- });
103
68
 
104
- exports.NFTCheckoutPluginError = NFTCheckoutPluginError;
105
69
  exports.WalletServicesPluginError = WalletServicesPluginError;
@@ -147,7 +147,7 @@ const getWalletServicesAnalyticsProperties = walletServicesConfig => {
147
147
  ws_default_portfolio: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig10 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig10 === void 0 ? void 0 : _walletServicesConfig10.defaultPortfolio
148
148
  };
149
149
  };
150
- const sdkVersion = "10.10.0";
150
+ const sdkVersion = "10.11.0";
151
151
  const getErrorAnalyticsProperties = error => {
152
152
  try {
153
153
  const code = error instanceof index.Web3AuthError ? error.code : error === null || error === void 0 ? void 0 : error.code;
@@ -28,9 +28,7 @@ var config = require('./connectors/wallet-connect-v2-connector/config.js');
28
28
  var walletConnectV2Connector = require('./connectors/wallet-connect-v2-connector/walletConnectV2Connector.js');
29
29
  var WalletConnectV2Provider = require('./connectors/wallet-connect-v2-connector/WalletConnectV2Provider.js');
30
30
  var noModal = require('./noModal.js');
31
- var embed = require('./plugins/nft-checkout-plugin/embed.js');
32
- var plugin = require('./plugins/nft-checkout-plugin/plugin.js');
33
- var plugin$1 = require('./plugins/wallet-services-plugin/plugin.js');
31
+ var plugin = require('./plugins/wallet-services-plugin/plugin.js');
34
32
  var AccountAbstractionProvider = require('./providers/account-abstraction-provider/providers/AccountAbstractionProvider.js');
35
33
  var ethereumControllers = require('@toruslabs/ethereum-controllers');
36
34
  var baseProvider = require('./providers/base-provider/baseProvider.js');
@@ -112,7 +110,6 @@ exports.WalletOperationsError = index$1.WalletOperationsError;
112
110
  exports.WalletProviderError = index$1.WalletProviderError;
113
111
  exports.Web3AuthError = index$1.Web3AuthError;
114
112
  exports.log = loglevel.log;
115
- exports.NFTCheckoutPluginError = errors.NFTCheckoutPluginError;
116
113
  exports.WalletServicesPluginError = errors.WalletServicesPluginError;
117
114
  exports.EVM_PLUGINS = IPlugin.EVM_PLUGINS;
118
115
  exports.PLUGIN_EVENTS = IPlugin.PLUGIN_EVENTS;
@@ -176,9 +173,7 @@ exports.getWalletConnectV2Settings = config.getWalletConnectV2Settings;
176
173
  exports.walletConnectV2Connector = walletConnectV2Connector.walletConnectV2Connector;
177
174
  exports.WalletConnectV2Provider = WalletConnectV2Provider.WalletConnectV2Provider;
178
175
  exports.Web3AuthNoModal = noModal.Web3AuthNoModal;
179
- exports.NFTCheckoutEmbed = embed.NFTCheckoutEmbed;
180
- exports.nftCheckoutPlugin = plugin.nftCheckoutPlugin;
181
- exports.walletServicesPlugin = plugin$1.walletServicesPlugin;
176
+ exports.walletServicesPlugin = plugin.walletServicesPlugin;
182
177
  exports.accountAbstractionProvider = AccountAbstractionProvider.accountAbstractionProvider;
183
178
  exports.toEoaProvider = AccountAbstractionProvider.toEoaProvider;
184
179
  Object.defineProperty(exports, "BiconomySmartAccount", {
@@ -287,9 +287,9 @@ class Web3AuthNoModal extends auth.SafeEventEmitter {
287
287
  let connectedEventCompleted = false;
288
288
  let authorizedEventReceived = false;
289
289
  const cleanup = () => {
290
- this.off(constants.CONNECTOR_EVENTS.CONNECTED, onConnected);
291
- this.off(constants.CONNECTOR_EVENTS.ERRORED, onErrored);
292
- this.off(constants.CONNECTOR_EVENTS.AUTHORIZED, onAuthorized);
290
+ this.removeListener(constants.CONNECTOR_EVENTS.CONNECTED, onConnected);
291
+ this.removeListener(constants.CONNECTOR_EVENTS.ERRORED, onErrored);
292
+ this.removeListener(constants.CONNECTOR_EVENTS.AUTHORIZED, onAuthorized);
293
293
  };
294
294
  const checkCompletion = async () => {
295
295
  // In CONNECT_AND_SIGN mode, wait for both connected event and authorized event
@@ -64,9 +64,9 @@ function WalletServicesContextProvider({
64
64
  }
65
65
  return () => {
66
66
  if (walletServicesPlugin) {
67
- walletServicesPlugin.off(IPlugin.PLUGIN_EVENTS.CONNECTED, connectedListener);
68
- walletServicesPlugin.off(IPlugin.PLUGIN_EVENTS.DISCONNECTED, disconnectedListener);
69
- walletServicesPlugin.off(IPlugin.PLUGIN_EVENTS.CONNECTING, connectingListener);
67
+ walletServicesPlugin.removeListener(IPlugin.PLUGIN_EVENTS.CONNECTED, connectedListener);
68
+ walletServicesPlugin.removeListener(IPlugin.PLUGIN_EVENTS.DISCONNECTED, disconnectedListener);
69
+ walletServicesPlugin.removeListener(IPlugin.PLUGIN_EVENTS.CONNECTING, connectingListener);
70
70
  }
71
71
  };
72
72
  }, [walletServicesPlugin]);
@@ -81,7 +81,7 @@ function Web3AuthInnerProvider(params) {
81
81
  provider.on("chainChanged", handleChainChange);
82
82
  return () => {
83
83
  if (provider) {
84
- provider.off("chainChanged", handleChainChange);
84
+ provider.removeListener("chainChanged", handleChainChange);
85
85
  }
86
86
  };
87
87
  }
@@ -145,15 +145,15 @@ function Web3AuthInnerProvider(params) {
145
145
  }
146
146
  return () => {
147
147
  if (web3Auth) {
148
- web3Auth.off(constants.CONNECTOR_EVENTS.NOT_READY, notReadyListener);
149
- web3Auth.off(constants.CONNECTOR_EVENTS.READY, readyListener);
150
- web3Auth.off(constants.CONNECTOR_EVENTS.CONNECTED, connectedListener);
151
- web3Auth.off(constants.CONNECTOR_EVENTS.DISCONNECTED, disconnectedListener);
152
- web3Auth.off(constants.CONNECTOR_EVENTS.CONNECTING, connectingListener);
153
- web3Auth.off(constants.CONNECTOR_EVENTS.ERRORED, errorListener);
154
- web3Auth.off(constants.CONNECTOR_EVENTS.REHYDRATION_ERROR, rehydrationErrorListener);
155
- web3Auth.off(constants.CONNECTOR_EVENTS.MFA_ENABLED, mfaEnabledListener);
156
- web3Auth.off(constants.CONNECTOR_EVENTS.AUTHORIZED, authorizedListener);
148
+ web3Auth.removeListener(constants.CONNECTOR_EVENTS.NOT_READY, notReadyListener);
149
+ web3Auth.removeListener(constants.CONNECTOR_EVENTS.READY, readyListener);
150
+ web3Auth.removeListener(constants.CONNECTOR_EVENTS.CONNECTED, connectedListener);
151
+ web3Auth.removeListener(constants.CONNECTOR_EVENTS.DISCONNECTED, disconnectedListener);
152
+ web3Auth.removeListener(constants.CONNECTOR_EVENTS.CONNECTING, connectingListener);
153
+ web3Auth.removeListener(constants.CONNECTOR_EVENTS.ERRORED, errorListener);
154
+ web3Auth.removeListener(constants.CONNECTOR_EVENTS.REHYDRATION_ERROR, rehydrationErrorListener);
155
+ web3Auth.removeListener(constants.CONNECTOR_EVENTS.MFA_ENABLED, mfaEnabledListener);
156
+ web3Auth.removeListener(constants.CONNECTOR_EVENTS.AUTHORIZED, authorizedListener);
157
157
  }
158
158
  };
159
159
  }, [web3Auth]);
@@ -28,7 +28,6 @@ export declare const PLUGIN_EVENTS: {
28
28
  export type PluginNamespace = (typeof PLUGIN_NAMESPACES)[keyof typeof PLUGIN_NAMESPACES];
29
29
  export declare const EVM_PLUGINS: {
30
30
  readonly WALLET_SERVICES: "wallet-services";
31
- readonly NFT_CHECKOUT: "nft-checkout";
32
31
  };
33
32
  export declare const SOLANA_PLUGINS: {
34
33
  readonly SOLANA: "solana";
@@ -36,7 +35,6 @@ export declare const SOLANA_PLUGINS: {
36
35
  export declare const WALLET_PLUGINS: {
37
36
  readonly SOLANA: "solana";
38
37
  readonly WALLET_SERVICES: "wallet-services";
39
- readonly NFT_CHECKOUT: "nft-checkout";
40
38
  };
41
39
  export interface IPlugin extends SafeEventEmitter {
42
40
  name: string;
@@ -16,13 +16,3 @@ export declare class WalletServicesPluginError extends Web3AuthError {
16
16
  static invalidSession(extraMessage?: string, cause?: unknown): IWeb3AuthError;
17
17
  static walletPluginNotConnected(extraMessage?: string, cause?: unknown): IWeb3AuthError;
18
18
  }
19
- export declare class NFTCheckoutPluginError extends Web3AuthError {
20
- protected static messages: ErrorCodes;
21
- constructor(code: number, message?: string, cause?: unknown);
22
- static fromCode(code: number, extraMessage?: string, cause?: unknown): IWeb3AuthError;
23
- static notInitialized(extraMessage?: string, cause?: unknown): IWeb3AuthError;
24
- static providerRequired(extraMessage?: string, cause?: unknown): IWeb3AuthError;
25
- static web3authRequired(extraMessage?: string, cause?: unknown): IWeb3AuthError;
26
- static web3AuthNotConnected(extraMessage?: string, cause?: unknown): IWeb3AuthError;
27
- static pluginNotConnected(extraMessage?: string, cause?: unknown): IWeb3AuthError;
28
- }
@@ -1,2 +1 @@
1
- export * from "./nft-checkout-plugin";
2
1
  export * from "./wallet-services-plugin";
@@ -59,9 +59,9 @@ const WalletServicesInnerProvider = vue.defineComponent({
59
59
  };
60
60
  // unregister previous listeners
61
61
  if (prevWalletServicesPlugin && newWalletServicesPlugin !== prevWalletServicesPlugin) {
62
- prevWalletServicesPlugin.off(IPlugin.PLUGIN_EVENTS.CONNECTED, connectedListener);
63
- prevWalletServicesPlugin.off(IPlugin.PLUGIN_EVENTS.DISCONNECTED, disconnectedListener);
64
- prevWalletServicesPlugin.off(IPlugin.PLUGIN_EVENTS.CONNECTING, connectingListener);
62
+ prevWalletServicesPlugin.removeListener(IPlugin.PLUGIN_EVENTS.CONNECTED, connectedListener);
63
+ prevWalletServicesPlugin.removeListener(IPlugin.PLUGIN_EVENTS.DISCONNECTED, disconnectedListener);
64
+ prevWalletServicesPlugin.removeListener(IPlugin.PLUGIN_EVENTS.CONNECTING, connectingListener);
65
65
  }
66
66
  if (newWalletServicesPlugin && newWalletServicesPlugin !== prevWalletServicesPlugin) {
67
67
  newWalletServicesPlugin.on(IPlugin.PLUGIN_EVENTS.CONNECTED, connectedListener);
@@ -134,15 +134,15 @@ const Web3AuthProvider = vue.defineComponent({
134
134
  };
135
135
  // unregister previous listeners
136
136
  if (prevWeb3Auth && newWeb3Auth !== prevWeb3Auth) {
137
- prevWeb3Auth.off(constants.CONNECTOR_EVENTS.NOT_READY, notReadyListener);
138
- prevWeb3Auth.off(constants.CONNECTOR_EVENTS.READY, readyListener);
139
- prevWeb3Auth.off(constants.CONNECTOR_EVENTS.CONNECTED, connectedListener);
140
- prevWeb3Auth.off(constants.CONNECTOR_EVENTS.AUTHORIZED, authorizedListener);
141
- prevWeb3Auth.off(constants.CONNECTOR_EVENTS.DISCONNECTED, disconnectedListener);
142
- prevWeb3Auth.off(constants.CONNECTOR_EVENTS.CONNECTING, connectingListener);
143
- prevWeb3Auth.off(constants.CONNECTOR_EVENTS.ERRORED, errorListener);
144
- prevWeb3Auth.off(constants.CONNECTOR_EVENTS.REHYDRATION_ERROR, errorListener);
145
- prevWeb3Auth.off(constants.CONNECTOR_EVENTS.MFA_ENABLED, mfaEnabledListener);
137
+ prevWeb3Auth.removeListener(constants.CONNECTOR_EVENTS.NOT_READY, notReadyListener);
138
+ prevWeb3Auth.removeListener(constants.CONNECTOR_EVENTS.READY, readyListener);
139
+ prevWeb3Auth.removeListener(constants.CONNECTOR_EVENTS.CONNECTED, connectedListener);
140
+ prevWeb3Auth.removeListener(constants.CONNECTOR_EVENTS.AUTHORIZED, authorizedListener);
141
+ prevWeb3Auth.removeListener(constants.CONNECTOR_EVENTS.DISCONNECTED, disconnectedListener);
142
+ prevWeb3Auth.removeListener(constants.CONNECTOR_EVENTS.CONNECTING, connectingListener);
143
+ prevWeb3Auth.removeListener(constants.CONNECTOR_EVENTS.ERRORED, errorListener);
144
+ prevWeb3Auth.removeListener(constants.CONNECTOR_EVENTS.REHYDRATION_ERROR, errorListener);
145
+ prevWeb3Auth.removeListener(constants.CONNECTOR_EVENTS.MFA_ENABLED, mfaEnabledListener);
146
146
  }
147
147
  if (newWeb3Auth && newWeb3Auth !== prevWeb3Auth) {
148
148
  status.value = newWeb3Auth.status;
@@ -13,8 +13,7 @@ const PLUGIN_STATUS = {
13
13
  };
14
14
  const PLUGIN_EVENTS = _objectSpread({}, PLUGIN_STATUS);
15
15
  const EVM_PLUGINS = {
16
- WALLET_SERVICES: "wallet-services",
17
- NFT_CHECKOUT: "nft-checkout"
16
+ WALLET_SERVICES: "wallet-services"
18
17
  };
19
18
  const SOLANA_PLUGINS = {
20
19
  SOLANA: "solana"
@@ -64,41 +64,5 @@ _defineProperty(WalletServicesPluginError, "messages", {
64
64
  5222: "Invalid session inside wallet services. Please report this issue.",
65
65
  5223: "Wallet plugin is not connected Yet. Please wait for plugin to connect and listen via `connected` event on the plugin"
66
66
  });
67
- class NFTCheckoutPluginError extends Web3AuthError {
68
- constructor(code, message, cause) {
69
- // takes care of stack and proto
70
- super(code, message, cause);
71
-
72
- // Set name explicitly as minification can mangle class names
73
- Object.defineProperty(this, "name", {
74
- value: "NFTCheckoutPluginError"
75
- });
76
- }
77
- static fromCode(code, extraMessage = "", cause) {
78
- return new NFTCheckoutPluginError(code, `${NFTCheckoutPluginError.messages[code]}${extraMessage}`, cause);
79
- }
80
- static notInitialized(extraMessage = "", cause) {
81
- return NFTCheckoutPluginError.fromCode(6210, extraMessage, cause);
82
- }
83
- static providerRequired(extraMessage = "", cause) {
84
- return NFTCheckoutPluginError.fromCode(6212, extraMessage, cause);
85
- }
86
- static web3authRequired(extraMessage = "", cause) {
87
- return NFTCheckoutPluginError.fromCode(6213, extraMessage, cause);
88
- }
89
- static web3AuthNotConnected(extraMessage = "", cause) {
90
- return NFTCheckoutPluginError.fromCode(6214, extraMessage, cause);
91
- }
92
- static pluginNotConnected(extraMessage = "", cause) {
93
- return NFTCheckoutPluginError.fromCode(6223, extraMessage, cause);
94
- }
95
- }
96
- _defineProperty(NFTCheckoutPluginError, "messages", {
97
- 6210: "NFT Checkout Plugin is not initialized",
98
- 6212: "Provider is required..",
99
- 6213: "Web3Auth instance is required while initialization.",
100
- 6214: "Web3Auth is not connected.",
101
- 6223: "NFT Checkout plugin is not connected Yet. Please wait for plugin to connect and listen via `connected` event on the plugin"
102
- });
103
67
 
104
- export { NFTCheckoutPluginError, WalletServicesPluginError };
68
+ export { WalletServicesPluginError };
@@ -146,7 +146,7 @@ const getWalletServicesAnalyticsProperties = walletServicesConfig => {
146
146
  ws_default_portfolio: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig10 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig10 === void 0 ? void 0 : _walletServicesConfig10.defaultPortfolio
147
147
  };
148
148
  };
149
- const sdkVersion = "10.10.0";
149
+ const sdkVersion = "10.11.0";
150
150
  const getErrorAnalyticsProperties = error => {
151
151
  try {
152
152
  const code = error instanceof Web3AuthError ? error.code : error === null || error === void 0 ? void 0 : error.code;
@@ -12,7 +12,7 @@ export { checkIfTokenIsExpired, clearToken, getSavedToken, saveToken, storageAva
12
12
  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';
13
13
  export { WalletInitializationError, WalletLoginError, WalletOperationsError, WalletProviderError, Web3AuthError } from './base/errors/index.js';
14
14
  export { log } from './base/loglevel.js';
15
- export { NFTCheckoutPluginError, WalletServicesPluginError } from './base/plugin/errors.js';
15
+ export { WalletServicesPluginError } from './base/plugin/errors.js';
16
16
  export { EVM_PLUGINS, PLUGIN_EVENTS, PLUGIN_NAMESPACES, PLUGIN_STATUS, SOLANA_PLUGINS, WALLET_PLUGINS } from './base/plugin/IPlugin.js';
17
17
  export { PROVIDER_EVENTS } from './base/provider/IProvider.js';
18
18
  export { fetchProjectConfig, fetchWalletRegistry, fromViemChain, fromWagmiChain, getAaAnalyticsProperties, getCaipChainId, getErrorAnalyticsProperties, getHostname, getWalletServicesAnalyticsProperties, getWhitelabelAnalyticsProperties, isBrowser, isHexStrict, normalizeWalletName, sdkVersion, signerHost, withAbort } from './base/utils.js';
@@ -29,8 +29,6 @@ export { metaMaskConnector } from './connectors/metamask-connector/metamaskConne
29
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
30
  export { walletConnectV2Connector } from './connectors/wallet-connect-v2-connector/walletConnectV2Connector.js';
31
31
  export { WalletConnectV2Provider } from './connectors/wallet-connect-v2-connector/WalletConnectV2Provider.js';
32
- export { NFTCheckoutEmbed } from './plugins/nft-checkout-plugin/embed.js';
33
- export { nftCheckoutPlugin } from './plugins/nft-checkout-plugin/plugin.js';
34
32
  export { BUTTON_POSITION, CONFIRMATION_STRATEGY } from '@web3auth/ws-embed';
35
33
  export { walletServicesPlugin } from './plugins/wallet-services-plugin/plugin.js';
36
34
  export { accountAbstractionProvider, toEoaProvider } from './providers/account-abstraction-provider/providers/AccountAbstractionProvider.js';
@@ -292,9 +292,9 @@ class Web3AuthNoModal extends SafeEventEmitter {
292
292
  let connectedEventCompleted = false;
293
293
  let authorizedEventReceived = false;
294
294
  const cleanup = () => {
295
- this.off(CONNECTOR_EVENTS.CONNECTED, onConnected);
296
- this.off(CONNECTOR_EVENTS.ERRORED, onErrored);
297
- this.off(CONNECTOR_EVENTS.AUTHORIZED, onAuthorized);
295
+ this.removeListener(CONNECTOR_EVENTS.CONNECTED, onConnected);
296
+ this.removeListener(CONNECTOR_EVENTS.ERRORED, onErrored);
297
+ this.removeListener(CONNECTOR_EVENTS.AUTHORIZED, onAuthorized);
298
298
  };
299
299
  const checkCompletion = async () => {
300
300
  // In CONNECT_AND_SIGN mode, wait for both connected event and authorized event
@@ -49,9 +49,9 @@ function WalletServicesContextProvider({
49
49
  }
50
50
  return () => {
51
51
  if (walletServicesPlugin) {
52
- walletServicesPlugin.off(PLUGIN_EVENTS.CONNECTED, connectedListener);
53
- walletServicesPlugin.off(PLUGIN_EVENTS.DISCONNECTED, disconnectedListener);
54
- walletServicesPlugin.off(PLUGIN_EVENTS.CONNECTING, connectingListener);
52
+ walletServicesPlugin.removeListener(PLUGIN_EVENTS.CONNECTED, connectedListener);
53
+ walletServicesPlugin.removeListener(PLUGIN_EVENTS.DISCONNECTED, disconnectedListener);
54
+ walletServicesPlugin.removeListener(PLUGIN_EVENTS.CONNECTING, connectingListener);
55
55
  }
56
56
  };
57
57
  }, [walletServicesPlugin]);
@@ -68,7 +68,7 @@ function Web3AuthInnerProvider(params) {
68
68
  provider.on("chainChanged", handleChainChange);
69
69
  return () => {
70
70
  if (provider) {
71
- provider.off("chainChanged", handleChainChange);
71
+ provider.removeListener("chainChanged", handleChainChange);
72
72
  }
73
73
  };
74
74
  }
@@ -133,15 +133,15 @@ function Web3AuthInnerProvider(params) {
133
133
  }
134
134
  return () => {
135
135
  if (web3Auth) {
136
- web3Auth.off(CONNECTOR_EVENTS.NOT_READY, notReadyListener);
137
- web3Auth.off(CONNECTOR_EVENTS.READY, readyListener);
138
- web3Auth.off(CONNECTOR_EVENTS.CONNECTED, connectedListener);
139
- web3Auth.off(CONNECTOR_EVENTS.DISCONNECTED, disconnectedListener);
140
- web3Auth.off(CONNECTOR_EVENTS.CONNECTING, connectingListener);
141
- web3Auth.off(CONNECTOR_EVENTS.ERRORED, errorListener);
142
- web3Auth.off(CONNECTOR_EVENTS.REHYDRATION_ERROR, rehydrationErrorListener);
143
- web3Auth.off(CONNECTOR_EVENTS.MFA_ENABLED, mfaEnabledListener);
144
- web3Auth.off(CONNECTOR_EVENTS.AUTHORIZED, authorizedListener);
136
+ web3Auth.removeListener(CONNECTOR_EVENTS.NOT_READY, notReadyListener);
137
+ web3Auth.removeListener(CONNECTOR_EVENTS.READY, readyListener);
138
+ web3Auth.removeListener(CONNECTOR_EVENTS.CONNECTED, connectedListener);
139
+ web3Auth.removeListener(CONNECTOR_EVENTS.DISCONNECTED, disconnectedListener);
140
+ web3Auth.removeListener(CONNECTOR_EVENTS.CONNECTING, connectingListener);
141
+ web3Auth.removeListener(CONNECTOR_EVENTS.ERRORED, errorListener);
142
+ web3Auth.removeListener(CONNECTOR_EVENTS.REHYDRATION_ERROR, rehydrationErrorListener);
143
+ web3Auth.removeListener(CONNECTOR_EVENTS.MFA_ENABLED, mfaEnabledListener);
144
+ web3Auth.removeListener(CONNECTOR_EVENTS.AUTHORIZED, authorizedListener);
145
145
  }
146
146
  };
147
147
  }, [web3Auth]);
@@ -46,9 +46,9 @@ const WalletServicesInnerProvider = defineComponent({
46
46
 
47
47
  // unregister previous listeners
48
48
  if (prevWalletServicesPlugin && newWalletServicesPlugin !== prevWalletServicesPlugin) {
49
- prevWalletServicesPlugin.off(PLUGIN_EVENTS.CONNECTED, connectedListener);
50
- prevWalletServicesPlugin.off(PLUGIN_EVENTS.DISCONNECTED, disconnectedListener);
51
- prevWalletServicesPlugin.off(PLUGIN_EVENTS.CONNECTING, connectingListener);
49
+ prevWalletServicesPlugin.removeListener(PLUGIN_EVENTS.CONNECTED, connectedListener);
50
+ prevWalletServicesPlugin.removeListener(PLUGIN_EVENTS.DISCONNECTED, disconnectedListener);
51
+ prevWalletServicesPlugin.removeListener(PLUGIN_EVENTS.CONNECTING, connectingListener);
52
52
  }
53
53
  if (newWalletServicesPlugin && newWalletServicesPlugin !== prevWalletServicesPlugin) {
54
54
  newWalletServicesPlugin.on(PLUGIN_EVENTS.CONNECTED, connectedListener);
@@ -124,15 +124,15 @@ const Web3AuthProvider = defineComponent({
124
124
 
125
125
  // unregister previous listeners
126
126
  if (prevWeb3Auth && newWeb3Auth !== prevWeb3Auth) {
127
- prevWeb3Auth.off(CONNECTOR_EVENTS.NOT_READY, notReadyListener);
128
- prevWeb3Auth.off(CONNECTOR_EVENTS.READY, readyListener);
129
- prevWeb3Auth.off(CONNECTOR_EVENTS.CONNECTED, connectedListener);
130
- prevWeb3Auth.off(CONNECTOR_EVENTS.AUTHORIZED, authorizedListener);
131
- prevWeb3Auth.off(CONNECTOR_EVENTS.DISCONNECTED, disconnectedListener);
132
- prevWeb3Auth.off(CONNECTOR_EVENTS.CONNECTING, connectingListener);
133
- prevWeb3Auth.off(CONNECTOR_EVENTS.ERRORED, errorListener);
134
- prevWeb3Auth.off(CONNECTOR_EVENTS.REHYDRATION_ERROR, errorListener);
135
- prevWeb3Auth.off(CONNECTOR_EVENTS.MFA_ENABLED, mfaEnabledListener);
127
+ prevWeb3Auth.removeListener(CONNECTOR_EVENTS.NOT_READY, notReadyListener);
128
+ prevWeb3Auth.removeListener(CONNECTOR_EVENTS.READY, readyListener);
129
+ prevWeb3Auth.removeListener(CONNECTOR_EVENTS.CONNECTED, connectedListener);
130
+ prevWeb3Auth.removeListener(CONNECTOR_EVENTS.AUTHORIZED, authorizedListener);
131
+ prevWeb3Auth.removeListener(CONNECTOR_EVENTS.DISCONNECTED, disconnectedListener);
132
+ prevWeb3Auth.removeListener(CONNECTOR_EVENTS.CONNECTING, connectingListener);
133
+ prevWeb3Auth.removeListener(CONNECTOR_EVENTS.ERRORED, errorListener);
134
+ prevWeb3Auth.removeListener(CONNECTOR_EVENTS.REHYDRATION_ERROR, errorListener);
135
+ prevWeb3Auth.removeListener(CONNECTOR_EVENTS.MFA_ENABLED, mfaEnabledListener);
136
136
  }
137
137
  if (newWeb3Auth && newWeb3Auth !== prevWeb3Auth) {
138
138
  status.value = newWeb3Auth.status;