@dynamic-labs/embedded-wallet-solana 4.25.4 → 4.25.5
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 -0
- package/package.cjs +4 -4
- package/package.js +4 -4
- package/package.json +11 -11
- package/src/lib/TurnkeySolanaWalletConnector/TurnkeySolanaWalletConnector.cjs +24 -6
- package/src/lib/TurnkeySolanaWalletConnector/TurnkeySolanaWalletConnector.d.ts +5 -5
- package/src/lib/TurnkeySolanaWalletConnector/TurnkeySolanaWalletConnector.js +24 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.25.5](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.4...v4.25.5) (2025-07-27)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add pending account switch copykey ([#9219](https://github.com/dynamic-labs/dynamic-auth/issues/9219)) ([1d88bf2](https://github.com/dynamic-labs/dynamic-auth/commit/1d88bf27c685f122d94cdf66541365eae7e11a64))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* logout user if last wallet removed in connect-only ([#9234](https://github.com/dynamic-labs/dynamic-auth/issues/9234)) ([42ea1ad](https://github.com/dynamic-labs/dynamic-auth/commit/42ea1ad331cd635a1c17fac0dcbf213fa045586d))
|
|
13
|
+
* prevent waas wallet from being created when embedded wallet option is turned on and then off ([#9237](https://github.com/dynamic-labs/dynamic-auth/issues/9237)) ([004a350](https://github.com/dynamic-labs/dynamic-auth/commit/004a350eb0d88d7ad6d3ceea7eb0d889f7d4a6bf))
|
|
14
|
+
* stop generating session keys on wallet linking ([#9244](https://github.com/dynamic-labs/dynamic-auth/issues/9244)) ([7176be9](https://github.com/dynamic-labs/dynamic-auth/commit/7176be93e31ba55dda264e0365c84376272ee945))
|
|
15
|
+
|
|
2
16
|
### [4.25.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.3...v4.25.4) (2025-07-25)
|
|
3
17
|
|
|
4
18
|
|
package/package.cjs
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var version = "4.25.
|
|
6
|
+
var version = "4.25.5";
|
|
7
7
|
var dependencies = {
|
|
8
|
-
"@dynamic-labs/utils": "4.25.
|
|
9
|
-
"@dynamic-labs/logger": "4.25.
|
|
10
|
-
"@dynamic-labs/types": "4.25.
|
|
8
|
+
"@dynamic-labs/utils": "4.25.5",
|
|
9
|
+
"@dynamic-labs/logger": "4.25.5",
|
|
10
|
+
"@dynamic-labs/types": "4.25.5",
|
|
11
11
|
"@dynamic-labs/sdk-api-core": "0.0.728",
|
|
12
12
|
eventemitter3: "5.0.1",
|
|
13
13
|
"@solana/web3.js": "1.98.1",
|
package/package.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
var version = "4.25.
|
|
2
|
+
var version = "4.25.5";
|
|
3
3
|
var dependencies = {
|
|
4
|
-
"@dynamic-labs/utils": "4.25.
|
|
5
|
-
"@dynamic-labs/logger": "4.25.
|
|
6
|
-
"@dynamic-labs/types": "4.25.
|
|
4
|
+
"@dynamic-labs/utils": "4.25.5",
|
|
5
|
+
"@dynamic-labs/logger": "4.25.5",
|
|
6
|
+
"@dynamic-labs/types": "4.25.5",
|
|
7
7
|
"@dynamic-labs/sdk-api-core": "0.0.728",
|
|
8
8
|
eventemitter3: "5.0.1",
|
|
9
9
|
"@solana/web3.js": "1.98.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/embedded-wallet-solana",
|
|
3
|
-
"version": "4.25.
|
|
3
|
+
"version": "4.25.5",
|
|
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,22 +18,22 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs/utils": "4.25.
|
|
22
|
-
"@dynamic-labs/logger": "4.25.
|
|
23
|
-
"@dynamic-labs/types": "4.25.
|
|
21
|
+
"@dynamic-labs/utils": "4.25.5",
|
|
22
|
+
"@dynamic-labs/logger": "4.25.5",
|
|
23
|
+
"@dynamic-labs/types": "4.25.5",
|
|
24
24
|
"@dynamic-labs/sdk-api-core": "0.0.728",
|
|
25
25
|
"eventemitter3": "5.0.1",
|
|
26
26
|
"@solana/web3.js": "1.98.1",
|
|
27
27
|
"@turnkey/iframe-stamper": "2.0.0",
|
|
28
28
|
"@turnkey/solana": "1.0.1",
|
|
29
29
|
"@turnkey/webauthn-stamper": "0.5.0",
|
|
30
|
-
"@dynamic-labs/assert-package-version": "4.25.
|
|
31
|
-
"@dynamic-labs/embedded-wallet": "4.25.
|
|
32
|
-
"@dynamic-labs/rpc-providers": "4.25.
|
|
33
|
-
"@dynamic-labs/solana-core": "4.25.
|
|
34
|
-
"@dynamic-labs/wallet-book": "4.25.
|
|
35
|
-
"@dynamic-labs/wallet-connector-core": "4.25.
|
|
36
|
-
"@dynamic-labs/webauthn": "4.25.
|
|
30
|
+
"@dynamic-labs/assert-package-version": "4.25.5",
|
|
31
|
+
"@dynamic-labs/embedded-wallet": "4.25.5",
|
|
32
|
+
"@dynamic-labs/rpc-providers": "4.25.5",
|
|
33
|
+
"@dynamic-labs/solana-core": "4.25.5",
|
|
34
|
+
"@dynamic-labs/wallet-book": "4.25.5",
|
|
35
|
+
"@dynamic-labs/wallet-connector-core": "4.25.5",
|
|
36
|
+
"@dynamic-labs/webauthn": "4.25.5",
|
|
37
37
|
"viem": "2.29.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {}
|
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var _tslib = require('../../../_virtual/_tslib.cjs');
|
|
7
7
|
var web3_js = require('@solana/web3.js');
|
|
8
|
-
var webauthnStamper = require('@turnkey/webauthn-stamper');
|
|
9
|
-
var solana = require('@turnkey/solana');
|
|
10
8
|
var iframeStamper = require('@turnkey/iframe-stamper');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var solanaCore = require('@dynamic-labs/solana-core');
|
|
9
|
+
var solana = require('@turnkey/solana');
|
|
10
|
+
var webauthnStamper = require('@turnkey/webauthn-stamper');
|
|
14
11
|
var embeddedWallet = require('@dynamic-labs/embedded-wallet');
|
|
12
|
+
var solanaCore = require('@dynamic-labs/solana-core');
|
|
13
|
+
var utils = require('@dynamic-labs/utils');
|
|
14
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
15
15
|
var createSolanaConnection = require('../utils/createSolanaConnection/createSolanaConnection.cjs');
|
|
16
16
|
var api = require('../utils/api/api.cjs');
|
|
17
17
|
var TurnkeySolanaSigner = require('./TurnkeySolanaSigner.cjs');
|
|
@@ -248,17 +248,23 @@ class TurnkeySolanaWalletConnector extends embeddedWallet.TurnkeyWalletConnector
|
|
|
248
248
|
yield this.createOrRestoreSession();
|
|
249
249
|
yield this.walletUiUtils.signMessage({
|
|
250
250
|
handler: () => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
251
|
+
var _a;
|
|
251
252
|
let account = yield this.getTurnkeyAccount();
|
|
252
253
|
try {
|
|
253
254
|
signedMessageRaw = yield (account === null || account === void 0 ? void 0 : account.signMessage(encodedMessage, address));
|
|
254
255
|
}
|
|
255
|
-
catch (
|
|
256
|
+
catch (err) {
|
|
256
257
|
yield this.removeSessionKeys();
|
|
257
258
|
yield this.createOrRestoreSession({
|
|
258
259
|
ignoreRestore: true,
|
|
259
260
|
});
|
|
260
261
|
account = yield this.getTurnkeyAccount();
|
|
261
262
|
signedMessageRaw = yield (account === null || account === void 0 ? void 0 : account.signMessage(encodedMessage, address));
|
|
263
|
+
embeddedWallet.logger.error('[TK - removeSessionKeys] failed to perform signUint8ArrayMessage activity', {
|
|
264
|
+
address,
|
|
265
|
+
err,
|
|
266
|
+
turnkeySubOrganizationId: (_a = this.walletProperties) === null || _a === void 0 ? void 0 : _a.turnkeySubOrganizationId,
|
|
267
|
+
});
|
|
262
268
|
}
|
|
263
269
|
return utils.bufferToBase64(signedMessageRaw || Buffer.from([]));
|
|
264
270
|
}),
|
|
@@ -280,6 +286,7 @@ class TurnkeySolanaWalletConnector extends embeddedWallet.TurnkeyWalletConnector
|
|
|
280
286
|
}
|
|
281
287
|
internalSignTransaction(transaction) {
|
|
282
288
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
289
|
+
var _a;
|
|
283
290
|
yield this.createOrRestoreSession();
|
|
284
291
|
let account = yield this.getTurnkeyAccount();
|
|
285
292
|
const address = this.turnkeyAddress;
|
|
@@ -299,6 +306,11 @@ class TurnkeySolanaWalletConnector extends embeddedWallet.TurnkeyWalletConnector
|
|
|
299
306
|
});
|
|
300
307
|
account = (yield this.getTurnkeyAccount());
|
|
301
308
|
yield account.addSignature(transaction, address);
|
|
309
|
+
embeddedWallet.logger.error('[TK - removeSessionKeys] failed to perform SignTransaction activity', {
|
|
310
|
+
address,
|
|
311
|
+
err,
|
|
312
|
+
turnkeySubOrganizationId: (_a = this.walletProperties) === null || _a === void 0 ? void 0 : _a.turnkeySubOrganizationId,
|
|
313
|
+
});
|
|
302
314
|
}
|
|
303
315
|
else {
|
|
304
316
|
embeddedWallet.logger.error('[TK] failed to perform SignTransaction activity', err);
|
|
@@ -345,6 +357,7 @@ class TurnkeySolanaWalletConnector extends embeddedWallet.TurnkeyWalletConnector
|
|
|
345
357
|
}
|
|
346
358
|
internalSignAllTransactions(transactions) {
|
|
347
359
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
360
|
+
var _a;
|
|
348
361
|
yield this.createOrRestoreSession();
|
|
349
362
|
let account = yield this.getTurnkeyAccount();
|
|
350
363
|
const address = this.turnkeyAddress;
|
|
@@ -365,6 +378,11 @@ class TurnkeySolanaWalletConnector extends embeddedWallet.TurnkeyWalletConnector
|
|
|
365
378
|
});
|
|
366
379
|
account = (yield this.getTurnkeyAccount());
|
|
367
380
|
signedTransactions = yield account.signAllTransactions(transactions, address);
|
|
381
|
+
embeddedWallet.logger.error('[TK - removeSessionKeys] failed to perform SignAllTransactions activity', {
|
|
382
|
+
address,
|
|
383
|
+
err,
|
|
384
|
+
turnkeySubOrganizationId: (_a = this.walletProperties) === null || _a === void 0 ? void 0 : _a.turnkeySubOrganizationId,
|
|
385
|
+
});
|
|
368
386
|
}
|
|
369
387
|
else {
|
|
370
388
|
embeddedWallet.logger.error('[TK] failed to perform SignAllTransactions activity', err);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Commitment, Connection, ConnectionConfig,
|
|
2
|
-
import {
|
|
3
|
-
import { Chain, ISendBalanceWalletConnector, InternalWalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
4
|
-
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
1
|
+
import { Commitment, ConfirmOptions, Connection, ConnectionConfig, SendOptions, Signer, Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
2
|
+
import { TurnkeyWalletConnectorBase, TurnkeyWalletConnectorNameAndKey } from '@dynamic-labs/embedded-wallet';
|
|
5
3
|
import { JwtVerifiedCredential } from '@dynamic-labs/sdk-api-core';
|
|
6
4
|
import { IChainRpcProviders, SolanaWallet, SwitchNetworkOps } from '@dynamic-labs/solana-core';
|
|
7
|
-
import {
|
|
5
|
+
import { GenericNetwork, IUITransaction, WalletUiUtils } from '@dynamic-labs/types';
|
|
6
|
+
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
7
|
+
import { Chain, InternalWalletConnector, ISendBalanceWalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
8
8
|
import { TurnkeySolanaSigner } from './TurnkeySolanaSigner';
|
|
9
9
|
type SendTransactionOptions = ConfirmOptions & {
|
|
10
10
|
signers?: Signer[];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter, __rest } from '../../../_virtual/_tslib.js';
|
|
3
3
|
import { LAMPORTS_PER_SOL, PublicKey } from '@solana/web3.js';
|
|
4
|
-
import { WebauthnStamper } from '@turnkey/webauthn-stamper';
|
|
5
|
-
import { TurnkeySigner } from '@turnkey/solana';
|
|
6
4
|
import { IframeStamper } from '@turnkey/iframe-stamper';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { TurnkeySigner } from '@turnkey/solana';
|
|
6
|
+
import { WebauthnStamper } from '@turnkey/webauthn-stamper';
|
|
7
|
+
import { TurnkeyWalletConnectorBase, findTurnkeyVerifiedCredentials, logger, TURNKEY_SDK_SESSION_KEY_RETRYABLE_ERRORS } from '@dynamic-labs/embedded-wallet';
|
|
9
8
|
import { SolanaWallet, getBackwardsCompatibleSolNetworks, getOverrideRpcUrlForNetwork, DYNAMIC_SVM_NETWORK_ID_LS_KEY, ProviderChain, SolanaUiTransaction, isTxAlreadySigned } from '@dynamic-labs/solana-core';
|
|
10
|
-
import {
|
|
9
|
+
import { DynamicError, bufferToBase64 } from '@dynamic-labs/utils';
|
|
10
|
+
import { isSameAddress } from '@dynamic-labs/wallet-connector-core';
|
|
11
11
|
import { createSolanaConnection } from '../utils/createSolanaConnection/createSolanaConnection.js';
|
|
12
12
|
import { optimizeSolanaTransaction } from '../utils/api/api.js';
|
|
13
13
|
import { TurnkeySolanaSigner } from './TurnkeySolanaSigner.js';
|
|
@@ -244,17 +244,23 @@ class TurnkeySolanaWalletConnector extends TurnkeyWalletConnectorBase {
|
|
|
244
244
|
yield this.createOrRestoreSession();
|
|
245
245
|
yield this.walletUiUtils.signMessage({
|
|
246
246
|
handler: () => __awaiter(this, void 0, void 0, function* () {
|
|
247
|
+
var _a;
|
|
247
248
|
let account = yield this.getTurnkeyAccount();
|
|
248
249
|
try {
|
|
249
250
|
signedMessageRaw = yield (account === null || account === void 0 ? void 0 : account.signMessage(encodedMessage, address));
|
|
250
251
|
}
|
|
251
|
-
catch (
|
|
252
|
+
catch (err) {
|
|
252
253
|
yield this.removeSessionKeys();
|
|
253
254
|
yield this.createOrRestoreSession({
|
|
254
255
|
ignoreRestore: true,
|
|
255
256
|
});
|
|
256
257
|
account = yield this.getTurnkeyAccount();
|
|
257
258
|
signedMessageRaw = yield (account === null || account === void 0 ? void 0 : account.signMessage(encodedMessage, address));
|
|
259
|
+
logger.error('[TK - removeSessionKeys] failed to perform signUint8ArrayMessage activity', {
|
|
260
|
+
address,
|
|
261
|
+
err,
|
|
262
|
+
turnkeySubOrganizationId: (_a = this.walletProperties) === null || _a === void 0 ? void 0 : _a.turnkeySubOrganizationId,
|
|
263
|
+
});
|
|
258
264
|
}
|
|
259
265
|
return bufferToBase64(signedMessageRaw || Buffer.from([]));
|
|
260
266
|
}),
|
|
@@ -276,6 +282,7 @@ class TurnkeySolanaWalletConnector extends TurnkeyWalletConnectorBase {
|
|
|
276
282
|
}
|
|
277
283
|
internalSignTransaction(transaction) {
|
|
278
284
|
return __awaiter(this, void 0, void 0, function* () {
|
|
285
|
+
var _a;
|
|
279
286
|
yield this.createOrRestoreSession();
|
|
280
287
|
let account = yield this.getTurnkeyAccount();
|
|
281
288
|
const address = this.turnkeyAddress;
|
|
@@ -295,6 +302,11 @@ class TurnkeySolanaWalletConnector extends TurnkeyWalletConnectorBase {
|
|
|
295
302
|
});
|
|
296
303
|
account = (yield this.getTurnkeyAccount());
|
|
297
304
|
yield account.addSignature(transaction, address);
|
|
305
|
+
logger.error('[TK - removeSessionKeys] failed to perform SignTransaction activity', {
|
|
306
|
+
address,
|
|
307
|
+
err,
|
|
308
|
+
turnkeySubOrganizationId: (_a = this.walletProperties) === null || _a === void 0 ? void 0 : _a.turnkeySubOrganizationId,
|
|
309
|
+
});
|
|
298
310
|
}
|
|
299
311
|
else {
|
|
300
312
|
logger.error('[TK] failed to perform SignTransaction activity', err);
|
|
@@ -341,6 +353,7 @@ class TurnkeySolanaWalletConnector extends TurnkeyWalletConnectorBase {
|
|
|
341
353
|
}
|
|
342
354
|
internalSignAllTransactions(transactions) {
|
|
343
355
|
return __awaiter(this, void 0, void 0, function* () {
|
|
356
|
+
var _a;
|
|
344
357
|
yield this.createOrRestoreSession();
|
|
345
358
|
let account = yield this.getTurnkeyAccount();
|
|
346
359
|
const address = this.turnkeyAddress;
|
|
@@ -361,6 +374,11 @@ class TurnkeySolanaWalletConnector extends TurnkeyWalletConnectorBase {
|
|
|
361
374
|
});
|
|
362
375
|
account = (yield this.getTurnkeyAccount());
|
|
363
376
|
signedTransactions = yield account.signAllTransactions(transactions, address);
|
|
377
|
+
logger.error('[TK - removeSessionKeys] failed to perform SignAllTransactions activity', {
|
|
378
|
+
address,
|
|
379
|
+
err,
|
|
380
|
+
turnkeySubOrganizationId: (_a = this.walletProperties) === null || _a === void 0 ? void 0 : _a.turnkeySubOrganizationId,
|
|
381
|
+
});
|
|
364
382
|
}
|
|
365
383
|
else {
|
|
366
384
|
logger.error('[TK] failed to perform SignAllTransactions activity', err);
|