@dynamic-labs/ethereum 4.55.0 → 4.57.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/CHANGELOG.md +20 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/walletConnect/WalletConnectConnector/WalletConnectConnector.cjs +23 -0
- package/src/walletConnect/WalletConnectConnector/WalletConnectConnector.js +23 -0
- package/src/walletConnect/WalletConnectProvider/WalletConnectProvider.cjs +21 -8
- package/src/walletConnect/WalletConnectProvider/WalletConnectProvider.d.ts +10 -0
- package/src/walletConnect/WalletConnectProvider/WalletConnectProvider.js +21 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.57.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.56.0...v4.57.0) (2026-01-20)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* auto redirect back from wallet connect ([#10257](https://github.com/dynamic-labs/dynamic-auth/issues/10257)) ([92994da](https://github.com/dynamic-labs/dynamic-auth/commit/92994dadaae851e309b5f889c0e415241cb2d00f))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* metamask console noise when signing in with wallet connect ([#10263](https://github.com/dynamic-labs/dynamic-auth/issues/10263)) ([1861e4a](https://github.com/dynamic-labs/dynamic-auth/commit/1861e4a3e78dd7d7a5a250da32f722a7bf972083))
|
|
13
|
+
* only throw webview did not load error after retries ([#10255](https://github.com/dynamic-labs/dynamic-auth/issues/10255)) ([7c11824](https://github.com/dynamic-labs/dynamic-auth/commit/7c11824c32c9058c12aa5d6998b8cc3fe7e75938))
|
|
14
|
+
|
|
15
|
+
## [4.56.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.55.0...v4.56.0) (2026-01-19)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* add iCloud backup support alongside Google Drive ([#10222](https://github.com/dynamic-labs/dynamic-auth/issues/10222)) ([62b3fe6](https://github.com/dynamic-labs/dynamic-auth/commit/62b3fe60756b7f48abb48f9fac82225c514660aa))
|
|
21
|
+
|
|
2
22
|
## [4.55.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.54.0...v4.55.0) (2026-01-17)
|
|
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",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.57.0",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
"eventemitter3": "5.0.1",
|
|
25
25
|
"buffer": "6.0.3",
|
|
26
26
|
"@metamask/sdk": "0.33.0",
|
|
27
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
28
|
-
"@dynamic-labs/embedded-wallet-evm": "4.
|
|
29
|
-
"@dynamic-labs/ethereum-core": "4.
|
|
30
|
-
"@dynamic-labs/logger": "4.
|
|
31
|
-
"@dynamic-labs/rpc-providers": "4.
|
|
32
|
-
"@dynamic-labs/types": "4.
|
|
33
|
-
"@dynamic-labs/utils": "4.
|
|
34
|
-
"@dynamic-labs/waas-evm": "4.
|
|
35
|
-
"@dynamic-labs/wallet-book": "4.
|
|
36
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
27
|
+
"@dynamic-labs/assert-package-version": "4.57.0",
|
|
28
|
+
"@dynamic-labs/embedded-wallet-evm": "4.57.0",
|
|
29
|
+
"@dynamic-labs/ethereum-core": "4.57.0",
|
|
30
|
+
"@dynamic-labs/logger": "4.57.0",
|
|
31
|
+
"@dynamic-labs/rpc-providers": "4.57.0",
|
|
32
|
+
"@dynamic-labs/types": "4.57.0",
|
|
33
|
+
"@dynamic-labs/utils": "4.57.0",
|
|
34
|
+
"@dynamic-labs/waas-evm": "4.57.0",
|
|
35
|
+
"@dynamic-labs/wallet-book": "4.57.0",
|
|
36
|
+
"@dynamic-labs/wallet-connector-core": "4.57.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"viem": "^2.28.4"
|
|
@@ -35,6 +35,29 @@ class WalletConnectConnector extends ethereumCore.EthereumWalletConnector {
|
|
|
35
35
|
WalletConnectProvider.WalletConnectProvider.evmNetworkRpcMap = this.evmNetworkRpcMap();
|
|
36
36
|
WalletConnectProvider.WalletConnectProvider.appName = opts.appName || '';
|
|
37
37
|
WalletConnectProvider.WalletConnectProvider.appLogoUrl = opts.appLogoUrl || '';
|
|
38
|
+
// Set redirect URLs for WalletConnect mobile linking
|
|
39
|
+
// This allows wallets to automatically redirect back to the app after signature
|
|
40
|
+
const { redirectUrl } = this.constructorProps;
|
|
41
|
+
if (redirectUrl) {
|
|
42
|
+
try {
|
|
43
|
+
const redirectUrlObj = new URL(redirectUrl);
|
|
44
|
+
// Native redirects use custom schemes (e.g., "yourapp://")
|
|
45
|
+
if (!redirectUrlObj.protocol.startsWith('http')) {
|
|
46
|
+
WalletConnectProvider.WalletConnectProvider.redirectNative = redirectUrl;
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
// For http/https URLs, use as universal link
|
|
50
|
+
WalletConnectProvider.WalletConnectProvider.redirectUniversal = redirectUrl;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch (_a) {
|
|
54
|
+
// If redirectUrl is not a valid URL, try to use it as-is if it looks like a scheme
|
|
55
|
+
// (e.g., "yourapp://")
|
|
56
|
+
if (redirectUrl.includes('://')) {
|
|
57
|
+
WalletConnectProvider.WalletConnectProvider.redirectNative = redirectUrl;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
38
61
|
}
|
|
39
62
|
init() {
|
|
40
63
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -31,6 +31,29 @@ class WalletConnectConnector extends EthereumWalletConnector {
|
|
|
31
31
|
WalletConnectProvider.evmNetworkRpcMap = this.evmNetworkRpcMap();
|
|
32
32
|
WalletConnectProvider.appName = opts.appName || '';
|
|
33
33
|
WalletConnectProvider.appLogoUrl = opts.appLogoUrl || '';
|
|
34
|
+
// Set redirect URLs for WalletConnect mobile linking
|
|
35
|
+
// This allows wallets to automatically redirect back to the app after signature
|
|
36
|
+
const { redirectUrl } = this.constructorProps;
|
|
37
|
+
if (redirectUrl) {
|
|
38
|
+
try {
|
|
39
|
+
const redirectUrlObj = new URL(redirectUrl);
|
|
40
|
+
// Native redirects use custom schemes (e.g., "yourapp://")
|
|
41
|
+
if (!redirectUrlObj.protocol.startsWith('http')) {
|
|
42
|
+
WalletConnectProvider.redirectNative = redirectUrl;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
// For http/https URLs, use as universal link
|
|
46
|
+
WalletConnectProvider.redirectUniversal = redirectUrl;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch (_a) {
|
|
50
|
+
// If redirectUrl is not a valid URL, try to use it as-is if it looks like a scheme
|
|
51
|
+
// (e.g., "yourapp://")
|
|
52
|
+
if (redirectUrl.includes('://')) {
|
|
53
|
+
WalletConnectProvider.redirectNative = redirectUrl;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
34
57
|
}
|
|
35
58
|
init() {
|
|
36
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -52,17 +52,30 @@ WalletConnectProvider.init = (...args_1) => _tslib.__awaiter(void 0, [...args_1]
|
|
|
52
52
|
}
|
|
53
53
|
_a.isInitializing = true;
|
|
54
54
|
logger.logger.debug('[WalletConnectProvider] initializing');
|
|
55
|
+
const redirectMetadata = {};
|
|
56
|
+
if (_a.redirectNative) {
|
|
57
|
+
redirectMetadata.native = _a.redirectNative;
|
|
58
|
+
}
|
|
59
|
+
if (_a.redirectUniversal) {
|
|
60
|
+
redirectMetadata.universal = _a.redirectUniversal;
|
|
61
|
+
}
|
|
62
|
+
const metadata = {
|
|
63
|
+
description: '',
|
|
64
|
+
icons: _a.appLogoUrl
|
|
65
|
+
? [_a.appLogoUrl]
|
|
66
|
+
: [],
|
|
67
|
+
name: _a.appName || 'Unknown App',
|
|
68
|
+
url: '',
|
|
69
|
+
};
|
|
70
|
+
// Only include redirect metadata if at least one redirect URL is set
|
|
71
|
+
if (_a.redirectNative ||
|
|
72
|
+
_a.redirectUniversal) {
|
|
73
|
+
metadata.redirect = redirectMetadata;
|
|
74
|
+
}
|
|
55
75
|
_a.providerInitPromise = EthereumProvider__default["default"].init({
|
|
56
76
|
customStoragePrefix: storePrefix,
|
|
57
77
|
disableProviderPing: true,
|
|
58
|
-
metadata
|
|
59
|
-
description: '',
|
|
60
|
-
icons: _a.appLogoUrl
|
|
61
|
-
? [_a.appLogoUrl]
|
|
62
|
-
: [],
|
|
63
|
-
name: _a.appName || 'Unknown App',
|
|
64
|
-
url: '',
|
|
65
|
-
},
|
|
78
|
+
metadata,
|
|
66
79
|
optionalChains: _a.getMappedChainsByPreferredOrder(),
|
|
67
80
|
optionalEvents: ['chainChanged', 'accountsChanged'],
|
|
68
81
|
optionalMethods: [
|
|
@@ -14,6 +14,16 @@ export declare class WalletConnectProvider {
|
|
|
14
14
|
static evmNetworkRpcMap: Record<string, string>;
|
|
15
15
|
static appName: string;
|
|
16
16
|
static appLogoUrl: string;
|
|
17
|
+
/**
|
|
18
|
+
* Native redirect URL scheme (e.g., 'yourapp://')
|
|
19
|
+
* Used for WalletConnect mobile linking to redirect back to the app after signature
|
|
20
|
+
*/
|
|
21
|
+
static redirectNative: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Universal redirect URL (e.g., 'https://yourapp.com/...')
|
|
24
|
+
* Optional universal link for WalletConnect mobile linking
|
|
25
|
+
*/
|
|
26
|
+
static redirectUniversal: string | undefined;
|
|
17
27
|
private static providerInitPromise;
|
|
18
28
|
private static provider;
|
|
19
29
|
/**
|
|
@@ -44,17 +44,30 @@ WalletConnectProvider.init = (...args_1) => __awaiter(void 0, [...args_1], void
|
|
|
44
44
|
}
|
|
45
45
|
_a.isInitializing = true;
|
|
46
46
|
logger.debug('[WalletConnectProvider] initializing');
|
|
47
|
+
const redirectMetadata = {};
|
|
48
|
+
if (_a.redirectNative) {
|
|
49
|
+
redirectMetadata.native = _a.redirectNative;
|
|
50
|
+
}
|
|
51
|
+
if (_a.redirectUniversal) {
|
|
52
|
+
redirectMetadata.universal = _a.redirectUniversal;
|
|
53
|
+
}
|
|
54
|
+
const metadata = {
|
|
55
|
+
description: '',
|
|
56
|
+
icons: _a.appLogoUrl
|
|
57
|
+
? [_a.appLogoUrl]
|
|
58
|
+
: [],
|
|
59
|
+
name: _a.appName || 'Unknown App',
|
|
60
|
+
url: '',
|
|
61
|
+
};
|
|
62
|
+
// Only include redirect metadata if at least one redirect URL is set
|
|
63
|
+
if (_a.redirectNative ||
|
|
64
|
+
_a.redirectUniversal) {
|
|
65
|
+
metadata.redirect = redirectMetadata;
|
|
66
|
+
}
|
|
47
67
|
_a.providerInitPromise = EthereumProvider.init({
|
|
48
68
|
customStoragePrefix: storePrefix,
|
|
49
69
|
disableProviderPing: true,
|
|
50
|
-
metadata
|
|
51
|
-
description: '',
|
|
52
|
-
icons: _a.appLogoUrl
|
|
53
|
-
? [_a.appLogoUrl]
|
|
54
|
-
: [],
|
|
55
|
-
name: _a.appName || 'Unknown App',
|
|
56
|
-
url: '',
|
|
57
|
-
},
|
|
70
|
+
metadata,
|
|
58
71
|
optionalChains: _a.getMappedChainsByPreferredOrder(),
|
|
59
72
|
optionalEvents: ['chainChanged', 'accountsChanged'],
|
|
60
73
|
optionalMethods: [
|