go-stellar-sdk

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2025 License: Apache-2.0, Apache-2.0

README

Stellar

master GitHub workflow GoDoc Go Report Card

This repository contains the official Go SDK for Stellar, maintained by the Stellar Development Foundation.

It provides all the tools developers need to build applications that integrate with the Stellar network, including APIs for Horizon and Stellar RPC, as well as foundational utilities and ingestion libraries for working with raw ledger data.

This repo previously served as the Go Monorepo for all SDF Go projects. As of October 2025, it has been refactored to focus exclusively on developer-facing SDK packages. Services that are still maintained have been moved to their own dedicated repositories.

This repo follows Go Module Versioning.

Usage

Run the following command inside your Go project.

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

Package Index

Package Description
Transaction Builder Builder for creating Stellar transactions and operations
Horizon API Client Client for querying and submitting transactions via a Horizon instance
RPC API Client Client for interacting with a Stellar RPC instance
Ingest SDK Library for parsing raw ledger data from Captive Core, a Galexie Data Lake, or RPC
xdr / strkey Core network primitives and encoding helpers
Processors Library Reusable data abstractions and ETL-style processors

Relocated

The following services have been moved to their own repositories and are no longer built from this SDK:

Service New Repository Description
Horizon stellar-horizon Full-featured API server for querying Stellar network data
Galexie stellar-galexie Ledger exporter that writes network data to external data stores
Friendbot friendbot Stellar's test network native asset faucet

If you build or deploy these services from source, please use their new repositories. Pre-built Debian packages and Docker images continue to be distributed through the same channels.

Deprecated Services

As of tag stellar-go-2025-10-29_10-56-50, several legacy services have been deprecated and removed. They remain available in Git history for archival or fork purposes.

Service Description
Ticker API server providing asset and market statistics
Keystore Encrypted key-management API server
Federation Server Address-lookup service for anchors and financial institutions

Contributing

Contributions are welcome! See CONTRIBUTING.md for more details.

Go Versions Supported

The packages in this repository are tested against the two most recent major versions of Go, because only the two most recent major versions of Go receive security updates.

Directories

Path Synopsis
Package address provides utility functions for working with stellar addresses.
Package address provides utility functions for working with stellar addresses.
Package amount provides utilities for converting numbers to/from the format used internally to stellar-core.
Package amount provides utilities for converting numbers to/from the format used internally to stellar-core.
Package clients contains sub-packages that provide client access to the various stellar services.
Package clients contains sub-packages that provide client access to the various stellar services.
horizonclient
Package horizonclient provides client access to a Horizon server, allowing an application to post transactions and look up ledger information.
Package horizonclient provides client access to a Horizon server, allowing an application to post transactions and look up ledger information.
stellarcore
Package stellarcore is a client library for communicating with an instance of stellar-core using through the server's HTTP port.
Package stellarcore is a client library for communicating with an instance of stellar-core using through the server's HTTP port.
exp
Package ingest provides primitives for building custom ingestion engines.
Package ingest provides primitives for building custom ingestion engines.
sac
tutorial command
Package network contains functions that deal with stellar network passphrases and IDs.
Package network contains functions that deal with stellar network passphrases and IDs.
Package price implements functions to ease working with stellar price values.
Package price implements functions to ease working with stellar price values.
processors
protocols
horizon
Package horizon contains the type definitions for all of horizon's response resources.
Package horizon contains the type definitions for all of horizon's response resources.
rpc
Package strkey is an implementation of StrKey, the address scheme for the StellarNetwork.
Package strkey is an implementation of StrKey, the address scheme for the StellarNetwork.
internal/crc16
Package crc16 is implementation according to CCITT standards.
Package crc16 is implementation according to CCITT standards.
support
app
Package app provides vars that can be populated via "-X" linker flags to provide global application metadata, such as build time or version.
Package app provides vars that can be populated via "-X" linker flags to provide global application metadata, such as build time or version.
config
Package config provides a common infrastructure for reading configuration data stored in local TOML files.
Package config provides a common infrastructure for reading configuration data stored in local TOML files.
db
Package db is the base package for database access at stellar.
Package db is the base package for database access at stellar.
db/sqlutils
Package sqlutils contains utility functions for manipulating strings of SQL
Package sqlutils contains utility functions for manipulating strings of SQL
env
errors
Package errors provides the common infrastructure for managing errors.
Package errors provides the common infrastructure for managing errors.
http
Package http provides easy access to Stellar's best practices for building http servers.
Package http provides easy access to Stellar's best practices for building http servers.
http/httpauthz
Package httpauthz contains helper functions for parsing the 'Authorization' header in HTTP requests.
Package httpauthz contains helper functions for parsing the 'Authorization' header in HTTP requests.
http/httptest
Package httptest enhances the stdlib net/http/httptest package by integrating it with gopkg.in/gavv/httpexpect.v1, reducing the boilerplate needed for http tests.
Package httptest enhances the stdlib net/http/httptest package by integrating it with gopkg.in/gavv/httpexpect.v1, reducing the boilerplate needed for http tests.
http/mutil
Package mutil contains various functions that are helpful when writing http middleware.
Package mutil contains various functions that are helpful when writing http middleware.
log
Package log provides the common logging facilities used by the Stellar Development foundation.
Package log provides the common logging facilities used by the Stellar Development foundation.
render/health
Package health contains simple utilities for implementing a /health endpoint that adheres to the requirements defined in the draft IETF network working group standard, Health Check Response Format for HTTP APIs.
Package health contains simple utilities for implementing a /health endpoint that adheres to the requirements defined in the draft IETF network working group standard, Health Check Response Format for HTTP APIs.
render/problem
Package problem provides utility functions for rendering errors as RFC7807 compatible responses.
Package problem provides utility functions for rendering errors as RFC7807 compatible responses.
test
Package test contains simple test helpers that should not have any service-specific dependencies.
Package test contains simple test helpers that should not have any service-specific dependencies.
url
tools
alb-replay command
alb-replay replays the successful GET requests found in an AWS ALB log file see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html
alb-replay replays the successful GET requests found in an AWS ALB log file see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html
archive-reader command
dump-orderbook command
goreplay-middleware command
The code below is a goreplay middleware used for regression testing current vs next Horizon version.
The code below is a goreplay middleware used for regression testing current vs next Horizon version.
horizon-cmp command
horizon-verify command
stellar-hd-wallet/crypto/derivation
Package derivation provides functions for ed25519 key derivation as described in: https://github.com/satoshilabs/slips/blob/master/slip-0010.md
Package derivation provides functions for ed25519 key derivation as described in: https://github.com/satoshilabs/slips/blob/master/slip-0010.md
stellar-key-gen command
stellar-sign command
stellar-sign is a small interactive utility to help you contribute a signature to a transaction envelope or verify a transaction.
stellar-sign is a small interactive utility to help you contribute a signature to a transaction envelope or verify a transaction.
xdr2go command
Package txnbuild implements transactions and operations on the Stellar network.
Package txnbuild implements transactions and operations on the Stellar network.
cmd/demo command
Demo is an interactive demonstration of the Go SDK using the Stellar TestNet.
Demo is an interactive demonstration of the Go SDK using the Stellar TestNet.
cmd/demo/operations
Package demo is an interactive demonstration of the Go SDK using the Stellar TestNet.
Package demo is an interactive demonstration of the Go SDK using the Stellar TestNet.
examplehorizonclient
Package examplehorizonclient provides a dummy client for use with the GoDoc examples.
Package examplehorizonclient provides a dummy client for use with the GoDoc examples.
utils
Package xdr contains the generated code for parsing the xdr structures used for stellar.
Package xdr contains the generated code for parsing the xdr structures used for stellar.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL