Skip to content

Feat/memo issuer sep24 paginator - #571

Open
proverbs31ziggo-a11y wants to merge 5 commits into
Stellar-split:mainfrom
proverbs31ziggo-a11y:feat/memo-issuer-sep24-paginator
Open

Feat/memo issuer sep24 paginator#571
proverbs31ziggo-a11y wants to merge 5 commits into
Stellar-split:mainfrom
proverbs31ziggo-a11y:feat/memo-issuer-sep24-paginator

Conversation

@proverbs31ziggo-a11y

Copy link
Copy Markdown

Closes #508
Closes #509
Closes #510
Closes #511

Many Horizon collection endpoints (transactions, operations, payments) use cursor-based pagination, but the SDK wraps them with one-shot calls that silently truncate results at the default page size. Callers iterating over a large invoice's payment history receive incomplete data without any indication that more pages exist. An async iterator should transparently walk all pages and yield records until the collection is exhausted.

Technical Context
Add src/horizonPaginator.ts. Wraps @stellar/stellar-sdk CollectionPage and its .next() method. Exposes paginate(initialPage: CollectionPage): AsyncIterableIterator. Used by src/client.ts listPayments(), listOperations(), and invoiceFilter.ts. Respects a configurable maxRecords limit. Integrates with src/cursorTracker.ts to persist the last paging token.

Add src/memoBuilder.ts with buildMemo/buildHashMemo/buildIdMemo/parseMemo/
isStellarSplitMemo functions. Encodes invoice ID, split version, and payer
ID into a canonical SS:v{version}:{invoiceId}:{payerSuffix} format that
fits within Stellar's 28-byte text memo limit. Adds ParsedMemo and
SplitConfig types to src/types.ts.
Add src/assetIssuerVerifier.ts that verifies issuer accounts exist on
network, checks home domain and stellar.toml CURRENCIES section, and
detects frozen/deauthorised flags. Adds IssuerVerificationResult to
src/types.ts.
Add src/sep/sep24Handler.ts with Sep24Handler class that manages the
full interactive transfer lifecycle: initiation, IFRAME URL generation,
status polling, and completion detection. Emits sep24StatusChanged events
via TypedEventEmitter. Adds Sep24TransactionRecord, Sep24Status, and
Sep24StatusChangedEvent to src/types.ts.
Add src/horizonPaginator.ts providing an async iterator that transparently
walks all pages of Horizon collection endpoints until exhausted or a
configurable maxRecords limit is hit. Add src/cursorTracker.ts with
InMemoryCursorStore for persisting paging tokens. Adds CollectionPage,
HorizonPaginatorOptions, and CursorStore to src/types.ts.
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@proverbs31ziggo-a11y Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Horizon Cursor-Based Pagination Iterator SEP-24 Interactive Transfer Handler Asset Issuer Identity Verifier Structured Payment Memo Builder

1 participant