@unicitylabs/sphere-sdk 0.14.0-dev.5 → 0.14.0-dev.6

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.
@@ -2767,6 +2767,7 @@ var WalletApiSession = class {
2767
2767
  reseedChain = Promise.resolve();
2768
2768
  reseedsPending = 0;
2769
2769
  handlers = /* @__PURE__ */ new Map();
2770
+ statusHandlers = /* @__PURE__ */ new Set();
2770
2771
  socket = null;
2771
2772
  started = false;
2772
2773
  stopped = false;
@@ -2917,10 +2918,16 @@ var WalletApiSession = class {
2917
2918
  status() {
2918
2919
  return this.lastStatus ?? "offline";
2919
2920
  }
2921
+ /** Transition feed off the existing emitStatus point (FacadeSession.subscribeStatus). */
2922
+ subscribeStatus(handler) {
2923
+ this.statusHandlers.add(handler);
2924
+ return () => this.statusHandlers.delete(handler);
2925
+ }
2920
2926
  emitStatus(status) {
2921
2927
  if (this.stopped || this.lastStatus === status) return;
2922
2928
  this.lastStatus = status;
2923
2929
  this.deps.emitStatus(status);
2930
+ for (const handler of this.statusHandlers) handler(status);
2924
2931
  }
2925
2932
  async connect() {
2926
2933
  if (this.stopped) return;