Skip to content

Commit 6ee841f

Browse files
ElliotFriendclaudeCopilot
authored
chore(sdk-examples): update Go SDK RPC client import paths (#2500)
* chore(sdk-examples): update Go SDK RPC client import paths As of go-stellar-sdk v0.6.0 / stellar-rpc v27.0.0, the Go RPC client moved out of the stellar-rpc repo and into the Go SDK: - github.com/stellar/stellar-rpc/client -> github.com/stellar/go-stellar-sdk/clients/rpcclient (package rpcclient) - github.com/stellar/stellar-rpc/protocol -> github.com/stellar/go-stellar-sdk/protocols/rpc (package protocol) Both old paths are 404 at the current tags. - Update the 8 import sites across the create-account, send-and-receive-payments, sponsored-reserves, and claimable-balances transaction guides, preserving each file's existing package identifiers (client/sdk/protocol) via aliases so the code bodies stay valid. - Drop the now-redundant `go get github.com/stellar/stellar-rpc@latest` line; the client ships in go-stellar-sdk. - Fix the RPC Go client link and the RPC Client entry on the client-sdks page (both pointed at the removed stellar-rpc/client path). - Repoint ingest/processors links to the relocated top-level processors package (incl. the token_transfer protobuf path). - Point the stellar-archivist link at go-stellar-sdk (was the archived stellar/go), matching the sibling publishing-history-archives guide. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 5f10f88 commit 6ee841f

10 files changed

Lines changed: 21 additions & 22 deletions

File tree

docs/build/guides/transactions/claimable-balances.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ import (
226226
"net/url"
227227
"time"
228228

229-
"github.com/stellar/stellar-rpc/client"
230-
"github.com/stellar/stellar-rpc/protocol"
229+
client "github.com/stellar/go-stellar-sdk/clients/rpcclient"
230+
protocol "github.com/stellar/go-stellar-sdk/protocols/rpc"
231231

232232
"github.com/stellar/go-stellar-sdk/keypair"
233233
"github.com/stellar/go-stellar-sdk/network"
@@ -442,8 +442,8 @@ package main
442442
import (
443443
"context"
444444
"fmt"
445-
"github.com/stellar/stellar-rpc/client"
446-
"github.com/stellar/stellar-rpc/protocol"
445+
client "github.com/stellar/go-stellar-sdk/clients/rpcclient"
446+
protocol "github.com/stellar/go-stellar-sdk/protocols/rpc"
447447

448448
"github.com/stellar/go-stellar-sdk/xdr"
449449
)
@@ -595,8 +595,8 @@ import (
595595
"log"
596596
"time"
597597

598-
"github.com/stellar/stellar-rpc/client"
599-
"github.com/stellar/stellar-rpc/protocol"
598+
client "github.com/stellar/go-stellar-sdk/clients/rpcclient"
599+
protocol "github.com/stellar/go-stellar-sdk/protocols/rpc"
600600

601601
"github.com/stellar/go-stellar-sdk/keypair"
602602
"github.com/stellar/go-stellar-sdk/network"

docs/build/guides/transactions/create-account.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ import (
282282
"github.com/stellar/go-stellar-sdk/txnbuild"
283283
"github.com/stellar/go-stellar-sdk/xdr"
284284

285-
"github.com/stellar/stellar-rpc/client"
286-
"github.com/stellar/stellar-rpc/protocol"
285+
client "github.com/stellar/go-stellar-sdk/clients/rpcclient"
286+
protocol "github.com/stellar/go-stellar-sdk/protocols/rpc"
287287
)
288288

289289
const (

docs/build/guides/transactions/send-and-receive-payments.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ import (
313313
"github.com/stellar/go-stellar-sdk/keypair"
314314
"github.com/stellar/go-stellar-sdk/network"
315315
"github.com/stellar/go-stellar-sdk/txnbuild"
316-
sdk "github.com/stellar/stellar-rpc/client"
317-
"github.com/stellar/stellar-rpc/protocol"
316+
sdk "github.com/stellar/go-stellar-sdk/clients/rpcclient"
317+
protocol "github.com/stellar/go-stellar-sdk/protocols/rpc"
318318
)
319319

320320
// friendbotFund funds an account using the Stellar testnet friendbot
@@ -739,8 +739,8 @@ import (
739739

740740
"github.com/stellar/go-stellar-sdk/strkey"
741741
"github.com/stellar/go-stellar-sdk/xdr"
742-
sdk "github.com/stellar/stellar-rpc/client"
743-
"github.com/stellar/stellar-rpc/protocol"
742+
sdk "github.com/stellar/go-stellar-sdk/clients/rpcclient"
743+
protocol "github.com/stellar/go-stellar-sdk/protocols/rpc"
744744
)
745745

746746
func main() {
@@ -1085,7 +1085,6 @@ mkdir -p payments_example/sender
10851085
cd payments_example
10861086
go mod init payments_example
10871087
go get github.com/stellar/go-stellar-sdk@latest
1088-
go get github.com/stellar/stellar-rpc@latest
10891088
# save sender.go code to sender/sender.go file
10901089
go build -o sender sender/sender.go
10911090
./sender

docs/build/guides/transactions/sponsored-reserves.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ import (
139139
"github.com/stellar/go-stellar-sdk/keypair"
140140
"github.com/stellar/go-stellar-sdk/network"
141141
"github.com/stellar/go-stellar-sdk/txnbuild"
142-
sdk "github.com/stellar/stellar-rpc/client"
143-
protocol "github.com/stellar/stellar-rpc/protocol"
142+
sdk "github.com/stellar/go-stellar-sdk/clients/rpcclient"
143+
protocol "github.com/stellar/go-stellar-sdk/protocols/rpc"
144144
)
145145

146146
func main() {

docs/data/indexers/build-your-own/ingest-sdk/developer_guide/architecture.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ Ingest SDK is organized into three main components:
1111

1212
1. **[Ledger Backends](./ledgerbackends/README.mdx)**: Used to stream ledgers from the Stellar network. `https://github.com/stellar/go-stellar-sdk/tree/main/ingest/ledgerbackend`
1313
2. **[Ledger Readers](./ledgerreaders.mdx)** : Iterators to extract individual changes or transactions from a ledger. `https://github.com/stellar/go-stellar-sdk/tree/main/ingest`
14-
3. **[Ledger Processors](https://github.com/stellar/go-stellar-sdk/tree/main/ingest/processors)** : Functions to process individual changes or transactions and extract meaningful data such as accounts, offers, claimable balance, etc. They are used in conjunction with `Ledger Readers` to interpret and transform ledger data.
14+
3. **[Ledger Processors](https://github.com/stellar/go-stellar-sdk/tree/main/processors)** : Functions to process individual changes or transactions and extract meaningful data such as accounts, offers, claimable balance, etc. They are used in conjunction with `Ledger Readers` to interpret and transform ledger data.

docs/data/indexers/build-your-own/ingest-sdk/developer_guide/ledgerbackends/bufferedstoragebackend.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sidebar_position: 5
1212
- **Parallel Downloads**: Downloads multiple ledgers concurrently and buffers them in memory for fast access. This is particularly useful for fetching large historical ledger ranges.
1313
- **Schema-Aware**: Reads multi-ledger files based on the datastore schema, extracting one ledger at a time.
1414
- **Automatic Retries**: Handles request failures by retrying failed requests.
15-
- **XDR Output**: Returns ledger metadata in XDR format, enabling easy integration with other packages in ingest SDK (e.g., [processors](https://github.com/stellar/go-stellar-sdk/tree/main/ingest/processors)).
15+
- **XDR Output**: Returns ledger metadata in XDR format, enabling easy integration with other packages in ingest SDK (e.g., [processors](https://github.com/stellar/go-stellar-sdk/tree/main/processors)).
1616

1717
## Prerequisites
1818

docs/data/indexers/build-your-own/ingest-sdk/developer_guide/ledgerbackends/rpcledgerbackend.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Usage of the RPCLedgerBackend implies having awareness of the retention window a
2121

2222
### Code
2323

24-
A working example demonstrating programmatic usage of [RPCLedgerBackend](https://github.com/stellar/go-stellar-sdk/blob/main/ingest/ledgerbackend/rpc_backend.go) to print a stream of latest ledgers emitted from the Stellar Testnet Network. Note the additional usage of the [RPC Go Client](https://github.com/stellar/stellar-rpc/blob/main/client/main.go) which uses the same RPC url to get the latest ledger from the RPC server. This is used to prime our live streaming example to use the latest known ledger on RPC as the starting ledger when requesting the unbounded range.
24+
A working example demonstrating programmatic usage of [RPCLedgerBackend](https://github.com/stellar/go-stellar-sdk/blob/main/ingest/ledgerbackend/rpc_backend.go) to print a stream of latest ledgers emitted from the Stellar Testnet Network. Note the additional usage of the [RPC Go Client](https://github.com/stellar/go-stellar-sdk/blob/main/clients/rpcclient/main.go) which uses the same RPC URL to get the latest ledger from the RPC server. This is used to prime our live streaming example to use the latest known ledger on RPC as the starting ledger when requesting the unbounded range.
2525

2626
Prerequisites:
2727

docs/data/indexers/build-your-own/processors/token-transfer-processor/README.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar_position: 0
55

66
## Overview
77

8-
The Token Transfer Processor (TTP) is a [Go package](https://github.com/stellar/go-stellar-sdk/tree/main/ingest/processors/token_transfer) which uses the [ingest-sdk](../../ingest-sdk/README.mdx) to parse Stellar network transaction data and derive token transfer events. Before TTP, developers had to manually parse complex ledger data, operation results, and ledger entry changes to understand when and how value moved between accounts, contracts, and other entities on the network.
8+
The Token Transfer Processor (TTP) is a [Go package](https://github.com/stellar/go-stellar-sdk/tree/main/processors/token_transfer) which uses the [ingest-sdk](../../ingest-sdk/README.mdx) to parse Stellar network transaction data and derive token transfer events. Before TTP, developers had to manually parse complex ledger data, operation results, and ledger entry changes to understand when and how value moved between accounts, contracts, and other entities on the network.
99

1010
Prior to [CAP-67 Unified Events][cap67], tracking token transfers required significant custom logic to handle different operation types, interpret ledger changes, and reconstruct the flow of assets. CAP-67 introduced a standardized event format that simplifies this process by providing a unified way to represent all token transfer activities.
1111

@@ -43,7 +43,7 @@ For more details on operational modes, see the [Modes of Operation](#modes-of-op
4343

4444
## Events
4545

46-
TTP generates events in Go bindings based on [protobuf definitions](https://github.com/stellar/go-stellar-sdk/blob/main/protos/ingest/processors/token_transfer/token_transfer_event.proto). The definitions codify an IDL for the standardized token transfer event models put forth in CAP-67. Each event contains metadata and type-specific information structured as follows:
46+
TTP generates events in Go bindings based on [protobuf definitions](https://github.com/stellar/go-stellar-sdk/blob/main/protos/processors/token_transfer/token_transfer_event.proto). The definitions codify an IDL for the standardized token transfer event models put forth in CAP-67. Each event contains metadata and type-specific information structured as follows:
4747

4848
| Event Type | Description | Key Fields | When Generated |
4949
| --- | --- | --- | --- |

docs/tools/sdks/client-sdks.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ This SDK is split up into separate packages, all of which you can find in the [G
127127

128128
- `txnbuild` [SDK](https://github.com/stellar/go-stellar-sdk/tree/main/txnbuild) | [Docs](https://godoc.org/github.com/stellar/go-stellar-sdk/txnbuild): enables the construction, signing, and encoding of Stellar transactions.
129129
- `Horizon Client` [SDK](https://github.com/stellar/go-stellar-sdk/tree/main/clients/horizonclient) | [Docs](https://godoc.org/github.com/stellar/go-stellar-sdk/clients/horizonclient): provides a web client for interfacing with Horizon server REST endpoints to retrieve ledger information and submit transactions built with `txnbuild`.
130-
- `RPC Client` [SDK](https://github.com/stellar/stellar-rpc/tree/main/client) | [Docs](https://pkg.go.dev/github.com/stellar/stellar-rpc/client): provide sdk wrapper to invoke RPC endpoints.
130+
- `RPC Client` [SDK](https://github.com/stellar/go-stellar-sdk/tree/main/clients/rpcclient) | [Docs](https://pkg.go.dev/github.com/stellar/go-stellar-sdk/clients/rpcclient): provides an SDK wrapper to invoke RPC endpoints.
131131
- [Ingest SDK](../../data/indexers/build-your-own/ingest-sdk/README.mdx): acquire and parse data from the Stellar network.
132132

133133
## C# .NET

docs/validators/admin-guide/running-node.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ And will then move through the various phases of downloading and applying state,
9595

9696
For the fastest sync — including for new Full Validators and Tier 1 candidates — leave `CATCHUP_RECENT` at its default and do **not** set `CATCHUP_COMPLETE=true`. Your node will sync against current network state in minutes to hours rather than weeks.
9797

98-
`CATCHUP_COMPLETE=true` makes the node replay the _entire history_ of the network on startup, which takes weeks and is almost never the right choice for a validator — see [Why local disk stays bounded](./prerequisites.mdx#why-local-disk-stays-bounded). The standard pattern for new validators that want to publish a complete history archive is to sync against current state first, publish forward from that point, and use the [`stellar-archivist mirror`](https://github.com/stellar/go/tree/master/tools/stellar-archivist) tool to backfill historical data into the published archive as a separate offline operation. See the [complete example configuration] for more details.
98+
`CATCHUP_COMPLETE=true` makes the node replay the _entire history_ of the network on startup, which takes weeks and is almost never the right choice for a validator — see [Why local disk stays bounded](./prerequisites.mdx#why-local-disk-stays-bounded). The standard pattern for new validators that want to publish a complete history archive is to sync against current state first, publish forward from that point, and use the [`stellar-archivist mirror`](https://github.com/stellar/go-stellar-sdk/tree/main/tools/stellar-archivist) tool to backfill historical data into the published archive as a separate offline operation. See the [complete example configuration] for more details.
9999

100100
:::info
101101

0 commit comments

Comments
 (0)