@pafi-dev/issuer 0.33.0 → 0.34.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/dist/index.cjs CHANGED
@@ -2650,13 +2650,13 @@ var DEFAULT_STATUS_CONFIRMATIONS = 3;
2650
2650
  async function isReceiptPastConfirmations(receipt, provider, confirmations, onWarning, handlerName) {
2651
2651
  if (!provider) {
2652
2652
  onWarning?.(
2653
- `${handlerName}: provider missing \u2014 cannot enforce confirmation depth; deferring receipt fallback to on-chain indexer (audit PACI5-13).`
2653
+ `${handlerName}: provider missing \u2014 cannot enforce confirmation depth; deferring receipt fallback to on-chain indexer.`
2654
2654
  );
2655
2655
  return false;
2656
2656
  }
2657
2657
  if (!receipt.blockNumber) {
2658
2658
  onWarning?.(
2659
- `${handlerName}: receipt has no blockNumber \u2014 cannot enforce confirmation depth; deferring to indexer (audit PACI5-13).`
2659
+ `${handlerName}: receipt has no blockNumber \u2014 cannot enforce confirmation depth; deferring to indexer.`
2660
2660
  );
2661
2661
  return false;
2662
2662
  }
@@ -2666,7 +2666,7 @@ async function isReceiptPastConfirmations(receipt, provider, confirmations, onWa
2666
2666
  receiptBlock = BigInt(receipt.blockNumber);
2667
2667
  } catch {
2668
2668
  onWarning?.(
2669
- `${handlerName}: malformed receipt blockNumber (${receipt.blockNumber}) \u2014 deferring to indexer (audit PACI5-13).`
2669
+ `${handlerName}: malformed receipt blockNumber (${receipt.blockNumber}) \u2014 deferring to indexer.`
2670
2670
  );
2671
2671
  return false;
2672
2672
  }
@@ -2675,7 +2675,7 @@ async function isReceiptPastConfirmations(receipt, provider, confirmations, onWa
2675
2675
  head = await provider.getBlockNumber();
2676
2676
  } catch (err) {
2677
2677
  onWarning?.(
2678
- `${handlerName}: getBlockNumber failed (${err instanceof Error ? err.message : String(err)}) \u2014 deferring to indexer (audit PACI5-13).`
2678
+ `${handlerName}: getBlockNumber failed (${err instanceof Error ? err.message : String(err)}) \u2014 deferring to indexer.`
2679
2679
  );
2680
2680
  return false;
2681
2681
  }
@@ -3984,8 +3984,6 @@ var IssuerApiAdapter = class {
3984
3984
  userAddress: authenticatedAddress,
3985
3985
  ledger: this.cfg.ledger,
3986
3986
  pafiBackendClient: this.cfg.pafiBackendClient,
3987
- // Audit PACI5-13 — pass the same provider the indexers use so
3988
- // the receipt fallback gates on the same reorg depth.
3989
3987
  provider: this.cfg.provider,
3990
3988
  onWarning: this.cfg.onWarning
3991
3989
  });
@@ -3996,7 +3994,6 @@ var IssuerApiAdapter = class {
3996
3994
  userAddress: authenticatedAddress,
3997
3995
  ledger: this.cfg.ledger,
3998
3996
  pafiBackendClient: this.cfg.pafiBackendClient,
3999
- // Audit PACI5-13 — see claimStatus comment.
4000
3997
  provider: this.cfg.provider,
4001
3998
  onWarning: this.cfg.onWarning
4002
3999
  });
@@ -5210,7 +5207,7 @@ async function createIssuerService(config) {
5210
5207
  // src/issuer-state/validator.ts
5211
5208
  var import_viem16 = require("viem");
5212
5209
  var import_core20 = require("@pafi-dev/core");
5213
- var ISSUER_RECORD_TTL_MS = 3e4;
5210
+ var ISSUER_RECORD_TTL_MS = 1e4;
5214
5211
  var IssuerStateValidator = class _IssuerStateValidator {
5215
5212
  constructor(provider, registryAddress) {
5216
5213
  this.provider = provider;
@@ -5231,7 +5228,9 @@ var IssuerStateValidator = class _IssuerStateValidator {
5231
5228
  }
5232
5229
  /**
5233
5230
  * Invalidate cached state for one PointToken, or everything if omitted.
5234
- * Call after admin txs that change registry or cap settings.
5231
+ * Call after admin txs that change registry or cap settings — closes
5232
+ * the split-brain window described in audit PACI5-3 ahead of the
5233
+ * passive TTL. Idempotent: safe to call when no entry exists.
5235
5234
  */
5236
5235
  invalidate(pointToken) {
5237
5236
  if (pointToken) {
@@ -5404,7 +5403,7 @@ var MemoryRedemptionHistoryStore = class {
5404
5403
  };
5405
5404
 
5406
5405
  // src/index.ts
5407
- var PAFI_ISSUER_SDK_VERSION = true ? "0.33.0" : "dev";
5406
+ var PAFI_ISSUER_SDK_VERSION = true ? "0.34.0" : "dev";
5408
5407
  // Annotate the CommonJS export names for ESM import in node:
5409
5408
  0 && (module.exports = {
5410
5409
  AdapterMisconfiguredError,