@dynamic-labs/waas-evm 5.11.0 → 5.12.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 +18 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -10
- package/src/DynamicWaasEVMConnector.cjs +24 -9
- package/src/DynamicWaasEVMConnector.d.ts +32 -10
- package/src/DynamicWaasEVMConnector.js +24 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
|
|
2
|
+
### [5.12.1](https://github.com/dynamic-labs/dynamic-auth/compare/v5.12.0...v5.12.1) (2026-10-20)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* rabby not using native rabby:// scheme when redirecting on android devices [main] ([#12541](https://github.com/dynamic-labs/dynamic-auth/issues/12541)) ([923a372](https://github.com/dynamic-labs/dynamic-auth/commit/923a3724eae5e82ef896de78641320b7320933df))
|
|
8
|
+
* **sui,ton:** sign serialized Sui txs without parsing; native TON balance for jetton sends ([#12503](https://github.com/dynamic-labs/dynamic-auth/issues/12503)) ([6a5bfd6](https://github.com/dynamic-labs/dynamic-auth/commit/6a5bfd6bd0118b8ed7ce079159c10ac47cade337))
|
|
9
|
+
|
|
10
|
+
## [5.12.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.11.0...v5.12.0) (2026-10-16)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **embedded-wallet-solana:** add getSolanaSponsorAddress ([#12517](https://github.com/dynamic-labs/dynamic-auth/issues/12517)) ([b95c550](https://github.com/dynamic-labs/dynamic-auth/commit/b95c550e3dab783b7ff0b019051a17b22ea44f97))
|
|
16
|
+
* **embedded-wallet:** show chain and wallet in private key export modal ([#12507](https://github.com/dynamic-labs/dynamic-auth/issues/12507)) ([4bfb6d6](https://github.com/dynamic-labs/dynamic-auth/commit/4bfb6d6168aac3f800792fde933e0597f288058f))
|
|
17
|
+
* **sdk-react-core:** send OTP purpose from step-up flows ([#12511](https://github.com/dynamic-labs/dynamic-auth/issues/12511)) ([0d2d8a3](https://github.com/dynamic-labs/dynamic-auth/commit/0d2d8a31058b3e75c71af7a34f459e2a3ddf383b)), closes [#12898](https://github.com/dynamic-labs/dynamic-auth/issues/12898) [#816](https://github.com/dynamic-labs/dynamic-auth/issues/816) [#203](https://github.com/dynamic-labs/dynamic-auth/issues/203) [#12512](https://github.com/dynamic-labs/dynamic-auth/issues/12512)
|
|
18
|
+
* **wallet-connect:** back WalletConnect storage with native secure storage on mobile ([#12515](https://github.com/dynamic-labs/dynamic-auth/issues/12515)) ([7b57903](https://github.com/dynamic-labs/dynamic-auth/commit/7b5790325fce707d73d591483a0130b960ed055c))
|
|
19
|
+
|
|
2
20
|
## [5.11.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.10.0...v5.11.0) (2026-10-14)
|
|
3
21
|
|
|
4
22
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/waas-evm",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.12.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,16 +18,17 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs/
|
|
22
|
-
"@dynamic-labs/
|
|
21
|
+
"@dynamic-labs-wallet/core": "1.1.43",
|
|
22
|
+
"@dynamic-labs/ethereum-gasless-core": "5.12.1",
|
|
23
|
+
"@dynamic-labs/sdk-api-core": "0.104.0",
|
|
23
24
|
"viem": "^2.45.3",
|
|
24
|
-
"@dynamic-labs/assert-package-version": "5.
|
|
25
|
-
"@dynamic-labs/ethereum-core": "5.
|
|
26
|
-
"@dynamic-labs/logger": "5.
|
|
27
|
-
"@dynamic-labs/types": "5.
|
|
28
|
-
"@dynamic-labs/utils": "5.
|
|
29
|
-
"@dynamic-labs/waas": "5.
|
|
30
|
-
"@dynamic-labs/wallet-connector-core": "5.
|
|
25
|
+
"@dynamic-labs/assert-package-version": "5.12.1",
|
|
26
|
+
"@dynamic-labs/ethereum-core": "5.12.1",
|
|
27
|
+
"@dynamic-labs/logger": "5.12.1",
|
|
28
|
+
"@dynamic-labs/types": "5.12.1",
|
|
29
|
+
"@dynamic-labs/utils": "5.12.1",
|
|
30
|
+
"@dynamic-labs/waas": "5.12.1",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "5.12.1"
|
|
31
32
|
},
|
|
32
33
|
"peerDependencies": {}
|
|
33
34
|
}
|
|
@@ -235,7 +235,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
235
235
|
}
|
|
236
236
|
return {
|
|
237
237
|
address: accountAddress,
|
|
238
|
-
signAuthorization: (parameters) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
238
|
+
signAuthorization: (parameters, options) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
239
239
|
const traceId = this.generateTraceId();
|
|
240
240
|
const startTime = Date.now();
|
|
241
241
|
this.instrument('[signAuthorization] start', {
|
|
@@ -249,12 +249,14 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
249
249
|
const password = yield this.getPasswordIfNeeded({ accountAddress });
|
|
250
250
|
return this.instrumentAsync({
|
|
251
251
|
context: { chainName: 'EVM', startTime, traceId },
|
|
252
|
-
fn: () => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
252
|
+
fn: () => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
253
|
+
return this.signAuthorization(parameters, password, options === null || options === void 0 ? void 0 : options.approvalQuorum);
|
|
254
|
+
}),
|
|
253
255
|
operation: 'signAuthorization',
|
|
254
256
|
resource: 'client.signAuthorization',
|
|
255
257
|
});
|
|
256
258
|
}),
|
|
257
|
-
signMessage: (_c) => _tslib.__awaiter(this, [_c], void 0, function* ({ message, }) {
|
|
259
|
+
signMessage: (_c, options_1) => _tslib.__awaiter(this, [_c, options_1], void 0, function* ({ message, }, options) {
|
|
258
260
|
var _d, _e;
|
|
259
261
|
const traceId = this.generateTraceId();
|
|
260
262
|
const startTime = Date.now();
|
|
@@ -281,6 +283,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
281
283
|
var _f;
|
|
282
284
|
return client.signMessage({
|
|
283
285
|
accountAddress,
|
|
286
|
+
approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum,
|
|
284
287
|
authToken: (_f = this.getAuthToken) === null || _f === void 0 ? void 0 : _f.call(this),
|
|
285
288
|
elevatedAccessToken,
|
|
286
289
|
message: message,
|
|
@@ -298,7 +301,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
298
301
|
});
|
|
299
302
|
return signature;
|
|
300
303
|
}),
|
|
301
|
-
signTransaction: (transaction) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
304
|
+
signTransaction: (transaction, options) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
302
305
|
var _g, _h, _j;
|
|
303
306
|
const traceId = this.generateTraceId();
|
|
304
307
|
const startTime = Date.now();
|
|
@@ -333,7 +336,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
333
336
|
context: { chainName: 'EVM', startTime, traceId },
|
|
334
337
|
fn: () => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
335
338
|
var _k;
|
|
336
|
-
return client.signTransaction(Object.assign(Object.assign({ authToken: (_k = this.getAuthToken) === null || _k === void 0 ? void 0 : _k.call(this) }, (effectiveChainId !== undefined && {
|
|
339
|
+
return client.signTransaction(Object.assign(Object.assign({ approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum, authToken: (_k = this.getAuthToken) === null || _k === void 0 ? void 0 : _k.call(this) }, (effectiveChainId !== undefined && {
|
|
337
340
|
chainId: effectiveChainId.toString(),
|
|
338
341
|
})), { elevatedAccessToken,
|
|
339
342
|
mfaToken,
|
|
@@ -347,7 +350,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
347
350
|
});
|
|
348
351
|
return tx;
|
|
349
352
|
}),
|
|
350
|
-
signTypedData: (typedData) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
353
|
+
signTypedData: (typedData, options) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
351
354
|
var _l, _m;
|
|
352
355
|
const traceId = this.generateTraceId();
|
|
353
356
|
const startTime = Date.now();
|
|
@@ -372,6 +375,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
372
375
|
var _o;
|
|
373
376
|
return client.signTypedData({
|
|
374
377
|
accountAddress,
|
|
378
|
+
approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum,
|
|
375
379
|
authToken: (_o = this.getAuthToken) === null || _o === void 0 ? void 0 : _o.call(this),
|
|
376
380
|
elevatedAccessToken,
|
|
377
381
|
mfaToken,
|
|
@@ -427,12 +431,21 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
427
431
|
walletUiUtils: this.walletUiUtils,
|
|
428
432
|
});
|
|
429
433
|
}
|
|
430
|
-
signMessage(message) {
|
|
434
|
+
signMessage(message, options) {
|
|
431
435
|
var _a;
|
|
436
|
+
// Signing-quorum retry needs the raw waas client path — the viem wallet
|
|
437
|
+
// client has no way to forward approvalQuorum.
|
|
438
|
+
if (options === null || options === void 0 ? void 0 : options.approvalQuorum) {
|
|
439
|
+
return this.signMessageWithContext({
|
|
440
|
+
approvalQuorum: options.approvalQuorum,
|
|
441
|
+
context: undefined,
|
|
442
|
+
message,
|
|
443
|
+
});
|
|
444
|
+
}
|
|
432
445
|
return (_a = this.getWalletClient()) === null || _a === void 0 ? void 0 : _a.signMessage({ message });
|
|
433
446
|
}
|
|
434
447
|
signMessageWithContext(_a) {
|
|
435
|
-
return _tslib.__awaiter(this, arguments, void 0, function* ({ message, context, }) {
|
|
448
|
+
return _tslib.__awaiter(this, arguments, void 0, function* ({ message, approvalQuorum, context, }) {
|
|
436
449
|
var _b, _c, _d, _e, _f;
|
|
437
450
|
const walletClient = yield this.getWaasWalletClient();
|
|
438
451
|
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
@@ -457,6 +470,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
457
470
|
});
|
|
458
471
|
return walletClient.signMessage({
|
|
459
472
|
accountAddress,
|
|
473
|
+
approvalQuorum,
|
|
460
474
|
authToken: (_f = this.getAuthToken) === null || _f === void 0 ? void 0 : _f.call(this),
|
|
461
475
|
context,
|
|
462
476
|
elevatedAccessToken,
|
|
@@ -716,7 +730,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
716
730
|
return activeAccount.address;
|
|
717
731
|
});
|
|
718
732
|
}
|
|
719
|
-
signAuthorization(parameters, password) {
|
|
733
|
+
signAuthorization(parameters, password, approvalQuorum) {
|
|
720
734
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
721
735
|
var _a, _b, _c, _d;
|
|
722
736
|
const { address: contractAddress, nonce, chainId } = parameters;
|
|
@@ -757,6 +771,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
757
771
|
};
|
|
758
772
|
const signature = yield walletClient.signRawMessage({
|
|
759
773
|
accountAddress: address,
|
|
774
|
+
approvalQuorum,
|
|
760
775
|
authToken: (_d = this.getAuthToken) === null || _d === void 0 ? void 0 : _d.call(this),
|
|
761
776
|
context: { eip7702Auth: authorization },
|
|
762
777
|
elevatedAccessToken,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Account, CustomSource, Hex, Transport, Chain as ViemChain, WalletClient } from 'viem';
|
|
1
|
+
import { Account, CustomSource, Hex, SerializeTransactionFn, SignableMessage, TransactionSerializable, Transport, TypedData, Chain as ViemChain, WalletClient } from 'viem';
|
|
2
2
|
import { LocalAccount, SignAuthorizationParameters, SignAuthorizationReturnType } from 'viem/accounts';
|
|
3
|
+
import type { ApprovalQuorumRequestContext } from '@dynamic-labs-wallet/core';
|
|
3
4
|
import { EthereumWalletConnector, EthereumWalletConnectorOpts, SwitchNetworkOps } from '@dynamic-labs/ethereum-core';
|
|
4
5
|
import { Logger } from '@dynamic-labs/logger';
|
|
5
6
|
import { JwtVerifiedCredential, MFAAction, SDKApi, SignMessageContext, TokenScope } from '@dynamic-labs/sdk-api-core';
|
|
@@ -12,8 +13,21 @@ interface JwtVerifiedCredentialWithSmartWalletRef extends JwtVerifiedCredential
|
|
|
12
13
|
smartWalletRefAddress?: string;
|
|
13
14
|
}
|
|
14
15
|
type SignAuthorizationParametersWithoutPrivateKey = Omit<SignAuthorizationParameters, 'privateKey'>;
|
|
15
|
-
type
|
|
16
|
-
|
|
16
|
+
type ApprovalQuorumOptions = {
|
|
17
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
18
|
+
};
|
|
19
|
+
type DefaultTxSerializer = SerializeTransactionFn<TransactionSerializable>;
|
|
20
|
+
type DynamicCustomSource = Omit<CustomSource, 'signMessage' | 'signTransaction' | 'signTypedData'> & {
|
|
21
|
+
signAuthorization: (parameters: SignAuthorizationParametersWithoutPrivateKey, options?: ApprovalQuorumOptions) => Promise<SignAuthorizationReturnType>;
|
|
22
|
+
signMessage: (args: {
|
|
23
|
+
message: SignableMessage;
|
|
24
|
+
}, options?: ApprovalQuorumOptions) => Promise<Hex>;
|
|
25
|
+
signTransaction: <serializer extends DefaultTxSerializer = DefaultTxSerializer, transaction extends Parameters<serializer>[0] = Parameters<serializer>[0]>(transaction: transaction, options?: {
|
|
26
|
+
serializer?: serializer;
|
|
27
|
+
} & ApprovalQuorumOptions) => Promise<Hex>;
|
|
28
|
+
signTypedData: (typedData: TypedData | {
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
}, options?: ApprovalQuorumOptions) => Promise<Hex>;
|
|
17
31
|
};
|
|
18
32
|
declare const DynamicWaasEVMConnector_base: (abstract new (...args: any[]) => {
|
|
19
33
|
[x: string]: any;
|
|
@@ -57,7 +71,10 @@ declare const DynamicWaasEVMConnector_base: (abstract new (...args: any[]) => {
|
|
|
57
71
|
}): Promise<string | undefined>;
|
|
58
72
|
getPassword({ accountAddress, }: {
|
|
59
73
|
accountAddress: string;
|
|
60
|
-
}): Promise<string | undefined>;
|
|
74
|
+
}): Promise<string | undefined>; /**
|
|
75
|
+
* Chain IDs that have dedicated connectors and should not be handled by this connector.
|
|
76
|
+
* Networks with these chain IDs are filtered from network lists and rejected during switching.
|
|
77
|
+
*/
|
|
61
78
|
setEnvironmentId(environmentId: string): void;
|
|
62
79
|
setBaseApiUrl(baseApiUrl: string): void;
|
|
63
80
|
setBaseClientKeysharesRelayApiUrl(baseClientKeysharesRelayApiUrl?: string | undefined): void;
|
|
@@ -67,7 +84,7 @@ declare const DynamicWaasEVMConnector_base: (abstract new (...args: any[]) => {
|
|
|
67
84
|
delegateKeyShares({ accountAddress, password, initialSignerRules, }: {
|
|
68
85
|
accountAddress: string;
|
|
69
86
|
password?: string | undefined;
|
|
70
|
-
initialSignerRules?: import("@dynamic-labs/
|
|
87
|
+
initialSignerRules?: import("@dynamic-labs-wallet/core").WaasPolicyRule[] | undefined;
|
|
71
88
|
}): Promise<void>;
|
|
72
89
|
createRevocableSignedSessionCallback(): {
|
|
73
90
|
getSignedSessionId: () => Promise<string>;
|
|
@@ -159,8 +176,9 @@ declare const DynamicWaasEVMConnector_base: (abstract new (...args: any[]) => {
|
|
|
159
176
|
accountAddress: string;
|
|
160
177
|
newPassword: string;
|
|
161
178
|
}): Promise<void>;
|
|
162
|
-
signRawMessage({ accountAddress, context, message, password, }: {
|
|
179
|
+
signRawMessage({ accountAddress, approvalQuorum, context, message, password, }: {
|
|
163
180
|
accountAddress: string;
|
|
181
|
+
approvalQuorum?: ApprovalQuorumRequestContext | undefined;
|
|
164
182
|
context?: SignMessageContext | undefined;
|
|
165
183
|
message: string;
|
|
166
184
|
password?: string | undefined;
|
|
@@ -276,10 +294,14 @@ export declare class DynamicWaasEVMConnector extends DynamicWaasEVMConnector_bas
|
|
|
276
294
|
accountAddress: string;
|
|
277
295
|
}): Promise<LocalAccount>;
|
|
278
296
|
getWalletClient(chainId?: string): WalletClient<Transport, ViemChain, Account> | undefined;
|
|
279
|
-
signMessage(message: string
|
|
280
|
-
|
|
297
|
+
signMessage(message: string, options?: {
|
|
298
|
+
address?: string;
|
|
299
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
300
|
+
}): Promise<Hex>;
|
|
301
|
+
signMessageWithContext({ message, approvalQuorum, context, }: {
|
|
281
302
|
message: string;
|
|
282
|
-
|
|
303
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
304
|
+
context?: SignMessageContext;
|
|
283
305
|
}): Promise<string>;
|
|
284
306
|
getSigner(): Promise<any>;
|
|
285
307
|
getWalletClientByAddress({ accountAddress, }: {
|
|
@@ -309,7 +331,7 @@ export declare class DynamicWaasEVMConnector extends DynamicWaasEVMConnector_bas
|
|
|
309
331
|
createUiTransaction(from: string): Promise<IUITransaction>;
|
|
310
332
|
getConnectedAccounts(): Promise<string[]>;
|
|
311
333
|
getAddress(): Promise<string>;
|
|
312
|
-
signAuthorization(parameters: SignAuthorizationParametersWithoutPrivateKey, password?: string): Promise<SignAuthorizationReturnType>;
|
|
334
|
+
signAuthorization(parameters: SignAuthorizationParametersWithoutPrivateKey, password?: string, approvalQuorum?: ApprovalQuorumRequestContext): Promise<SignAuthorizationReturnType>;
|
|
313
335
|
isAtomicSupported(chainId?: number): Promise<boolean>;
|
|
314
336
|
isPaymasterServiceSupported(chainId?: number): Promise<boolean>;
|
|
315
337
|
isSignAuthorizationSupported(): boolean;
|
|
@@ -231,7 +231,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
231
231
|
}
|
|
232
232
|
return {
|
|
233
233
|
address: accountAddress,
|
|
234
|
-
signAuthorization: (parameters) => __awaiter(this, void 0, void 0, function* () {
|
|
234
|
+
signAuthorization: (parameters, options) => __awaiter(this, void 0, void 0, function* () {
|
|
235
235
|
const traceId = this.generateTraceId();
|
|
236
236
|
const startTime = Date.now();
|
|
237
237
|
this.instrument('[signAuthorization] start', {
|
|
@@ -245,12 +245,14 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
245
245
|
const password = yield this.getPasswordIfNeeded({ accountAddress });
|
|
246
246
|
return this.instrumentAsync({
|
|
247
247
|
context: { chainName: 'EVM', startTime, traceId },
|
|
248
|
-
fn: () => __awaiter(this, void 0, void 0, function* () {
|
|
248
|
+
fn: () => __awaiter(this, void 0, void 0, function* () {
|
|
249
|
+
return this.signAuthorization(parameters, password, options === null || options === void 0 ? void 0 : options.approvalQuorum);
|
|
250
|
+
}),
|
|
249
251
|
operation: 'signAuthorization',
|
|
250
252
|
resource: 'client.signAuthorization',
|
|
251
253
|
});
|
|
252
254
|
}),
|
|
253
|
-
signMessage: (_c) => __awaiter(this, [_c], void 0, function* ({ message, }) {
|
|
255
|
+
signMessage: (_c, options_1) => __awaiter(this, [_c, options_1], void 0, function* ({ message, }, options) {
|
|
254
256
|
var _d, _e;
|
|
255
257
|
const traceId = this.generateTraceId();
|
|
256
258
|
const startTime = Date.now();
|
|
@@ -277,6 +279,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
277
279
|
var _f;
|
|
278
280
|
return client.signMessage({
|
|
279
281
|
accountAddress,
|
|
282
|
+
approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum,
|
|
280
283
|
authToken: (_f = this.getAuthToken) === null || _f === void 0 ? void 0 : _f.call(this),
|
|
281
284
|
elevatedAccessToken,
|
|
282
285
|
message: message,
|
|
@@ -294,7 +297,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
294
297
|
});
|
|
295
298
|
return signature;
|
|
296
299
|
}),
|
|
297
|
-
signTransaction: (transaction) => __awaiter(this, void 0, void 0, function* () {
|
|
300
|
+
signTransaction: (transaction, options) => __awaiter(this, void 0, void 0, function* () {
|
|
298
301
|
var _g, _h, _j;
|
|
299
302
|
const traceId = this.generateTraceId();
|
|
300
303
|
const startTime = Date.now();
|
|
@@ -329,7 +332,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
329
332
|
context: { chainName: 'EVM', startTime, traceId },
|
|
330
333
|
fn: () => __awaiter(this, void 0, void 0, function* () {
|
|
331
334
|
var _k;
|
|
332
|
-
return client.signTransaction(Object.assign(Object.assign({ authToken: (_k = this.getAuthToken) === null || _k === void 0 ? void 0 : _k.call(this) }, (effectiveChainId !== undefined && {
|
|
335
|
+
return client.signTransaction(Object.assign(Object.assign({ approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum, authToken: (_k = this.getAuthToken) === null || _k === void 0 ? void 0 : _k.call(this) }, (effectiveChainId !== undefined && {
|
|
333
336
|
chainId: effectiveChainId.toString(),
|
|
334
337
|
})), { elevatedAccessToken,
|
|
335
338
|
mfaToken,
|
|
@@ -343,7 +346,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
343
346
|
});
|
|
344
347
|
return tx;
|
|
345
348
|
}),
|
|
346
|
-
signTypedData: (typedData) => __awaiter(this, void 0, void 0, function* () {
|
|
349
|
+
signTypedData: (typedData, options) => __awaiter(this, void 0, void 0, function* () {
|
|
347
350
|
var _l, _m;
|
|
348
351
|
const traceId = this.generateTraceId();
|
|
349
352
|
const startTime = Date.now();
|
|
@@ -368,6 +371,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
368
371
|
var _o;
|
|
369
372
|
return client.signTypedData({
|
|
370
373
|
accountAddress,
|
|
374
|
+
approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum,
|
|
371
375
|
authToken: (_o = this.getAuthToken) === null || _o === void 0 ? void 0 : _o.call(this),
|
|
372
376
|
elevatedAccessToken,
|
|
373
377
|
mfaToken,
|
|
@@ -423,12 +427,21 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
423
427
|
walletUiUtils: this.walletUiUtils,
|
|
424
428
|
});
|
|
425
429
|
}
|
|
426
|
-
signMessage(message) {
|
|
430
|
+
signMessage(message, options) {
|
|
427
431
|
var _a;
|
|
432
|
+
// Signing-quorum retry needs the raw waas client path — the viem wallet
|
|
433
|
+
// client has no way to forward approvalQuorum.
|
|
434
|
+
if (options === null || options === void 0 ? void 0 : options.approvalQuorum) {
|
|
435
|
+
return this.signMessageWithContext({
|
|
436
|
+
approvalQuorum: options.approvalQuorum,
|
|
437
|
+
context: undefined,
|
|
438
|
+
message,
|
|
439
|
+
});
|
|
440
|
+
}
|
|
428
441
|
return (_a = this.getWalletClient()) === null || _a === void 0 ? void 0 : _a.signMessage({ message });
|
|
429
442
|
}
|
|
430
443
|
signMessageWithContext(_a) {
|
|
431
|
-
return __awaiter(this, arguments, void 0, function* ({ message, context, }) {
|
|
444
|
+
return __awaiter(this, arguments, void 0, function* ({ message, approvalQuorum, context, }) {
|
|
432
445
|
var _b, _c, _d, _e, _f;
|
|
433
446
|
const walletClient = yield this.getWaasWalletClient();
|
|
434
447
|
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
@@ -453,6 +466,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
453
466
|
});
|
|
454
467
|
return walletClient.signMessage({
|
|
455
468
|
accountAddress,
|
|
469
|
+
approvalQuorum,
|
|
456
470
|
authToken: (_f = this.getAuthToken) === null || _f === void 0 ? void 0 : _f.call(this),
|
|
457
471
|
context,
|
|
458
472
|
elevatedAccessToken,
|
|
@@ -712,7 +726,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
712
726
|
return activeAccount.address;
|
|
713
727
|
});
|
|
714
728
|
}
|
|
715
|
-
signAuthorization(parameters, password) {
|
|
729
|
+
signAuthorization(parameters, password, approvalQuorum) {
|
|
716
730
|
return __awaiter(this, void 0, void 0, function* () {
|
|
717
731
|
var _a, _b, _c, _d;
|
|
718
732
|
const { address: contractAddress, nonce, chainId } = parameters;
|
|
@@ -753,6 +767,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
753
767
|
};
|
|
754
768
|
const signature = yield walletClient.signRawMessage({
|
|
755
769
|
accountAddress: address,
|
|
770
|
+
approvalQuorum,
|
|
756
771
|
authToken: (_d = this.getAuthToken) === null || _d === void 0 ? void 0 : _d.call(this),
|
|
757
772
|
context: { eip7702Auth: authorization },
|
|
758
773
|
elevatedAccessToken,
|