@dynamic-labs/wallet-connector-core 4.9.5 → 4.9.6
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 +15 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +7 -7
- package/src/WalletConnectorBase/WalletConnectorBase.cjs +6 -1
- package/src/WalletConnectorBase/WalletConnectorBase.d.ts +5 -0
- package/src/WalletConnectorBase/WalletConnectorBase.js +6 -1
- package/src/WalletConnectorBase/types.cjs +1 -0
- package/src/WalletConnectorBase/types.d.ts +1 -1
- package/src/WalletConnectorBase/types.js +1 -0
- package/src/utils/getChainInfo/getChainInfo.cjs +7 -0
- package/src/utils/getChainInfo/getChainInfo.d.ts +1 -1
- package/src/utils/getChainInfo/getChainInfo.js +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.9.6](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.5...v4.9.6) (2025-03-21)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add initial sui support ([#8317](https://github.com/dynamic-labs/dynamic-auth/issues/8317)) ([88c0234](https://github.com/dynamic-labs/dynamic-auth/commit/88c023483bad5736f38cb313b035279460f6e256))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* allow metmask sdk to retry connection ([#8322](https://github.com/dynamic-labs/dynamic-auth/issues/8322)) ([603ed99](https://github.com/dynamic-labs/dynamic-auth/commit/603ed99de3b5d90ac4f5eabcdcd3b2e90863298f))
|
|
13
|
+
* css for profile page without embedded wallets ([#8339](https://github.com/dynamic-labs/dynamic-auth/issues/8339)) ([7f696e9](https://github.com/dynamic-labs/dynamic-auth/commit/7f696e9986ddd899d140640f9af7cfd2dcd7c37a))
|
|
14
|
+
* ensure metamask connector can get display uri for multiple connections ([#8324](https://github.com/dynamic-labs/dynamic-auth/issues/8324)) ([1d95f08](https://github.com/dynamic-labs/dynamic-auth/commit/1d95f089589779e8ef078b80bd84fa0754179696))
|
|
15
|
+
* pass HttpTransportConfig to WalletClient, not just PublicClient ([#8333](https://github.com/dynamic-labs/dynamic-auth/issues/8333)) ([a0ddd10](https://github.com/dynamic-labs/dynamic-auth/commit/a0ddd10f1df57555cf0a3ed777f5d354eb140582))
|
|
16
|
+
|
|
2
17
|
### [4.9.5](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.4...v4.9.5) (2025-03-19)
|
|
3
18
|
|
|
4
19
|
|
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.9.
|
|
3
|
+
"version": "4.9.6",
|
|
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",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@dynamic-labs/sdk-api-core": "0.0.644",
|
|
22
|
-
"@dynamic-labs/assert-package-version": "4.9.
|
|
23
|
-
"@dynamic-labs/logger": "4.9.
|
|
24
|
-
"@dynamic-labs/rpc-providers": "4.9.
|
|
25
|
-
"@dynamic-labs/types": "4.9.
|
|
26
|
-
"@dynamic-labs/utils": "4.9.
|
|
27
|
-
"@dynamic-labs/wallet-book": "4.9.
|
|
22
|
+
"@dynamic-labs/assert-package-version": "4.9.6",
|
|
23
|
+
"@dynamic-labs/logger": "4.9.6",
|
|
24
|
+
"@dynamic-labs/rpc-providers": "4.9.6",
|
|
25
|
+
"@dynamic-labs/types": "4.9.6",
|
|
26
|
+
"@dynamic-labs/utils": "4.9.6",
|
|
27
|
+
"@dynamic-labs/wallet-book": "4.9.6",
|
|
28
28
|
"eventemitter3": "5.0.1"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {}
|
|
@@ -63,6 +63,11 @@ class WalletConnectorBase extends EventEmitter__default["default"] {
|
|
|
63
63
|
* @default false
|
|
64
64
|
*/
|
|
65
65
|
this.canConnectViaSocial = false;
|
|
66
|
+
/**
|
|
67
|
+
* Whether this connector can handle multiple connections
|
|
68
|
+
* @default true
|
|
69
|
+
*/
|
|
70
|
+
this.canHandleMultipleConnections = true;
|
|
66
71
|
/**
|
|
67
72
|
* Flag if connector/provider is available
|
|
68
73
|
*
|
|
@@ -426,7 +431,7 @@ class WalletConnectorBase extends EventEmitter__default["default"] {
|
|
|
426
431
|
}
|
|
427
432
|
logger.logger.debug('validateActiveWallet - trying to reconnect wallet...');
|
|
428
433
|
const getReconnectedAddress = () => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
429
|
-
if (this.
|
|
434
|
+
if (!this.canHandleMultipleConnections || !this.canGetChainAddress()) {
|
|
430
435
|
return undefined;
|
|
431
436
|
}
|
|
432
437
|
return this.getAddress().catch((err) => {
|
|
@@ -69,6 +69,11 @@ export declare abstract class WalletConnectorBase<C extends WalletConstructor<an
|
|
|
69
69
|
* @default false
|
|
70
70
|
*/
|
|
71
71
|
canConnectViaSocial: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Whether this connector can handle multiple connections
|
|
74
|
+
* @default true
|
|
75
|
+
*/
|
|
76
|
+
canHandleMultipleConnections: boolean;
|
|
72
77
|
/**
|
|
73
78
|
* Prompt the user to choose accounts to connect (see behavior in MM)
|
|
74
79
|
* @default Promise<[]>
|
|
@@ -55,6 +55,11 @@ class WalletConnectorBase extends EventEmitter {
|
|
|
55
55
|
* @default false
|
|
56
56
|
*/
|
|
57
57
|
this.canConnectViaSocial = false;
|
|
58
|
+
/**
|
|
59
|
+
* Whether this connector can handle multiple connections
|
|
60
|
+
* @default true
|
|
61
|
+
*/
|
|
62
|
+
this.canHandleMultipleConnections = true;
|
|
58
63
|
/**
|
|
59
64
|
* Flag if connector/provider is available
|
|
60
65
|
*
|
|
@@ -418,7 +423,7 @@ class WalletConnectorBase extends EventEmitter {
|
|
|
418
423
|
}
|
|
419
424
|
logger.debug('validateActiveWallet - trying to reconnect wallet...');
|
|
420
425
|
const getReconnectedAddress = () => __awaiter(this, void 0, void 0, function* () {
|
|
421
|
-
if (this.
|
|
426
|
+
if (!this.canHandleMultipleConnections || !this.canGetChainAddress()) {
|
|
422
427
|
return undefined;
|
|
423
428
|
}
|
|
424
429
|
return this.getAddress().catch((err) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import EventEmitter from 'eventemitter3';
|
|
2
2
|
import { WalletConnectorCore } from '../types';
|
|
3
|
-
export declare const Chains: readonly ["ETH", "FLOW", "SOL", "EVM", "ALGO", "STARK", "ATOM", "COSMOS", "BTC", "ECLIPSE"];
|
|
3
|
+
export declare const Chains: readonly ["ETH", "FLOW", "SOL", "EVM", "ALGO", "STARK", "ATOM", "COSMOS", "BTC", "ECLIPSE", "SUI"];
|
|
4
4
|
export type Chain = typeof Chains[number];
|
|
5
5
|
export declare const socialProviders: readonly ["google", "facebook", "apple", "github", "bitbucket", "gitlab", "linkedin", "twitter", "discord", "twitch", "microsoft"];
|
|
6
6
|
export type SocialProvider = typeof socialProviders[number];
|
|
@@ -52,6 +52,12 @@ const chainsInfo = [
|
|
|
52
52
|
name: 'eclipse',
|
|
53
53
|
symbol: 'ECLIPSE',
|
|
54
54
|
},
|
|
55
|
+
{
|
|
56
|
+
blockchainName: 'Sui',
|
|
57
|
+
displayName: 'Sui',
|
|
58
|
+
name: 'sui',
|
|
59
|
+
symbol: 'SUI',
|
|
60
|
+
},
|
|
55
61
|
];
|
|
56
62
|
const chainOverrides = {
|
|
57
63
|
algo: 'algorand',
|
|
@@ -61,6 +67,7 @@ const chainOverrides = {
|
|
|
61
67
|
eth: 'evm',
|
|
62
68
|
sol: 'solana',
|
|
63
69
|
stark: 'starknet',
|
|
70
|
+
sui: 'sui',
|
|
64
71
|
};
|
|
65
72
|
let chainInfoOverrides;
|
|
66
73
|
const setChainInfoOverrides = (overrides) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChainInfo } from '../..';
|
|
2
|
-
export type ChainName = 'algorand' | 'eclipse' | 'bitcoin' | 'evm' | 'flow' | 'solana' | 'starknet' | 'cosmos';
|
|
2
|
+
export type ChainName = 'algorand' | 'eclipse' | 'bitcoin' | 'evm' | 'flow' | 'solana' | 'starknet' | 'cosmos' | 'sui';
|
|
3
3
|
export type ChainDisplayOverrides = Partial<Record<ChainName, {
|
|
4
4
|
displayName?: string;
|
|
5
5
|
}>>;
|
|
@@ -48,6 +48,12 @@ const chainsInfo = [
|
|
|
48
48
|
name: 'eclipse',
|
|
49
49
|
symbol: 'ECLIPSE',
|
|
50
50
|
},
|
|
51
|
+
{
|
|
52
|
+
blockchainName: 'Sui',
|
|
53
|
+
displayName: 'Sui',
|
|
54
|
+
name: 'sui',
|
|
55
|
+
symbol: 'SUI',
|
|
56
|
+
},
|
|
51
57
|
];
|
|
52
58
|
const chainOverrides = {
|
|
53
59
|
algo: 'algorand',
|
|
@@ -57,6 +63,7 @@ const chainOverrides = {
|
|
|
57
63
|
eth: 'evm',
|
|
58
64
|
sol: 'solana',
|
|
59
65
|
stark: 'starknet',
|
|
66
|
+
sui: 'sui',
|
|
60
67
|
};
|
|
61
68
|
let chainInfoOverrides;
|
|
62
69
|
const setChainInfoOverrides = (overrides) => {
|