@dynamic-labs/embedded-wallet 4.91.3 → 4.91.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 CHANGED
@@ -1,4 +1,21 @@
1
1
 
2
+ ### [4.91.5](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.4...v4.91.5) (2026-07-02)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * revoke WaaS signed-session callback on client rebuild to stop iOS nonce race ([#11766](https://github.com/dynamic-labs/dynamic-auth/issues/11766)) ([c895b5d](https://github.com/dynamic-labs/dynamic-auth/commit/c895b5d0987d62a9f5597741dbeae0ec7fedfe5b))
8
+ * **sdk-react-core:** allow sendOneTimeCode to target non-primary chain wallets ([#11777](https://github.com/dynamic-labs/dynamic-auth/issues/11777)) ([63f82af](https://github.com/dynamic-labs/dynamic-auth/commit/63f82af7c52be595bc2948ec88ee9c919ac9275a))
9
+ * **webview-controller:** resolve post-login wallet race in Viem and ZeroDev controllers ([#11774](https://github.com/dynamic-labs/dynamic-auth/issues/11774)) ([95ed26e](https://github.com/dynamic-labs/dynamic-auth/commit/95ed26eee09d9aff5a5af6517ab7e1360ef5f337))
10
+
11
+ ### [4.91.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.3...v4.91.4) (2026-07-01)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * 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))
17
+ * 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))
18
+
2
19
  ### [4.91.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.2...v4.91.3) (2026-06-30)
3
20
 
4
21
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.91.3";
6
+ var version = "4.91.5";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.91.3";
2
+ var version = "4.91.5";
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.91.3",
3
+ "version": "4.91.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",
@@ -23,12 +23,12 @@
23
23
  "@turnkey/http": "3.10.0",
24
24
  "@turnkey/iframe-stamper": "2.5.0",
25
25
  "@turnkey/webauthn-stamper": "0.5.1",
26
- "@dynamic-labs/assert-package-version": "4.91.3",
27
- "@dynamic-labs/logger": "4.91.3",
28
- "@dynamic-labs/utils": "4.91.3",
29
- "@dynamic-labs/wallet-book": "4.91.3",
30
- "@dynamic-labs/wallet-connector-core": "4.91.3",
31
- "@dynamic-labs/webauthn": "4.91.3"
26
+ "@dynamic-labs/assert-package-version": "4.91.5",
27
+ "@dynamic-labs/logger": "4.91.5",
28
+ "@dynamic-labs/utils": "4.91.5",
29
+ "@dynamic-labs/wallet-book": "4.91.5",
30
+ "@dynamic-labs/wallet-connector-core": "4.91.5",
31
+ "@dynamic-labs/webauthn": "4.91.5"
32
32
  },
33
33
  "peerDependencies": {}
34
34
  }
@@ -37,7 +37,7 @@ class TurnkeyAuthenticatorRecoveryHandler extends BaseTurnkeyHandler.BaseTurnkey
37
37
  this.isValidCode = (organizationId) => _tslib.__awaiter(this, void 0, void 0, function* () {
38
38
  var _a, _b, _c, _d;
39
39
  if (!organizationId || !this.__turnkeyRecoveryUserId) {
40
- throw new utils.DynamicError('Cannot proceed with your request');
40
+ throw new utils.DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
41
41
  }
42
42
  const userResponse = yield ((_a = this.__turnkeyClient) === null || _a === void 0 ? void 0 : _a.getUser({
43
43
  organizationId,
@@ -105,7 +105,7 @@ class TurnkeyAuthenticatorRecoveryHandler extends BaseTurnkeyHandler.BaseTurnkey
105
105
  verifyRecoveryCode(recoveryBundle, organizationId) {
106
106
  return _tslib.__awaiter(this, void 0, void 0, function* () {
107
107
  if (!this.__iframeStamper) {
108
- throw new utils.DynamicError('Cannot proceed with your request');
108
+ throw new utils.DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
109
109
  }
110
110
  try {
111
111
  yield this.__iframeStamper.injectCredentialBundle(recoveryBundle);
@@ -113,10 +113,10 @@ class TurnkeyAuthenticatorRecoveryHandler extends BaseTurnkeyHandler.BaseTurnkey
113
113
  baseUrl: constants.TURNKEY_API_BASE_URL,
114
114
  }, this.__iframeStamper);
115
115
  if (!organizationId || !this.__turnkeyRecoveryUserId) {
116
- throw new utils.DynamicError('Cannot proceed with your request');
116
+ throw new utils.DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
117
117
  }
118
118
  if (!(yield this.isValidCode(organizationId))) {
119
- throw new utils.DynamicError('The code is invalid or expired.');
119
+ throw new utils.DynamicError('The code is invalid or expired.', 'the_code_is_invalid_or_expired');
120
120
  }
121
121
  }
122
122
  catch (err) {
@@ -124,14 +124,14 @@ class TurnkeyAuthenticatorRecoveryHandler extends BaseTurnkeyHandler.BaseTurnkey
124
124
  if (err instanceof utils.DynamicError) {
125
125
  throw err;
126
126
  }
127
- throw new utils.DynamicError('The code is invalid or expired.');
127
+ throw new utils.DynamicError('The code is invalid or expired.', 'the_code_is_invalid_or_expired');
128
128
  }
129
129
  });
130
130
  }
131
131
  completeRecovery(_a) {
132
132
  return _tslib.__awaiter(this, arguments, void 0, function* ({ attestation, challenge, turnkeySubOrganizationId, }) {
133
133
  if (!this.__turnkeyClient || !this.__turnkeyRecoveryUserId) {
134
- throw new utils.DynamicError('Cannot proceed with your request');
134
+ throw new utils.DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
135
135
  }
136
136
  try {
137
137
  return this.__turnkeyClient.recoverUser({
@@ -157,7 +157,7 @@ class TurnkeyAuthenticatorRecoveryHandler extends BaseTurnkeyHandler.BaseTurnkey
157
157
  addPasskeyAuthenticator(_a) {
158
158
  return _tslib.__awaiter(this, arguments, void 0, function* ({ attestation, challenge, turnkeySubOrganizationId, }) {
159
159
  if (!this.__turnkeyClient || !this.__turnkeyRecoveryUserId) {
160
- throw new utils.DynamicError('Cannot proceed with your request');
160
+ throw new utils.DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
161
161
  }
162
162
  try {
163
163
  return this.__turnkeyClient.createAuthenticators({
@@ -33,7 +33,7 @@ class TurnkeyAuthenticatorRecoveryHandler extends BaseTurnkeyHandler {
33
33
  this.isValidCode = (organizationId) => __awaiter(this, void 0, void 0, function* () {
34
34
  var _a, _b, _c, _d;
35
35
  if (!organizationId || !this.__turnkeyRecoveryUserId) {
36
- throw new DynamicError('Cannot proceed with your request');
36
+ throw new DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
37
37
  }
38
38
  const userResponse = yield ((_a = this.__turnkeyClient) === null || _a === void 0 ? void 0 : _a.getUser({
39
39
  organizationId,
@@ -101,7 +101,7 @@ class TurnkeyAuthenticatorRecoveryHandler extends BaseTurnkeyHandler {
101
101
  verifyRecoveryCode(recoveryBundle, organizationId) {
102
102
  return __awaiter(this, void 0, void 0, function* () {
103
103
  if (!this.__iframeStamper) {
104
- throw new DynamicError('Cannot proceed with your request');
104
+ throw new DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
105
105
  }
106
106
  try {
107
107
  yield this.__iframeStamper.injectCredentialBundle(recoveryBundle);
@@ -109,10 +109,10 @@ class TurnkeyAuthenticatorRecoveryHandler extends BaseTurnkeyHandler {
109
109
  baseUrl: TURNKEY_API_BASE_URL,
110
110
  }, this.__iframeStamper);
111
111
  if (!organizationId || !this.__turnkeyRecoveryUserId) {
112
- throw new DynamicError('Cannot proceed with your request');
112
+ throw new DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
113
113
  }
114
114
  if (!(yield this.isValidCode(organizationId))) {
115
- throw new DynamicError('The code is invalid or expired.');
115
+ throw new DynamicError('The code is invalid or expired.', 'the_code_is_invalid_or_expired');
116
116
  }
117
117
  }
118
118
  catch (err) {
@@ -120,14 +120,14 @@ class TurnkeyAuthenticatorRecoveryHandler extends BaseTurnkeyHandler {
120
120
  if (err instanceof DynamicError) {
121
121
  throw err;
122
122
  }
123
- throw new DynamicError('The code is invalid or expired.');
123
+ throw new DynamicError('The code is invalid or expired.', 'the_code_is_invalid_or_expired');
124
124
  }
125
125
  });
126
126
  }
127
127
  completeRecovery(_a) {
128
128
  return __awaiter(this, arguments, void 0, function* ({ attestation, challenge, turnkeySubOrganizationId, }) {
129
129
  if (!this.__turnkeyClient || !this.__turnkeyRecoveryUserId) {
130
- throw new DynamicError('Cannot proceed with your request');
130
+ throw new DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
131
131
  }
132
132
  try {
133
133
  return this.__turnkeyClient.recoverUser({
@@ -153,7 +153,7 @@ class TurnkeyAuthenticatorRecoveryHandler extends BaseTurnkeyHandler {
153
153
  addPasskeyAuthenticator(_a) {
154
154
  return __awaiter(this, arguments, void 0, function* ({ attestation, challenge, turnkeySubOrganizationId, }) {
155
155
  if (!this.__turnkeyClient || !this.__turnkeyRecoveryUserId) {
156
- throw new DynamicError('Cannot proceed with your request');
156
+ throw new DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
157
157
  }
158
158
  try {
159
159
  return this.__turnkeyClient.createAuthenticators({
@@ -48,7 +48,7 @@ class TurnkeyExportHandler extends BaseTurnkeyHandler.BaseTurnkeyHandler {
48
48
  verifyExportWallet(_a) {
49
49
  return _tslib.__awaiter(this, arguments, void 0, function* ({ exportBundle, organizationId, }) {
50
50
  if (!this.__iframeStamper) {
51
- throw new utils.DynamicError('Cannot proceed with your request');
51
+ throw new utils.DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
52
52
  }
53
53
  try {
54
54
  return yield this.__iframeStamper.injectWalletExportBundle(exportBundle, organizationId);
@@ -62,7 +62,7 @@ class TurnkeyExportHandler extends BaseTurnkeyHandler.BaseTurnkeyHandler {
62
62
  verifyExportPrivateKey(_a) {
63
63
  return _tslib.__awaiter(this, arguments, void 0, function* ({ exportBundle, organizationId, chain, }) {
64
64
  if (!this.__iframeStamper) {
65
- throw new utils.DynamicError('Cannot proceed with your request');
65
+ throw new utils.DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
66
66
  }
67
67
  const keyFormat = chain === 'solana' || chain === 'SOL'
68
68
  ? iframeStamper.KeyFormat.Solana
@@ -88,7 +88,7 @@ class TurnkeyExportHandler extends BaseTurnkeyHandler.BaseTurnkeyHandler {
88
88
  !this.__publicKey ||
89
89
  !this.__turnkeyClient ||
90
90
  !privateKeyId) {
91
- throw new utils.DynamicError('Cannot proceed with your request');
91
+ throw new utils.DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
92
92
  }
93
93
  try {
94
94
  const newActivity = yield this.__turnkeyClient.exportPrivateKey({
@@ -117,7 +117,7 @@ class TurnkeyExportHandler extends BaseTurnkeyHandler.BaseTurnkeyHandler {
117
117
  !this.__publicKey ||
118
118
  !this.__turnkeyClient ||
119
119
  !walletId) {
120
- throw new utils.DynamicError('Cannot proceed with your request');
120
+ throw new utils.DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
121
121
  }
122
122
  try {
123
123
  if (address) {
@@ -44,7 +44,7 @@ class TurnkeyExportHandler extends BaseTurnkeyHandler {
44
44
  verifyExportWallet(_a) {
45
45
  return __awaiter(this, arguments, void 0, function* ({ exportBundle, organizationId, }) {
46
46
  if (!this.__iframeStamper) {
47
- throw new DynamicError('Cannot proceed with your request');
47
+ throw new DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
48
48
  }
49
49
  try {
50
50
  return yield this.__iframeStamper.injectWalletExportBundle(exportBundle, organizationId);
@@ -58,7 +58,7 @@ class TurnkeyExportHandler extends BaseTurnkeyHandler {
58
58
  verifyExportPrivateKey(_a) {
59
59
  return __awaiter(this, arguments, void 0, function* ({ exportBundle, organizationId, chain, }) {
60
60
  if (!this.__iframeStamper) {
61
- throw new DynamicError('Cannot proceed with your request');
61
+ throw new DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
62
62
  }
63
63
  const keyFormat = chain === 'solana' || chain === 'SOL'
64
64
  ? KeyFormat.Solana
@@ -84,7 +84,7 @@ class TurnkeyExportHandler extends BaseTurnkeyHandler {
84
84
  !this.__publicKey ||
85
85
  !this.__turnkeyClient ||
86
86
  !privateKeyId) {
87
- throw new DynamicError('Cannot proceed with your request');
87
+ throw new DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
88
88
  }
89
89
  try {
90
90
  const newActivity = yield this.__turnkeyClient.exportPrivateKey({
@@ -113,7 +113,7 @@ class TurnkeyExportHandler extends BaseTurnkeyHandler {
113
113
  !this.__publicKey ||
114
114
  !this.__turnkeyClient ||
115
115
  !walletId) {
116
- throw new DynamicError('Cannot proceed with your request');
116
+ throw new DynamicError('Cannot proceed with your request', 'proceed_with_your_request');
117
117
  }
118
118
  try {
119
119
  if (address) {
@@ -186,7 +186,7 @@ class TurnkeyWalletConnectorBase extends walletConnectorCore.WalletConnectorBase
186
186
  return;
187
187
  }
188
188
  if (!this.createOrRestoreSessionFetcherFunction) {
189
- throw new utils.DynamicError('Cannot register session key to init provider');
189
+ throw new utils.DynamicError('Cannot register session key to init provider', 'register_session_key_to_init_provider');
190
190
  }
191
191
  const { sessionKeys } = TurnkeyWalletConnectorBase;
192
192
  if (sessionKeys === null || sessionKeys === void 0 ? void 0 : sessionKeys.publicKey) {
@@ -198,7 +198,7 @@ class TurnkeyWalletConnectorBase extends walletConnectorCore.WalletConnectorBase
198
198
  TurnkeyWalletConnectorBase.isLoadingSession = true;
199
199
  this.isLoadingSessionDeferredPromise = new utils.DeferredPromise();
200
200
  if (!((_a = this.verifiedCredential) === null || _a === void 0 ? void 0 : _a.id)) {
201
- throw new utils.DynamicError('No wallet ID found');
201
+ throw new utils.DynamicError('No wallet ID found', 'no_wallet_id_found');
202
202
  }
203
203
  const sessionKeys = yield this.createOrRestoreSessionFetcherFunction({
204
204
  ignoreRestore,
@@ -216,7 +216,7 @@ class TurnkeyWalletConnectorBase extends walletConnectorCore.WalletConnectorBase
216
216
  }
217
217
  catch (error) {
218
218
  logger.logger.error(error);
219
- throw new utils.DynamicError('Failed to create or restore session');
219
+ throw new utils.DynamicError('Failed to create or restore session', 'create_or_restore_session');
220
220
  }
221
221
  finally {
222
222
  TurnkeyWalletConnectorBase.isLoadingSession = false;
@@ -182,7 +182,7 @@ class TurnkeyWalletConnectorBase extends WalletConnectorBase {
182
182
  return;
183
183
  }
184
184
  if (!this.createOrRestoreSessionFetcherFunction) {
185
- throw new DynamicError('Cannot register session key to init provider');
185
+ throw new DynamicError('Cannot register session key to init provider', 'register_session_key_to_init_provider');
186
186
  }
187
187
  const { sessionKeys } = TurnkeyWalletConnectorBase;
188
188
  if (sessionKeys === null || sessionKeys === void 0 ? void 0 : sessionKeys.publicKey) {
@@ -194,7 +194,7 @@ class TurnkeyWalletConnectorBase extends WalletConnectorBase {
194
194
  TurnkeyWalletConnectorBase.isLoadingSession = true;
195
195
  this.isLoadingSessionDeferredPromise = new DeferredPromise();
196
196
  if (!((_a = this.verifiedCredential) === null || _a === void 0 ? void 0 : _a.id)) {
197
- throw new DynamicError('No wallet ID found');
197
+ throw new DynamicError('No wallet ID found', 'no_wallet_id_found');
198
198
  }
199
199
  const sessionKeys = yield this.createOrRestoreSessionFetcherFunction({
200
200
  ignoreRestore,
@@ -212,7 +212,7 @@ class TurnkeyWalletConnectorBase extends WalletConnectorBase {
212
212
  }
213
213
  catch (error) {
214
214
  logger.error(error);
215
- throw new DynamicError('Failed to create or restore session');
215
+ throw new DynamicError('Failed to create or restore session', 'create_or_restore_session');
216
216
  }
217
217
  finally {
218
218
  TurnkeyWalletConnectorBase.isLoadingSession = false;