@dynamic-labs/wallet-connector-core 4.62.0 → 4.63.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 +13 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +9 -9
- package/src/utils/walletConnectDeepLinks/performPlatformSpecificConnectionMethod.cjs +5 -1
- package/src/utils/walletConnectDeepLinks/performPlatformSpecificConnectionMethod.d.ts +1 -1
- package/src/utils/walletConnectDeepLinks/performPlatformSpecificConnectionMethod.js +6 -2
- package/src/utils/walletConnectDeepLinks/walletConnectDeepLinks.cjs +6 -3
- package/src/utils/walletConnectDeepLinks/walletConnectDeepLinks.d.ts +2 -1
- package/src/utils/walletConnectDeepLinks/walletConnectDeepLinks.js +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.63.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.62.0...v4.63.0) (2026-02-24)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **react-native:** raise walletReturnFromDeepLink event to allow redirecting back to the same route as before ([#10364](https://github.com/dynamic-labs/dynamic-auth/issues/10364)) ([cd56fd0](https://github.com/dynamic-labs/dynamic-auth/commit/cd56fd089e867bb5ed09a7c999b04480d8f59f81))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **react-native:** include redirectUrl in WalletConnect connection deep links on iOS and add session redirect metadata for Solana ([#10479](https://github.com/dynamic-labs/dynamic-auth/issues/10479)) ([68829f9](https://github.com/dynamic-labs/dynamic-auth/commit/68829f9ef39c845917ce49bfd63922e5252c2299))
|
|
13
|
+
* ton external wallet connection ([#10460](https://github.com/dynamic-labs/dynamic-auth/issues/10460)) ([7431a74](https://github.com/dynamic-labs/dynamic-auth/commit/7431a74fcd0bcd04755e6a81b49aa24dfc261f09))
|
|
14
|
+
|
|
2
15
|
## [4.62.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.61.7...v4.62.0) (2026-02-23)
|
|
3
16
|
|
|
4
17
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/wallet-connector-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.63.0",
|
|
4
4
|
"description": "Core package for utilities and types for handling multiple wallet/chain support Dynamic SDK",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
22
|
-
"@dynamic-labs-wallet/browser-wallet-client": "0.0.
|
|
23
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
24
|
-
"@dynamic-labs/logger": "4.
|
|
25
|
-
"@dynamic-labs/rpc-providers": "4.
|
|
26
|
-
"@dynamic-labs/types": "4.
|
|
27
|
-
"@dynamic-labs/utils": "4.
|
|
28
|
-
"@dynamic-labs/wallet-book": "4.
|
|
21
|
+
"@dynamic-labs/sdk-api-core": "0.0.875",
|
|
22
|
+
"@dynamic-labs-wallet/browser-wallet-client": "0.0.276",
|
|
23
|
+
"@dynamic-labs/assert-package-version": "4.63.0",
|
|
24
|
+
"@dynamic-labs/logger": "4.63.0",
|
|
25
|
+
"@dynamic-labs/rpc-providers": "4.63.0",
|
|
26
|
+
"@dynamic-labs/types": "4.63.0",
|
|
27
|
+
"@dynamic-labs/utils": "4.63.0",
|
|
28
|
+
"@dynamic-labs/wallet-book": "4.63.0",
|
|
29
29
|
"eventemitter3": "5.0.1"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {}
|
|
@@ -7,16 +7,20 @@ var _tslib = require('../../../_virtual/_tslib.cjs');
|
|
|
7
7
|
var utils = require('@dynamic-labs/utils');
|
|
8
8
|
var walletConnectDeepLinks = require('./walletConnectDeepLinks.cjs');
|
|
9
9
|
|
|
10
|
-
const performPlatformSpecificConnectionMethod = (uri, deepLinks, opts, preference) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
10
|
+
const performPlatformSpecificConnectionMethod = (uri, deepLinks, opts, preference, redirectUrl) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
11
11
|
var _a, _b, _c;
|
|
12
12
|
const deepLink = walletConnectDeepLinks.getDeepLink({
|
|
13
13
|
deepLinks,
|
|
14
14
|
mode: 'connection',
|
|
15
15
|
preference,
|
|
16
|
+
redirectUrl,
|
|
16
17
|
uri,
|
|
17
18
|
});
|
|
18
19
|
// Deeplink performed here
|
|
19
20
|
if (utils.isMobile()) {
|
|
21
|
+
// Store current route before opening wallet so we can emit an event on return
|
|
22
|
+
const currentUrl = utils.PlatformService.getUrl();
|
|
23
|
+
utils.walletReturnRoute.set(currentUrl.pathname);
|
|
20
24
|
// Await the openURL call so errors propagate to the caller
|
|
21
25
|
// This ensures that if opening the URL fails, the connection promise rejects
|
|
22
26
|
yield utils.PlatformService.openURL(deepLink);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GetAddressOpts } from '../../WalletConnectorBase/types';
|
|
2
2
|
import type { WalletDeepLinks } from '../../types';
|
|
3
3
|
import { DeepLinkVariant } from './walletConnectDeepLinks';
|
|
4
|
-
export declare const performPlatformSpecificConnectionMethod: (uri: string, deepLinks: WalletDeepLinks | undefined, opts: Pick<GetAddressOpts, 'onDesktopUri' | 'onDisplayUri'>, preference: DeepLinkVariant) => Promise<void>;
|
|
4
|
+
export declare const performPlatformSpecificConnectionMethod: (uri: string, deepLinks: WalletDeepLinks | undefined, opts: Pick<GetAddressOpts, 'onDesktopUri' | 'onDisplayUri'>, preference: DeepLinkVariant, redirectUrl?: string) => Promise<void>;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter } from '../../../_virtual/_tslib.js';
|
|
3
|
-
import { isMobile, PlatformService } from '@dynamic-labs/utils';
|
|
3
|
+
import { isMobile, PlatformService, walletReturnRoute } from '@dynamic-labs/utils';
|
|
4
4
|
import { getDeepLink } from './walletConnectDeepLinks.js';
|
|
5
5
|
|
|
6
|
-
const performPlatformSpecificConnectionMethod = (uri, deepLinks, opts, preference) => __awaiter(void 0, void 0, void 0, function* () {
|
|
6
|
+
const performPlatformSpecificConnectionMethod = (uri, deepLinks, opts, preference, redirectUrl) => __awaiter(void 0, void 0, void 0, function* () {
|
|
7
7
|
var _a, _b, _c;
|
|
8
8
|
const deepLink = getDeepLink({
|
|
9
9
|
deepLinks,
|
|
10
10
|
mode: 'connection',
|
|
11
11
|
preference,
|
|
12
|
+
redirectUrl,
|
|
12
13
|
uri,
|
|
13
14
|
});
|
|
14
15
|
// Deeplink performed here
|
|
15
16
|
if (isMobile()) {
|
|
17
|
+
// Store current route before opening wallet so we can emit an event on return
|
|
18
|
+
const currentUrl = PlatformService.getUrl();
|
|
19
|
+
walletReturnRoute.set(currentUrl.pathname);
|
|
16
20
|
// Await the openURL call so errors propagate to the caller
|
|
17
21
|
// This ensures that if opening the URL fails, the connection promise rejects
|
|
18
22
|
yield PlatformService.openURL(deepLink);
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var utils = require('@dynamic-labs/utils');
|
|
7
7
|
|
|
8
|
-
const getConnectionDeepLink = (uri, deepLinks, preference) => {
|
|
8
|
+
const getConnectionDeepLink = (uri, deepLinks, preference, redirectUrl) => {
|
|
9
9
|
// on android, the connection deeplink is simply the uri
|
|
10
10
|
// see: https://docs.walletconnect.com/mobile-linking#for-android
|
|
11
11
|
if (utils.isAndroid()) {
|
|
@@ -18,6 +18,9 @@ const getConnectionDeepLink = (uri, deepLinks, preference) => {
|
|
|
18
18
|
const deepLinkUrl = new URL(deepLink);
|
|
19
19
|
const deepLinkParams = new URLSearchParams(deepLinkUrl.search);
|
|
20
20
|
deepLinkParams.set('uri', uri);
|
|
21
|
+
if (redirectUrl) {
|
|
22
|
+
deepLinkParams.set('redirectUrl', redirectUrl);
|
|
23
|
+
}
|
|
21
24
|
deepLinkUrl.search = deepLinkParams.toString();
|
|
22
25
|
return deepLinkUrl.toString();
|
|
23
26
|
};
|
|
@@ -38,13 +41,13 @@ const getRegularDeepLink = (uri, deepLinks, preference) => {
|
|
|
38
41
|
}
|
|
39
42
|
return origin || '';
|
|
40
43
|
};
|
|
41
|
-
const getDeepLink = ({ mode, uri = '', deepLinks, preference, }) => {
|
|
44
|
+
const getDeepLink = ({ mode, uri = '', deepLinks, preference, redirectUrl, }) => {
|
|
42
45
|
if (!deepLinks) {
|
|
43
46
|
return '';
|
|
44
47
|
}
|
|
45
48
|
switch (mode) {
|
|
46
49
|
case 'connection':
|
|
47
|
-
return getConnectionDeepLink(uri, deepLinks, preference);
|
|
50
|
+
return getConnectionDeepLink(uri, deepLinks, preference, redirectUrl);
|
|
48
51
|
case 'regular':
|
|
49
52
|
return getRegularDeepLink(uri, deepLinks, preference);
|
|
50
53
|
}
|
|
@@ -5,6 +5,7 @@ type GetDeepLinkArgs = {
|
|
|
5
5
|
mode: 'connection' | 'regular';
|
|
6
6
|
uri?: string;
|
|
7
7
|
preference: DeepLinkVariant;
|
|
8
|
+
redirectUrl?: string;
|
|
8
9
|
};
|
|
9
|
-
export declare const getDeepLink: ({ mode, uri, deepLinks, preference, }: GetDeepLinkArgs) => string;
|
|
10
|
+
export declare const getDeepLink: ({ mode, uri, deepLinks, preference, redirectUrl, }: GetDeepLinkArgs) => string;
|
|
10
11
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { isAndroid, isMobile } from '@dynamic-labs/utils';
|
|
3
3
|
|
|
4
|
-
const getConnectionDeepLink = (uri, deepLinks, preference) => {
|
|
4
|
+
const getConnectionDeepLink = (uri, deepLinks, preference, redirectUrl) => {
|
|
5
5
|
// on android, the connection deeplink is simply the uri
|
|
6
6
|
// see: https://docs.walletconnect.com/mobile-linking#for-android
|
|
7
7
|
if (isAndroid()) {
|
|
@@ -14,6 +14,9 @@ const getConnectionDeepLink = (uri, deepLinks, preference) => {
|
|
|
14
14
|
const deepLinkUrl = new URL(deepLink);
|
|
15
15
|
const deepLinkParams = new URLSearchParams(deepLinkUrl.search);
|
|
16
16
|
deepLinkParams.set('uri', uri);
|
|
17
|
+
if (redirectUrl) {
|
|
18
|
+
deepLinkParams.set('redirectUrl', redirectUrl);
|
|
19
|
+
}
|
|
17
20
|
deepLinkUrl.search = deepLinkParams.toString();
|
|
18
21
|
return deepLinkUrl.toString();
|
|
19
22
|
};
|
|
@@ -34,13 +37,13 @@ const getRegularDeepLink = (uri, deepLinks, preference) => {
|
|
|
34
37
|
}
|
|
35
38
|
return origin || '';
|
|
36
39
|
};
|
|
37
|
-
const getDeepLink = ({ mode, uri = '', deepLinks, preference, }) => {
|
|
40
|
+
const getDeepLink = ({ mode, uri = '', deepLinks, preference, redirectUrl, }) => {
|
|
38
41
|
if (!deepLinks) {
|
|
39
42
|
return '';
|
|
40
43
|
}
|
|
41
44
|
switch (mode) {
|
|
42
45
|
case 'connection':
|
|
43
|
-
return getConnectionDeepLink(uri, deepLinks, preference);
|
|
46
|
+
return getConnectionDeepLink(uri, deepLinks, preference, redirectUrl);
|
|
44
47
|
case 'regular':
|
|
45
48
|
return getRegularDeepLink(uri, deepLinks, preference);
|
|
46
49
|
}
|