@unicitylabs/sphere-sdk 0.6.8-dev.2 → 0.6.8-dev.3
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/core/index.cjs +14 -3
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +2 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +14 -3
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +14 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -16868,6 +16868,8 @@ var Sphere = class _Sphere {
|
|
|
16868
16868
|
// Per-address module instances (Phase 2: independent parallel operation)
|
|
16869
16869
|
_addressModules = /* @__PURE__ */ new Map();
|
|
16870
16870
|
_transportMux = null;
|
|
16871
|
+
/** Fallback DM since timestamp from init options, forwarded to mux on creation. */
|
|
16872
|
+
_dmSince = null;
|
|
16871
16873
|
// Stored configs for creating per-address modules
|
|
16872
16874
|
_l1Config;
|
|
16873
16875
|
_groupChatConfig;
|
|
@@ -16955,9 +16957,6 @@ var Sphere = class _Sphere {
|
|
|
16955
16957
|
const groupChat = _Sphere.resolveGroupChatConfig(options.groupChat, options.network);
|
|
16956
16958
|
const market = _Sphere.resolveMarketConfig(options.market);
|
|
16957
16959
|
const walletExists = await _Sphere.exists(options.storage);
|
|
16958
|
-
if (options.dmSince != null && options.transport.setFallbackDmSince) {
|
|
16959
|
-
options.transport.setFallbackDmSince(options.dmSince);
|
|
16960
|
-
}
|
|
16961
16960
|
if (walletExists) {
|
|
16962
16961
|
const sphere2 = await _Sphere.load({
|
|
16963
16962
|
storage: options.storage,
|
|
@@ -16972,6 +16971,9 @@ var Sphere = class _Sphere {
|
|
|
16972
16971
|
discoverAddresses: options.discoverAddresses,
|
|
16973
16972
|
onProgress: options.onProgress
|
|
16974
16973
|
});
|
|
16974
|
+
if (options.dmSince != null) {
|
|
16975
|
+
sphere2._dmSince = options.dmSince;
|
|
16976
|
+
}
|
|
16975
16977
|
return { sphere: sphere2, created: false };
|
|
16976
16978
|
}
|
|
16977
16979
|
let mnemonic = options.mnemonic;
|
|
@@ -17003,6 +17005,9 @@ var Sphere = class _Sphere {
|
|
|
17003
17005
|
discoverAddresses: options.discoverAddresses,
|
|
17004
17006
|
onProgress: options.onProgress
|
|
17005
17007
|
});
|
|
17008
|
+
if (options.dmSince != null) {
|
|
17009
|
+
sphere._dmSince = options.dmSince;
|
|
17010
|
+
}
|
|
17006
17011
|
return { sphere, created: true, generatedMnemonic };
|
|
17007
17012
|
}
|
|
17008
17013
|
/**
|
|
@@ -18276,6 +18281,9 @@ var Sphere = class _Sphere {
|
|
|
18276
18281
|
const emitEvent = this.emitEvent.bind(this);
|
|
18277
18282
|
const adapter = await this.ensureTransportMux(index, identity);
|
|
18278
18283
|
const addressTransport = adapter ?? this._transport;
|
|
18284
|
+
if (!adapter && this._dmSince != null && addressTransport.setFallbackDmSince) {
|
|
18285
|
+
addressTransport.setFallbackDmSince(this._dmSince);
|
|
18286
|
+
}
|
|
18279
18287
|
const payments = createPaymentsModule({ l1: this._l1Config });
|
|
18280
18288
|
const communications = createCommunicationsModule();
|
|
18281
18289
|
const groupChat = this._groupChatConfig ? createGroupChatModule(this._groupChatConfig) : null;
|
|
@@ -18359,6 +18367,9 @@ var Sphere = class _Sphere {
|
|
|
18359
18367
|
}
|
|
18360
18368
|
logger.debug("Sphere", "Transport mux created and connected");
|
|
18361
18369
|
}
|
|
18370
|
+
if (this._dmSince != null) {
|
|
18371
|
+
this._transportMux.setFallbackDmSince(index, this._dmSince);
|
|
18372
|
+
}
|
|
18362
18373
|
const adapter = await this._transportMux.addAddress(index, identity, this._transport);
|
|
18363
18374
|
return adapter;
|
|
18364
18375
|
}
|