@dynamic-labs/waas-evm 4.25.5 → 4.25.7
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 +10 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/DynamicWaasEVMConnector.cjs +13 -4
- package/src/DynamicWaasEVMConnector.d.ts +8 -10
- package/src/DynamicWaasEVMConnector.js +13 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.25.7](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.6...v4.25.7) (2025-07-28)
|
|
3
|
+
|
|
4
|
+
### [4.25.6](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.5...v4.25.6) (2025-07-28)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* don't create a new user when linking a wallet to a user with no wallets ([#9252](https://github.com/dynamic-labs/dynamic-auth/issues/9252)) ([30f846e](https://github.com/dynamic-labs/dynamic-auth/commit/30f846e89f2dffd112e656201bfa1cc24b787f03))
|
|
10
|
+
* Nufi EVM wallet showing up twice in wallet list ([#9256](https://github.com/dynamic-labs/dynamic-auth/issues/9256)) ([213488e](https://github.com/dynamic-labs/dynamic-auth/commit/213488e2226ef55965e12a1a548845cb100e859f))
|
|
11
|
+
|
|
2
12
|
### [4.25.5](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.4...v4.25.5) (2025-07-27)
|
|
3
13
|
|
|
4
14
|
|
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": "4.25.
|
|
3
|
+
"version": "4.25.7",
|
|
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",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@dynamic-labs/sdk-api-core": "0.0.728",
|
|
22
22
|
"viem": "^2.28.4",
|
|
23
|
-
"@dynamic-labs/assert-package-version": "4.25.
|
|
24
|
-
"@dynamic-labs/ethereum-core": "4.25.
|
|
25
|
-
"@dynamic-labs/logger": "4.25.
|
|
26
|
-
"@dynamic-labs/types": "4.25.
|
|
27
|
-
"@dynamic-labs/utils": "4.25.
|
|
28
|
-
"@dynamic-labs/waas": "4.25.
|
|
29
|
-
"@dynamic-labs/wallet-connector-core": "4.25.
|
|
23
|
+
"@dynamic-labs/assert-package-version": "4.25.7",
|
|
24
|
+
"@dynamic-labs/ethereum-core": "4.25.7",
|
|
25
|
+
"@dynamic-labs/logger": "4.25.7",
|
|
26
|
+
"@dynamic-labs/types": "4.25.7",
|
|
27
|
+
"@dynamic-labs/utils": "4.25.7",
|
|
28
|
+
"@dynamic-labs/waas": "4.25.7",
|
|
29
|
+
"@dynamic-labs/wallet-connector-core": "4.25.7"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {}
|
|
32
32
|
}
|
|
@@ -9,6 +9,7 @@ var accounts = require('viem/accounts');
|
|
|
9
9
|
var utils$1 = require('viem/utils');
|
|
10
10
|
var ethereumCore = require('@dynamic-labs/ethereum-core');
|
|
11
11
|
var logger$1 = require('@dynamic-labs/logger');
|
|
12
|
+
var sdkApiCore = require('@dynamic-labs/sdk-api-core');
|
|
12
13
|
var utils = require('@dynamic-labs/utils');
|
|
13
14
|
var waas = require('@dynamic-labs/waas');
|
|
14
15
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
@@ -183,7 +184,9 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
183
184
|
signAuthorization: (parameters) => _tslib.__awaiter(this, void 0, void 0, function* () { return this.signAuthorization(parameters); }),
|
|
184
185
|
signMessage: (_c) => _tslib.__awaiter(this, [_c], void 0, function* ({ message, }) {
|
|
185
186
|
var _d, _e;
|
|
186
|
-
const mfaToken = yield ((_d = this.getMfaToken) === null || _d === void 0 ? void 0 : _d.call(this
|
|
187
|
+
const mfaToken = yield ((_d = this.getMfaToken) === null || _d === void 0 ? void 0 : _d.call(this, {
|
|
188
|
+
mfaAction: sdkApiCore.MFAAction.WalletWaasSign,
|
|
189
|
+
}));
|
|
187
190
|
return client.signMessage({
|
|
188
191
|
accountAddress,
|
|
189
192
|
authToken: (_e = this.getAuthToken) === null || _e === void 0 ? void 0 : _e.call(this),
|
|
@@ -194,7 +197,9 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
194
197
|
}),
|
|
195
198
|
signTransaction: (transaction) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
196
199
|
var _f, _g;
|
|
197
|
-
const mfaToken = yield ((_f = this.getMfaToken) === null || _f === void 0 ? void 0 : _f.call(this
|
|
200
|
+
const mfaToken = yield ((_f = this.getMfaToken) === null || _f === void 0 ? void 0 : _f.call(this, {
|
|
201
|
+
mfaAction: sdkApiCore.MFAAction.WalletWaasSign,
|
|
202
|
+
}));
|
|
198
203
|
return client
|
|
199
204
|
.signTransaction({
|
|
200
205
|
authToken: (_g = this.getAuthToken) === null || _g === void 0 ? void 0 : _g.call(this),
|
|
@@ -207,7 +212,9 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
207
212
|
}),
|
|
208
213
|
signTypedData: (typedData) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
209
214
|
var _h, _j;
|
|
210
|
-
const mfaToken = yield ((_h = this.getMfaToken) === null || _h === void 0 ? void 0 : _h.call(this
|
|
215
|
+
const mfaToken = yield ((_h = this.getMfaToken) === null || _h === void 0 ? void 0 : _h.call(this, {
|
|
216
|
+
mfaAction: sdkApiCore.MFAAction.WalletWaasSign,
|
|
217
|
+
}));
|
|
211
218
|
return client.signTypedData({
|
|
212
219
|
accountAddress,
|
|
213
220
|
authToken: (_j = this.getAuthToken) === null || _j === void 0 ? void 0 : _j.call(this),
|
|
@@ -406,7 +413,9 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
406
413
|
if (!signedSessionId) {
|
|
407
414
|
throw new utils.DynamicError('Signed session ID is required');
|
|
408
415
|
}
|
|
409
|
-
const mfaToken = yield ((_b = this.getMfaToken) === null || _b === void 0 ? void 0 : _b.call(this
|
|
416
|
+
const mfaToken = yield ((_b = this.getMfaToken) === null || _b === void 0 ? void 0 : _b.call(this, {
|
|
417
|
+
mfaAction: sdkApiCore.MFAAction.WalletWaasSign,
|
|
418
|
+
}));
|
|
410
419
|
const signature = yield walletClient.signRawMessage({
|
|
411
420
|
accountAddress: address,
|
|
412
421
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Account, Hex, Transport, Chain as ViemChain, WalletClient } from 'viem';
|
|
2
2
|
import { LocalAccount, SignAuthorizationParameters, SignAuthorizationReturnType } from 'viem/accounts';
|
|
3
3
|
import { EthereumWalletConnector, EthereumWalletConnectorOpts, SwitchNetworkOps } from '@dynamic-labs/ethereum-core';
|
|
4
|
-
import { JwtVerifiedCredential } from '@dynamic-labs/sdk-api-core';
|
|
4
|
+
import { JwtVerifiedCredential, MFAAction } from '@dynamic-labs/sdk-api-core';
|
|
5
5
|
import { IUITransaction } from '@dynamic-labs/types';
|
|
6
6
|
import { WaasExportHandler } from '@dynamic-labs/waas';
|
|
7
7
|
import { IDynamicWaasConnector } from '@dynamic-labs/wallet-connector-core';
|
|
@@ -16,7 +16,9 @@ declare const DynamicWaasEVMConnector_base: (abstract new (...args: any[]) => {
|
|
|
16
16
|
overrideKey: string;
|
|
17
17
|
isEmbeddedWallet: boolean;
|
|
18
18
|
getSignedSessionId?: (() => Promise<string>) | undefined;
|
|
19
|
-
getMfaToken?: ((
|
|
19
|
+
getMfaToken?: ((props?: {
|
|
20
|
+
mfaAction?: MFAAction | undefined;
|
|
21
|
+
} | undefined) => Promise<string | undefined>) | undefined;
|
|
20
22
|
getAuthToken?: (() => string) | undefined;
|
|
21
23
|
environmentId?: string | undefined;
|
|
22
24
|
baseApiUrl?: string | undefined;
|
|
@@ -26,7 +28,9 @@ declare const DynamicWaasEVMConnector_base: (abstract new (...args: any[]) => {
|
|
|
26
28
|
__exportHandler: WaasExportHandler;
|
|
27
29
|
validateActiveWallet(expectedAddress: string): Promise<void>;
|
|
28
30
|
setGetAuthTokenFunction(getAuthToken: () => string): void;
|
|
29
|
-
setGetMfaTokenFunction(getMfaToken: (
|
|
31
|
+
setGetMfaTokenFunction(getMfaToken: (props?: {
|
|
32
|
+
mfaAction?: MFAAction | undefined;
|
|
33
|
+
} | undefined) => Promise<string | undefined>): void;
|
|
30
34
|
setEnvironmentId(environmentId: string): void;
|
|
31
35
|
setBaseApiUrl(baseApiUrl: string): void;
|
|
32
36
|
setRelayUrl(relayUrl: string): void;
|
|
@@ -41,13 +45,7 @@ declare const DynamicWaasEVMConnector_base: (abstract new (...args: any[]) => {
|
|
|
41
45
|
thresholdSignatureScheme?: string | undefined;
|
|
42
46
|
} | undefined): Promise<{
|
|
43
47
|
chainName: string;
|
|
44
|
-
accountAddress: string;
|
|
45
|
-
* Relationship between verifiedCredential and verifiedCredentials:
|
|
46
|
-
* - verifiedCredential: The first/primary credential from the array (used for active account)
|
|
47
|
-
* - verifiedCredentials: The full array of all credentials
|
|
48
|
-
* When setVerifiedCredentials is called, it processes the input array and sets both properties
|
|
49
|
-
* The first credential (verifiedCredential) is specifically filtered to be a "dynamicwaas"
|
|
50
|
-
*/
|
|
48
|
+
accountAddress: string;
|
|
51
49
|
publicKeyHex: string;
|
|
52
50
|
rawPublicKey: string | Uint8Array | undefined;
|
|
53
51
|
}>;
|
|
@@ -5,6 +5,7 @@ import { toAccount } from 'viem/accounts';
|
|
|
5
5
|
import { hashAuthorization } from 'viem/utils';
|
|
6
6
|
import { EthereumWalletConnector, createWalletClientWithUiConfirmation, getOrMapViemChain, ViemUiTransaction } from '@dynamic-labs/ethereum-core';
|
|
7
7
|
import { Logger } from '@dynamic-labs/logger';
|
|
8
|
+
import { MFAAction } from '@dynamic-labs/sdk-api-core';
|
|
8
9
|
import { DynamicError } from '@dynamic-labs/utils';
|
|
9
10
|
import { withDynamicWaas, WaasExportHandler } from '@dynamic-labs/waas';
|
|
10
11
|
import { isSameAddress } from '@dynamic-labs/wallet-connector-core';
|
|
@@ -179,7 +180,9 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
179
180
|
signAuthorization: (parameters) => __awaiter(this, void 0, void 0, function* () { return this.signAuthorization(parameters); }),
|
|
180
181
|
signMessage: (_c) => __awaiter(this, [_c], void 0, function* ({ message, }) {
|
|
181
182
|
var _d, _e;
|
|
182
|
-
const mfaToken = yield ((_d = this.getMfaToken) === null || _d === void 0 ? void 0 : _d.call(this
|
|
183
|
+
const mfaToken = yield ((_d = this.getMfaToken) === null || _d === void 0 ? void 0 : _d.call(this, {
|
|
184
|
+
mfaAction: MFAAction.WalletWaasSign,
|
|
185
|
+
}));
|
|
183
186
|
return client.signMessage({
|
|
184
187
|
accountAddress,
|
|
185
188
|
authToken: (_e = this.getAuthToken) === null || _e === void 0 ? void 0 : _e.call(this),
|
|
@@ -190,7 +193,9 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
190
193
|
}),
|
|
191
194
|
signTransaction: (transaction) => __awaiter(this, void 0, void 0, function* () {
|
|
192
195
|
var _f, _g;
|
|
193
|
-
const mfaToken = yield ((_f = this.getMfaToken) === null || _f === void 0 ? void 0 : _f.call(this
|
|
196
|
+
const mfaToken = yield ((_f = this.getMfaToken) === null || _f === void 0 ? void 0 : _f.call(this, {
|
|
197
|
+
mfaAction: MFAAction.WalletWaasSign,
|
|
198
|
+
}));
|
|
194
199
|
return client
|
|
195
200
|
.signTransaction({
|
|
196
201
|
authToken: (_g = this.getAuthToken) === null || _g === void 0 ? void 0 : _g.call(this),
|
|
@@ -203,7 +208,9 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
203
208
|
}),
|
|
204
209
|
signTypedData: (typedData) => __awaiter(this, void 0, void 0, function* () {
|
|
205
210
|
var _h, _j;
|
|
206
|
-
const mfaToken = yield ((_h = this.getMfaToken) === null || _h === void 0 ? void 0 : _h.call(this
|
|
211
|
+
const mfaToken = yield ((_h = this.getMfaToken) === null || _h === void 0 ? void 0 : _h.call(this, {
|
|
212
|
+
mfaAction: MFAAction.WalletWaasSign,
|
|
213
|
+
}));
|
|
207
214
|
return client.signTypedData({
|
|
208
215
|
accountAddress,
|
|
209
216
|
authToken: (_j = this.getAuthToken) === null || _j === void 0 ? void 0 : _j.call(this),
|
|
@@ -402,7 +409,9 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
402
409
|
if (!signedSessionId) {
|
|
403
410
|
throw new DynamicError('Signed session ID is required');
|
|
404
411
|
}
|
|
405
|
-
const mfaToken = yield ((_b = this.getMfaToken) === null || _b === void 0 ? void 0 : _b.call(this
|
|
412
|
+
const mfaToken = yield ((_b = this.getMfaToken) === null || _b === void 0 ? void 0 : _b.call(this, {
|
|
413
|
+
mfaAction: MFAAction.WalletWaasSign,
|
|
414
|
+
}));
|
|
406
415
|
const signature = yield walletClient.signRawMessage({
|
|
407
416
|
accountAddress: address,
|
|
408
417
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|