@dynamic-labs/solana 4.4.2 → 4.4.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 +20 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/index.cjs +2 -0
- package/src/index.js +2 -0
- package/src/injected/fetchInjectedWalletConnectors.cjs +17 -4
- package/src/injected/fetchInjectedWalletConnectors.js +14 -1
- package/src/injected/walletStandard/getConnectorConstructorForWalletStandardWallet/getConnectorConstructorForWalletStandardWallet.cjs +2 -7
- package/src/injected/walletStandard/getConnectorConstructorForWalletStandardWallet/getConnectorConstructorForWalletStandardWallet.d.ts +2 -2
- package/src/injected/walletStandard/getConnectorConstructorForWalletStandardWallet/getConnectorConstructorForWalletStandardWallet.js +2 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.4.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.3...v4.4.4) (2025-01-31)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* coinbase connect only signature request message flicker ([#7950](https://github.com/dynamic-labs/dynamic-auth/issues/7950)) ([e7bc2b8](https://github.com/dynamic-labs/dynamic-auth/commit/e7bc2b82f611612936521838b0fe01a5115446c3))
|
|
8
|
+
* decouple show menu from click event ([#7951](https://github.com/dynamic-labs/dynamic-auth/issues/7951)) ([b1132f9](https://github.com/dynamic-labs/dynamic-auth/commit/b1132f96bda15a9cbea30c3040f6bf9cd7be5e05))
|
|
9
|
+
* ensure correct dependencies are listed in packages ([#7949](https://github.com/dynamic-labs/dynamic-auth/issues/7949)) ([a84f39f](https://github.com/dynamic-labs/dynamic-auth/commit/a84f39fcb289b17c6b17b51977b685ea66b4b16d))
|
|
10
|
+
* in-app browser coinbase evm wallet ([#7957](https://github.com/dynamic-labs/dynamic-auth/issues/7957)) ([a85f556](https://github.com/dynamic-labs/dynamic-auth/commit/a85f556d4c44bf331718f9d04ec64a68f492240b))
|
|
11
|
+
* mfa and external wallet funding back button ([#7930](https://github.com/dynamic-labs/dynamic-auth/issues/7930)) ([7f65dc6](https://github.com/dynamic-labs/dynamic-auth/commit/7f65dc66f4d121ac5ee1b34638f52543e53476db))
|
|
12
|
+
* **sdk-react-core:** logout user when SDK is upgraded ([#7940](https://github.com/dynamic-labs/dynamic-auth/issues/7940)) ([e20b113](https://github.com/dynamic-labs/dynamic-auth/commit/e20b113d5dc182df499b34080893da9fc98568f6))
|
|
13
|
+
* set sms verified to always true ([#7929](https://github.com/dynamic-labs/dynamic-auth/issues/7929)) ([9bfbc99](https://github.com/dynamic-labs/dynamic-auth/commit/9bfbc999da04ee9ebf1f4f4dff8c70c1cac18131))
|
|
14
|
+
|
|
15
|
+
### [4.4.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.2...v4.4.3) (2025-01-30)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* remove extra useOnClickOutside hook ([#7910](https://github.com/dynamic-labs/dynamic-auth/issues/7910)) ([42fce2e](https://github.com/dynamic-labs/dynamic-auth/commit/42fce2e91e814514a72c97b3ea06930db805a200))
|
|
21
|
+
|
|
2
22
|
### [4.4.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.1...v4.4.2) (2025-01-30)
|
|
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/solana",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.4",
|
|
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",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"@wallet-standard/experimental-features": "0.1.1",
|
|
26
26
|
"bs58": "5.0.0",
|
|
27
27
|
"tweetnacl": "1.0.3",
|
|
28
|
-
"@dynamic-labs/assert-package-version": "4.4.
|
|
29
|
-
"@dynamic-labs/embedded-wallet-solana": "4.4.
|
|
30
|
-
"@dynamic-labs/logger": "4.4.
|
|
31
|
-
"@dynamic-labs/rpc-providers": "4.4.
|
|
32
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
33
|
-
"@dynamic-labs/solana-core": "4.4.
|
|
34
|
-
"@dynamic-labs/types": "4.4.
|
|
35
|
-
"@dynamic-labs/utils": "4.4.
|
|
36
|
-
"@dynamic-labs/wallet-book": "4.4.
|
|
37
|
-
"@dynamic-labs/wallet-connector-core": "4.4.
|
|
28
|
+
"@dynamic-labs/assert-package-version": "4.4.4",
|
|
29
|
+
"@dynamic-labs/embedded-wallet-solana": "4.4.4",
|
|
30
|
+
"@dynamic-labs/logger": "4.4.4",
|
|
31
|
+
"@dynamic-labs/rpc-providers": "4.4.4",
|
|
32
|
+
"@dynamic-labs/sdk-api-core": "0.0.604",
|
|
33
|
+
"@dynamic-labs/solana-core": "4.4.4",
|
|
34
|
+
"@dynamic-labs/types": "4.4.4",
|
|
35
|
+
"@dynamic-labs/utils": "4.4.4",
|
|
36
|
+
"@dynamic-labs/wallet-book": "4.4.4",
|
|
37
|
+
"@dynamic-labs/wallet-connector-core": "4.4.4"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {}
|
|
40
40
|
}
|
package/src/index.cjs
CHANGED
|
@@ -12,6 +12,8 @@ var SolanaWalletConnectors = require('./SolanaWalletConnectors.cjs');
|
|
|
12
12
|
var SolanaWalletConnectorsWithConfig = require('./SolanaWalletConnectorsWithConfig/SolanaWalletConnectorsWithConfig.cjs');
|
|
13
13
|
var isBackpackSolanaSigner = require('./utils/isBackpackSolanaSigner.cjs');
|
|
14
14
|
var isSignedMessage = require('./utils/isSignedMessage.cjs');
|
|
15
|
+
require('@dynamic-labs/wallet-book');
|
|
16
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
15
17
|
require('@dynamic-labs/utils');
|
|
16
18
|
require('../_virtual/_tslib.cjs');
|
|
17
19
|
require('./utils/logger.cjs');
|
package/src/index.js
CHANGED
|
@@ -8,6 +8,8 @@ export { SolanaWalletConnectors } from './SolanaWalletConnectors.js';
|
|
|
8
8
|
export { SolanaWalletConnectorsWithConfig } from './SolanaWalletConnectorsWithConfig/SolanaWalletConnectorsWithConfig.js';
|
|
9
9
|
export { isBackpackSolanaSigner } from './utils/isBackpackSolanaSigner.js';
|
|
10
10
|
export { isSignedMessage } from './utils/isSignedMessage.js';
|
|
11
|
+
import '@dynamic-labs/wallet-book';
|
|
12
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
11
13
|
import '@dynamic-labs/utils';
|
|
12
14
|
import '../_virtual/_tslib.js';
|
|
13
15
|
import './utils/logger.js';
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
+
var walletBook = require('@dynamic-labs/wallet-book');
|
|
7
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
6
8
|
var utils = require('@dynamic-labs/utils');
|
|
7
9
|
var CoinbaseSolana = require('../CoinbaseSolana/CoinbaseSolana.cjs');
|
|
8
10
|
var Solflare = require('../Solflare/Solflare.cjs');
|
|
@@ -51,9 +53,9 @@ const shouldAddWalletStandardConnector = (wallet, walletBook) => {
|
|
|
51
53
|
});
|
|
52
54
|
return !shouldHandleFromWalletBook && hasAllFeatures;
|
|
53
55
|
};
|
|
54
|
-
const fetchInjectedWalletConnectors = ({ walletBook, }) => {
|
|
56
|
+
const fetchInjectedWalletConnectors = ({ walletBook: walletBook$1, }) => {
|
|
55
57
|
var _a;
|
|
56
|
-
const walletBookConnectors = Object.entries((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {})
|
|
58
|
+
const walletBookConnectors = Object.entries((_a = walletBook$1 === null || walletBook$1 === void 0 ? void 0 : walletBook$1.wallets) !== null && _a !== void 0 ? _a : {})
|
|
57
59
|
.filter(([key, wallet]) => {
|
|
58
60
|
var _a, _b, _c;
|
|
59
61
|
const injectedConfig = (_a = wallet.injectedConfig) === null || _a === void 0 ? void 0 : _a.find((config) => config.chain === 'sol');
|
|
@@ -78,8 +80,19 @@ const fetchInjectedWalletConnectors = ({ walletBook, }) => {
|
|
|
78
80
|
});
|
|
79
81
|
const walletStandardWallets = getWalletStandardWallets.getWalletStandardWallets();
|
|
80
82
|
const walletStandardConnectors = walletStandardWallets
|
|
81
|
-
.filter((wallet) => shouldAddWalletStandardConnector(wallet, walletBook))
|
|
82
|
-
.map((wallet) =>
|
|
83
|
+
.filter((wallet) => shouldAddWalletStandardConnector(wallet, walletBook$1))
|
|
84
|
+
.map((wallet) => {
|
|
85
|
+
const walletBookWallet = walletBook.findWalletBookWalletByNameAndChain(walletBook$1, wallet.name, 'sol');
|
|
86
|
+
// if the wallet book wallet is found, we want to use it to get the metadata
|
|
87
|
+
// to merge with the wallet standard metadata, specially the supportedHardwareWallets prop
|
|
88
|
+
const walletBookMetadata = walletBookWallet &&
|
|
89
|
+
walletConnectorCore.getWalletMetadataFromWalletBook({
|
|
90
|
+
walletBook: walletBook$1,
|
|
91
|
+
walletBookWallet,
|
|
92
|
+
walletKey: `sanitizeName(${wallet.name})sol`,
|
|
93
|
+
});
|
|
94
|
+
return getConnectorConstructorForWalletStandardWallet.getConnectorConstructorForWalletStandardWallet(wallet, walletBookMetadata);
|
|
95
|
+
});
|
|
83
96
|
logger.logger.logVerboseTroubleshootingMessage('[SOL fetchInjectedWalletConnectors] walletStandardConnectors', walletStandardConnectors.map((w) => w.name));
|
|
84
97
|
return [...walletBookConnectors, ...walletStandardConnectors];
|
|
85
98
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
|
+
import { findWalletBookWalletByNameAndChain } from '@dynamic-labs/wallet-book';
|
|
3
|
+
import { getWalletMetadataFromWalletBook } from '@dynamic-labs/wallet-connector-core';
|
|
2
4
|
import { sanitizeName } from '@dynamic-labs/utils';
|
|
3
5
|
import { CoinbaseSolana } from '../CoinbaseSolana/CoinbaseSolana.js';
|
|
4
6
|
import { Solflare } from '../Solflare/Solflare.js';
|
|
@@ -75,7 +77,18 @@ const fetchInjectedWalletConnectors = ({ walletBook, }) => {
|
|
|
75
77
|
const walletStandardWallets = getWalletStandardWallets();
|
|
76
78
|
const walletStandardConnectors = walletStandardWallets
|
|
77
79
|
.filter((wallet) => shouldAddWalletStandardConnector(wallet, walletBook))
|
|
78
|
-
.map((wallet) =>
|
|
80
|
+
.map((wallet) => {
|
|
81
|
+
const walletBookWallet = findWalletBookWalletByNameAndChain(walletBook, wallet.name, 'sol');
|
|
82
|
+
// if the wallet book wallet is found, we want to use it to get the metadata
|
|
83
|
+
// to merge with the wallet standard metadata, specially the supportedHardwareWallets prop
|
|
84
|
+
const walletBookMetadata = walletBookWallet &&
|
|
85
|
+
getWalletMetadataFromWalletBook({
|
|
86
|
+
walletBook,
|
|
87
|
+
walletBookWallet,
|
|
88
|
+
walletKey: `sanitizeName(${wallet.name})sol`,
|
|
89
|
+
});
|
|
90
|
+
return getConnectorConstructorForWalletStandardWallet(wallet, walletBookMetadata);
|
|
91
|
+
});
|
|
79
92
|
logger.logVerboseTroubleshootingMessage('[SOL fetchInjectedWalletConnectors] walletStandardConnectors', walletStandardConnectors.map((w) => w.name));
|
|
80
93
|
return [...walletBookConnectors, ...walletStandardConnectors];
|
|
81
94
|
};
|
|
@@ -7,16 +7,11 @@ var utils = require('@dynamic-labs/utils');
|
|
|
7
7
|
var InjectedWalletBase = require('../../InjectedWalletBase/InjectedWalletBase.cjs');
|
|
8
8
|
var createSolanaSignerFromWalletStandard = require('../createSolanaSignerFromWalletStandard/createSolanaSignerFromWalletStandard.cjs');
|
|
9
9
|
|
|
10
|
-
const getConnectorConstructorForWalletStandardWallet = (wallet) => {
|
|
10
|
+
const getConnectorConstructorForWalletStandardWallet = (wallet, walletBookMetadata = {}) => {
|
|
11
11
|
const sanitizedName = utils.sanitizeName(wallet.name);
|
|
12
12
|
return class extends InjectedWalletBase.InjectedWalletBase {
|
|
13
13
|
constructor(props) {
|
|
14
|
-
super(Object.assign(Object.assign({}, props), { metadata: {
|
|
15
|
-
groupKey: sanitizedName,
|
|
16
|
-
icon: wallet.icon,
|
|
17
|
-
id: sanitizedName,
|
|
18
|
-
name: wallet.name,
|
|
19
|
-
} }));
|
|
14
|
+
super(Object.assign(Object.assign({}, props), { metadata: Object.assign(Object.assign({}, walletBookMetadata), { groupKey: sanitizedName, icon: wallet.icon, id: sanitizedName, name: wallet.name }) }));
|
|
20
15
|
this.name = wallet.name;
|
|
21
16
|
this.overrideKey = `${sanitizedName}sol`;
|
|
22
17
|
this._provider = createSolanaSignerFromWalletStandard.createSolanaSignerFromWalletStandard({
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Wallet } from '@wallet-standard/base';
|
|
2
|
-
import { WalletConnectorConstructor } from '@dynamic-labs/wallet-connector-core';
|
|
3
|
-
export declare const getConnectorConstructorForWalletStandardWallet: (wallet: Wallet) => WalletConnectorConstructor;
|
|
2
|
+
import { WalletConnectorConstructor, WalletMetadata } from '@dynamic-labs/wallet-connector-core';
|
|
3
|
+
export declare const getConnectorConstructorForWalletStandardWallet: (wallet: Wallet, walletBookMetadata?: Partial<WalletMetadata>) => WalletConnectorConstructor;
|
|
@@ -3,16 +3,11 @@ import { sanitizeName } from '@dynamic-labs/utils';
|
|
|
3
3
|
import { InjectedWalletBase } from '../../InjectedWalletBase/InjectedWalletBase.js';
|
|
4
4
|
import { createSolanaSignerFromWalletStandard } from '../createSolanaSignerFromWalletStandard/createSolanaSignerFromWalletStandard.js';
|
|
5
5
|
|
|
6
|
-
const getConnectorConstructorForWalletStandardWallet = (wallet) => {
|
|
6
|
+
const getConnectorConstructorForWalletStandardWallet = (wallet, walletBookMetadata = {}) => {
|
|
7
7
|
const sanitizedName = sanitizeName(wallet.name);
|
|
8
8
|
return class extends InjectedWalletBase {
|
|
9
9
|
constructor(props) {
|
|
10
|
-
super(Object.assign(Object.assign({}, props), { metadata: {
|
|
11
|
-
groupKey: sanitizedName,
|
|
12
|
-
icon: wallet.icon,
|
|
13
|
-
id: sanitizedName,
|
|
14
|
-
name: wallet.name,
|
|
15
|
-
} }));
|
|
10
|
+
super(Object.assign(Object.assign({}, props), { metadata: Object.assign(Object.assign({}, walletBookMetadata), { groupKey: sanitizedName, icon: wallet.icon, id: sanitizedName, name: wallet.name }) }));
|
|
16
11
|
this.name = wallet.name;
|
|
17
12
|
this.overrideKey = `${sanitizedName}sol`;
|
|
18
13
|
this._provider = createSolanaSignerFromWalletStandard({
|