@dynamic-labs/aleo 5.3.2 → 5.4.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,38 @@
1
1
 
2
+ ### [5.4.1](https://github.com/dynamic-labs/dynamic-auth/compare/v5.4.0...v5.4.1) (2026-08-26)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * **webview-controller:** resolve which keychain key a session belongs to ([#12246](https://github.com/dynamic-labs/dynamic-auth/issues/12246)) ([3d110db](https://github.com/dynamic-labs/dynamic-auth/commit/3d110db831c6e9d82d07d86841f5c7733924b17e))
8
+ * **bitcoin:** forward the password through the BTC importPrivateKey override ([#12278](https://github.com/dynamic-labs/dynamic-auth/issues/12278)) ([21e1df3](https://github.com/dynamic-labs/dynamic-auth/commit/21e1df3e33e96e2efdb15ffa0fd29a441056202e))
9
+ * **react-native-extension:** recover 4.x expo-secure-store sessions on keychain miss ([#12254](https://github.com/dynamic-labs/dynamic-auth/issues/12254)) ([217e991](https://github.com/dynamic-labs/dynamic-auth/commit/217e991838f3073c12e2d2fab7a2e12830faad9e)), closes [#12092](https://github.com/dynamic-labs/dynamic-auth/issues/12092) [#12092](https://github.com/dynamic-labs/dynamic-auth/issues/12092) [#12092](https://github.com/dynamic-labs/dynamic-auth/issues/12092) [#12092](https://github.com/dynamic-labs/dynamic-auth/issues/12092) [#12242](https://github.com/dynamic-labs/dynamic-auth/issues/12242) [#12242](https://github.com/dynamic-labs/dynamic-auth/issues/12242)
10
+ * **transaction-card:** use walletConnector prop for network/fee instead of primaryWallet ([#12063](https://github.com/dynamic-labs/dynamic-auth/issues/12063)) ([81314d2](https://github.com/dynamic-labs/dynamic-auth/commit/81314d25fba4b20ab89631bc2d9ceeb9e2b6b2ac))
11
+ * **waas-svm:** instrument sponsorship retry attempts ([#12281](https://github.com/dynamic-labs/dynamic-auth/issues/12281)) ([7273a4b](https://github.com/dynamic-labs/dynamic-auth/commit/7273a4bc456cad512c0e9fbcd2abd66532a2f7df))
12
+ * **webview-controller:** recover 4.x secure-storage sessions and surface init failures ([#12242](https://github.com/dynamic-labs/dynamic-auth/issues/12242)) ([b51605c](https://github.com/dynamic-labs/dynamic-auth/commit/b51605cc9bdbb5d695173192c502a58d899bbbdd)), closes [#12094](https://github.com/dynamic-labs/dynamic-auth/issues/12094) [#12095](https://github.com/dynamic-labs/dynamic-auth/issues/12095) [#12098](https://github.com/dynamic-labs/dynamic-auth/issues/12098) [dynamic-labs/flutter-sdk#256](https://github.com/dynamic-labs/flutter-sdk/issues/256)
13
+
14
+ ## [5.4.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.3.2...v5.4.0) (2026-08-25)
15
+
16
+
17
+ ### Features
18
+
19
+ * **aleo:** wire up signMessage on the WaaS Aleo connector ([#12235](https://github.com/dynamic-labs/dynamic-auth/issues/12235)) ([e56cbf5](https://github.com/dynamic-labs/dynamic-auth/commit/e56cbf5546bdcc21ce916dece43ae36dcea9b808))
20
+ * **waas:** thread isRawScalarImport through importPrivateKey for ed25519 chains ([#12220](https://github.com/dynamic-labs/dynamic-auth/issues/12220)) ([ced9efa](https://github.com/dynamic-labs/dynamic-auth/commit/ced9efac5fa5a4a1280383419f56fe22733722cd))
21
+ * **webview:** add policies message contract and controller ([#12248](https://github.com/dynamic-labs/dynamic-auth/issues/12248)) ([8557c1e](https://github.com/dynamic-labs/dynamic-auth/commit/8557c1ed3861e12f1f06b2bb610184813b577daa))
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * **bitcoin:** pass the wallet's address type when signing ([#12265](https://github.com/dynamic-labs/dynamic-auth/issues/12265)) ([b8a8eab](https://github.com/dynamic-labs/dynamic-auth/commit/b8a8eab7e4cc294cc307fb10ea6814e76111a274))
27
+ * remediate high-severity tar vulnerability and prune a dead override ([#12268](https://github.com/dynamic-labs/dynamic-auth/issues/12268)) ([6b1b343](https://github.com/dynamic-labs/dynamic-auth/commit/6b1b343e7947e8da30012446677e342ae9bfe14a))
28
+ * **waas-svm:** fix retry-classification and environmentId gaps in [#12240](https://github.com/dynamic-labs/dynamic-auth/issues/12240) ([#12247](https://github.com/dynamic-labs/dynamic-auth/issues/12247)) ([e79cecc](https://github.com/dynamic-labs/dynamic-auth/commit/e79ceccd424c48c3a7f45fdd6ea288c269ac0171))
29
+ * **wallet-connect:** reopen WalletConnect IndexedDB when the browser closes the connection ([#12262](https://github.com/dynamic-labs/dynamic-auth/issues/12262)) ([1a20dde](https://github.com/dynamic-labs/dynamic-auth/commit/1a20ddeaeec590ae3390c9e47ef3c14738379b83))
30
+
31
+
32
+ ### Performance Improvements
33
+
34
+ * **ethereum-gasless-core:** parallel 7702 auth signing and long-poll sponsored-tx status ([#12225](https://github.com/dynamic-labs/dynamic-auth/issues/12225)) ([53ca916](https://github.com/dynamic-labs/dynamic-auth/commit/53ca91668f8dd839c52d55a0e5d7bb5257f7f415))
35
+
2
36
  ### [5.3.2](https://github.com/dynamic-labs/dynamic-auth/compare/v5.3.1...v5.3.2) (2026-08-19)
3
37
 
4
38
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "5.3.2";
6
+ var version = "5.4.1";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "5.3.2";
2
+ var version = "5.4.1";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/aleo",
3
- "version": "5.3.2",
3
+ "version": "5.4.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",
@@ -18,19 +18,19 @@
18
18
  },
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
- "@dynamic-labs/assert-package-version": "5.3.2",
22
- "@dynamic-labs-sdk/client": "1.27.1",
21
+ "@dynamic-labs/assert-package-version": "5.4.1",
22
+ "@dynamic-labs-sdk/client": "1.29.0",
23
23
  "@dynamic-labs/sdk-api-core": "0.12.0",
24
24
  "@provablehq/aleo-wallet-adaptor-core": "0.3.0-alpha.3",
25
25
  "@provablehq/aleo-wallet-adaptor-shield": "0.3.0-alpha.3",
26
26
  "@provablehq/aleo-wallet-standard": "0.3.0-alpha.3",
27
27
  "@provablehq/aleo-types": "0.3.0-alpha.3",
28
- "@dynamic-labs/logger": "5.3.2",
29
- "@dynamic-labs/types": "5.3.2",
30
- "@dynamic-labs/utils": "5.3.2",
31
- "@dynamic-labs/waas": "5.3.2",
32
- "@dynamic-labs/wallet-book": "5.3.2",
33
- "@dynamic-labs/wallet-connector-core": "5.3.2"
28
+ "@dynamic-labs/logger": "5.4.1",
29
+ "@dynamic-labs/types": "5.4.1",
30
+ "@dynamic-labs/utils": "5.4.1",
31
+ "@dynamic-labs/waas": "5.4.1",
32
+ "@dynamic-labs/wallet-book": "5.4.1",
33
+ "@dynamic-labs/wallet-connector-core": "5.4.1"
34
34
  },
35
35
  "peerDependencies": {}
36
36
  }
@@ -4,6 +4,7 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var _tslib = require('../../../_virtual/_tslib.cjs');
7
+ var sdkApiCore = require('@dynamic-labs/sdk-api-core');
7
8
  var utils = require('@dynamic-labs/utils');
8
9
  var waas = require('@dynamic-labs/waas');
9
10
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
@@ -227,10 +228,10 @@ const hasUsableRecordShape = (r) => {
227
228
  };
228
229
  /**
229
230
  * Dynamic WaaS connector for Aleo.
230
- * Phase 1: supports wallet creation (MPC keygen → aleo1... address) and
231
- * retrieval of the active WaaS wallet. signMessage and signTransaction
232
- * throw NotSupported until Sodot adds `EdBls12377.sign(bytes)` and we wire up
233
- * the Aleo `signRequest` ceremony.
231
+ * Supports wallet creation (MPC keygen → aleo1... address), message signing
232
+ * (Aleo Schnorr signatures via Sodot's EdBls12377.signBytes), and retrieval
233
+ * of the active WaaS wallet. signTransaction throws NotSupported until we
234
+ * wire up the Aleo `signRequest` ceremony.
234
235
  */
235
236
  class DynamicWaasAleoConnector extends waas.withDynamicWaas(WaasAleoWalletConnector.WaasAleoWalletConnector) {
236
237
  constructor(props) {
@@ -335,11 +336,42 @@ class DynamicWaasAleoConnector extends waas.withDynamicWaas(WaasAleoWalletConnec
335
336
  return this.activeAccountAddress ? [this.activeAccountAddress] : [];
336
337
  });
337
338
  }
338
- // Phase 1: signMessage not supported (Sodot EdBls12377 lacks sign(bytes))
339
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
340
339
  signMessage(message) {
341
340
  return _tslib.__awaiter(this, void 0, void 0, function* () {
342
- throw new utils.DynamicError('Aleo signMessage is not supported yet — pending EdBls12377.sign(bytes) from Sodot', 'aleo_signmessage_is_not_supported_yet');
341
+ return this.walletUiUtils.signMessage({
342
+ handler: () => _tslib.__awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message); }),
343
+ message,
344
+ walletConnector: this,
345
+ });
346
+ });
347
+ }
348
+ internalSignMessage(message) {
349
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
350
+ var _a, _b, _c;
351
+ const walletClient = yield this.getWaasWalletClient();
352
+ this.ensureActiveAccountFromVerifiedCredentials();
353
+ if (!this.activeAccountAddress) {
354
+ throw new utils.DynamicError('Active account address is required', 'active_account_address_is_required');
355
+ }
356
+ const signedSessionId = yield this.requireSignedSessionId();
357
+ const mfaToken = yield ((_a = this.getMfaToken) === null || _a === void 0 ? void 0 : _a.call(this, {
358
+ mfaAction: sdkApiCore.MFAAction.WalletWaasSign,
359
+ }));
360
+ const elevatedAccessToken = yield ((_b = this.getElevatedAccessToken) === null || _b === void 0 ? void 0 : _b.call(this, {
361
+ scope: sdkApiCore.TokenScope.Walletsign,
362
+ }));
363
+ const password = yield this.getPasswordIfNeeded({
364
+ accountAddress: this.activeAccountAddress,
365
+ });
366
+ return walletClient.signMessage({
367
+ accountAddress: this.activeAccountAddress,
368
+ authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
369
+ elevatedAccessToken,
370
+ message,
371
+ mfaToken,
372
+ password,
373
+ signedSessionId,
374
+ });
343
375
  });
344
376
  }
345
377
  /* eslint-disable @typescript-eslint/no-unused-vars */
@@ -1,5 +1,5 @@
1
1
  import type { LogoutReason } from '@dynamic-labs-sdk/client';
2
- import { JwtVerifiedCredential, SignMessageContext } from '@dynamic-labs/sdk-api-core';
2
+ import { JwtVerifiedCredential, MFAAction, SignMessageContext, TokenScope } from '@dynamic-labs/sdk-api-core';
3
3
  import { IUITransaction, WalletUiUtils } from '@dynamic-labs/types';
4
4
  import { IDynamicWaasConnector, InternalWalletConnector } from '@dynamic-labs/wallet-connector-core';
5
5
  import { Logger } from '@dynamic-labs/logger';
@@ -26,12 +26,12 @@ declare const DynamicWaasAleoConnector_base: (abstract new (...args: any[]) => {
26
26
  getSignedSessionId?: (() => Promise<string>) | undefined;
27
27
  getSessionPublicKey?: (() => Promise<string | undefined>) | undefined;
28
28
  getMfaToken?: ((props?: {
29
- mfaAction?: import("@dynamic-labs-sdk/client").MFAAction | undefined;
29
+ mfaAction?: MFAAction | undefined;
30
30
  } | undefined) => Promise<string | undefined>) | undefined;
31
31
  getWalletPassword?: import("@dynamic-labs/wallet-connector-core").GetWalletPasswordFn | undefined;
32
32
  getAuthToken?: (() => string) | undefined;
33
33
  getElevatedAccessToken?: ((props: {
34
- scope: import("@dynamic-labs-sdk/client").TokenScope;
34
+ scope: TokenScope;
35
35
  }) => Promise<string | undefined>) | undefined;
36
36
  onUnauthorized?: (() => void | Promise<void>) | undefined;
37
37
  environmentId?: string | undefined;
@@ -49,10 +49,10 @@ declare const DynamicWaasAleoConnector_base: (abstract new (...args: any[]) => {
49
49
  setOnUnauthorizedFunction(onUnauthorized: () => void | Promise<void>): void;
50
50
  setWaasAuthMode(authMode: "cookie" | "header"): void;
51
51
  setGetMfaTokenFunction(getMfaToken: (props?: {
52
- mfaAction?: import("@dynamic-labs-sdk/client").MFAAction | undefined;
52
+ mfaAction?: MFAAction | undefined;
53
53
  } | undefined) => Promise<string | undefined>): void;
54
54
  setGetElevatedAccessTokenFunction(getElevatedAccessToken: (params: {
55
- scope: import("@dynamic-labs-sdk/client").TokenScope;
55
+ scope: TokenScope;
56
56
  }) => Promise<string | undefined>): void;
57
57
  setGetWalletPasswordFunction(getWalletPassword: import("@dynamic-labs/wallet-connector-core").GetWalletPasswordFn): void;
58
58
  getPasswordIfNeeded({ accountAddress, }: {
@@ -79,12 +79,7 @@ declare const DynamicWaasAleoConnector_base: (abstract new (...args: any[]) => {
79
79
  getWaasWalletClient(traceContext?: import("dist/packages/waas/utils/instrumentation").TraceContext | undefined, { forceRebuild }?: {
80
80
  forceRebuild?: boolean | undefined;
81
81
  } | undefined): Promise<import("@dynamic-labs-wallet/browser-wallet-client").DynamicWalletClient>;
82
- createWalletAccount({ thresholdSignatureScheme, password, bitcoinConfig, businessAccountId, }?: {
83
- thresholdSignatureScheme?: string | undefined;
84
- password?: string | undefined;
85
- bitcoinConfig?: import("@dynamic-labs-wallet/browser-wallet-client").BitcoinConfig | undefined;
86
- businessAccountId?: string | undefined;
87
- } | undefined): Promise<{
82
+ createWalletAccount({ thresholdSignatureScheme, password, bitcoinConfig, businessAccountId, }?: import("@dynamic-labs/wallet-connector-core").CreateWalletAccountParams | undefined): Promise<{
88
83
  chainName: string;
89
84
  accountAddress: string;
90
85
  publicKeyHex: string;
@@ -104,14 +99,7 @@ declare const DynamicWaasAleoConnector_base: (abstract new (...args: any[]) => {
104
99
  }): Promise<{
105
100
  shareSetId: string;
106
101
  }>;
107
- importPrivateKey({ privateKey, thresholdSignatureScheme, publicAddressCheck, addressType, legacyWalletId, password, }: {
108
- privateKey: string;
109
- thresholdSignatureScheme?: string | undefined;
110
- publicAddressCheck?: string | undefined;
111
- addressType?: string | undefined;
112
- legacyWalletId?: string | undefined;
113
- password?: string | undefined;
114
- }): Promise<void>;
102
+ importPrivateKey({ privateKey, thresholdSignatureScheme, publicAddressCheck, addressType, legacyWalletId, password, isRawScalarImport, }: import("@dynamic-labs/wallet-connector-core").ImportPrivateKeyParams): Promise<void>;
115
103
  migrateFromFireblocks({ deviceId, jwt, walletPassword, ncwStorage, expectedAddresses, coinTypes, password, }: {
116
104
  deviceId: string;
117
105
  jwt: string;
@@ -129,10 +117,7 @@ declare const DynamicWaasAleoConnector_base: (abstract new (...args: any[]) => {
129
117
  getExportHandler(): {
130
118
  clear: () => void;
131
119
  };
132
- exportClientKeyshares({ accountAddress, password, }: {
133
- accountAddress: string;
134
- password?: string | undefined;
135
- }): Promise<void>;
120
+ exportClientKeyshares({ accountAddress, password, }: import("@dynamic-labs/wallet-connector-core").ExportClientKeysharesParams): Promise<void>;
136
121
  runBackupLifecycle({ provider, accountAddress, password, performBackup, }: {
137
122
  provider: string;
138
123
  accountAddress: string;
@@ -148,11 +133,7 @@ declare const DynamicWaasAleoConnector_base: (abstract new (...args: any[]) => {
148
133
  };
149
134
  }) => Promise<void>;
150
135
  }): Promise<void>;
151
- backupKeySharesToGoogleDrive({ accountAddress, password, googleDriveAccessToken, }: {
152
- accountAddress: string;
153
- password?: string | undefined;
154
- googleDriveAccessToken?: string | undefined;
155
- }): Promise<void>;
136
+ backupKeySharesToGoogleDrive({ accountAddress, password, googleDriveAccessToken, }: import("@dynamic-labs/wallet-connector-core").BackupKeySharesToGoogleDriveParams): Promise<void>;
156
137
  exportClientKeysharesFromGoogleDrive({ accountAddress, password, }: {
157
138
  accountAddress: string;
158
139
  password?: string | undefined;
@@ -166,24 +147,13 @@ declare const DynamicWaasAleoConnector_base: (abstract new (...args: any[]) => {
166
147
  }): Promise<void>;
167
148
  hideICloudSignIn(): Promise<void>;
168
149
  isICloudAuthenticated(): Promise<boolean>;
169
- refreshWalletAccountShares({ accountAddress, password, }: {
170
- accountAddress: string;
171
- password?: string | undefined;
172
- }): Promise<void>;
173
- reshareWalletAccountShares({ accountAddress, thresholdSignatureScheme, password, }: {
174
- accountAddress: string;
175
- thresholdSignatureScheme: string;
176
- password?: string | undefined;
177
- }): Promise<void>;
150
+ refreshWalletAccountShares({ accountAddress, password, }: import("@dynamic-labs/wallet-connector-core").RefreshWalletAccountSharesParams): Promise<void>;
151
+ reshareWalletAccountShares({ accountAddress, thresholdSignatureScheme, password, }: import("@dynamic-labs/wallet-connector-core").ReshareWalletAccountSharesParams): Promise<void>;
178
152
  revokeDelegation({ accountAddress, password, }: {
179
153
  accountAddress: string;
180
154
  password?: string | undefined;
181
155
  }): Promise<void>;
182
- updatePassword({ accountAddress, existingPassword, newPassword, }: {
183
- accountAddress: string;
184
- existingPassword?: string | undefined;
185
- newPassword: string;
186
- }): Promise<void>;
156
+ updatePassword({ accountAddress, existingPassword, newPassword, }: import("@dynamic-labs/wallet-connector-core").UpdatePasswordParams): Promise<void>;
187
157
  setPassword({ accountAddress, newPassword, }: {
188
158
  accountAddress: string;
189
159
  newPassword: string;
@@ -240,10 +210,10 @@ declare const DynamicWaasAleoConnector_base: (abstract new (...args: any[]) => {
240
210
  }) & typeof WaasAleoWalletConnector;
241
211
  /**
242
212
  * Dynamic WaaS connector for Aleo.
243
- * Phase 1: supports wallet creation (MPC keygen → aleo1... address) and
244
- * retrieval of the active WaaS wallet. signMessage and signTransaction
245
- * throw NotSupported until Sodot adds `EdBls12377.sign(bytes)` and we wire up
246
- * the Aleo `signRequest` ceremony.
213
+ * Supports wallet creation (MPC keygen → aleo1... address), message signing
214
+ * (Aleo Schnorr signatures via Sodot's EdBls12377.signBytes), and retrieval
215
+ * of the active WaaS wallet. signTransaction throws NotSupported until we
216
+ * wire up the Aleo `signRequest` ceremony.
247
217
  */
248
218
  export declare class DynamicWaasAleoConnector extends DynamicWaasAleoConnector_base implements IDynamicWaasConnector {
249
219
  ChainWallet: typeof AleoWallet;
@@ -271,6 +241,7 @@ export declare class DynamicWaasAleoConnector extends DynamicWaasAleoConnector_b
271
241
  connect(): Promise<void>;
272
242
  getConnectedAccounts(): Promise<string[]>;
273
243
  signMessage(message: string): Promise<string>;
244
+ internalSignMessage(message: string): Promise<string>;
274
245
  signMessageWithContext({ message, context, }: {
275
246
  message: string | {
276
247
  raw: string;
@@ -1,5 +1,6 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../_virtual/_tslib.js';
3
+ import { MFAAction, TokenScope } from '@dynamic-labs/sdk-api-core';
3
4
  import { DynamicError } from '@dynamic-labs/utils';
4
5
  import { withDynamicWaas } from '@dynamic-labs/waas';
5
6
  import { isSameAddress } from '@dynamic-labs/wallet-connector-core';
@@ -223,10 +224,10 @@ const hasUsableRecordShape = (r) => {
223
224
  };
224
225
  /**
225
226
  * Dynamic WaaS connector for Aleo.
226
- * Phase 1: supports wallet creation (MPC keygen → aleo1... address) and
227
- * retrieval of the active WaaS wallet. signMessage and signTransaction
228
- * throw NotSupported until Sodot adds `EdBls12377.sign(bytes)` and we wire up
229
- * the Aleo `signRequest` ceremony.
227
+ * Supports wallet creation (MPC keygen → aleo1... address), message signing
228
+ * (Aleo Schnorr signatures via Sodot's EdBls12377.signBytes), and retrieval
229
+ * of the active WaaS wallet. signTransaction throws NotSupported until we
230
+ * wire up the Aleo `signRequest` ceremony.
230
231
  */
231
232
  class DynamicWaasAleoConnector extends withDynamicWaas(WaasAleoWalletConnector) {
232
233
  constructor(props) {
@@ -331,11 +332,42 @@ class DynamicWaasAleoConnector extends withDynamicWaas(WaasAleoWalletConnector)
331
332
  return this.activeAccountAddress ? [this.activeAccountAddress] : [];
332
333
  });
333
334
  }
334
- // Phase 1: signMessage not supported (Sodot EdBls12377 lacks sign(bytes))
335
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
336
335
  signMessage(message) {
337
336
  return __awaiter(this, void 0, void 0, function* () {
338
- throw new DynamicError('Aleo signMessage is not supported yet — pending EdBls12377.sign(bytes) from Sodot', 'aleo_signmessage_is_not_supported_yet');
337
+ return this.walletUiUtils.signMessage({
338
+ handler: () => __awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message); }),
339
+ message,
340
+ walletConnector: this,
341
+ });
342
+ });
343
+ }
344
+ internalSignMessage(message) {
345
+ return __awaiter(this, void 0, void 0, function* () {
346
+ var _a, _b, _c;
347
+ const walletClient = yield this.getWaasWalletClient();
348
+ this.ensureActiveAccountFromVerifiedCredentials();
349
+ if (!this.activeAccountAddress) {
350
+ throw new DynamicError('Active account address is required', 'active_account_address_is_required');
351
+ }
352
+ const signedSessionId = yield this.requireSignedSessionId();
353
+ const mfaToken = yield ((_a = this.getMfaToken) === null || _a === void 0 ? void 0 : _a.call(this, {
354
+ mfaAction: MFAAction.WalletWaasSign,
355
+ }));
356
+ const elevatedAccessToken = yield ((_b = this.getElevatedAccessToken) === null || _b === void 0 ? void 0 : _b.call(this, {
357
+ scope: TokenScope.Walletsign,
358
+ }));
359
+ const password = yield this.getPasswordIfNeeded({
360
+ accountAddress: this.activeAccountAddress,
361
+ });
362
+ return walletClient.signMessage({
363
+ accountAddress: this.activeAccountAddress,
364
+ authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
365
+ elevatedAccessToken,
366
+ message,
367
+ mfaToken,
368
+ password,
369
+ signedSessionId,
370
+ });
339
371
  });
340
372
  }
341
373
  /* eslint-disable @typescript-eslint/no-unused-vars */