Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update URLs to Developer Documentation #5371

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ change is, and why it is being made, with enough context for anyone to understan

<details>
<summary>PR Checklist</summary>

### PR Structure

* [ ] This PR has reasonably narrow scope (if not, break it down into smaller PRs).
Expand All @@ -17,7 +17,7 @@ change is, and why it is being made, with enough context for anyone to understan
### Thoroughness

* [ ] This PR adds tests for the most critical parts of the new functionality or fixes.
* [ ] I've updated any docs ([developer docs](https://developers.stellar.org/api/), `.md`
* [ ] I've updated any docs ([developer docs](https://developers.stellar.org/docs/data/horizon), `.md`
files, etc... affected by this change). Take a look in the `docs` folder for a given service,
like [this one](https://github.com/stellar/go/tree/master/services/horizon/internal/docs).

Expand Down
2 changes: 1 addition & 1 deletion address/main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package address provides utility functions for working with stellar
// addresses. See https://developers.stellar.org/docs/glossary/federation/
// addresses. See https://developers.stellar.org/docs/learn/encyclopedia/network-configuration/federation
// html#stellar-addresses for more on addresses.
package address

Expand Down
2 changes: 1 addition & 1 deletion clients/horizonclient/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# horizonclient


`horizonclient` is a [Stellar Go SDK](https://developers.stellar.org/api/) package that provides client access to a horizon server. It supports all endpoints exposed by the [horizon API](https://developers.stellar.org/api/introduction/).
`horizonclient` is a [Stellar Go SDK](https://developers.stellar.org/docs/data/horizon) package that provides client access to a horizon server. It supports all endpoints exposed by the [horizon API](https://developers.stellar.org/docs/data/horizon/api-reference).

This project is maintained by the Stellar Development Foundation.

Expand Down
52 changes: 26 additions & 26 deletions clients/horizonclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,14 @@ func (c *Client) HorizonTimeout() time.Duration {

// Accounts returns accounts who have a given signer or
// have a trustline to an asset.
// See https://developers.stellar.org/api/resources/accounts/
// See https://developers.stellar.org/docs/data/horizon/api-reference/resources/accounts
func (c *Client) Accounts(request AccountsRequest) (accounts hProtocol.AccountsPage, err error) {
err = c.sendRequest(request, &accounts)
return
}

// AccountDetail returns information for a single account.
// See https://developers.stellar.org/api/resources/accounts/single/
// See https://developers.stellar.org/docs/data/horizon/api-reference/retrieve-an-account
func (c *Client) AccountDetail(request AccountRequest) (account hProtocol.Account, err error) {
if request.AccountID == "" {
err = errors.New("no account ID provided")
Expand All @@ -318,7 +318,7 @@ func (c *Client) AccountDetail(request AccountRequest) (account hProtocol.Accoun
}

// AccountData returns a single data associated with a given account
// See https://developers.stellar.org/api/resources/accounts/data/
// See https://developers.stellar.org/docs/data/horizon/api-reference/get-data-by-account-id
func (c *Client) AccountData(request AccountRequest) (accountData hProtocol.AccountData, err error) {
if request.AccountID == "" || request.DataKey == "" {
err = errors.New("too few parameters")
Expand All @@ -332,29 +332,29 @@ func (c *Client) AccountData(request AccountRequest) (accountData hProtocol.Acco
return
}

// Effects returns effects (https://developers.stellar.org/api/resources/effects/)
// Effects returns effects (https://developers.stellar.org/docs/data/horizon/api-reference/resources/effects)
// It can be used to return effects for an account, a ledger, an operation, a transaction and all effects on the network.
func (c *Client) Effects(request EffectRequest) (effects effects.EffectsPage, err error) {
err = c.sendRequest(request, &effects)
return
}

// Assets returns asset information.
// See https://developers.stellar.org/api/resources/assets/list/
// See https://developers.stellar.org/docs/data/horizon/api-reference/list-all-assets
func (c *Client) Assets(request AssetRequest) (assets hProtocol.AssetsPage, err error) {
err = c.sendRequest(request, &assets)
return
}

// Ledgers returns information about all ledgers.
// See https://developers.stellar.org/api/resources/ledgers/list/
// See https://developers.stellar.org/docs/data/horizon/api-reference/list-all-ledgers
func (c *Client) Ledgers(request LedgerRequest) (ledgers hProtocol.LedgersPage, err error) {
err = c.sendRequest(request, &ledgers)
return
}

// LedgerDetail returns information about a particular ledger for a given sequence number
// See https://developers.stellar.org/api/resources/ledgers/single/
// See https://developers.stellar.org/docs/data/horizon/api-reference/retrieve-a-ledger
func (c *Client) LedgerDetail(sequence uint32) (ledger hProtocol.Ledger, err error) {
if sequence == 0 {
err = errors.New("invalid sequence number provided")
Expand All @@ -370,22 +370,22 @@ func (c *Client) LedgerDetail(sequence uint32) (ledger hProtocol.Ledger, err err
}

// FeeStats returns information about fees in the last 5 ledgers.
// See https://developers.stellar.org/api/aggregations/fee-stats/
// See https://developers.stellar.org/docs/data/horizon/api-reference/retrieve-fee-stats
func (c *Client) FeeStats() (feestats hProtocol.FeeStats, err error) {
request := feeStatsRequest{endpoint: "fee_stats"}
err = c.sendRequest(request, &feestats)
return
}

// Offers returns information about offers made on the SDEX.
// See https://developers.stellar.org/api/resources/offers/list/
// See https://developers.stellar.org/docs/data/horizon/api-reference/get-all-offers
func (c *Client) Offers(request OfferRequest) (offers hProtocol.OffersPage, err error) {
err = c.sendRequest(request, &offers)
return
}

// OfferDetails returns information for a single offer.
// See https://developers.stellar.org/api/resources/offers/single/
// See https://developers.stellar.org/docs/data/horizon/api-reference/get-offer-by-offer-id
func (c *Client) OfferDetails(offerID string) (offer hProtocol.Offer, err error) {
if len(offerID) == 0 {
err = errors.New("no offer ID provided")
Expand All @@ -401,15 +401,15 @@ func (c *Client) OfferDetails(offerID string) (offer hProtocol.Offer, err error)
return
}

// Operations returns stellar operations (https://developers.stellar.org/api/resources/operations/list/)
// Operations returns stellar operations (https://developers.stellar.org/docs/data/horizon/api-reference/list-all-operations)
// It can be used to return operations for an account, a ledger, a transaction and all operations on the network.
func (c *Client) Operations(request OperationRequest) (ops operations.OperationsPage, err error) {
err = c.sendRequest(request.SetOperationsEndpoint(), &ops)
return
}

// OperationDetail returns a single stellar operation for a given operation id
// See https://developers.stellar.org/api/resources/operations/single/
// See https://developers.stellar.org/docs/data/horizon/api-reference/retrieve-an-operation
func (c *Client) OperationDetail(id string) (ops operations.Operation, err error) {
if id == "" {
return ops, errors.New("invalid operation id provided")
Expand Down Expand Up @@ -479,7 +479,7 @@ func (c *Client) validateTx(transaction *txnbuild.Transaction, opts SubmitTxOpts
}

// SubmitTransactionXDR submits a transaction represented as a base64 XDR string to the network. err can be either error object or horizon.Error object.
// See https://developers.stellar.org/api/resources/transactions/post/
// See https://developers.stellar.org/docs/data/horizon/api-reference/submit-a-transaction
func (c *Client) SubmitTransactionXDR(transactionXdr string) (tx hProtocol.Transaction,
err error) {
request := submitRequest{endpoint: "transactions", transactionXdr: transactionXdr}
Expand All @@ -495,15 +495,15 @@ func (c *Client) SubmitTransactionXDR(transactionXdr string) (tx hProtocol.Trans
//
// If you want to skip this check, use SubmitTransactionWithOptions.
//
// See https://developers.stellar.org/api/resources/transactions/post/
// See https://developers.stellar.org/docs/data/horizon/api-reference/submit-a-transaction
func (c *Client) SubmitFeeBumpTransaction(transaction *txnbuild.FeeBumpTransaction) (tx hProtocol.Transaction, err error) {
return c.SubmitFeeBumpTransactionWithOptions(transaction, SubmitTxOpts{})
}

// SubmitFeeBumpTransactionWithOptions submits a fee bump transaction to the network, allowing
// you to pass SubmitTxOpts. err can be either an error object or a horizon.Error object.
//
// See https://developers.stellar.org/api/resources/transactions/post/
// See https://developers.stellar.org/docs/data/horizon/api-reference/submit-a-transaction
func (c *Client) SubmitFeeBumpTransactionWithOptions(transaction *txnbuild.FeeBumpTransaction, opts SubmitTxOpts) (tx hProtocol.Transaction, err error) {
// only check if memo is required if skip is false and the inner transaction
// doesn't have a memo.
Expand All @@ -523,15 +523,15 @@ func (c *Client) SubmitFeeBumpTransactionWithOptions(transaction *txnbuild.FeeBu
//
// If you want to skip this check, use SubmitTransactionWithOptions.
//
// See https://developers.stellar.org/api/resources/transactions/post/
// See https://developers.stellar.org/docs/data/horizon/api-reference/submit-a-transaction
func (c *Client) SubmitTransaction(transaction *txnbuild.Transaction) (tx hProtocol.Transaction, err error) {
return c.SubmitTransactionWithOptions(transaction, SubmitTxOpts{})
}

// SubmitTransactionWithOptions submits a transaction to the network, allowing
// you to pass SubmitTxOpts. err can be either an error object or a horizon.Error object.
//
// See https://developers.stellar.org/api/resources/transactions/post/
// See https://developers.stellar.org/docs/data/horizon/api-reference/submit-a-transaction
func (c *Client) SubmitTransactionWithOptions(transaction *txnbuild.Transaction, opts SubmitTxOpts) (tx hProtocol.Transaction, err error) {
// only check if memo is required if skip is false and the transaction
// doesn't have a memo.
Expand Down Expand Up @@ -599,15 +599,15 @@ func (c *Client) AsyncSubmitTransactionWithOptions(transaction *txnbuild.Transac
return c.AsyncSubmitTransactionXDR(txeBase64)
}

// Transactions returns stellar transactions (https://developers.stellar.org/api/resources/transactions/list/)
// Transactions returns stellar transactions (https://developers.stellar.org/docs/data/horizon/api-reference/list-all-transactions)
// It can be used to return transactions for an account, a ledger,and all transactions on the network.
func (c *Client) Transactions(request TransactionRequest) (txs hProtocol.TransactionsPage, err error) {
err = c.sendRequest(request, &txs)
return
}

// TransactionDetail returns information about a particular transaction for a given transaction hash
// See https://developers.stellar.org/api/resources/transactions/single/
// See https://developers.stellar.org/docs/data/horizon/api-reference/retrieve-a-transaction
func (c *Client) TransactionDetail(txHash string) (tx hProtocol.Transaction, err error) {
if txHash == "" {
return tx, errors.New("no transaction hash provided")
Expand All @@ -618,26 +618,26 @@ func (c *Client) TransactionDetail(txHash string) (tx hProtocol.Transaction, err
return
}

// OrderBook returns the orderbook for an asset pair (https://developers.stellar.org/api/aggregations/order-books/single/)
// OrderBook returns the orderbook for an asset pair (https://developers.stellar.org/docs/data/horizon/api-reference/retrieve-an-order-book)
func (c *Client) OrderBook(request OrderBookRequest) (obs hProtocol.OrderBookSummary, err error) {
err = c.sendRequest(request, &obs)
return
}

// Paths returns the available paths to make a strict receive path payment. See https://developers.stellar.org/api/aggregations/paths/strict-receive/
// Paths returns the available paths to make a strict receive path payment. See https://developers.stellar.org/docs/data/horizon/api-reference/list-strict-receive-payment-paths
// This function is an alias for `client.StrictReceivePaths` and will be deprecated, use `client.StrictReceivePaths` instead.
func (c *Client) Paths(request PathsRequest) (paths hProtocol.PathsPage, err error) {
paths, err = c.StrictReceivePaths(request)
return
}

// StrictReceivePaths returns the available paths to make a strict receive path payment. See https://developers.stellar.org/api/aggregations/paths/strict-receive/
// StrictReceivePaths returns the available paths to make a strict receive path payment. See https://developers.stellar.org/docs/data/horizon/api-reference/list-strict-receive-payment-paths
func (c *Client) StrictReceivePaths(request PathsRequest) (paths hProtocol.PathsPage, err error) {
err = c.sendRequest(request, &paths)
return
}

// StrictSendPaths returns the available paths to make a strict send path payment. See https://developers.stellar.org/api/aggregations/paths/strict-send/
// StrictSendPaths returns the available paths to make a strict send path payment. See https://developers.stellar.org/docs/data/horizon/api-reference/list-strict-send-payment-paths
func (c *Client) StrictSendPaths(request StrictSendPathsRequest) (paths hProtocol.PathsPage, err error) {
err = c.sendRequest(request, &paths)
return
Expand All @@ -650,15 +650,15 @@ func (c *Client) Payments(request OperationRequest) (ops operations.OperationsPa
return
}

// Trades returns stellar trades (https://developers.stellar.org/api/resources/trades/list/)
// Trades returns stellar trades (https://developers.stellar.org/docs/data/horizon/api-reference/get-all-trades)
// It can be used to return trades for an account, an offer and all trades on the network.
func (c *Client) Trades(request TradeRequest) (tds hProtocol.TradesPage, err error) {
err = c.sendRequest(request, &tds)
return
}

// Fund creates a new account funded from friendbot. It only works on test networks. See
// https://developers.stellar.org/docs/tutorials/create-account/ for more information.
// https://developers.stellar.org/docs/build/guides/basics/create-account for more information.
func (c *Client) Fund(addr string) (tx hProtocol.Transaction, err error) {
friendbotURL := fmt.Sprintf("%sfriendbot?addr=%s", c.fixHorizonURL(), addr)
err = c.sendGetRequest(friendbotURL, &tx)
Expand All @@ -676,7 +676,7 @@ func (c *Client) StreamTrades(ctx context.Context, request TradeRequest, handler
return
}

// TradeAggregations returns stellar trade aggregations (https://developers.stellar.org/api/aggregations/trade-aggregations/list/)
// TradeAggregations returns stellar trade aggregations (https://developers.stellar.org/docs/data/horizon/api-reference/list-trade-aggregations)
func (c *Client) TradeAggregations(request TradeAggregationRequest) (tds hProtocol.TradeAggregationsPage, err error) {
err = c.sendRequest(request, &tds)
return
Expand Down
4 changes: 2 additions & 2 deletions clients/horizonclient/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ type OrderBookRequest struct {
// PathsRequest struct contains data for getting available strict receive path payments from a horizon server.
// All the Destination related parameters are required and you need to include either
// SourceAccount or SourceAssets.
// See https://developers.stellar.org/api/aggregations/paths/strict-receive/
// See https://developers.stellar.org/docs/data/horizon/api-reference/list-strict-receive-payment-paths
type PathsRequest struct {
DestinationAccount string
DestinationAssetType AssetType
Expand All @@ -405,7 +405,7 @@ type PathsRequest struct {
// StrictSendPathsRequest struct contains data for getting available strict send path payments from a horizon server.
// All the Source related parameters are required and you need to include either
// DestinationAccount or DestinationAssets.
// See https://developers.stellar.org/api/aggregations/paths/strict-send/
// See https://developers.stellar.org/docs/data/horizon/api-reference/list-strict-send-payment-paths
type StrictSendPathsRequest struct {
DestinationAccount string
DestinationAssets string
Expand Down
6 changes: 3 additions & 3 deletions clients/horizonclient/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2241,7 +2241,7 @@ var multipleOpsResponse = `{
"selling_asset_code": "XRP",
"selling_asset_issuer": "GBVOL67TMUQBGL4TZYNMY3ZQ5WGQYFPFD5VJRWXR72VA33VFNL225PL5",
"offer_id": "73938565"
},
},
{
"_links": {
"self": {
Expand Down Expand Up @@ -2271,7 +2271,7 @@ var multipleOpsResponse = `{
"starting_balance": "2.0000000",
"funder": "GD7C4MQJDM3AHXKO2Z2OF7BK3FYL6QMNBGVEO4H2DHM65B7JMHD2IU2E",
"account": "GD6LCN37TNJZW3JF2R7N5EYGQGVWRPMSGQHR6RZD4X4NATEQLP7RFAMA"
}
}
]
}
}`
Expand Down Expand Up @@ -2361,7 +2361,7 @@ var transactionFailure = `{
"type": "https://stellar.org/horizon-errors/transaction_failed",
"title": "Transaction Failed",
"status": 400,
"detail": "The transaction failed when submitted to the stellar network. The extras.result_codes field on this response contains further details. Descriptions of each code can be found at: https://developers.stellar.org/docs/start/list-of-operations/",
"detail": "The transaction failed when submitted to the stellar network. The extras.result_codes field on this response contains further details. Descriptions of each code can be found at: https://developers.stellar.org/docs/data/horizon/api-reference/retrieve-an-order-book",
"instance": "horizon-testnet-001.prd.stellar001.internal.stellar-ops.com/4elYz2fHhC-528285",
"extras": {
"envelope_xdr": "AAAAAKpmDL6Z4hvZmkTBkYpHftan4ogzTaO4XTB7joLgQnYYAAAAZAAAAAAABeoyAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAD3sEVVGZGi/NoC3ta/8f/YZKMzyi9ZJpOi0H47x7IqYAAAAAAAAAAAF9eEAAAAAAAAAAAA=",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The Go SDK is a set of packages for interacting with most aspects of the Stellar
## Horizon SDK

The Horizon SDK is composed of two complementary libraries: `txnbuild` + `horizonclient`.
The `txnbuild` ([source](https://github.com/stellar/go/tree/master/txnbuild), [docs](https://godoc.org/github.com/stellar/go/txnbuild)) package enables the construction, signing and encoding of Stellar [transactions](https://developers.stellar.org/docs/glossary/transactions/) and [operations](https://developers.stellar.org/docs/start/list-of-operations/) in Go. The `horizonclient` ([source](https://github.com/stellar/go/tree/master/clients/horizonclient), [docs](https://godoc.org/github.com/stellar/go/clients/horizonclient)) package provides a web client for interfacing with [Horizon](https://developers.stellar.org/docs/start/introduction/) server REST endpoints to retrieve ledger information, and to submit transactions built with `txnbuild`.
The `txnbuild` ([source](https://github.com/stellar/go/tree/master/txnbuild), [docs](https://godoc.org/github.com/stellar/go/txnbuild)) package enables the construction, signing and encoding of Stellar [transactions](https://developers.stellar.org/docs/learn/glossary#transaction) and [operations](https://developers.stellar.org/docs/learn/fundamentals/transactions/list-of-operations) in Go. The `horizonclient` ([source](https://github.com/stellar/go/tree/master/clients/horizonclient), [docs](https://godoc.org/github.com/stellar/go/clients/horizonclient)) package provides a web client for interfacing with [Horizon](https://developers.stellar.org/docs/data/horizon) server REST endpoints to retrieve ledger information, and to submit transactions built with `txnbuild`.

## List of major SDK packages

Expand Down
Loading
Loading