Skip to main content

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 Stellar Ingest SDK is a go module and includes several packages in addition to the ingest SDK. You will need to include the module in your go project go.mod.

go get github.com/stellar/go-stellar-sdk@latest
go mod tidy