@dynamic-labs/sdk-react-core 5.9.2 → 5.9.3

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,11 @@
1
1
 
2
+ ### [5.9.3](https://github.com/dynamic-labs/dynamic-auth/compare/v5.9.2...v5.9.3) (2026-10-02)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * **deps:** patch undici/joi/webpack-dev-middleware highs (main) ([#12452](https://github.com/dynamic-labs/dynamic-auth/issues/12452)) ([3b2ac12](https://github.com/dynamic-labs/dynamic-auth/commit/3b2ac126153bec03c0f296353a71a97bb61974d9)), closes [#1030-1048](https://github.com/dynamic-labs/dynamic-auth/issues/1030-1048) [#1036](https://github.com/dynamic-labs/dynamic-auth/issues/1036) [#1035](https://github.com/dynamic-labs/dynamic-auth/issues/1035)
8
+
2
9
  ### [5.9.2](https://github.com/dynamic-labs/dynamic-auth/compare/v5.9.1...v5.9.2) (2026-09-28)
3
10
 
4
11
 
package/package.cjs CHANGED
@@ -3,12 +3,12 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "5.9.2";
6
+ var version = "5.9.3";
7
7
  var dependencies = {
8
- "@dynamic-labs/sdk-api-core": "0.40.0",
9
- "@dynamic-labs-sdk/client": "1.33.3",
10
- "@dynamic-labs-wallet/browser-wallet-client": "1.1.18",
11
- "@dynamic-labs-wallet/core": "1.1.18",
8
+ "@dynamic-labs/sdk-api-core": "0.70.0",
9
+ "@dynamic-labs-sdk/client": "1.37.0",
10
+ "@dynamic-labs-wallet/browser-wallet-client": "1.1.27",
11
+ "@dynamic-labs-wallet/core": "1.1.27",
12
12
  "@dynamic-labs-wallet/forward-mpc-client": "1.0.2",
13
13
  "@hcaptcha/react-hcaptcha": "1.4.4",
14
14
  "@marsidev/react-turnstile": "1.5.2",
package/package.js CHANGED
@@ -1,10 +1,10 @@
1
1
  'use client'
2
- var version = "5.9.2";
2
+ var version = "5.9.3";
3
3
  var dependencies = {
4
- "@dynamic-labs/sdk-api-core": "0.40.0",
5
- "@dynamic-labs-sdk/client": "1.33.3",
6
- "@dynamic-labs-wallet/browser-wallet-client": "1.1.18",
7
- "@dynamic-labs-wallet/core": "1.1.18",
4
+ "@dynamic-labs/sdk-api-core": "0.70.0",
5
+ "@dynamic-labs-sdk/client": "1.37.0",
6
+ "@dynamic-labs-wallet/browser-wallet-client": "1.1.27",
7
+ "@dynamic-labs-wallet/core": "1.1.27",
8
8
  "@dynamic-labs-wallet/forward-mpc-client": "1.0.2",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
10
10
  "@marsidev/react-turnstile": "1.5.2",
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "5.9.2",
3
+ "version": "5.9.3",
4
4
  "dependencies": {
5
- "@dynamic-labs/sdk-api-core": "0.40.0",
6
- "@dynamic-labs-sdk/client": "1.33.3",
7
- "@dynamic-labs-wallet/browser-wallet-client": "1.1.18",
8
- "@dynamic-labs-wallet/core": "1.1.18",
5
+ "@dynamic-labs/sdk-api-core": "0.70.0",
6
+ "@dynamic-labs-sdk/client": "1.37.0",
7
+ "@dynamic-labs-wallet/browser-wallet-client": "1.1.27",
8
+ "@dynamic-labs-wallet/core": "1.1.27",
9
9
  "@dynamic-labs-wallet/forward-mpc-client": "1.0.2",
10
10
  "@hcaptcha/react-hcaptcha": "1.4.4",
11
11
  "@marsidev/react-turnstile": "1.5.2",
@@ -19,17 +19,17 @@
19
19
  "react-i18next": "13.5.0",
20
20
  "react-international-phone": "4.5.0",
21
21
  "yup": "0.32.11",
22
- "@dynamic-labs/assert-package-version": "5.9.2",
23
- "@dynamic-labs/iconic": "5.9.2",
24
- "@dynamic-labs/locale": "5.9.2",
25
- "@dynamic-labs/logger": "5.9.2",
26
- "@dynamic-labs/multi-wallet": "5.9.2",
27
- "@dynamic-labs/rpc-providers": "5.9.2",
28
- "@dynamic-labs/store": "5.9.2",
29
- "@dynamic-labs/types": "5.9.2",
30
- "@dynamic-labs/utils": "5.9.2",
31
- "@dynamic-labs/wallet-book": "5.9.2",
32
- "@dynamic-labs/wallet-connector-core": "5.9.2",
22
+ "@dynamic-labs/assert-package-version": "5.9.3",
23
+ "@dynamic-labs/iconic": "5.9.3",
24
+ "@dynamic-labs/locale": "5.9.3",
25
+ "@dynamic-labs/logger": "5.9.3",
26
+ "@dynamic-labs/multi-wallet": "5.9.3",
27
+ "@dynamic-labs/rpc-providers": "5.9.3",
28
+ "@dynamic-labs/store": "5.9.3",
29
+ "@dynamic-labs/types": "5.9.3",
30
+ "@dynamic-labs/utils": "5.9.3",
31
+ "@dynamic-labs/wallet-book": "5.9.3",
32
+ "@dynamic-labs/wallet-connector-core": "5.9.3",
33
33
  "eventemitter3": "5.0.1"
34
34
  },
35
35
  "devDependencies": {
@@ -99,24 +99,28 @@ const useBusinessAccounts = () => {
99
99
  const addBusinessAccountMember = React.useCallback((_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ businessAccountId, userId, identifier, identifierType, role, }) {
100
100
  yield ensureStepUpAuth([sdkApiCore.TokenScope.BusinessAccountmemberadd]);
101
101
  const targetIdentity = { identifier, identifierType, userId };
102
- const result = yield waas.addBusinessAccountMember({ businessAccountId, role, targetIdentity }, dynamicClient);
103
- // A governed account answers with the intent to sign instead of adding
104
- // the member. Sign it with the session key and resend — the session key
105
- // never leaves this WaaS context, so native callers can't do this step.
106
- if (core.isBusinessAccountActionRequired(result) &&
107
- result.reason === 'INTENT_REQUIRED' &&
108
- result.intent) {
109
- // Signs the exact object the ceremony returned, since the enclave
102
+ try {
103
+ return yield waas.addBusinessAccountMember({ businessAccountId, role, targetIdentity }, dynamicClient);
104
+ }
105
+ catch (error) {
106
+ // A governed account with an identifier-based target throws the
107
+ // unsigned intent — the server has no userId to build one for, and
108
+ // the SDK only self-signs when it is known. Sign it with the session
109
+ // key and resend — the session key never leaves this WaaS context,
110
+ // so native callers can't do this step.
111
+ if (!(error instanceof waas.BusinessAccountIntentRequiredError)) {
112
+ throw error;
113
+ }
114
+ // Signs the exact object the server returned, since the enclave
110
115
  // verifies the signature against its canonical form byte-for-byte.
111
- const { intentSignature } = yield waas.signBusinessAccountIntent({ intent: result.intent }, dynamicClient);
116
+ const { intentSignature } = yield waas.signBusinessAccountIntent({ intent: error.intent }, dynamicClient);
112
117
  return waas.addBusinessAccountMember({
113
118
  businessAccountId,
114
119
  role,
115
- signed: { intent: result.intent, intentSignature },
120
+ signedIntent: { intent: error.intent, intentSignature },
116
121
  targetIdentity,
117
122
  }, dynamicClient);
118
123
  }
119
- return result;
120
124
  }), [dynamicClient, ensureStepUpAuth]);
121
125
  const addWalletToBusinessAccount = React.useCallback((input) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
122
126
  yield ensureStepUpAuth([sdkApiCore.TokenScope.BusinessAccountlinkWallet]);
@@ -69,9 +69,9 @@ export type AddBusinessAccountSignerInput = {
69
69
  };
70
70
  export declare const useBusinessAccounts: () => {
71
71
  addBusinessAccountMember: ({ businessAccountId, userId, identifier, identifierType, role, }: AddBusinessAccountMemberInput) => Promise<import("@dynamic-labs-sdk/client/waas").BusinessAccountActionRequired | import("@dynamic-labs-sdk/client/waas").BusinessAccountMember>;
72
- addBusinessAccountSigner: ({ accountAddress, walletId, chainName, businessAccountId, targetSignerIdentity, signerType, password, targetSignerPassword, }: AddBusinessAccountSignerInput) => Promise<import("@dynamic-labs-wallet/core").BusinessAccountActionRequired | {
72
+ addBusinessAccountSigner: ({ accountAddress, walletId, chainName, businessAccountId, targetSignerIdentity, signerType, password, targetSignerPassword, }: AddBusinessAccountSignerInput) => Promise<{
73
73
  shareSetId: string;
74
- }>;
74
+ } | import("@dynamic-labs-wallet/core").BusinessAccountActionRequired>;
75
75
  addWalletToBusinessAccount: (input: AddWalletToBusinessAccountInput) => Promise<import("@dynamic-labs-sdk/client/waas").BusinessAccountActionRequired | import("@dynamic-labs-sdk/client/waas").BusinessAccountDetail>;
76
76
  createBusinessAccount: (input?: CreateBusinessAccountInput) => Promise<any>;
77
77
  createWalletForBusinessAccount: ({ businessAccountId, chainName, thresholdSignatureScheme, password, }: CreateWalletForBusinessAccountInput) => Promise<{
@@ -1,8 +1,8 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../../../_virtual/_tslib.js';
3
3
  import { useMemo, useCallback } from 'react';
4
- import { addBusinessAccountMember, signBusinessAccountIntent, addWalletToBusinessAccount, isBusinessAccountActionRequired as isBusinessAccountActionRequired$1, removeBusinessAccountMember, updateBusinessAccountMemberRole, transferBusinessAccountOwnership, removeBusinessAccountWallet, removeBusinessAccountSigner, updateBusinessAccount } from '@dynamic-labs-sdk/client/waas';
5
- import { isBusinessAccountActionRequired } from '@dynamic-labs-wallet/core';
4
+ import { addBusinessAccountMember, BusinessAccountIntentRequiredError, signBusinessAccountIntent, addWalletToBusinessAccount, isBusinessAccountActionRequired, removeBusinessAccountMember, updateBusinessAccountMemberRole, transferBusinessAccountOwnership, removeBusinessAccountWallet, removeBusinessAccountSigner, updateBusinessAccount } from '@dynamic-labs-sdk/client/waas';
5
+ import { isBusinessAccountActionRequired as isBusinessAccountActionRequired$1 } from '@dynamic-labs-wallet/core';
6
6
  import { TokenScope } from '@dynamic-labs/sdk-api-core';
7
7
  import { useDynamicClient } from '../../../client/client.js';
8
8
  import '@dynamic-labs-sdk/client/core';
@@ -95,24 +95,28 @@ const useBusinessAccounts = () => {
95
95
  const addBusinessAccountMember$1 = useCallback((_a) => __awaiter(void 0, [_a], void 0, function* ({ businessAccountId, userId, identifier, identifierType, role, }) {
96
96
  yield ensureStepUpAuth([TokenScope.BusinessAccountmemberadd]);
97
97
  const targetIdentity = { identifier, identifierType, userId };
98
- const result = yield addBusinessAccountMember({ businessAccountId, role, targetIdentity }, dynamicClient);
99
- // A governed account answers with the intent to sign instead of adding
100
- // the member. Sign it with the session key and resend — the session key
101
- // never leaves this WaaS context, so native callers can't do this step.
102
- if (isBusinessAccountActionRequired(result) &&
103
- result.reason === 'INTENT_REQUIRED' &&
104
- result.intent) {
105
- // Signs the exact object the ceremony returned, since the enclave
98
+ try {
99
+ return yield addBusinessAccountMember({ businessAccountId, role, targetIdentity }, dynamicClient);
100
+ }
101
+ catch (error) {
102
+ // A governed account with an identifier-based target throws the
103
+ // unsigned intent — the server has no userId to build one for, and
104
+ // the SDK only self-signs when it is known. Sign it with the session
105
+ // key and resend — the session key never leaves this WaaS context,
106
+ // so native callers can't do this step.
107
+ if (!(error instanceof BusinessAccountIntentRequiredError)) {
108
+ throw error;
109
+ }
110
+ // Signs the exact object the server returned, since the enclave
106
111
  // verifies the signature against its canonical form byte-for-byte.
107
- const { intentSignature } = yield signBusinessAccountIntent({ intent: result.intent }, dynamicClient);
112
+ const { intentSignature } = yield signBusinessAccountIntent({ intent: error.intent }, dynamicClient);
108
113
  return addBusinessAccountMember({
109
114
  businessAccountId,
110
115
  role,
111
- signed: { intent: result.intent, intentSignature },
116
+ signedIntent: { intent: error.intent, intentSignature },
112
117
  targetIdentity,
113
118
  }, dynamicClient);
114
119
  }
115
- return result;
116
120
  }), [dynamicClient, ensureStepUpAuth]);
117
121
  const addWalletToBusinessAccount$1 = useCallback((input) => __awaiter(void 0, void 0, void 0, function* () {
118
122
  yield ensureStepUpAuth([TokenScope.BusinessAccountlinkWallet]);
@@ -146,7 +150,7 @@ const useBusinessAccounts = () => {
146
150
  throw new Error('addBusinessAccountSigner requires a walletId when no businessAccountId is provided');
147
151
  }
148
152
  const account = yield addWalletToBusinessAccount({ walletId }, dynamicClient);
149
- if (isBusinessAccountActionRequired$1(account)) {
153
+ if (isBusinessAccountActionRequired(account)) {
150
154
  throw new Error(`addBusinessAccountSigner requires approval: ${account.reason}`);
151
155
  }
152
156
  resolvedBusinessAccountId = account.id;
@@ -173,7 +177,7 @@ const useBusinessAccounts = () => {
173
177
  // session key never leaves this WaaS context, so native callers can't
174
178
  // do this step. Signs the exact object the ceremony returned, since the
175
179
  // enclave verifies the signature against its canonical form byte-for-byte.
176
- if (isBusinessAccountActionRequired(reshareResult) &&
180
+ if (isBusinessAccountActionRequired$1(reshareResult) &&
177
181
  reshareResult.reason === 'INTENT_REQUIRED' &&
178
182
  reshareResult.intent) {
179
183
  const { intentSignature } = yield signBusinessAccountIntent({ intent: reshareResult.intent }, dynamicClient);
@@ -20,7 +20,7 @@ export declare const usePolicies: () => {
20
20
  getPolicy: (input: GetPolicyInput) => Promise<{
21
21
  layerId: string;
22
22
  rules: import("@dynamic-labs-sdk/client/waas").PolicyRules;
23
- unmapped: import("@dynamic-labs/sdk-api-core").WaasPolicyRule[];
23
+ unmapped: import("@dynamic-labs-sdk/client").WaasPolicyRule[];
24
24
  updatedAt: Date;
25
25
  }>;
26
26
  getSignerPolicyLayer: ({ shareSetId, walletId }: GetSignerPolicyLayerInput) => Promise<import("@dynamic-labs/sdk-api-core").WaasPolicyLayerResponse>;