@unicitylabs/sphere-sdk 0.15.0 → 0.16.0-dev.2
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/README.md +15 -5
- package/dist/connect/index.cjs +26 -25
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.cts +4 -0
- package/dist/connect/index.d.ts +4 -0
- package/dist/connect/index.js +26 -25
- package/dist/connect/index.js.map +1 -1
- package/dist/core/index.cjs +728 -227
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +174 -23
- package/dist/core/index.d.ts +174 -23
- package/dist/core/index.js +728 -226
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/connect/index.cjs +16 -25
- package/dist/impl/browser/connect/index.cjs.map +1 -1
- package/dist/impl/browser/connect/index.js +16 -25
- package/dist/impl/browser/connect/index.js.map +1 -1
- package/dist/impl/browser/index.cjs +333 -506
- package/dist/impl/browser/index.cjs.map +1 -1
- package/dist/impl/browser/index.js +333 -506
- package/dist/impl/browser/index.js.map +1 -1
- package/dist/impl/nodejs/connect/index.cjs +15 -24
- package/dist/impl/nodejs/connect/index.cjs.map +1 -1
- package/dist/impl/nodejs/connect/index.js +15 -24
- package/dist/impl/nodejs/connect/index.js.map +1 -1
- package/dist/impl/nodejs/index.cjs +300 -571
- package/dist/impl/nodejs/index.cjs.map +1 -1
- package/dist/impl/nodejs/index.d.cts +92 -15
- package/dist/impl/nodejs/index.d.ts +92 -15
- package/dist/impl/nodejs/index.js +300 -571
- package/dist/impl/nodejs/index.js.map +1 -1
- package/dist/impl/shared/wallet-api/index.d.cts +54 -2
- package/dist/impl/shared/wallet-api/index.d.ts +54 -2
- package/dist/index.cjs +730 -227
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +229 -110
- package/dist/index.d.ts +229 -110
- package/dist/index.js +730 -226
- package/dist/index.js.map +1 -1
- package/dist/modules/payments-v2/index.cjs +11 -7
- package/dist/modules/payments-v2/index.cjs.map +1 -1
- package/dist/modules/payments-v2/index.d.cts +56 -3
- package/dist/modules/payments-v2/index.d.ts +56 -3
- package/dist/modules/payments-v2/index.js +11 -7
- package/dist/modules/payments-v2/index.js.map +1 -1
- package/dist/token-engine/index.cjs +46 -0
- package/dist/token-engine/index.cjs.map +1 -1
- package/dist/token-engine/index.js +46 -0
- package/dist/token-engine/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -3214,12 +3214,13 @@ var Receive = class {
|
|
|
3214
3214
|
return this.drainFlight.run(() => this.doDrain());
|
|
3215
3215
|
}
|
|
3216
3216
|
start(pollIntervalMs = POLL_INTERVAL_MS) {
|
|
3217
|
-
this.unsubscribeWake ??= this.deps.delivery.onWake?.(() =>
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3217
|
+
this.unsubscribeWake ??= this.deps.delivery.onWake?.(() => this.spawnDrain()) ?? null;
|
|
3218
|
+
this.pollTimer ??= setInterval(() => this.spawnDrain(), pollIntervalMs);
|
|
3219
|
+
}
|
|
3220
|
+
spawnDrain() {
|
|
3221
|
+
const op = this.drainOnce();
|
|
3222
|
+
if (this.deps.track !== void 0) this.deps.track(op);
|
|
3223
|
+
else void op;
|
|
3223
3224
|
}
|
|
3224
3225
|
stop() {
|
|
3225
3226
|
if (this.pollTimer !== null) clearInterval(this.pollTimer);
|
|
@@ -4322,6 +4323,8 @@ function buildReceive(deps, hooks, historyStore, heldStates, refreshView) {
|
|
|
4322
4323
|
);
|
|
4323
4324
|
},
|
|
4324
4325
|
syncEpoch: deps.syncEpoch,
|
|
4326
|
+
// #770: the poll/wake drains Receive spawns itself must hold stop() too.
|
|
4327
|
+
track: hooks.track,
|
|
4325
4328
|
...deps.now !== void 0 ? { now: deps.now } : {}
|
|
4326
4329
|
});
|
|
4327
4330
|
}
|
|
@@ -4464,7 +4467,8 @@ var PaymentsFacade = class {
|
|
|
4464
4467
|
await Promise.allSettled([...this.pendingOps]);
|
|
4465
4468
|
}
|
|
4466
4469
|
}
|
|
4467
|
-
/** Swaps what FUTURE operations snapshot
|
|
4470
|
+
/** Swaps what FUTURE operations snapshot. Chain ops finish on the old engine, but it is
|
|
4471
|
+
* DISPOSED here, so one mid-`verify()` is cancelled — MODULE_DESTROYED, #770(4). */
|
|
4468
4472
|
setEngine(next) {
|
|
4469
4473
|
const previous = this.currentEngine ?? this.deps.engineRef();
|
|
4470
4474
|
this.currentEngine = next;
|