@unicitylabs/sphere-sdk 0.6.8-dev.2 → 0.6.8

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.
@@ -16613,6 +16613,8 @@ var Sphere = class _Sphere {
16613
16613
  // Per-address module instances (Phase 2: independent parallel operation)
16614
16614
  _addressModules = /* @__PURE__ */ new Map();
16615
16615
  _transportMux = null;
16616
+ /** Fallback DM since timestamp from init options, forwarded to mux on creation. */
16617
+ _dmSince = null;
16616
16618
  // Stored configs for creating per-address modules
16617
16619
  _l1Config;
16618
16620
  _groupChatConfig;
@@ -16700,9 +16702,6 @@ var Sphere = class _Sphere {
16700
16702
  const groupChat = _Sphere.resolveGroupChatConfig(options.groupChat, options.network);
16701
16703
  const market = _Sphere.resolveMarketConfig(options.market);
16702
16704
  const walletExists = await _Sphere.exists(options.storage);
16703
- if (options.dmSince != null && options.transport.setFallbackDmSince) {
16704
- options.transport.setFallbackDmSince(options.dmSince);
16705
- }
16706
16705
  if (walletExists) {
16707
16706
  const sphere2 = await _Sphere.load({
16708
16707
  storage: options.storage,
@@ -16717,6 +16716,9 @@ var Sphere = class _Sphere {
16717
16716
  discoverAddresses: options.discoverAddresses,
16718
16717
  onProgress: options.onProgress
16719
16718
  });
16719
+ if (options.dmSince != null) {
16720
+ sphere2._dmSince = options.dmSince;
16721
+ }
16720
16722
  return { sphere: sphere2, created: false };
16721
16723
  }
16722
16724
  let mnemonic = options.mnemonic;
@@ -16748,6 +16750,9 @@ var Sphere = class _Sphere {
16748
16750
  discoverAddresses: options.discoverAddresses,
16749
16751
  onProgress: options.onProgress
16750
16752
  });
16753
+ if (options.dmSince != null) {
16754
+ sphere._dmSince = options.dmSince;
16755
+ }
16751
16756
  return { sphere, created: true, generatedMnemonic };
16752
16757
  }
16753
16758
  /**
@@ -18021,6 +18026,9 @@ var Sphere = class _Sphere {
18021
18026
  const emitEvent = this.emitEvent.bind(this);
18022
18027
  const adapter = await this.ensureTransportMux(index, identity);
18023
18028
  const addressTransport = adapter ?? this._transport;
18029
+ if (!adapter && this._dmSince != null && addressTransport.setFallbackDmSince) {
18030
+ addressTransport.setFallbackDmSince(this._dmSince);
18031
+ }
18024
18032
  const payments = createPaymentsModule({ l1: this._l1Config });
18025
18033
  const communications = createCommunicationsModule();
18026
18034
  const groupChat = this._groupChatConfig ? createGroupChatModule(this._groupChatConfig) : null;
@@ -18104,6 +18112,9 @@ var Sphere = class _Sphere {
18104
18112
  }
18105
18113
  logger.debug("Sphere", "Transport mux created and connected");
18106
18114
  }
18115
+ if (this._dmSince != null) {
18116
+ this._transportMux.setFallbackDmSince(index, this._dmSince);
18117
+ }
18107
18118
  const adapter = await this._transportMux.addAddress(index, identity, this._transport);
18108
18119
  return adapter;
18109
18120
  }