@dynamic-labs/waas 4.52.0 → 4.52.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 +7 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/DynamicWaasMixin.cjs +22 -0
- package/src/DynamicWaasMixin.d.ts +4 -0
- package/src/DynamicWaasMixin.js +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.52.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.52.0...v4.52.1) (2025-12-23)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add getConnectedAccounts to waas mixin ([#10157](https://github.com/dynamic-labs/dynamic-auth/issues/10157)) ([959f216](https://github.com/dynamic-labs/dynamic-auth/commit/959f216a981a8008d1d051eb9813793d634049e0))
|
|
8
|
+
|
|
2
9
|
## [4.52.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.51.2...v4.52.0) (2025-12-22)
|
|
3
10
|
|
|
4
11
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/waas",
|
|
3
|
-
"version": "4.52.
|
|
3
|
+
"version": "4.52.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
"./package.json": "./package.json"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@dynamic-labs/assert-package-version": "4.52.
|
|
19
|
+
"@dynamic-labs/assert-package-version": "4.52.1",
|
|
20
20
|
"@dynamic-labs/sdk-api-core": "0.0.843",
|
|
21
21
|
"@dynamic-labs-wallet/browser-wallet-client": "0.0.217",
|
|
22
|
-
"@dynamic-labs/ethereum-core": "4.52.
|
|
23
|
-
"@dynamic-labs/logger": "4.52.
|
|
24
|
-
"@dynamic-labs/solana-core": "4.52.
|
|
25
|
-
"@dynamic-labs/sui-core": "4.52.
|
|
26
|
-
"@dynamic-labs/utils": "4.52.
|
|
27
|
-
"@dynamic-labs/wallet-book": "4.52.
|
|
22
|
+
"@dynamic-labs/ethereum-core": "4.52.1",
|
|
23
|
+
"@dynamic-labs/logger": "4.52.1",
|
|
24
|
+
"@dynamic-labs/solana-core": "4.52.1",
|
|
25
|
+
"@dynamic-labs/sui-core": "4.52.1",
|
|
26
|
+
"@dynamic-labs/utils": "4.52.1",
|
|
27
|
+
"@dynamic-labs/wallet-book": "4.52.1"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {}
|
|
30
30
|
}
|
package/src/DynamicWaasMixin.cjs
CHANGED
|
@@ -385,6 +385,28 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
385
385
|
this.dynamicWaasClient = undefined;
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
|
+
/**
|
|
389
|
+
* Get connected accounts by fetching wallets from Waas client.
|
|
390
|
+
*/
|
|
391
|
+
getConnectedAccounts() {
|
|
392
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
393
|
+
try {
|
|
394
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
395
|
+
const wallets = yield walletClient.getWallets();
|
|
396
|
+
const addresses = wallets
|
|
397
|
+
.map((w) => w === null || w === void 0 ? void 0 : w.accountAddress)
|
|
398
|
+
.filter((a) => typeof a === 'string');
|
|
399
|
+
return addresses;
|
|
400
|
+
}
|
|
401
|
+
catch (error) {
|
|
402
|
+
// If fetching wallets fails, return empty array
|
|
403
|
+
this.logger.debug('[getConnectedAccounts] Failed to fetch wallets from Waas client', {
|
|
404
|
+
error,
|
|
405
|
+
});
|
|
406
|
+
return [];
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
}
|
|
388
410
|
generateTraceId() {
|
|
389
411
|
// Generate a 128-bit trace ID
|
|
390
412
|
// 128-bit = 16 bytes = 32 hexadecimal characters
|
|
@@ -102,6 +102,10 @@ export declare const withDynamicWaas: <T extends abstract new (...args: any[]) =
|
|
|
102
102
|
}): Promise<string>;
|
|
103
103
|
endSession(): Promise<void>;
|
|
104
104
|
getActiveAccountAddress(): Promise<string | undefined>;
|
|
105
|
+
/**
|
|
106
|
+
* Get connected accounts by fetching wallets from Waas client.
|
|
107
|
+
*/
|
|
108
|
+
getConnectedAccounts(): Promise<string[]>;
|
|
105
109
|
generateTraceId(): string;
|
|
106
110
|
/**
|
|
107
111
|
* Helper method to instrument with automatic properties inclusion
|
package/src/DynamicWaasMixin.js
CHANGED
|
@@ -381,6 +381,28 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
381
381
|
this.dynamicWaasClient = undefined;
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
|
+
/**
|
|
385
|
+
* Get connected accounts by fetching wallets from Waas client.
|
|
386
|
+
*/
|
|
387
|
+
getConnectedAccounts() {
|
|
388
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
389
|
+
try {
|
|
390
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
391
|
+
const wallets = yield walletClient.getWallets();
|
|
392
|
+
const addresses = wallets
|
|
393
|
+
.map((w) => w === null || w === void 0 ? void 0 : w.accountAddress)
|
|
394
|
+
.filter((a) => typeof a === 'string');
|
|
395
|
+
return addresses;
|
|
396
|
+
}
|
|
397
|
+
catch (error) {
|
|
398
|
+
// If fetching wallets fails, return empty array
|
|
399
|
+
this.logger.debug('[getConnectedAccounts] Failed to fetch wallets from Waas client', {
|
|
400
|
+
error,
|
|
401
|
+
});
|
|
402
|
+
return [];
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
}
|
|
384
406
|
generateTraceId() {
|
|
385
407
|
// Generate a 128-bit trace ID
|
|
386
408
|
// 128-bit = 16 bytes = 32 hexadecimal characters
|