@dynamic-labs/solana 4.91.3 → 4.91.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
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.91.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.3...v4.91.4) (2026-07-01)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* conditionally use /op/ route for AA transactions based on block explorer support ([#11628](https://github.com/dynamic-labs/dynamic-auth/issues/11628)) ([95822dc](https://github.com/dynamic-labs/dynamic-auth/commit/95822dc0edbcd739afe870f0b3881555fdb17eb6))
|
|
8
|
+
* require error codes in all SDK error classes ([#11761](https://github.com/dynamic-labs/dynamic-auth/issues/11761)) ([5744811](https://github.com/dynamic-labs/dynamic-auth/commit/5744811efdd1e415aaf51eec5b3300b323ec1347))
|
|
9
|
+
|
|
2
10
|
### [4.91.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.2...v4.91.3) (2026-06-30)
|
|
3
11
|
|
|
4
12
|
|
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.91.
|
|
3
|
+
"version": "4.91.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,8 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs/wallet-connect": "4.91.
|
|
22
|
-
"@dynamic-labs-connectors/metamask-solana": "4.6.
|
|
21
|
+
"@dynamic-labs/wallet-connect": "4.91.4",
|
|
22
|
+
"@dynamic-labs-connectors/metamask-solana": "4.6.9",
|
|
23
23
|
"@solana/web3.js": "1.98.1",
|
|
24
24
|
"@wallet-standard/app": "1.0.1",
|
|
25
25
|
"@wallet-standard/base": "1.0.1",
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
"@walletconnect/sign-client": "2.21.5",
|
|
31
31
|
"@walletconnect/utils": "2.21.5",
|
|
32
32
|
"@walletconnect/types": "2.21.5",
|
|
33
|
-
"@dynamic-labs/assert-package-version": "4.91.
|
|
34
|
-
"@dynamic-labs/embedded-wallet-solana": "4.91.
|
|
35
|
-
"@dynamic-labs/logger": "4.91.
|
|
36
|
-
"@dynamic-labs/rpc-providers": "4.91.
|
|
33
|
+
"@dynamic-labs/assert-package-version": "4.91.4",
|
|
34
|
+
"@dynamic-labs/embedded-wallet-solana": "4.91.4",
|
|
35
|
+
"@dynamic-labs/logger": "4.91.4",
|
|
36
|
+
"@dynamic-labs/rpc-providers": "4.91.4",
|
|
37
37
|
"@dynamic-labs/sdk-api-core": "0.0.1046",
|
|
38
|
-
"@dynamic-labs/solana-core": "4.91.
|
|
39
|
-
"@dynamic-labs/types": "4.91.
|
|
40
|
-
"@dynamic-labs/utils": "4.91.
|
|
41
|
-
"@dynamic-labs/waas-svm": "4.91.
|
|
42
|
-
"@dynamic-labs/wallet-book": "4.91.
|
|
43
|
-
"@dynamic-labs/wallet-connector-core": "4.91.
|
|
38
|
+
"@dynamic-labs/solana-core": "4.91.4",
|
|
39
|
+
"@dynamic-labs/types": "4.91.4",
|
|
40
|
+
"@dynamic-labs/utils": "4.91.4",
|
|
41
|
+
"@dynamic-labs/waas-svm": "4.91.4",
|
|
42
|
+
"@dynamic-labs/wallet-book": "4.91.4",
|
|
43
|
+
"@dynamic-labs/wallet-connector-core": "4.91.4",
|
|
44
44
|
"eventemitter3": "5.0.1"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {}
|
|
@@ -54,7 +54,7 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
54
54
|
this.overrideKey = opts.overrideKey;
|
|
55
55
|
}
|
|
56
56
|
if (!opts.projectId) {
|
|
57
|
-
throw new utils.DynamicError('WalletConnect project ID is required');
|
|
57
|
+
throw new utils.DynamicError('WalletConnect project ID is required', 'walletconnect_project_id_is_required');
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
get deepLinkPreference() {
|
|
@@ -67,7 +67,7 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
67
67
|
*/
|
|
68
68
|
get signClient() {
|
|
69
69
|
if (!SolanaWalletConnectConnector.signClientReference) {
|
|
70
|
-
throw new utils.DynamicError('Failed to access sign client for Wallet Connect Solana: Sign client not initialized');
|
|
70
|
+
throw new utils.DynamicError('Failed to access sign client for Wallet Connect Solana: Sign client not initialized', 'access_sign_client_for_wallet_connect');
|
|
71
71
|
}
|
|
72
72
|
return SolanaWalletConnectConnector.signClientReference;
|
|
73
73
|
}
|
|
@@ -119,7 +119,7 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
119
119
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
120
120
|
yield this.validateActiveWallet(from);
|
|
121
121
|
if (this.isSendBalanceUnsupported()) {
|
|
122
|
-
throw new utils.DynamicError('Wallet does not support signing transactions. Please connect to a wallet that supports signing transactions.');
|
|
122
|
+
throw new utils.DynamicError('Wallet does not support signing transactions. Please connect to a wallet that supports signing transactions.', 'wallet_does_not_support_signing_transactions');
|
|
123
123
|
}
|
|
124
124
|
const transaction = new solanaCore.SolanaUiTransaction({
|
|
125
125
|
connection: this.getWalletClient(),
|
|
@@ -330,7 +330,7 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
330
330
|
// and the sign client is still initializing
|
|
331
331
|
const signClient = yield SolanaWalletConnectConnector.signClientPromise;
|
|
332
332
|
if (!signClient) {
|
|
333
|
-
throw new utils.DynamicError('Failed to access sign client for Wallet Connect Solana: Sign client not initialized');
|
|
333
|
+
throw new utils.DynamicError('Failed to access sign client for Wallet Connect Solana: Sign client not initialized', 'access_sign_client_for_wallet_connect');
|
|
334
334
|
}
|
|
335
335
|
try {
|
|
336
336
|
const { approval, uri } = yield signClient.connect({
|
|
@@ -368,7 +368,7 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
368
368
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ method, params, }) {
|
|
369
369
|
var _b, _c;
|
|
370
370
|
if (!this.session) {
|
|
371
|
-
throw new utils.DynamicError('Session not initialized. Please connect to a wallet first.');
|
|
371
|
+
throw new utils.DynamicError('Session not initialized. Please connect to a wallet first.', 'session_not_initialized_please_connect_to');
|
|
372
372
|
}
|
|
373
373
|
const chainHash = (_c = (_b = this.getSelectedNetwork()) === null || _b === void 0 ? void 0 : _b.genesisHash) !== null && _c !== void 0 ? _c : this.solNetworks[0].genesisHash;
|
|
374
374
|
const chainId = `solana:${chainHash}`;
|
|
@@ -391,7 +391,7 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
391
391
|
// Yes their error message has a typo on "occured"
|
|
392
392
|
if (error.message === 'An error has occured. Please, try again.') {
|
|
393
393
|
yield this.endSession();
|
|
394
|
-
throw new utils.DynamicError('Wallet connection lost. Please, try again.');
|
|
394
|
+
throw new utils.DynamicError('Wallet connection lost. Please, try again.', 'wallet_connection_lost_please_try_again');
|
|
395
395
|
}
|
|
396
396
|
throw error;
|
|
397
397
|
}
|
|
@@ -430,7 +430,7 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
430
430
|
}
|
|
431
431
|
const activeAddress = this.getActiveAddress();
|
|
432
432
|
if (!activeAddress) {
|
|
433
|
-
throw new utils.DynamicError('No active address found');
|
|
433
|
+
throw new utils.DynamicError('No active address found', 'no_active_address_found');
|
|
434
434
|
}
|
|
435
435
|
const { signature } = yield this.signClientRequest({
|
|
436
436
|
method: 'solana_signMessage',
|
|
@@ -453,7 +453,7 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
453
453
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
454
454
|
const activeAddress = this.getActiveAddress();
|
|
455
455
|
if (!activeAddress) {
|
|
456
|
-
throw new utils.DynamicError('Active account address is required');
|
|
456
|
+
throw new utils.DynamicError('Active account address is required', 'active_account_address_is_required');
|
|
457
457
|
}
|
|
458
458
|
logger.logger.debug('[SolanaWalletConnect] Signing transaction', {
|
|
459
459
|
activeAddress,
|
|
@@ -518,7 +518,7 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
518
518
|
: 'N/A',
|
|
519
519
|
});
|
|
520
520
|
if (!isSigned) {
|
|
521
|
-
throw new utils.DynamicError('Transaction returned from wallet was not properly signed. The wallet may have rejected the signing request.');
|
|
521
|
+
throw new utils.DynamicError('Transaction returned from wallet was not properly signed. The wallet may have rejected the signing request.', 'transaction_returned_from_wallet_was_not');
|
|
522
522
|
}
|
|
523
523
|
// When sending a signed transaction, serialize it without flags
|
|
524
524
|
// (requireAllSignatures and verifySignatures are only for unsigned transactions)
|
|
@@ -532,7 +532,7 @@ class SolanaWalletConnectConnector extends solanaCore.SolanaWalletConnector {
|
|
|
532
532
|
});
|
|
533
533
|
return signature;
|
|
534
534
|
}
|
|
535
|
-
throw new utils.DynamicError('Wallet does not support signing and sending transactions. Please connect to a wallet that supports at least solana_signTransaction.');
|
|
535
|
+
throw new utils.DynamicError('Wallet does not support signing and sending transactions. Please connect to a wallet that supports at least solana_signTransaction.', 'wallet_does_not_support_signing_and');
|
|
536
536
|
});
|
|
537
537
|
}
|
|
538
538
|
getDeepLink() {
|
|
@@ -45,7 +45,7 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
45
45
|
this.overrideKey = opts.overrideKey;
|
|
46
46
|
}
|
|
47
47
|
if (!opts.projectId) {
|
|
48
|
-
throw new DynamicError('WalletConnect project ID is required');
|
|
48
|
+
throw new DynamicError('WalletConnect project ID is required', 'walletconnect_project_id_is_required');
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
get deepLinkPreference() {
|
|
@@ -58,7 +58,7 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
58
58
|
*/
|
|
59
59
|
get signClient() {
|
|
60
60
|
if (!SolanaWalletConnectConnector.signClientReference) {
|
|
61
|
-
throw new DynamicError('Failed to access sign client for Wallet Connect Solana: Sign client not initialized');
|
|
61
|
+
throw new DynamicError('Failed to access sign client for Wallet Connect Solana: Sign client not initialized', 'access_sign_client_for_wallet_connect');
|
|
62
62
|
}
|
|
63
63
|
return SolanaWalletConnectConnector.signClientReference;
|
|
64
64
|
}
|
|
@@ -110,7 +110,7 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
110
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
111
111
|
yield this.validateActiveWallet(from);
|
|
112
112
|
if (this.isSendBalanceUnsupported()) {
|
|
113
|
-
throw new DynamicError('Wallet does not support signing transactions. Please connect to a wallet that supports signing transactions.');
|
|
113
|
+
throw new DynamicError('Wallet does not support signing transactions. Please connect to a wallet that supports signing transactions.', 'wallet_does_not_support_signing_transactions');
|
|
114
114
|
}
|
|
115
115
|
const transaction = new SolanaUiTransaction({
|
|
116
116
|
connection: this.getWalletClient(),
|
|
@@ -321,7 +321,7 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
321
321
|
// and the sign client is still initializing
|
|
322
322
|
const signClient = yield SolanaWalletConnectConnector.signClientPromise;
|
|
323
323
|
if (!signClient) {
|
|
324
|
-
throw new DynamicError('Failed to access sign client for Wallet Connect Solana: Sign client not initialized');
|
|
324
|
+
throw new DynamicError('Failed to access sign client for Wallet Connect Solana: Sign client not initialized', 'access_sign_client_for_wallet_connect');
|
|
325
325
|
}
|
|
326
326
|
try {
|
|
327
327
|
const { approval, uri } = yield signClient.connect({
|
|
@@ -359,7 +359,7 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
359
359
|
return __awaiter(this, arguments, void 0, function* ({ method, params, }) {
|
|
360
360
|
var _b, _c;
|
|
361
361
|
if (!this.session) {
|
|
362
|
-
throw new DynamicError('Session not initialized. Please connect to a wallet first.');
|
|
362
|
+
throw new DynamicError('Session not initialized. Please connect to a wallet first.', 'session_not_initialized_please_connect_to');
|
|
363
363
|
}
|
|
364
364
|
const chainHash = (_c = (_b = this.getSelectedNetwork()) === null || _b === void 0 ? void 0 : _b.genesisHash) !== null && _c !== void 0 ? _c : this.solNetworks[0].genesisHash;
|
|
365
365
|
const chainId = `solana:${chainHash}`;
|
|
@@ -382,7 +382,7 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
382
382
|
// Yes their error message has a typo on "occured"
|
|
383
383
|
if (error.message === 'An error has occured. Please, try again.') {
|
|
384
384
|
yield this.endSession();
|
|
385
|
-
throw new DynamicError('Wallet connection lost. Please, try again.');
|
|
385
|
+
throw new DynamicError('Wallet connection lost. Please, try again.', 'wallet_connection_lost_please_try_again');
|
|
386
386
|
}
|
|
387
387
|
throw error;
|
|
388
388
|
}
|
|
@@ -421,7 +421,7 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
421
421
|
}
|
|
422
422
|
const activeAddress = this.getActiveAddress();
|
|
423
423
|
if (!activeAddress) {
|
|
424
|
-
throw new DynamicError('No active address found');
|
|
424
|
+
throw new DynamicError('No active address found', 'no_active_address_found');
|
|
425
425
|
}
|
|
426
426
|
const { signature } = yield this.signClientRequest({
|
|
427
427
|
method: 'solana_signMessage',
|
|
@@ -444,7 +444,7 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
444
444
|
return __awaiter(this, void 0, void 0, function* () {
|
|
445
445
|
const activeAddress = this.getActiveAddress();
|
|
446
446
|
if (!activeAddress) {
|
|
447
|
-
throw new DynamicError('Active account address is required');
|
|
447
|
+
throw new DynamicError('Active account address is required', 'active_account_address_is_required');
|
|
448
448
|
}
|
|
449
449
|
logger.debug('[SolanaWalletConnect] Signing transaction', {
|
|
450
450
|
activeAddress,
|
|
@@ -509,7 +509,7 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
509
509
|
: 'N/A',
|
|
510
510
|
});
|
|
511
511
|
if (!isSigned) {
|
|
512
|
-
throw new DynamicError('Transaction returned from wallet was not properly signed. The wallet may have rejected the signing request.');
|
|
512
|
+
throw new DynamicError('Transaction returned from wallet was not properly signed. The wallet may have rejected the signing request.', 'transaction_returned_from_wallet_was_not');
|
|
513
513
|
}
|
|
514
514
|
// When sending a signed transaction, serialize it without flags
|
|
515
515
|
// (requireAllSignatures and verifySignatures are only for unsigned transactions)
|
|
@@ -523,7 +523,7 @@ class SolanaWalletConnectConnector extends SolanaWalletConnector {
|
|
|
523
523
|
});
|
|
524
524
|
return signature;
|
|
525
525
|
}
|
|
526
|
-
throw new DynamicError('Wallet does not support signing and sending transactions. Please connect to a wallet that supports at least solana_signTransaction.');
|
|
526
|
+
throw new DynamicError('Wallet does not support signing and sending transactions. Please connect to a wallet that supports at least solana_signTransaction.', 'wallet_does_not_support_signing_and');
|
|
527
527
|
});
|
|
528
528
|
}
|
|
529
529
|
getDeepLink() {
|