@dynamic-labs/solana 4.4.2-preview.1 → 4.4.3
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 +14 -12
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +10 -10
- 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,24 +1,26 @@
|
|
|
1
1
|
|
|
2
|
-
### [4.4.
|
|
2
|
+
### [4.4.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.2...v4.4.3) (2025-01-30)
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Bug Fixes
|
|
6
6
|
|
|
7
|
-
*
|
|
8
|
-
* implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([9622d1e](https://github.com/dynamic-labs/dynamic-auth/commit/9622d1e0e42bb3401fffbdda7b735db1736717ce))
|
|
9
|
-
* implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([7f367b8](https://github.com/dynamic-labs/dynamic-auth/commit/7f367b8bc9d6a0ece0268867bf9c7754d75d7949))
|
|
10
|
-
* implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([2019c4c](https://github.com/dynamic-labs/dynamic-auth/commit/2019c4cb89e4a042dc1c896a71b803db572e1842))
|
|
11
|
-
* override kernel address and add auth to localstorage ([1074ebc](https://github.com/dynamic-labs/dynamic-auth/commit/1074ebc0f3eca26fb868fd7acc9e3ac7c1048007))
|
|
7
|
+
* remove extra useOnClickOutside hook ([#7910](https://github.com/dynamic-labs/dynamic-auth/issues/7910)) ([42fce2e](https://github.com/dynamic-labs/dynamic-auth/commit/42fce2e91e814514a72c97b3ea06930db805a200))
|
|
12
8
|
|
|
13
|
-
### [4.4.2
|
|
9
|
+
### [4.4.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.1...v4.4.2) (2025-01-30)
|
|
14
10
|
|
|
15
11
|
|
|
16
12
|
### Features
|
|
17
13
|
|
|
18
|
-
* add support for
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
* add support for Bitget BTC ([#7915](https://github.com/dynamic-labs/dynamic-auth/issues/7915)) ([3fe23f7](https://github.com/dynamic-labs/dynamic-auth/commit/3fe23f739818ef0f5d504c34f237d1d115e4f50c))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* add backpackeclipse to walletbook fallbacks ([#7932](https://github.com/dynamic-labs/dynamic-auth/issues/7932)) ([eeaa7da](https://github.com/dynamic-labs/dynamic-auth/commit/eeaa7da629cb06ffc856f2e7f99beefcb8553bbd))
|
|
20
|
+
* otp verified should always be true ([#7921](https://github.com/dynamic-labs/dynamic-auth/issues/7921)) ([ac884d6](https://github.com/dynamic-labs/dynamic-auth/commit/ac884d6475152778aabd72d2c923b3c0b7745b00))
|
|
21
|
+
* **qntm-2814:** return checksum address from coinbase and metamask ([#7927](https://github.com/dynamic-labs/dynamic-auth/issues/7927)) ([3169d4d](https://github.com/dynamic-labs/dynamic-auth/commit/3169d4dd717b840c3654d15bacb20780d515269b))
|
|
22
|
+
* fix: creation of embedded wallet sessions with external auth
|
|
23
|
+
|
|
22
24
|
|
|
23
25
|
### [4.4.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.0...v4.4.1) (2025-01-27)
|
|
24
26
|
|
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.3",
|
|
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.
|
|
28
|
+
"@dynamic-labs/assert-package-version": "4.4.3",
|
|
29
|
+
"@dynamic-labs/embedded-wallet-solana": "4.4.3",
|
|
30
|
+
"@dynamic-labs/logger": "4.4.3",
|
|
31
|
+
"@dynamic-labs/rpc-providers": "4.4.3",
|
|
32
32
|
"@dynamic-labs/sdk-api-core": "0.0.599",
|
|
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.
|
|
33
|
+
"@dynamic-labs/solana-core": "4.4.3",
|
|
34
|
+
"@dynamic-labs/types": "4.4.3",
|
|
35
|
+
"@dynamic-labs/utils": "4.4.3",
|
|
36
|
+
"@dynamic-labs/wallet-book": "4.4.3",
|
|
37
|
+
"@dynamic-labs/wallet-connector-core": "4.4.3"
|
|
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({
|