@unicitylabs/sphere-sdk 0.9.1-dev.11 → 0.9.1-dev.13
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 +7750 -7715
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +41 -14
- package/dist/core/index.d.ts +41 -14
- package/dist/core/index.js +7778 -7743
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +7885 -7810
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -14
- package/dist/index.d.ts +41 -14
- package/dist/index.js +7868 -7793
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2065,10 +2065,13 @@ declare class PaymentsModule {
|
|
|
2065
2065
|
/** Coalesces concurrent payment-request pump runs. */
|
|
2066
2066
|
private prPumpInFlight;
|
|
2067
2067
|
/**
|
|
2068
|
-
* Set after the once-per-session
|
|
2069
|
-
* incoming list is in-memory only, so
|
|
2070
|
-
*
|
|
2071
|
-
*
|
|
2068
|
+
* Set after the once-per-session full incoming hydration (#556): the surfaced
|
|
2069
|
+
* incoming list is in-memory only, so on a fresh engine the CURRENT state of
|
|
2070
|
+
* ALL incoming requests — open AND resolved (paid/declined/expired) — must be
|
|
2071
|
+
* rebuilt from a `role=incoming&since=0` pull, not just the still-open ones.
|
|
2072
|
+
* A status-filtered bootstrap (the pre-#556 `status=open` scan) dropped
|
|
2073
|
+
* requests resolved in a PRIOR session, so the payer reopened and the
|
|
2074
|
+
* 'Paid Successfully' request was gone (twin of #521/#549).
|
|
2072
2075
|
*/
|
|
2073
2076
|
private prBootstrapped;
|
|
2074
2077
|
private loadedPromise;
|
|
@@ -2805,20 +2808,44 @@ declare class PaymentsModule {
|
|
|
2805
2808
|
* mailbox-cursor pattern: the persisted `{cursor, syncEpoch}` is the resume
|
|
2806
2809
|
* point; a `syncEpoch` change (server restore — §5.4) voids cursor
|
|
2807
2810
|
* continuity, so the tail re-pulls from 0 and the id-dedup in
|
|
2808
|
-
* {@link surfaceIncomingPaymentRequest} absorbs the replays.
|
|
2809
|
-
*
|
|
2810
|
-
*
|
|
2811
|
-
*
|
|
2812
|
-
*
|
|
2811
|
+
* {@link surfaceIncomingPaymentRequest} absorbs the replays.
|
|
2812
|
+
*
|
|
2813
|
+
* Because the surfaced list is in-memory only, each session FIRST runs one
|
|
2814
|
+
* full incoming hydration from `since=0` with NO status filter (#556 —
|
|
2815
|
+
* mirrors {@link hydrateHistoryFromServer}): a fresh engine rebuilds the
|
|
2816
|
+
* CURRENT state of ALL incoming requests — open AND resolved — so a request
|
|
2817
|
+
* paid/declined/expired in a PRIOR session is still present (with its
|
|
2818
|
+
* resolved status) instead of vanishing once the cursor advanced past it.
|
|
2819
|
+
* Hydration NEVER fires the new-incoming handlers/events for resolved
|
|
2820
|
+
* requests — only `open` ones notify (the status-aware
|
|
2821
|
+
* {@link surfaceIncomingPaymentRequest}) — so reopening can't spam stale
|
|
2822
|
+
* 'new request' notifications. After hydration the `since`-cursor delta poll
|
|
2823
|
+
* picks up live updates from the resume point.
|
|
2813
2824
|
*/
|
|
2814
2825
|
private pumpIncomingPaymentRequests;
|
|
2826
|
+
/**
|
|
2827
|
+
* Decrypt a payment-request's recipient-addressed memo envelope into
|
|
2828
|
+
* `{ memo, senderNametag }` (the requester's message + nametag). The key is
|
|
2829
|
+
* the ECDH shared secret between THIS wallet (the payer) and the requester's
|
|
2830
|
+
* chain pubkey (`wire.fromPubkey`) — symmetric with the requester's
|
|
2831
|
+
* create-time derivation. Returns an empty bundle (and logs at debug) on any
|
|
2832
|
+
* absence/failure so the incoming view never wedges on an unreadable memo
|
|
2833
|
+
* (PR twin of #546/#547).
|
|
2834
|
+
*/
|
|
2835
|
+
private decryptPaymentRequestMemo;
|
|
2836
|
+
/** §16 wire status → the public {@link PaymentRequestStatus} display status. */
|
|
2837
|
+
private static readonly PR_WIRE_STATUS;
|
|
2815
2838
|
/**
|
|
2816
2839
|
* Map a §16 wire request onto the public {@link IncomingPaymentRequest}
|
|
2817
|
-
* surface
|
|
2818
|
-
*
|
|
2819
|
-
*
|
|
2820
|
-
*
|
|
2821
|
-
*
|
|
2840
|
+
* surface, deduped by id (the in-memory id-dedup doubles as the replay guard
|
|
2841
|
+
* for cursor resets). Requests of EVERY status are surfaced so a reloaded
|
|
2842
|
+
* thin wallet rebuilds the CURRENT state of its incoming view (#556) — open
|
|
2843
|
+
* ones land as actionable `pending`, resolved ones carry their paid/declined
|
|
2844
|
+
* (→ `rejected`)/expired status. Only `open` requests fire the new-incoming
|
|
2845
|
+
* event + handlers; resolved requests are folded into the list silently, so a
|
|
2846
|
+
* reload (or a `syncEpoch` re-pull) never re-notifies for already-resolved
|
|
2847
|
+
* requests. Multi-asset requests surface their first asset (the module's
|
|
2848
|
+
* request surface is single-asset; module-created requests always are).
|
|
2822
2849
|
*/
|
|
2823
2850
|
private surfaceIncomingPaymentRequest;
|
|
2824
2851
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -2065,10 +2065,13 @@ declare class PaymentsModule {
|
|
|
2065
2065
|
/** Coalesces concurrent payment-request pump runs. */
|
|
2066
2066
|
private prPumpInFlight;
|
|
2067
2067
|
/**
|
|
2068
|
-
* Set after the once-per-session
|
|
2069
|
-
* incoming list is in-memory only, so
|
|
2070
|
-
*
|
|
2071
|
-
*
|
|
2068
|
+
* Set after the once-per-session full incoming hydration (#556): the surfaced
|
|
2069
|
+
* incoming list is in-memory only, so on a fresh engine the CURRENT state of
|
|
2070
|
+
* ALL incoming requests — open AND resolved (paid/declined/expired) — must be
|
|
2071
|
+
* rebuilt from a `role=incoming&since=0` pull, not just the still-open ones.
|
|
2072
|
+
* A status-filtered bootstrap (the pre-#556 `status=open` scan) dropped
|
|
2073
|
+
* requests resolved in a PRIOR session, so the payer reopened and the
|
|
2074
|
+
* 'Paid Successfully' request was gone (twin of #521/#549).
|
|
2072
2075
|
*/
|
|
2073
2076
|
private prBootstrapped;
|
|
2074
2077
|
private loadedPromise;
|
|
@@ -2805,20 +2808,44 @@ declare class PaymentsModule {
|
|
|
2805
2808
|
* mailbox-cursor pattern: the persisted `{cursor, syncEpoch}` is the resume
|
|
2806
2809
|
* point; a `syncEpoch` change (server restore — §5.4) voids cursor
|
|
2807
2810
|
* continuity, so the tail re-pulls from 0 and the id-dedup in
|
|
2808
|
-
* {@link surfaceIncomingPaymentRequest} absorbs the replays.
|
|
2809
|
-
*
|
|
2810
|
-
*
|
|
2811
|
-
*
|
|
2812
|
-
*
|
|
2811
|
+
* {@link surfaceIncomingPaymentRequest} absorbs the replays.
|
|
2812
|
+
*
|
|
2813
|
+
* Because the surfaced list is in-memory only, each session FIRST runs one
|
|
2814
|
+
* full incoming hydration from `since=0` with NO status filter (#556 —
|
|
2815
|
+
* mirrors {@link hydrateHistoryFromServer}): a fresh engine rebuilds the
|
|
2816
|
+
* CURRENT state of ALL incoming requests — open AND resolved — so a request
|
|
2817
|
+
* paid/declined/expired in a PRIOR session is still present (with its
|
|
2818
|
+
* resolved status) instead of vanishing once the cursor advanced past it.
|
|
2819
|
+
* Hydration NEVER fires the new-incoming handlers/events for resolved
|
|
2820
|
+
* requests — only `open` ones notify (the status-aware
|
|
2821
|
+
* {@link surfaceIncomingPaymentRequest}) — so reopening can't spam stale
|
|
2822
|
+
* 'new request' notifications. After hydration the `since`-cursor delta poll
|
|
2823
|
+
* picks up live updates from the resume point.
|
|
2813
2824
|
*/
|
|
2814
2825
|
private pumpIncomingPaymentRequests;
|
|
2826
|
+
/**
|
|
2827
|
+
* Decrypt a payment-request's recipient-addressed memo envelope into
|
|
2828
|
+
* `{ memo, senderNametag }` (the requester's message + nametag). The key is
|
|
2829
|
+
* the ECDH shared secret between THIS wallet (the payer) and the requester's
|
|
2830
|
+
* chain pubkey (`wire.fromPubkey`) — symmetric with the requester's
|
|
2831
|
+
* create-time derivation. Returns an empty bundle (and logs at debug) on any
|
|
2832
|
+
* absence/failure so the incoming view never wedges on an unreadable memo
|
|
2833
|
+
* (PR twin of #546/#547).
|
|
2834
|
+
*/
|
|
2835
|
+
private decryptPaymentRequestMemo;
|
|
2836
|
+
/** §16 wire status → the public {@link PaymentRequestStatus} display status. */
|
|
2837
|
+
private static readonly PR_WIRE_STATUS;
|
|
2815
2838
|
/**
|
|
2816
2839
|
* Map a §16 wire request onto the public {@link IncomingPaymentRequest}
|
|
2817
|
-
* surface
|
|
2818
|
-
*
|
|
2819
|
-
*
|
|
2820
|
-
*
|
|
2821
|
-
*
|
|
2840
|
+
* surface, deduped by id (the in-memory id-dedup doubles as the replay guard
|
|
2841
|
+
* for cursor resets). Requests of EVERY status are surfaced so a reloaded
|
|
2842
|
+
* thin wallet rebuilds the CURRENT state of its incoming view (#556) — open
|
|
2843
|
+
* ones land as actionable `pending`, resolved ones carry their paid/declined
|
|
2844
|
+
* (→ `rejected`)/expired status. Only `open` requests fire the new-incoming
|
|
2845
|
+
* event + handlers; resolved requests are folded into the list silently, so a
|
|
2846
|
+
* reload (or a `syncEpoch` re-pull) never re-notifies for already-resolved
|
|
2847
|
+
* requests. Multi-asset requests surface their first asset (the module's
|
|
2848
|
+
* request surface is single-asset; module-created requests always are).
|
|
2822
2849
|
*/
|
|
2823
2850
|
private surfaceIncomingPaymentRequest;
|
|
2824
2851
|
/**
|