@dynamic-labs/waas 4.26.0 → 4.27.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,26 @@
1
1
 
2
+ ### [4.27.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.27.0...v4.27.1) (2025-08-18)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * apple icon black background ([#9363](https://github.com/dynamic-labs/dynamic-auth/issues/9363)) ([b8242e6](https://github.com/dynamic-labs/dynamic-auth/commit/b8242e699f457036f5dbe5e061617d966b6e639e))
8
+ * issue when signing pbst with embedded wallet ([#9356](https://github.com/dynamic-labs/dynamic-auth/issues/9356)) ([3abac9a](https://github.com/dynamic-labs/dynamic-auth/commit/3abac9a52f27a27a95f576e402163ea9d19f69a5))
9
+ * secondary embedded wallets can register session on transactions and signing ([#9030](https://github.com/dynamic-labs/dynamic-auth/issues/9030)) ([716bd95](https://github.com/dynamic-labs/dynamic-auth/commit/716bd9588ac0c435dd6e3e2f37e93f4c488aa0ae))
10
+ * show native balance when on testnet ([#9329](https://github.com/dynamic-labs/dynamic-auth/issues/9329)) ([d8cbe3b](https://github.com/dynamic-labs/dynamic-auth/commit/d8cbe3b319c2ab2f3579e3759ca45913c7434e44))
11
+
12
+ ## [4.27.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.26.0...v4.27.0) (2025-08-16)
13
+
14
+
15
+ ### Features
16
+
17
+ * add cookie option to waas connectors ([#9335](https://github.com/dynamic-labs/dynamic-auth/issues/9335)) ([2330f58](https://github.com/dynamic-labs/dynamic-auth/commit/2330f58b5eb35da8568c3114d2d2507a742ad22c))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * ensure consistent dynamic api url ([#9357](https://github.com/dynamic-labs/dynamic-auth/issues/9357)) ([0cb9bde](https://github.com/dynamic-labs/dynamic-auth/commit/0cb9bdeb7eb6e4d103dafecea337d1548a62b9b7))
23
+
2
24
  ## [4.26.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.10...v4.26.0) (2025-08-14)
3
25
 
4
26
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.26.0";
6
+ var version = "4.27.1";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.26.0";
2
+ var version = "4.27.1";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/waas",
3
- "version": "4.26.0",
3
+ "version": "4.27.1",
4
4
  "type": "module",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -16,14 +16,14 @@
16
16
  "./package.json": "./package.json"
17
17
  },
18
18
  "dependencies": {
19
- "@dynamic-labs/assert-package-version": "4.26.0",
20
- "@dynamic-labs/sdk-api-core": "0.0.749",
21
- "@dynamic-labs-wallet/browser-wallet-client": "0.0.129",
22
- "@dynamic-labs/ethereum-core": "4.26.0",
23
- "@dynamic-labs/solana-core": "4.26.0",
24
- "@dynamic-labs/sui-core": "4.26.0",
25
- "@dynamic-labs/utils": "4.26.0",
26
- "@dynamic-labs/wallet-book": "4.26.0"
19
+ "@dynamic-labs/assert-package-version": "4.27.1",
20
+ "@dynamic-labs/sdk-api-core": "0.0.753",
21
+ "@dynamic-labs-wallet/browser-wallet-client": "0.0.137",
22
+ "@dynamic-labs/ethereum-core": "4.27.1",
23
+ "@dynamic-labs/solana-core": "4.27.1",
24
+ "@dynamic-labs/sui-core": "4.27.1",
25
+ "@dynamic-labs/utils": "4.27.1",
26
+ "@dynamic-labs/wallet-book": "4.27.1"
27
27
  },
28
28
  "peerDependencies": {}
29
29
  }
@@ -30,6 +30,9 @@ const withDynamicWaas = (BaseClass) => {
30
30
  setGetAuthTokenFunction(getAuthToken) {
31
31
  this.getAuthToken = getAuthToken;
32
32
  }
33
+ setWaasAuthMode(authMode) {
34
+ this.authMode = authMode;
35
+ }
33
36
  setGetMfaTokenFunction(getMfaToken) {
34
37
  this.getMfaToken = getMfaToken;
35
38
  }
@@ -73,6 +76,7 @@ const withDynamicWaas = (BaseClass) => {
73
76
  this.name = 'Dynamic Waas';
74
77
  this.overrideKey = 'dynamicwaas';
75
78
  this.isEmbeddedWallet = true;
79
+ this.authMode = 'header';
76
80
  // Initialize export handler
77
81
  this.__exportHandler = new WaasExportHandler();
78
82
  // Get the class name from the constructor
@@ -93,14 +97,15 @@ const withDynamicWaas = (BaseClass) => {
93
97
  return _tslib.__awaiter(this, void 0, void 0, function* () {
94
98
  var _a;
95
99
  const authToken = (_a = this.getAuthToken) === null || _a === void 0 ? void 0 : _a.call(this);
96
- if (!authToken) {
97
- throw new utils.DynamicError('Auth token is required');
100
+ if (!authToken && this.authMode === 'header') {
101
+ throw new utils.DynamicError('Auth token is required in non-cookie auth mode');
98
102
  }
99
103
  if (!this.environmentId) {
100
104
  throw new utils.DynamicError('Environment ID is required');
101
105
  }
102
106
  const client = new browserWalletClient.DynamicWalletClient({
103
- authToken,
107
+ authMode: (this.authMode || 'header'),
108
+ authToken: authToken || '',
104
109
  baseApiUrl: this.baseApiUrl || constants.DEFAULT_BASE_API_URL,
105
110
  baseMPCRelayApiUrl: this.relayUrl || constants.DEFAULT_BASE_MPC_RELAY_API_URL,
106
111
  chainName: this.chainName,
@@ -20,9 +20,11 @@ export declare const withDynamicWaas: <T extends abstract new (...args: any[]) =
20
20
  relayUrl?: string | undefined;
21
21
  dynamicWaasClient: DynamicWalletClient | undefined;
22
22
  chainName: string;
23
+ authMode: 'cookie' | 'header';
23
24
  __exportHandler: WaasExportHandler;
24
25
  validateActiveWallet(expectedAddress: string): Promise<void>;
25
26
  setGetAuthTokenFunction(getAuthToken: () => string): void;
27
+ setWaasAuthMode(authMode: 'cookie' | 'header'): void;
26
28
  setGetMfaTokenFunction(getMfaToken: (props?: {
27
29
  mfaAction?: MFAAction;
28
30
  }) => Promise<string | undefined>): void;
@@ -26,6 +26,9 @@ const withDynamicWaas = (BaseClass) => {
26
26
  setGetAuthTokenFunction(getAuthToken) {
27
27
  this.getAuthToken = getAuthToken;
28
28
  }
29
+ setWaasAuthMode(authMode) {
30
+ this.authMode = authMode;
31
+ }
29
32
  setGetMfaTokenFunction(getMfaToken) {
30
33
  this.getMfaToken = getMfaToken;
31
34
  }
@@ -69,6 +72,7 @@ const withDynamicWaas = (BaseClass) => {
69
72
  this.name = 'Dynamic Waas';
70
73
  this.overrideKey = 'dynamicwaas';
71
74
  this.isEmbeddedWallet = true;
75
+ this.authMode = 'header';
72
76
  // Initialize export handler
73
77
  this.__exportHandler = new WaasExportHandler();
74
78
  // Get the class name from the constructor
@@ -89,14 +93,15 @@ const withDynamicWaas = (BaseClass) => {
89
93
  return __awaiter(this, void 0, void 0, function* () {
90
94
  var _a;
91
95
  const authToken = (_a = this.getAuthToken) === null || _a === void 0 ? void 0 : _a.call(this);
92
- if (!authToken) {
93
- throw new DynamicError('Auth token is required');
96
+ if (!authToken && this.authMode === 'header') {
97
+ throw new DynamicError('Auth token is required in non-cookie auth mode');
94
98
  }
95
99
  if (!this.environmentId) {
96
100
  throw new DynamicError('Environment ID is required');
97
101
  }
98
102
  const client = new DynamicWalletClient({
99
- authToken,
103
+ authMode: (this.authMode || 'header'),
104
+ authToken: authToken || '',
100
105
  baseApiUrl: this.baseApiUrl || DEFAULT_BASE_API_URL,
101
106
  baseMPCRelayApiUrl: this.relayUrl || DEFAULT_BASE_MPC_RELAY_API_URL,
102
107
  chainName: this.chainName,