@dynamic-labs/waas-svm 4.97.0 → 4.98.0

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,17 @@
1
1
 
2
+ ## [4.98.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.97.0...v4.98.0) (2026-09-02)
3
+
4
+
5
+ ### Features
6
+
7
+ * **waas-evm:** route embedded EVM sends through gas sponsorship when enabled (V4) ([#12307](https://github.com/dynamic-labs/dynamic-auth/issues/12307)) ([d8e6b94](https://github.com/dynamic-labs/dynamic-auth/commit/d8e6b94dc86e1d48b66a246bf8bf0b857e7e69c4))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **sdk-react-core:** send a css overrides summary in sdkSettings telemetry (v4) ([#12330](https://github.com/dynamic-labs/dynamic-auth/issues/12330)) ([8547ee7](https://github.com/dynamic-labs/dynamic-auth/commit/8547ee7a7c3fef8de0ff384778f86542b809e7aa))
13
+ * **waas-svm:** apply overrideBlockhash before sponsorship [v4 backport] ([#12320](https://github.com/dynamic-labs/dynamic-auth/issues/12320)) ([0551f01](https://github.com/dynamic-labs/dynamic-auth/commit/0551f01953f5e623ac113b03e1b010d3dc58a81e)), closes [#10599](https://github.com/dynamic-labs/dynamic-auth/issues/10599) [#10599](https://github.com/dynamic-labs/dynamic-auth/issues/10599) [#10599](https://github.com/dynamic-labs/dynamic-auth/issues/10599) [#10599](https://github.com/dynamic-labs/dynamic-auth/issues/10599)
14
+
2
15
  ## [4.97.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.96.4...v4.97.0) (2026-08-27)
3
16
 
4
17
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.97.0";
6
+ var version = "4.98.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.97.0";
2
+ var version = "4.98.0";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/waas-svm",
3
- "version": "4.97.0",
3
+ "version": "4.98.0",
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",
@@ -19,18 +19,18 @@
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
21
  "@dynamic-labs/sdk-api-core": "0.12.0",
22
- "@dynamic-labs/embedded-wallet-solana": "4.97.0",
22
+ "@dynamic-labs/embedded-wallet-solana": "4.98.0",
23
23
  "@solana/web3.js": "1.98.1",
24
24
  "eventemitter3": "5.0.1",
25
25
  "bs58": "5.0.0",
26
- "@dynamic-labs/assert-package-version": "4.97.0",
27
- "@dynamic-labs/logger": "4.97.0",
28
- "@dynamic-labs/rpc-providers": "4.97.0",
29
- "@dynamic-labs/solana-core": "4.97.0",
30
- "@dynamic-labs/types": "4.97.0",
31
- "@dynamic-labs/utils": "4.97.0",
32
- "@dynamic-labs/waas": "4.97.0",
33
- "@dynamic-labs/wallet-connector-core": "4.97.0"
26
+ "@dynamic-labs/assert-package-version": "4.98.0",
27
+ "@dynamic-labs/logger": "4.98.0",
28
+ "@dynamic-labs/rpc-providers": "4.98.0",
29
+ "@dynamic-labs/solana-core": "4.98.0",
30
+ "@dynamic-labs/types": "4.98.0",
31
+ "@dynamic-labs/utils": "4.98.0",
32
+ "@dynamic-labs/waas": "4.98.0",
33
+ "@dynamic-labs/wallet-connector-core": "4.98.0"
34
34
  },
35
35
  "peerDependencies": {}
36
36
  }
@@ -243,17 +243,21 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
243
243
  var _a, _b, _c;
244
244
  const traceId = parentTraceId || this.generateTraceId();
245
245
  const effectiveStartTime = startTime || Date.now();
246
- // Attempt to sponsor the transaction before signing
247
- const txToSign = yield this.maybeSponsorTransaction(transaction);
246
+ // Write the blockhash before sponsorship, never after: the sponsor signs the
247
+ // message it is handed, so a later rewrite invalidates its signature and the
248
+ // RPC rejects the transaction at preflight with SignatureFailure.
249
+ const txToSponsor = transaction;
248
250
  if (overrideBlockhash) {
249
- if (solanaCore.isVersionedTransaction(txToSign)) {
250
- txToSign.message.recentBlockhash = overrideBlockhash.blockhash;
251
+ if (solanaCore.isVersionedTransaction(txToSponsor)) {
252
+ txToSponsor.message.recentBlockhash = overrideBlockhash.blockhash;
251
253
  }
252
254
  else {
253
- txToSign.recentBlockhash = overrideBlockhash.blockhash;
254
- txToSign.lastValidBlockHeight = overrideBlockhash.lastValidBlockHeight;
255
+ txToSponsor.recentBlockhash = overrideBlockhash.blockhash;
256
+ txToSponsor.lastValidBlockHeight =
257
+ overrideBlockhash.lastValidBlockHeight;
255
258
  }
256
259
  }
260
+ const txToSign = yield this.maybeSponsorTransaction(txToSponsor);
257
261
  const walletClient = yield this.instrumentAsync({
258
262
  context: { chainName: 'SVM', startTime: effectiveStartTime, traceId },
259
263
  fn: () => _tslib.__awaiter(this, void 0, void 0, function* () { return this.getWaasWalletClient(); }),
@@ -400,16 +404,16 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
400
404
  }
401
405
  internalSignAndSendTransaction(transaction_1, options_1) {
402
406
  return _tslib.__awaiter(this, arguments, void 0, function* (transaction, options, { parentTraceId, startTime, } = {}) {
403
- var _a;
407
+ var _a, _b;
404
408
  const traceId = parentTraceId || this.generateTraceId();
405
409
  const effectiveStartTime = startTime || Date.now();
406
410
  if (!this.activeAccountAddress) {
407
411
  throw new Error('Active account address is required');
408
412
  }
409
413
  const connection = this.getWalletClient();
410
- // Refresh the blockhash right before signing so the tx is submitted with
411
- // a fresh validity window AND so confirmTransaction's expiration check
412
- // operates on the same blockhash that's embedded in the tx.
414
+ // Refresh the blockhash so the tx gets a fresh validity window AND so
415
+ // confirmTransaction's expiration check operates on the same blockhash
416
+ // that's embedded in the tx. Applied before sponsorship.
413
417
  // Use 'finalized' so the blockhash is recognized by every RPC node
414
418
  // (a 'confirmed' blockhash may not yet have propagated to the simulating
415
419
  // node, which surfaces as "Blockhash not found" at sendRawTransaction).
@@ -447,12 +451,18 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
447
451
  resource: 'sendRawTransaction',
448
452
  });
449
453
  const confirmationStartTime = Date.now();
454
+ // Confirm against the blockhash the broadcast tx actually carries, in case a
455
+ // sponsor ever substitutes its own. lastValidBlockHeight stays local, which
456
+ // only errs on the side of giving up early.
457
+ const broadcastBlockhash = isVersionedSolanaTransaction
458
+ ? signedTransaction.message.recentBlockhash
459
+ : (_a = signedTransaction.recentBlockhash) !== null && _a !== void 0 ? _a : blockhash;
450
460
  try {
451
461
  const confirmationResult = yield connection.confirmTransaction({
452
- blockhash,
462
+ blockhash: broadcastBlockhash,
453
463
  lastValidBlockHeight,
454
464
  signature,
455
- }, (_a = options === null || options === void 0 ? void 0 : options.preflightCommitment) !== null && _a !== void 0 ? _a : 'confirmed');
465
+ }, (_b = options === null || options === void 0 ? void 0 : options.preflightCommitment) !== null && _b !== void 0 ? _b : 'confirmed');
456
466
  const confirmationEndTime = Date.now();
457
467
  const confirmationStepElapsed = confirmationEndTime - confirmationStartTime;
458
468
  const confirmationTotalElapsed = confirmationEndTime - effectiveStartTime;
@@ -239,17 +239,21 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
239
239
  var _a, _b, _c;
240
240
  const traceId = parentTraceId || this.generateTraceId();
241
241
  const effectiveStartTime = startTime || Date.now();
242
- // Attempt to sponsor the transaction before signing
243
- const txToSign = yield this.maybeSponsorTransaction(transaction);
242
+ // Write the blockhash before sponsorship, never after: the sponsor signs the
243
+ // message it is handed, so a later rewrite invalidates its signature and the
244
+ // RPC rejects the transaction at preflight with SignatureFailure.
245
+ const txToSponsor = transaction;
244
246
  if (overrideBlockhash) {
245
- if (isVersionedTransaction(txToSign)) {
246
- txToSign.message.recentBlockhash = overrideBlockhash.blockhash;
247
+ if (isVersionedTransaction(txToSponsor)) {
248
+ txToSponsor.message.recentBlockhash = overrideBlockhash.blockhash;
247
249
  }
248
250
  else {
249
- txToSign.recentBlockhash = overrideBlockhash.blockhash;
250
- txToSign.lastValidBlockHeight = overrideBlockhash.lastValidBlockHeight;
251
+ txToSponsor.recentBlockhash = overrideBlockhash.blockhash;
252
+ txToSponsor.lastValidBlockHeight =
253
+ overrideBlockhash.lastValidBlockHeight;
251
254
  }
252
255
  }
256
+ const txToSign = yield this.maybeSponsorTransaction(txToSponsor);
253
257
  const walletClient = yield this.instrumentAsync({
254
258
  context: { chainName: 'SVM', startTime: effectiveStartTime, traceId },
255
259
  fn: () => __awaiter(this, void 0, void 0, function* () { return this.getWaasWalletClient(); }),
@@ -396,16 +400,16 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
396
400
  }
397
401
  internalSignAndSendTransaction(transaction_1, options_1) {
398
402
  return __awaiter(this, arguments, void 0, function* (transaction, options, { parentTraceId, startTime, } = {}) {
399
- var _a;
403
+ var _a, _b;
400
404
  const traceId = parentTraceId || this.generateTraceId();
401
405
  const effectiveStartTime = startTime || Date.now();
402
406
  if (!this.activeAccountAddress) {
403
407
  throw new Error('Active account address is required');
404
408
  }
405
409
  const connection = this.getWalletClient();
406
- // Refresh the blockhash right before signing so the tx is submitted with
407
- // a fresh validity window AND so confirmTransaction's expiration check
408
- // operates on the same blockhash that's embedded in the tx.
410
+ // Refresh the blockhash so the tx gets a fresh validity window AND so
411
+ // confirmTransaction's expiration check operates on the same blockhash
412
+ // that's embedded in the tx. Applied before sponsorship.
409
413
  // Use 'finalized' so the blockhash is recognized by every RPC node
410
414
  // (a 'confirmed' blockhash may not yet have propagated to the simulating
411
415
  // node, which surfaces as "Blockhash not found" at sendRawTransaction).
@@ -443,12 +447,18 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
443
447
  resource: 'sendRawTransaction',
444
448
  });
445
449
  const confirmationStartTime = Date.now();
450
+ // Confirm against the blockhash the broadcast tx actually carries, in case a
451
+ // sponsor ever substitutes its own. lastValidBlockHeight stays local, which
452
+ // only errs on the side of giving up early.
453
+ const broadcastBlockhash = isVersionedSolanaTransaction
454
+ ? signedTransaction.message.recentBlockhash
455
+ : (_a = signedTransaction.recentBlockhash) !== null && _a !== void 0 ? _a : blockhash;
446
456
  try {
447
457
  const confirmationResult = yield connection.confirmTransaction({
448
- blockhash,
458
+ blockhash: broadcastBlockhash,
449
459
  lastValidBlockHeight,
450
460
  signature,
451
- }, (_a = options === null || options === void 0 ? void 0 : options.preflightCommitment) !== null && _a !== void 0 ? _a : 'confirmed');
461
+ }, (_b = options === null || options === void 0 ? void 0 : options.preflightCommitment) !== null && _b !== void 0 ? _b : 'confirmed');
452
462
  const confirmationEndTime = Date.now();
453
463
  const confirmationStepElapsed = confirmationEndTime - confirmationStartTime;
454
464
  const confirmationTotalElapsed = confirmationEndTime - effectiveStartTime;