Skip to content

feat: add receipt registry with getReceiptByTxHash lookup (fixes #613) - #785

Draft
s6pa1rta3n-lab wants to merge 1 commit into
Stellar-split:mainfrom
s6pa1rta3n-lab:fix-issue
Draft

feat: add receipt registry with getReceiptByTxHash lookup (fixes #613)#785
s6pa1rta3n-lab wants to merge 1 commit into
Stellar-split:mainfrom
s6pa1rta3n-lab:fix-issue

Conversation

@s6pa1rta3n-lab

@s6pa1rta3n-lab s6pa1rta3n-lab commented Aug 29, 2026

Copy link
Copy Markdown

Summary

This PR implements a local receipt registry with transaction hash lookup for the Stellar Split SDK, resolving issue #613.

Acceptance Criteria & Implementation Checklist

  • registerReceipt(receipt: PaymentReceipt): void exported — stores receipt keyed by receipt.txHash (overwriting on duplicate hash)
  • getReceiptByTxHash(txHash: string): PaymentReceipt | null exported — returns stored receipt or null if not found
  • getAllReceipts(): PaymentReceipt[] exported — returns all registered receipts ordered chronologically by receipt.timestamp ascending without mutating internal store
  • clearReceipts(): void exported for test teardown (idempotent)
  • Registry is module-level (singleton) — not tied to any class instance
  • All functions exported from src/index.ts
  • Comprehensive unit tests in test/receipt.registry.test.ts covering registration, hash lookup, missing hash handling, timestamp ordering, and clearing

Closes #613

Verification

  • Unit tests in test/receipt.registry.test.ts passing 10/10 tests
  • All existing receipt tests passing 30/30 tests

Payout Routing

  • EVM (Base/Arbitrum/Polygon/ETH): 0xF46C9F6d70C50BF81ef3588AB523a90a594a2F89
  • Stellar: GCL6OXAMLD75BMTINA6EMRUDWK5THQUSHMYNLSNBCJAPZJHNYJTUNIBC

@s6pa1rta3n-lab s6pa1rta3n-lab changed the title feat(dedup): implement generateIdempotencyKey and key registry (#612) feat: add receipt registry with getReceiptByTxHash lookup (fixes #613) Aug 29, 2026
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.

Add receipt registry with getReceiptByTxHash lookup

1 participant