@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.
- package/dist/connect/index.cjs +1 -1
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +1 -1
- package/dist/connect/index.js.map +1 -1
- package/dist/core/index.cjs +303 -35
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +21 -0
- package/dist/core/index.d.ts +21 -0
- package/dist/core/index.js +303 -35
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/connect/index.cjs +1 -1
- package/dist/impl/browser/connect/index.cjs.map +1 -1
- package/dist/impl/browser/connect/index.js +1 -1
- package/dist/impl/browser/connect/index.js.map +1 -1
- package/dist/impl/wallet-api-v2/index.cjs +7 -0
- package/dist/impl/wallet-api-v2/index.cjs.map +1 -1
- package/dist/impl/wallet-api-v2/index.d.cts +3 -0
- package/dist/impl/wallet-api-v2/index.d.ts +3 -0
- package/dist/impl/wallet-api-v2/index.js +7 -0
- package/dist/impl/wallet-api-v2/index.js.map +1 -1
- package/dist/index.cjs +303 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +303 -35
- package/dist/index.js.map +1 -1
- package/dist/modules/payments-v2/index.cjs +300 -35
- package/dist/modules/payments-v2/index.cjs.map +1 -1
- package/dist/modules/payments-v2/index.d.cts +45 -2
- package/dist/modules/payments-v2/index.d.ts +45 -2
- package/dist/modules/payments-v2/index.js +298 -35
- package/dist/modules/payments-v2/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -367,6 +367,7 @@ declare class WalletApiSession {
|
|
|
367
367
|
private reseedChain;
|
|
368
368
|
private reseedsPending;
|
|
369
369
|
private readonly handlers;
|
|
370
|
+
private readonly statusHandlers;
|
|
370
371
|
private socket;
|
|
371
372
|
private started;
|
|
372
373
|
private stopped;
|
|
@@ -395,6 +396,8 @@ declare class WalletApiSession {
|
|
|
395
396
|
private nudgeAllStreams;
|
|
396
397
|
private startPullTimers;
|
|
397
398
|
status(): ConnectionStatus;
|
|
399
|
+
/** Transition feed off the existing emitStatus point (FacadeSession.subscribeStatus). */
|
|
400
|
+
subscribeStatus(handler: (status: ConnectionStatus) => void): () => void;
|
|
398
401
|
private emitStatus;
|
|
399
402
|
private connect;
|
|
400
403
|
private openSocket;
|
|
@@ -367,6 +367,7 @@ declare class WalletApiSession {
|
|
|
367
367
|
private reseedChain;
|
|
368
368
|
private reseedsPending;
|
|
369
369
|
private readonly handlers;
|
|
370
|
+
private readonly statusHandlers;
|
|
370
371
|
private socket;
|
|
371
372
|
private started;
|
|
372
373
|
private stopped;
|
|
@@ -395,6 +396,8 @@ declare class WalletApiSession {
|
|
|
395
396
|
private nudgeAllStreams;
|
|
396
397
|
private startPullTimers;
|
|
397
398
|
status(): ConnectionStatus;
|
|
399
|
+
/** Transition feed off the existing emitStatus point (FacadeSession.subscribeStatus). */
|
|
400
|
+
subscribeStatus(handler: (status: ConnectionStatus) => void): () => void;
|
|
398
401
|
private emitStatus;
|
|
399
402
|
private connect;
|
|
400
403
|
private openSocket;
|
|
@@ -2719,6 +2719,7 @@ var WalletApiSession = class {
|
|
|
2719
2719
|
reseedChain = Promise.resolve();
|
|
2720
2720
|
reseedsPending = 0;
|
|
2721
2721
|
handlers = /* @__PURE__ */ new Map();
|
|
2722
|
+
statusHandlers = /* @__PURE__ */ new Set();
|
|
2722
2723
|
socket = null;
|
|
2723
2724
|
started = false;
|
|
2724
2725
|
stopped = false;
|
|
@@ -2869,10 +2870,16 @@ var WalletApiSession = class {
|
|
|
2869
2870
|
status() {
|
|
2870
2871
|
return this.lastStatus ?? "offline";
|
|
2871
2872
|
}
|
|
2873
|
+
/** Transition feed off the existing emitStatus point (FacadeSession.subscribeStatus). */
|
|
2874
|
+
subscribeStatus(handler) {
|
|
2875
|
+
this.statusHandlers.add(handler);
|
|
2876
|
+
return () => this.statusHandlers.delete(handler);
|
|
2877
|
+
}
|
|
2872
2878
|
emitStatus(status) {
|
|
2873
2879
|
if (this.stopped || this.lastStatus === status) return;
|
|
2874
2880
|
this.lastStatus = status;
|
|
2875
2881
|
this.deps.emitStatus(status);
|
|
2882
|
+
for (const handler of this.statusHandlers) handler(status);
|
|
2876
2883
|
}
|
|
2877
2884
|
async connect() {
|
|
2878
2885
|
if (this.stopped) return;
|