Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 6 additions & 36 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,11 @@
# How to contribute

👍🎉 First off, thanks for taking the time to contribute! 🎉👍

Check out the [Stellar Contribution Guide](https://github.com/stellar/.github/blob/master/CONTRIBUTING.md) that apply to all Stellar projects.

## Style guides

### Git Commit Messages
# ⚠️ REPOSITORY DEPRECATED ⚠️

* Use the present tense ("Add feature" not "Added feature")
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
**This repository has been moved to: [github.com/stellar/go-stellar-sdk](https://github.com/stellar/go-stellar-sdk)**

### Issues
All new development will take place there.
Comment thread
sreuland marked this conversation as resolved.

* Issues and PR titles start with:
* The package name most affected, ex. `ingest: fix...`.
* Or, multiple package names separated by a comma when the fix addresses multiple packages worth noting, ex. `ingest, processors: fix...`.
* Or, `all:` when changes or an issue are broad, ex. `all: update...`.
* Or, `doc:` when changes or an issue are isolated to non-code documentation not limited to a single package.
* Label issues with `bug` if they're clearly a bug.
* Label issues with `feature request` if they're a feature request.
**Migration Guide:** See [MIGRATION.md](MIGRATION.md) for detailed instructions.

### Pull Requests

* PR titles follow the same rules as described in the [Issues](#Issues) section above.
* PRs must update the [CHANGELOG](CHANGELOG.md) with a small description of the change
* PRs are merged into master or release branch using squash merge
* Carefully think about where your PR fits according to [semver](https://semver.org). Target it at master if it’s only a patch change, otherwise if it contains breaking change or significant feature additions, set the base branch to the next major or minor release.
* Keep PR scope narrow. Expectation: 20 minutes to review max
* Explicitly differentiate refactoring PRs and feature PRs. Refactoring PRs don’t change functionality. They usually touch a lot more code, and are reviewed in less detail. Avoid refactoring in feature PRs.

### Go Style Guide

* Use `gofmt` or preferably `goimports` to format code
* Follow [Effective Go](https://golang.org/doc/effective_go.html) and [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)

### Go Coding conventions
# How to contribute

- Always document exported package elements: vars, consts, funcs, types, etc.
- Tests are better than no tests.
Refer to [github.com/stellar/go-stellar-sdk](https://github.com/stellar/go-stellar-sdk)
108 changes: 4 additions & 104 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
@@ -1,108 +1,8 @@
# Developing
# ⚠️ REPOSITORY DEPRECATED ⚠️

Welcome to the Stellar Go monorepo. These instructions help launch 🚀 you into making and testing code changes to this repository.
**This repository has been moved to: [github.com/stellar/go-stellar-sdk](https://github.com/stellar/go-stellar-sdk)**

For details about what's in this repository and how it is organized read the [README.md](README.md).
All new development will take place there.

If you're aiming to submit a contribution make sure to also read the [contributing guidelines](CONTRIBUTING.md).
**Migration Guide:** See [MIGRATION.md](MIGRATION.md) for detailed instructions.

## Requirements
To checkout, build, and run most tests these tools are required:
- Git
- [Go](https://golang.org/dl)

To run some tests these tools are also required:
- PostgreSQL 12+ server running locally, or set [environment variables](https://www.postgresql.org/docs/12/libpq-envars.html) (e.g. `PGHOST`, etc) for alternative host.
- MySQL 10.1+ server running locally.

## Get the code

Check the code out anywhere, using a `GOPATH` is not required.

```
git clone https://github.com/stellar/go
```

## Running tests

```
go test ./...
```

## Running tools

```
go run ./tools/<tool>
```

## Managing dependencies

* Supported on the two latest major Go releases
* Uses [Go Modules](https://github.com/golang/go/wiki/Modules) for dependency management (see [go.mod](./go.mod))
* Standard go build, go test, and go run workflows apply

### Adding/Removing dependencies

Add new dependencies by adding the import paths to the code. The next time you execute a Go command the tool will update the `go.mod` and `go.sum` files.

To add a specific version of a dependency use `go get`:

```
go get <importpath>@<version>
```

Before opening a PR make sure to run following command to tidy the module file. It will keep the go.* files tidy:
- `go mod tidy`

### Updating a dependency

Update an existing dependency by using `go get`:

```
go get <importpath>@<version>
```
Before opening a PR make sure to run these commands to tidy the module files:
```
go mod tidy
```

Note: `go list -m all` may show that the dependency is still being used. It will be possible that the dependency is still an indirect dependency. If it's important to understand why the dependency is still being used, use `go mod why <importpath>/...` and `go mod graph | grep <importpath>` to understand which modules are importing it.

### Reviewing changes in dependencies

When updating or adding dependencies it's critical that we review what the
changes are in those dependencies that we are introducing into our builds. When
dependencies change the diff for the `go.mod` file may be complex to
understand. In that situation check each new or upgraded dependency,
and check each dependencies code diffs to see what is being imported.
Always treat code being imported as code written that needs review.

```
git checkout master
go list -m -json all > go.list.master
git checkout <branch>
golistcmp go.list.master <(go list -m -json all)
```

## Package source layout

While much of the code in individual packages is organized based upon different developers' personal preferences, many of the packages follow a simple convention for organizing the declarations inside of a package that aim to aid in your ability to find code.

In each package, there may be one or more of a set of common files:

- *errors.go*: This file should contains declarations (both types and vars) for errors that are used by the package.
- *example_test.go*: This file should contains example tests, as described at https://blog.golang.org/examples.
- *main.go/internal.go* (**deprecated**): Older packages may have a `main.go` (public symbols) or `internal.go` (private symbols). These files contain, respectively, the exported and unexported vars, consts, types and funcs for the package. New packages do not follow this pattern, and instead follow the standard Go convention to co-locate structs and their methods in the same files.
- *main.go* (**new convention**): If present, this file contains a `main` function as part of an executable `main` package.

In addition to the above files, a package often has files that contains code that is specific to one declared type. This file uses the snake case form of the type name (for example `loggly_hook.go` would correspond to the type `LogglyHook`). This file should contain method declarations, interface implementation assertions and any other declarations that are tied solely to that type.

Each non-test file can have a test counterpart like normal, whose name ends with `_test.go`. The common files described above also have their own test counterparts... for example `internal_test.go` should contains tests that test unexported behavior and more commonly test helpers that are unexported.

Generally, file contents are sorted by exported/unexported, then declaration type (ordered as consts, vars, types, then funcs), then finally alphabetically.

### Test helpers

Often, we provide test packages that aid in the creation of tests that interact with our other packages. For example, the `support/db` package has the `support/db/dbtest` package underneath it that contains elements that make it easier to test code that accesses a SQL database. We've found that this pattern of having a separate test package maximizes flexibility and simplifies package dependencies.

[golistcmp]: https://github.com/stellar/golistcmp
50 changes: 50 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Migration Guide

## Migrating from github.com/stellar/go to github.com/stellar/go-stellar-sdk

The Golang SDKs are now located in a new dedicated repo for that sole purpose - https://github.com/stellar/go-stellar-sdk.

Go client applications that were using SDK packages from `github.com/stellar/go` module will need to change their project to reference the new go module name `github.com/stellar/go-stellar-sdk` and rename package import statements from `github.com/stellar/go/..` to `github.com/stellar/go-stellar-sdk/..`


### 1. Update your go.mod
```bash
# Add the new module name
go get github.com/stellar/go-stellar-sdk@latest

# Remove the old module name
go mod edit -droprequire github.com/stellar/go

go mod tidy
```

### 2. Update imports in your code

**Before:**
```go
import "github.com/stellar/go/.."
```

**After:**
```go
import "github.com/stellar/go-stellar-sdk/.."
```

### 3. Update git remote (if you have the repo cloned)
```bash
git remote set-url origin https://github.com/stellar/go-stellar-sdk.git
```

### 4. API Changes

No breaking API changes - all functions remain the same.

### 5. Verify
```bash
go mod tidy
go test ./...
```

## Need Help?

Open an issue at: https://github.com/stellar/go-stellar-sdk/issues
56 changes: 4 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,11 @@
<a href="https://goreportcard.com/report/github.com/stellar/go"><img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/stellar/go" /></a>
</p>

This repository contains the *official Go SDK for Stellar*, maintained by the [Stellar Development Foundation].
# ⚠️ REPOSITORY DEPRECATED ⚠️

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 repository has been moved to: [github.com/stellar/go-stellar-sdk](https://github.com/stellar/go-stellar-sdk)**

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.
All new development will take place there.

## Usage
**Migration Guide:** See [MIGRATION.md](MIGRATION.md) for detailed instructions.

Run the following command inside your Go project.

```
go get github.com/stellar/go@latest
```

## Package Index

| Package | Description |
|-----------|-----------|
| [Transaction Builder](txnbuild) | Builder for creating Stellar transactions and operations |
| [Horizon API Client](clients/horizonclient) | Client for querying and submitting transactions via a Horizon instance |
| [RPC API Client](clients/rpcclient) | Client for interacting with a Stellar RPC instance |
| [Ingest SDK](ingest) | Library for parsing raw ledger data from Captive Core, a Galexie Data Lake, or RPC |
| [xdr](xdr) / [strkey](strkey) | Core network primitives and encoding helpers |
| [Processors Library](processors) | 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](https://github.com/stellar/stellar-horizon) | Full-featured API server for querying Stellar network data |
| Galexie | [stellar-galexie](https://github.com/stellar/stellar-galexie) | Ledger exporter that writes network data to external data stores |
| Friendbot | [friendbot](https://github.com/stellar/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**](https://github.com/stellar/go/releases/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](https://github.com/stellar/go/tree/stellar-go-2025-10-29_10-56-50/services/ticker) | API server providing asset and market statistics |
| [Keystore](https://github.com/stellar/go/tree/stellar-go-2025-10-29_10-56-50/services/keystore) | Encrypted key-management API server |
| [Federation Server](https://github.com/stellar/go/tree/stellar-go-2025-10-29_10-56-50/services/federation) | Address-lookup service for anchors and financial institutions |

## Contributing

Contributions are welcome! See [CONTRIBUTING.md](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](https://go.dev/doc/security/policy).

[Stellar Development Foundation]: https://stellar.org
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Deprecated: Use github.com/stellar/go-stellar-sdk instead
// See https://github.com/stellar/go/blob/master/MIGRATION.md for migration instructions.
module github.com/stellar/go

go 1.24
Expand Down
Loading