Example Usages
This section showcases real-world use cases of the Ingest SDK, focusing on key components like ingest.LedgerTransaction
, ingest.LedgerChange
, ingest.LedgerTransactionReader
, and ingest.ChangeReader
.
These examples take a Stellar Ledger (xdr.LedgerCloseMeta
) or a ledger sequence range (start-end) as input. Each of the examples listed here is complete, and can be compiled and run as-is in your IDE/local dev.
Prerequisites
Some of the examples listed here might invoke the stellar-core
binary. Refer to the "admin guide" for more details on how to compile stellar-core
for your platform.
The Ingest SDK is currently a part of the Stellar Go Repo, which includes several packages in addition to the ingest SDK. You will need to include the following in the go.mod
file in your codebase.
//filename: go.mod
require (
github.com/stellar/go v0.0.0-20250206032706-4e70599a66af
)
You may want to optionally run go mod tidy
in your codebase to pull the latest version of the ingest package.