@dynamic-labs/solana 4.44.2 → 4.44.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 +23 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +12 -12
- package/src/Solflare/Solflare.cjs +7 -0
- package/src/Solflare/Solflare.d.ts +1 -0
- package/src/Solflare/Solflare.js +7 -0
- package/src/walletConnect/SolanaWalletConnectConnector/SolanaWalletConnectConnector.cjs +12 -16
- package/src/walletConnect/SolanaWalletConnectConnector/SolanaWalletConnectConnector.js +12 -16
- package/src/walletConnect/SolanaWalletConnectConnector/types.d.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.44.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.44.3...v4.44.4) (2025-11-11)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **react-native:** add mfa modals ([5f79b6a](https://github.com/dynamic-labs/dynamic-auth/commit/5f79b6a1be5eb8fc3fbf37890ea5028003c38e93))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* allow aptos chain ids to be normalized to number ([#9860](https://github.com/dynamic-labs/dynamic-auth/issues/9860)) ([1dbaaec](https://github.com/dynamic-labs/dynamic-auth/commit/1dbaaecb74316ea1a33b587acebe27c1cdac663f))
|
|
13
|
+
* ensure even late announced aptos wallets are returned in wallet list ([#9855](https://github.com/dynamic-labs/dynamic-auth/issues/9855)) ([c807a5f](https://github.com/dynamic-labs/dynamic-auth/commit/c807a5f0c519948ae94a14055bddac9b679c98eb))
|
|
14
|
+
|
|
15
|
+
### [4.44.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.44.2...v4.44.3) (2025-11-10)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* correctly connect wallet in connect only with wallet connect svm ([#9851](https://github.com/dynamic-labs/dynamic-auth/issues/9851)) ([7ab0d37](https://github.com/dynamic-labs/dynamic-auth/commit/7ab0d3744b776b31882d8eac8dd2634456acf95d))
|
|
21
|
+
* linkSocialAccount not properly optimized ([#9853](https://github.com/dynamic-labs/dynamic-auth/issues/9853)) ([76b807e](https://github.com/dynamic-labs/dynamic-auth/commit/76b807e4e0c1d3a86578bd24c7eb01c779b11129))
|
|
22
|
+
* solflare wallet on mobile ([#9841](https://github.com/dynamic-labs/dynamic-auth/issues/9841)) ([039d2e3](https://github.com/dynamic-labs/dynamic-auth/commit/039d2e3bb463944d18fc36c6434be3cea16b8009))
|
|
23
|
+
* wallet connect svm transaction signature ([#9857](https://github.com/dynamic-labs/dynamic-auth/issues/9857)) ([6fb8b03](https://github.com/dynamic-labs/dynamic-auth/commit/6fb8b030bc25c0c7e5d6f8a12de9718f8924d1ed))
|
|
24
|
+
|
|
2
25
|
### [4.44.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.44.1...v4.44.2) (2025-11-08)
|
|
3
26
|
|
|
4
27
|
|
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.44.
|
|
3
|
+
"version": "4.44.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",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs/wallet-connect": "4.44.
|
|
21
|
+
"@dynamic-labs/wallet-connect": "4.44.4",
|
|
22
22
|
"@solana/web3.js": "1.98.1",
|
|
23
23
|
"@wallet-standard/app": "1.0.1",
|
|
24
24
|
"@wallet-standard/base": "1.0.1",
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
"@walletconnect/sign-client": "2.21.5",
|
|
30
30
|
"@walletconnect/utils": "2.21.5",
|
|
31
31
|
"@walletconnect/types": "2.21.5",
|
|
32
|
-
"@dynamic-labs/assert-package-version": "4.44.
|
|
33
|
-
"@dynamic-labs/embedded-wallet-solana": "4.44.
|
|
34
|
-
"@dynamic-labs/logger": "4.44.
|
|
35
|
-
"@dynamic-labs/rpc-providers": "4.44.
|
|
32
|
+
"@dynamic-labs/assert-package-version": "4.44.4",
|
|
33
|
+
"@dynamic-labs/embedded-wallet-solana": "4.44.4",
|
|
34
|
+
"@dynamic-labs/logger": "4.44.4",
|
|
35
|
+
"@dynamic-labs/rpc-providers": "4.44.4",
|
|
36
36
|
"@dynamic-labs/sdk-api-core": "0.0.821",
|
|
37
|
-
"@dynamic-labs/solana-core": "4.44.
|
|
38
|
-
"@dynamic-labs/types": "4.44.
|
|
39
|
-
"@dynamic-labs/utils": "4.44.
|
|
40
|
-
"@dynamic-labs/waas-svm": "4.44.
|
|
41
|
-
"@dynamic-labs/wallet-book": "4.44.
|
|
42
|
-
"@dynamic-labs/wallet-connector-core": "4.44.
|
|
37
|
+
"@dynamic-labs/solana-core": "4.44.4",
|
|
38
|
+
"@dynamic-labs/types": "4.44.4",
|
|
39
|
+
"@dynamic-labs/utils": "4.44.4",
|
|
40
|
+
"@dynamic-labs/waas-svm": "4.44.4",
|
|
41
|
+
"@dynamic-labs/wallet-book": "4.44.4",
|
|
42
|
+
"@dynamic-labs/wallet-connector-core": "4.44.4",
|
|
43
43
|
"eventemitter3": "5.0.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {}
|
|
@@ -15,6 +15,13 @@ class Solflare extends InjectedWalletBase.InjectedWalletBase {
|
|
|
15
15
|
this.overrideKey = 'solflare';
|
|
16
16
|
this.walletConnectWalletBookEntry = walletBook.findWalletBookWallet(props.walletBook, this.key);
|
|
17
17
|
}
|
|
18
|
+
getMobileOrInstalledWallet() {
|
|
19
|
+
// Dont use WC on mobile
|
|
20
|
+
if (utils.isMobile()) {
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
return super.getMobileOrInstalledWallet();
|
|
24
|
+
}
|
|
18
25
|
getAddress() {
|
|
19
26
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
20
27
|
var _a, _b;
|
|
@@ -4,6 +4,7 @@ export declare class Solflare extends InjectedWalletBase {
|
|
|
4
4
|
name: string;
|
|
5
5
|
overrideKey: string;
|
|
6
6
|
constructor(props: SolanaWalletConnectorOpts);
|
|
7
|
+
getMobileOrInstalledWallet(): InjectedWalletBase;
|
|
7
8
|
getAddress(): Promise<string | undefined>;
|
|
8
9
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
9
10
|
}
|
package/src/Solflare/Solflare.js
CHANGED
|
@@ -11,6 +11,13 @@ class Solflare extends InjectedWalletBase {
|
|
|
11
11
|
this.overrideKey = 'solflare';
|
|
12
12
|
this.walletConnectWalletBookEntry = findWalletBookWallet(props.walletBook, this.key);
|
|
13
13
|
}
|
|
14
|
+
getMobileOrInstalledWallet() {
|
|
15
|
+
// Dont use WC on mobile
|
|
16
|
+
if (isMobile()) {
|
|
17
|
+
return this;
|
|
18
|
+
}
|
|
19
|
+
return super.getMobileOrInstalledWallet();
|
|
20
|
+
}
|
|
14
21
|
getAddress() {
|
|
15
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16
23
|
var _a, _b;
|
|
@@ -77,8 +77,10 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
77
77
|
getActiveAddress() {
|
|
78
78
|
var _a, _b;
|
|
79
79
|
if (!this.session) {
|
|
80
|
+
logger.logger.logVerboseTroubleshootingMessage('[SolanaWalletConnect] getActiveAddress - no session, returning undefined');
|
|
80
81
|
return undefined;
|
|
81
82
|
}
|
|
83
|
+
logger.logger.logVerboseTroubleshootingMessage('[SolanaWalletConnect] getActiveAddress - session', this.session);
|
|
82
84
|
return (_b = (_a = this.session.namespaces.solana) === null || _a === void 0 ? void 0 : _a.accounts) === null || _b === void 0 ? void 0 : _b[0].split(':')[2];
|
|
83
85
|
}
|
|
84
86
|
listenToActiveAccountChange(listener) {
|
|
@@ -386,7 +388,7 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
386
388
|
requireAllSignatures: false,
|
|
387
389
|
verifySignatures: false,
|
|
388
390
|
});
|
|
389
|
-
return
|
|
391
|
+
return Buffer.from(new Uint8Array(serialized)).toString('base64');
|
|
390
392
|
}
|
|
391
393
|
signTransaction(transaction) {
|
|
392
394
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -403,22 +405,15 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
403
405
|
logger.logger.debug('[SolanaWalletConnect] Sending to wallet for signing', {
|
|
404
406
|
serializedLength: serializedTransaction.length,
|
|
405
407
|
});
|
|
406
|
-
const {
|
|
408
|
+
const { signature } = yield this.signClientRequest({
|
|
407
409
|
method: 'solana_signTransaction',
|
|
408
410
|
params: { transaction: serializedTransaction },
|
|
409
411
|
});
|
|
410
|
-
logger.logger.debug('[SolanaWalletConnect] Received
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
logger.logger.debug('[SolanaWalletConnect] Decoded signed transaction', {
|
|
416
|
-
decodedLength: decodedTransaction.length,
|
|
417
|
-
});
|
|
418
|
-
if (solanaCore.isVersionedTransaction(transaction)) {
|
|
419
|
-
return web3_js.VersionedTransaction.deserialize(decodedTransaction);
|
|
420
|
-
}
|
|
421
|
-
return web3_js.Transaction.from(decodedTransaction);
|
|
412
|
+
logger.logger.debug('[SolanaWalletConnect] Received transaction signature from wallet', { signature });
|
|
413
|
+
// WalletConnect returns signatures as base58-encoded strings even though it expects base64 input
|
|
414
|
+
const signatureBytes = bs58__default["default"].decode(signature);
|
|
415
|
+
transaction.addSignature(new web3_js.PublicKey(activeAddress), signatureBytes);
|
|
416
|
+
return transaction;
|
|
422
417
|
});
|
|
423
418
|
}
|
|
424
419
|
signAllTransactions(transactions) {
|
|
@@ -430,7 +425,7 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
430
425
|
});
|
|
431
426
|
return signedTransactions.map((signedTransaction, index) => {
|
|
432
427
|
const originalTransaction = transactions[index];
|
|
433
|
-
const decodedTransaction =
|
|
428
|
+
const decodedTransaction = new Uint8Array(Buffer.from(signedTransaction, 'base64'));
|
|
434
429
|
if (solanaCore.isVersionedTransaction(originalTransaction)) {
|
|
435
430
|
return web3_js.VersionedTransaction.deserialize(decodedTransaction);
|
|
436
431
|
}
|
|
@@ -446,7 +441,7 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
446
441
|
const serializedTransaction = this.serializeTransaction(transaction);
|
|
447
442
|
const { signature } = yield this.signClientRequest({
|
|
448
443
|
method: 'solana_signAndSendTransaction',
|
|
449
|
-
params: { options, transaction: serializedTransaction },
|
|
444
|
+
params: { sendOptions: options, transaction: serializedTransaction },
|
|
450
445
|
});
|
|
451
446
|
return signature;
|
|
452
447
|
}
|
|
@@ -506,6 +501,7 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
506
501
|
*/
|
|
507
502
|
const account = this.getActiveAddress();
|
|
508
503
|
if (!account) {
|
|
504
|
+
logger.logger.logVerboseTroubleshootingMessage('[SolanaWalletConnect] getConnectedAccounts - no activeAccounts, returning empty array');
|
|
509
505
|
return [];
|
|
510
506
|
}
|
|
511
507
|
logger.logger.logVerboseTroubleshootingMessage('[SolanaWalletConnect] getConnectedAccounts - activeAccounts', [account]);
|
|
@@ -68,8 +68,10 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
68
68
|
getActiveAddress() {
|
|
69
69
|
var _a, _b;
|
|
70
70
|
if (!this.session) {
|
|
71
|
+
logger.logVerboseTroubleshootingMessage('[SolanaWalletConnect] getActiveAddress - no session, returning undefined');
|
|
71
72
|
return undefined;
|
|
72
73
|
}
|
|
74
|
+
logger.logVerboseTroubleshootingMessage('[SolanaWalletConnect] getActiveAddress - session', this.session);
|
|
73
75
|
return (_b = (_a = this.session.namespaces.solana) === null || _a === void 0 ? void 0 : _a.accounts) === null || _b === void 0 ? void 0 : _b[0].split(':')[2];
|
|
74
76
|
}
|
|
75
77
|
listenToActiveAccountChange(listener) {
|
|
@@ -377,7 +379,7 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
377
379
|
requireAllSignatures: false,
|
|
378
380
|
verifySignatures: false,
|
|
379
381
|
});
|
|
380
|
-
return
|
|
382
|
+
return Buffer.from(new Uint8Array(serialized)).toString('base64');
|
|
381
383
|
}
|
|
382
384
|
signTransaction(transaction) {
|
|
383
385
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -394,22 +396,15 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
394
396
|
logger.debug('[SolanaWalletConnect] Sending to wallet for signing', {
|
|
395
397
|
serializedLength: serializedTransaction.length,
|
|
396
398
|
});
|
|
397
|
-
const {
|
|
399
|
+
const { signature } = yield this.signClientRequest({
|
|
398
400
|
method: 'solana_signTransaction',
|
|
399
401
|
params: { transaction: serializedTransaction },
|
|
400
402
|
});
|
|
401
|
-
logger.debug('[SolanaWalletConnect] Received
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
logger.debug('[SolanaWalletConnect] Decoded signed transaction', {
|
|
407
|
-
decodedLength: decodedTransaction.length,
|
|
408
|
-
});
|
|
409
|
-
if (isVersionedTransaction(transaction)) {
|
|
410
|
-
return VersionedTransaction.deserialize(decodedTransaction);
|
|
411
|
-
}
|
|
412
|
-
return Transaction.from(decodedTransaction);
|
|
403
|
+
logger.debug('[SolanaWalletConnect] Received transaction signature from wallet', { signature });
|
|
404
|
+
// WalletConnect returns signatures as base58-encoded strings even though it expects base64 input
|
|
405
|
+
const signatureBytes = bs58.decode(signature);
|
|
406
|
+
transaction.addSignature(new PublicKey(activeAddress), signatureBytes);
|
|
407
|
+
return transaction;
|
|
413
408
|
});
|
|
414
409
|
}
|
|
415
410
|
signAllTransactions(transactions) {
|
|
@@ -421,7 +416,7 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
421
416
|
});
|
|
422
417
|
return signedTransactions.map((signedTransaction, index) => {
|
|
423
418
|
const originalTransaction = transactions[index];
|
|
424
|
-
const decodedTransaction =
|
|
419
|
+
const decodedTransaction = new Uint8Array(Buffer.from(signedTransaction, 'base64'));
|
|
425
420
|
if (isVersionedTransaction(originalTransaction)) {
|
|
426
421
|
return VersionedTransaction.deserialize(decodedTransaction);
|
|
427
422
|
}
|
|
@@ -437,7 +432,7 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
437
432
|
const serializedTransaction = this.serializeTransaction(transaction);
|
|
438
433
|
const { signature } = yield this.signClientRequest({
|
|
439
434
|
method: 'solana_signAndSendTransaction',
|
|
440
|
-
params: { options, transaction: serializedTransaction },
|
|
435
|
+
params: { sendOptions: options, transaction: serializedTransaction },
|
|
441
436
|
});
|
|
442
437
|
return signature;
|
|
443
438
|
}
|
|
@@ -497,6 +492,7 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
497
492
|
*/
|
|
498
493
|
const account = this.getActiveAddress();
|
|
499
494
|
if (!account) {
|
|
495
|
+
logger.logVerboseTroubleshootingMessage('[SolanaWalletConnect] getConnectedAccounts - no activeAccounts, returning empty array');
|
|
500
496
|
return [];
|
|
501
497
|
}
|
|
502
498
|
logger.logVerboseTroubleshootingMessage('[SolanaWalletConnect] getConnectedAccounts - activeAccounts', [account]);
|
|
@@ -8,7 +8,7 @@ export type SolanaSessionRequestParamMap = {
|
|
|
8
8
|
transactions: string[];
|
|
9
9
|
};
|
|
10
10
|
solana_signAndSendTransaction: {
|
|
11
|
-
|
|
11
|
+
sendOptions?: {
|
|
12
12
|
maxRetries?: number;
|
|
13
13
|
minContextSlot?: number;
|
|
14
14
|
preflightCommitment?: 'processed' | 'confirmed' | 'finalized' | 'recent' | 'single' | 'singleGossip' | 'root' | 'max';
|
|
@@ -35,6 +35,7 @@ export type SolanaSessionRequestResultMap = {
|
|
|
35
35
|
signature: string;
|
|
36
36
|
};
|
|
37
37
|
solana_signTransaction: {
|
|
38
|
-
transaction
|
|
38
|
+
transaction?: string;
|
|
39
|
+
signature: string;
|
|
39
40
|
};
|
|
40
41
|
};
|