@dynamic-labs/ethereum-core 4.91.2 → 4.91.4
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/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.91.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.3...v4.91.4) (2026-07-01)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* conditionally use /op/ route for AA transactions based on block explorer support ([#11628](https://github.com/dynamic-labs/dynamic-auth/issues/11628)) ([95822dc](https://github.com/dynamic-labs/dynamic-auth/commit/95822dc0edbcd739afe870f0b3881555fdb17eb6))
|
|
8
|
+
* require error codes in all SDK error classes ([#11761](https://github.com/dynamic-labs/dynamic-auth/issues/11761)) ([5744811](https://github.com/dynamic-labs/dynamic-auth/commit/5744811efdd1e415aaf51eec5b3300b323ec1347))
|
|
9
|
+
|
|
10
|
+
### [4.91.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.2...v4.91.3) (2026-06-30)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **bitcoin:** detect late-registering wallet-standard wallets (DYNT-1210) ([#11747](https://github.com/dynamic-labs/dynamic-auth/issues/11747)) ([17809f6](https://github.com/dynamic-labs/dynamic-auth/commit/17809f6e811fe101367cc31a2d899a8d0b0d107e))
|
|
16
|
+
* fetch onramp providers lazily instead of eagerly on mount ([#11767](https://github.com/dynamic-labs/dynamic-auth/issues/11767)) ([3ee6708](https://github.com/dynamic-labs/dynamic-auth/commit/3ee67087142ae1942f865e0ab37b7108700b3327))
|
|
17
|
+
* **iframe-setup:** sync parent URL to iframe on pushState/replaceState ([#11751](https://github.com/dynamic-labs/dynamic-auth/issues/11751)) ([c8be3af](https://github.com/dynamic-labs/dynamic-auth/commit/c8be3afc301f77b349f23398bed940ce40f93b73))
|
|
18
|
+
* **nonce:** fetch nonce on demand when missing before wallet verification ([#11753](https://github.com/dynamic-labs/dynamic-auth/issues/11753)) ([4f01a21](https://github.com/dynamic-labs/dynamic-auth/commit/4f01a21b6081c852f32868c8a5e04d70aaf280a2)), closes [#1](https://github.com/dynamic-labs/dynamic-auth/issues/1)
|
|
19
|
+
* **react-native-extension:** arm loading timer before setUrl to cover pre-onLoadStart gap ([#11764](https://github.com/dynamic-labs/dynamic-auth/issues/11764)) ([31f2015](https://github.com/dynamic-labs/dynamic-auth/commit/31f20151a4b59279f9c133b723e50de771b06436))
|
|
20
|
+
* **webview-controller:** unwrap ZeroDev smart wallet for native gasless ([#11758](https://github.com/dynamic-labs/dynamic-auth/issues/11758)) ([989714e](https://github.com/dynamic-labs/dynamic-auth/commit/989714e414556868c8e0c54401aac1ed7354331b))
|
|
21
|
+
|
|
2
22
|
### [4.91.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.1...v4.91.2) (2026-06-26)
|
|
3
23
|
|
|
4
24
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum-core",
|
|
3
|
-
"version": "4.91.
|
|
3
|
+
"version": "4.91.4",
|
|
4
4
|
"description": "Core package for utilities and types for viem",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@dynamic-labs/sdk-api-core": "0.0.1046",
|
|
22
|
-
"@dynamic-labs/assert-package-version": "4.91.
|
|
23
|
-
"@dynamic-labs/logger": "4.91.
|
|
24
|
-
"@dynamic-labs/rpc-providers": "4.91.
|
|
25
|
-
"@dynamic-labs/types": "4.91.
|
|
26
|
-
"@dynamic-labs/utils": "4.91.
|
|
27
|
-
"@dynamic-labs/wallet-book": "4.91.
|
|
28
|
-
"@dynamic-labs/wallet-connector-core": "4.91.
|
|
22
|
+
"@dynamic-labs/assert-package-version": "4.91.4",
|
|
23
|
+
"@dynamic-labs/logger": "4.91.4",
|
|
24
|
+
"@dynamic-labs/rpc-providers": "4.91.4",
|
|
25
|
+
"@dynamic-labs/types": "4.91.4",
|
|
26
|
+
"@dynamic-labs/utils": "4.91.4",
|
|
27
|
+
"@dynamic-labs/wallet-book": "4.91.4",
|
|
28
|
+
"@dynamic-labs/wallet-connector-core": "4.91.4"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"viem": "^2.45.3"
|
|
@@ -143,16 +143,16 @@ class EthereumWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
143
143
|
networks: this.evmNetworks,
|
|
144
144
|
});
|
|
145
145
|
if (!network) {
|
|
146
|
-
throw new utils.DynamicError(`Could not find network mapping for chain ${networkName ? networkName : networkChainId}
|
|
146
|
+
throw new utils.DynamicError(`Could not find network mapping for chain ${networkName ? networkName : networkChainId}`, 'could_not_find_network_mapping_for');
|
|
147
147
|
}
|
|
148
148
|
if (!this.supportsNetworkSwitching()) {
|
|
149
|
-
throw new utils.DynamicError('Network switching is not supported');
|
|
149
|
+
throw new utils.DynamicError('Network switching is not supported', 'network_switching_is_not_supported');
|
|
150
150
|
}
|
|
151
151
|
walletConnectorCore.logger.logVerboseTroubleshootingMessage('[EthereumWalletConnector] switchNetwork', { network, networkChainId, networkName });
|
|
152
152
|
const provider = this.getWalletClient();
|
|
153
153
|
walletConnectorCore.logger.logVerboseTroubleshootingMessage('[EthereumWalletConnector] switchNetwork - got provider', { provider });
|
|
154
154
|
if (!provider) {
|
|
155
|
-
throw new utils.DynamicError('Provider not found');
|
|
155
|
+
throw new utils.DynamicError('Provider not found', 'provider_not_found');
|
|
156
156
|
}
|
|
157
157
|
return this.providerSwitchNetwork({ network, provider });
|
|
158
158
|
});
|
|
@@ -211,7 +211,7 @@ class EthereumWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
211
211
|
}
|
|
212
212
|
try {
|
|
213
213
|
if (!this.supportsNetworkSwitching()) {
|
|
214
|
-
throw new utils.DynamicError('Network switching is not supported');
|
|
214
|
+
throw new utils.DynamicError('Network switching is not supported', 'network_switching_is_not_supported');
|
|
215
215
|
}
|
|
216
216
|
const viemChain = getOrMapViemChain.getOrMapViemChain(network);
|
|
217
217
|
yield provider.switchChain({ id: viemChain.id });
|
|
@@ -226,7 +226,7 @@ class EthereumWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
226
226
|
}
|
|
227
227
|
catch (error) {
|
|
228
228
|
if ((_b = error.details) === null || _b === void 0 ? void 0 : _b.includes('"wallet_switchEthereumChain" not implemented')) {
|
|
229
|
-
throw new utils.DynamicError('Network switching is not available at this time. The user should manually switch network in their wallet');
|
|
229
|
+
throw new utils.DynamicError('Network switching is not available at this time. The user should manually switch network in their wallet', 'network_switching_is_not_available_at');
|
|
230
230
|
}
|
|
231
231
|
// we need to check for unrecognized chain error first because it also contains 'rejected' in message
|
|
232
232
|
if (error.code === 4902 ||
|
|
@@ -240,7 +240,7 @@ class EthereumWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
240
240
|
}
|
|
241
241
|
else if (((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('rejected')) ||
|
|
242
242
|
(typeof error === 'string' && error.includes('rejected'))) {
|
|
243
|
-
throw new utils.DynamicError("User rejected the wallet's request to switch network");
|
|
243
|
+
throw new utils.DynamicError("User rejected the wallet's request to switch network", 'user_rejected_the_wallets_request_to');
|
|
244
244
|
}
|
|
245
245
|
else {
|
|
246
246
|
throw error;
|
|
@@ -266,7 +266,7 @@ class EthereumWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
266
266
|
catch (error) {
|
|
267
267
|
if (((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('rejected')) ||
|
|
268
268
|
(typeof error === 'string' && error.includes('rejected'))) {
|
|
269
|
-
throw new utils.DynamicError("User rejected the wallet's request to add network");
|
|
269
|
+
throw new utils.DynamicError("User rejected the wallet's request to add network", 'user_rejected_the_wallets_request_to');
|
|
270
270
|
}
|
|
271
271
|
else {
|
|
272
272
|
throw error;
|
|
@@ -302,7 +302,7 @@ class EthereumWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
302
302
|
const walletClient = yield this.getWalletClient();
|
|
303
303
|
const publicClient = yield this.getPublicClient();
|
|
304
304
|
if (!publicClient || !walletClient) {
|
|
305
|
-
throw new utils.DynamicError('No public client available');
|
|
305
|
+
throw new utils.DynamicError('No public client available', 'no_public_client_available');
|
|
306
306
|
}
|
|
307
307
|
return createViemUiTransaction.createViemUiTransaction({
|
|
308
308
|
from,
|
|
@@ -315,7 +315,7 @@ class EthereumWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
315
315
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
316
316
|
const publicClient = yield this.getPublicClient();
|
|
317
317
|
if (!publicClient) {
|
|
318
|
-
throw new utils.DynamicError('No public client available');
|
|
318
|
+
throw new utils.DynamicError('No public client available', 'no_public_client_available');
|
|
319
319
|
}
|
|
320
320
|
// The number of confirmations (blocks that have passed) to wait before resolving.
|
|
321
321
|
const confirmations = 3;
|
|
@@ -139,16 +139,16 @@ class EthereumWalletConnector extends WalletConnectorBase {
|
|
|
139
139
|
networks: this.evmNetworks,
|
|
140
140
|
});
|
|
141
141
|
if (!network) {
|
|
142
|
-
throw new DynamicError(`Could not find network mapping for chain ${networkName ? networkName : networkChainId}
|
|
142
|
+
throw new DynamicError(`Could not find network mapping for chain ${networkName ? networkName : networkChainId}`, 'could_not_find_network_mapping_for');
|
|
143
143
|
}
|
|
144
144
|
if (!this.supportsNetworkSwitching()) {
|
|
145
|
-
throw new DynamicError('Network switching is not supported');
|
|
145
|
+
throw new DynamicError('Network switching is not supported', 'network_switching_is_not_supported');
|
|
146
146
|
}
|
|
147
147
|
logger.logVerboseTroubleshootingMessage('[EthereumWalletConnector] switchNetwork', { network, networkChainId, networkName });
|
|
148
148
|
const provider = this.getWalletClient();
|
|
149
149
|
logger.logVerboseTroubleshootingMessage('[EthereumWalletConnector] switchNetwork - got provider', { provider });
|
|
150
150
|
if (!provider) {
|
|
151
|
-
throw new DynamicError('Provider not found');
|
|
151
|
+
throw new DynamicError('Provider not found', 'provider_not_found');
|
|
152
152
|
}
|
|
153
153
|
return this.providerSwitchNetwork({ network, provider });
|
|
154
154
|
});
|
|
@@ -207,7 +207,7 @@ class EthereumWalletConnector extends WalletConnectorBase {
|
|
|
207
207
|
}
|
|
208
208
|
try {
|
|
209
209
|
if (!this.supportsNetworkSwitching()) {
|
|
210
|
-
throw new DynamicError('Network switching is not supported');
|
|
210
|
+
throw new DynamicError('Network switching is not supported', 'network_switching_is_not_supported');
|
|
211
211
|
}
|
|
212
212
|
const viemChain = getOrMapViemChain(network);
|
|
213
213
|
yield provider.switchChain({ id: viemChain.id });
|
|
@@ -222,7 +222,7 @@ class EthereumWalletConnector extends WalletConnectorBase {
|
|
|
222
222
|
}
|
|
223
223
|
catch (error) {
|
|
224
224
|
if ((_b = error.details) === null || _b === void 0 ? void 0 : _b.includes('"wallet_switchEthereumChain" not implemented')) {
|
|
225
|
-
throw new DynamicError('Network switching is not available at this time. The user should manually switch network in their wallet');
|
|
225
|
+
throw new DynamicError('Network switching is not available at this time. The user should manually switch network in their wallet', 'network_switching_is_not_available_at');
|
|
226
226
|
}
|
|
227
227
|
// we need to check for unrecognized chain error first because it also contains 'rejected' in message
|
|
228
228
|
if (error.code === 4902 ||
|
|
@@ -236,7 +236,7 @@ class EthereumWalletConnector extends WalletConnectorBase {
|
|
|
236
236
|
}
|
|
237
237
|
else if (((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('rejected')) ||
|
|
238
238
|
(typeof error === 'string' && error.includes('rejected'))) {
|
|
239
|
-
throw new DynamicError("User rejected the wallet's request to switch network");
|
|
239
|
+
throw new DynamicError("User rejected the wallet's request to switch network", 'user_rejected_the_wallets_request_to');
|
|
240
240
|
}
|
|
241
241
|
else {
|
|
242
242
|
throw error;
|
|
@@ -262,7 +262,7 @@ class EthereumWalletConnector extends WalletConnectorBase {
|
|
|
262
262
|
catch (error) {
|
|
263
263
|
if (((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('rejected')) ||
|
|
264
264
|
(typeof error === 'string' && error.includes('rejected'))) {
|
|
265
|
-
throw new DynamicError("User rejected the wallet's request to add network");
|
|
265
|
+
throw new DynamicError("User rejected the wallet's request to add network", 'user_rejected_the_wallets_request_to');
|
|
266
266
|
}
|
|
267
267
|
else {
|
|
268
268
|
throw error;
|
|
@@ -298,7 +298,7 @@ class EthereumWalletConnector extends WalletConnectorBase {
|
|
|
298
298
|
const walletClient = yield this.getWalletClient();
|
|
299
299
|
const publicClient = yield this.getPublicClient();
|
|
300
300
|
if (!publicClient || !walletClient) {
|
|
301
|
-
throw new DynamicError('No public client available');
|
|
301
|
+
throw new DynamicError('No public client available', 'no_public_client_available');
|
|
302
302
|
}
|
|
303
303
|
return createViemUiTransaction({
|
|
304
304
|
from,
|
|
@@ -311,7 +311,7 @@ class EthereumWalletConnector extends WalletConnectorBase {
|
|
|
311
311
|
return __awaiter(this, void 0, void 0, function* () {
|
|
312
312
|
const publicClient = yield this.getPublicClient();
|
|
313
313
|
if (!publicClient) {
|
|
314
|
-
throw new DynamicError('No public client available');
|
|
314
|
+
throw new DynamicError('No public client available', 'no_public_client_available');
|
|
315
315
|
}
|
|
316
316
|
// The number of confirmations (blocks that have passed) to wait before resolving.
|
|
317
317
|
const confirmations = 3;
|