@dynamic-labs/embedded-wallet 4.27.0 → 4.27.1

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,14 @@
1
1
 
2
+ ### [4.27.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.27.0...v4.27.1) (2025-08-18)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * apple icon black background ([#9363](https://github.com/dynamic-labs/dynamic-auth/issues/9363)) ([b8242e6](https://github.com/dynamic-labs/dynamic-auth/commit/b8242e699f457036f5dbe5e061617d966b6e639e))
8
+ * issue when signing pbst with embedded wallet ([#9356](https://github.com/dynamic-labs/dynamic-auth/issues/9356)) ([3abac9a](https://github.com/dynamic-labs/dynamic-auth/commit/3abac9a52f27a27a95f576e402163ea9d19f69a5))
9
+ * secondary embedded wallets can register session on transactions and signing ([#9030](https://github.com/dynamic-labs/dynamic-auth/issues/9030)) ([716bd95](https://github.com/dynamic-labs/dynamic-auth/commit/716bd9588ac0c435dd6e3e2f37e93f4c488aa0ae))
10
+ * show native balance when on testnet ([#9329](https://github.com/dynamic-labs/dynamic-auth/issues/9329)) ([d8cbe3b](https://github.com/dynamic-labs/dynamic-auth/commit/d8cbe3b319c2ab2f3579e3759ca45913c7434e44))
11
+
2
12
  ## [4.27.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.26.0...v4.27.0) (2025-08-16)
3
13
 
4
14
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.27.0";
6
+ var version = "4.27.1";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.27.0";
2
+ var version = "4.27.1";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/embedded-wallet",
3
- "version": "4.27.0",
3
+ "version": "4.27.1",
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",
@@ -23,12 +23,12 @@
23
23
  "@turnkey/http": "2.15.0",
24
24
  "@turnkey/iframe-stamper": "2.0.0",
25
25
  "@turnkey/webauthn-stamper": "0.5.0",
26
- "@dynamic-labs/assert-package-version": "4.27.0",
27
- "@dynamic-labs/logger": "4.27.0",
28
- "@dynamic-labs/utils": "4.27.0",
29
- "@dynamic-labs/wallet-book": "4.27.0",
30
- "@dynamic-labs/wallet-connector-core": "4.27.0",
31
- "@dynamic-labs/webauthn": "4.27.0"
26
+ "@dynamic-labs/assert-package-version": "4.27.1",
27
+ "@dynamic-labs/logger": "4.27.1",
28
+ "@dynamic-labs/utils": "4.27.1",
29
+ "@dynamic-labs/wallet-book": "4.27.1",
30
+ "@dynamic-labs/wallet-connector-core": "4.27.1",
31
+ "@dynamic-labs/webauthn": "4.27.1"
32
32
  },
33
33
  "peerDependencies": {}
34
34
  }
@@ -180,7 +180,7 @@ class TurnkeyWalletConnectorBase extends walletConnectorCore.WalletConnectorBase
180
180
  }
181
181
  createOrRestoreSession() {
182
182
  return _tslib.__awaiter(this, arguments, void 0, function* ({ ignoreRestore, } = {}) {
183
- var _a;
183
+ var _a, _b, _c;
184
184
  if (!this.isSessionKeyCompatible() ||
185
185
  TurnkeyWalletConnectorBase.isLoadingSession) {
186
186
  return;
@@ -197,8 +197,12 @@ class TurnkeyWalletConnectorBase extends walletConnectorCore.WalletConnectorBase
197
197
  try {
198
198
  TurnkeyWalletConnectorBase.isLoadingSession = true;
199
199
  this.isLoadingSessionDeferredPromise = new utils.DeferredPromise();
200
+ if (!((_a = this.verifiedCredential) === null || _a === void 0 ? void 0 : _a.id)) {
201
+ throw new utils.DynamicError('No wallet ID found');
202
+ }
200
203
  const sessionKeys = yield this.createOrRestoreSessionFetcherFunction({
201
204
  ignoreRestore,
205
+ walletId: (_b = this.verifiedCredential) === null || _b === void 0 ? void 0 : _b.id,
202
206
  });
203
207
  TurnkeyWalletConnectorBase.sessionKeys = sessionKeys;
204
208
  TurnkeyWalletConnectorBase.apiKeyStamper = new apiKeyStamper.ApiKeyStamper({
@@ -216,7 +220,7 @@ class TurnkeyWalletConnectorBase extends walletConnectorCore.WalletConnectorBase
216
220
  }
217
221
  finally {
218
222
  TurnkeyWalletConnectorBase.isLoadingSession = false;
219
- (_a = this.isLoadingSessionDeferredPromise) === null || _a === void 0 ? void 0 : _a.resolve();
223
+ (_c = this.isLoadingSessionDeferredPromise) === null || _c === void 0 ? void 0 : _c.resolve();
220
224
  }
221
225
  });
222
226
  }
@@ -33,8 +33,9 @@ export declare abstract class TurnkeyWalletConnectorBase extends WalletConnector
33
33
  static sessionKeys: SessionKeys | undefined;
34
34
  static apiKeyStamper: ApiKeyStamper | undefined;
35
35
  private static __exportHandler;
36
- createOrRestoreSessionFetcherFunction: (({ ignoreRestore }: {
36
+ createOrRestoreSessionFetcherFunction: (({ ignoreRestore, walletId, }: {
37
37
  ignoreRestore?: boolean;
38
+ walletId: string;
38
39
  }) => Promise<SessionKeys>) | undefined;
39
40
  removeSessionKeysFunction: (() => Promise<void>) | undefined;
40
41
  constructor(nameAndKey: TurnkeyWalletConnectorNameAndKey, props: TurnkeyConnectorBaseProps);
@@ -65,7 +66,10 @@ export declare abstract class TurnkeyWalletConnectorBase extends WalletConnector
65
66
  get verifiedCredentials(): JwtVerifiedCredentialWithSmartWalletRef[] | undefined;
66
67
  set verifiedCredential(verifiedCredential: JwtVerifiedCredentialWithSmartWalletRef | undefined);
67
68
  get verifiedCredential(): JwtVerifiedCredentialWithSmartWalletRef | undefined;
68
- setSessionKeyFetcher(func: () => Promise<SessionKeys>): void;
69
+ setSessionKeyFetcher(func: ({ ignoreRestore, walletId, }: {
70
+ ignoreRestore?: boolean;
71
+ walletId: string;
72
+ }) => Promise<SessionKeys>): void;
69
73
  setSessionKeyRemoveFunction(func: () => Promise<void>): void;
70
74
  removeSessionKeys: () => Promise<void>;
71
75
  createOrRestoreSession({ ignoreRestore, }?: {
@@ -176,7 +176,7 @@ class TurnkeyWalletConnectorBase extends WalletConnectorBase {
176
176
  }
177
177
  createOrRestoreSession() {
178
178
  return __awaiter(this, arguments, void 0, function* ({ ignoreRestore, } = {}) {
179
- var _a;
179
+ var _a, _b, _c;
180
180
  if (!this.isSessionKeyCompatible() ||
181
181
  TurnkeyWalletConnectorBase.isLoadingSession) {
182
182
  return;
@@ -193,8 +193,12 @@ class TurnkeyWalletConnectorBase extends WalletConnectorBase {
193
193
  try {
194
194
  TurnkeyWalletConnectorBase.isLoadingSession = true;
195
195
  this.isLoadingSessionDeferredPromise = new DeferredPromise();
196
+ if (!((_a = this.verifiedCredential) === null || _a === void 0 ? void 0 : _a.id)) {
197
+ throw new DynamicError('No wallet ID found');
198
+ }
196
199
  const sessionKeys = yield this.createOrRestoreSessionFetcherFunction({
197
200
  ignoreRestore,
201
+ walletId: (_b = this.verifiedCredential) === null || _b === void 0 ? void 0 : _b.id,
198
202
  });
199
203
  TurnkeyWalletConnectorBase.sessionKeys = sessionKeys;
200
204
  TurnkeyWalletConnectorBase.apiKeyStamper = new ApiKeyStamper({
@@ -212,7 +216,7 @@ class TurnkeyWalletConnectorBase extends WalletConnectorBase {
212
216
  }
213
217
  finally {
214
218
  TurnkeyWalletConnectorBase.isLoadingSession = false;
215
- (_a = this.isLoadingSessionDeferredPromise) === null || _a === void 0 ? void 0 : _a.resolve();
219
+ (_c = this.isLoadingSessionDeferredPromise) === null || _c === void 0 ? void 0 : _c.resolve();
216
220
  }
217
221
  });
218
222
  }