Skip to main content
You don’t need to adopt the whole kit to get value from the corpus. If you’re writing a payment-history view, a fee display, a signer list or a balance tracker, there’s probably a fixture holding exactly the transaction that breaks naive implementations of that feature. This guide shows you how to find it and use it as an ordinary unit test.

Pick a fixture

Each fixture’s manifest has two sets of answers. expected_decoded is what correct parsing yields; expected_indexed is what a correct indexer stores. The values come from Horizon, the ledger, or the transaction as it was built, never from the SDK you’re testing. Browse every fixture, with its files and expectations, on the fixtures page or at /v1/fixtures.

Load it

Fetch the manifest and the files you need. In tests, verify the hash too. It costs one line and guarantees you’re asserting against the exact bytes the manifest describes.
This works unchanged in Node 18+, Deno, Bun and the browser. The API allows every origin. If your tests can’t reach the network, copy the fixture directory into your repository instead. Each file is base64 with a trailing newline, so trim() before decoding. The SDK guide shows a pinned sparse checkout.

Assert on what your code produces

The point is to test your function, not the SDK. Run the fixture through the code path your users hit, then compare with the manifest. Here’s the shape of it for a payment-history row, with toPaymentRow standing in for your own code:
payment-row.test.mjs
Two habits make these tests trustworthy:
  • Compare as strings. Every 64-bit value in a manifest is a JSON string. If your code produces a bigint or a uint64, stringify it before comparing. If it produces a number, the test should fail, and it will.
  • Pin the fixture id, not “the first fixture”. Ids are stable forever. A test that reads fixtures[0] changes meaning when the corpus grows.

Need the whole ledger?

Some code works on ledgers, not transactions: a custom ingestion loop, a meta parser, a replay tool. Every fixture’s canonical ledger is available as a zstd-compressed LedgerCloseMetaBatch, the format Galexie and the data lake use:
Or, if your code already talks to Stellar RPC, speak getLedgers to the mock RPC and get each LedgerCloseMeta as base64, exactly as Stellar RPC returns it.