Skip to content

Commit

Permalink
update old docs URLs to new locations
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotFriend committed Jul 3, 2024
1 parent 1885584 commit c4f067e
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 51 deletions.
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/resources/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/resources/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/resources/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/resources/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/resources/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/aggregations/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/resources/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/resources/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/resources/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/resources/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/resources/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/resources/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/resources/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/resources/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/resources/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/resources/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/resources/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/aggregations/order-books/single)
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/aggregations/paths/strict-receive
// 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/aggregations/paths/strict-receive
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/aggregations/paths/strict-send
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/resources/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/aggregations/trade-aggregations/list)
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/aggregations/paths/strict-receive
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/aggregations/paths/strict-send
type StrictSendPathsRequest struct {
DestinationAccount string
DestinationAssets string
Expand Down
12 changes: 6 additions & 6 deletions protocols/horizon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ For each new version we will only track changes from the previous version.

#### Changes

* In ["Transaction"](https://developers.stellar.org/api/horizon/resources/transactions/object),
* In ["Transaction"](https://developers.stellar.org/docs/data/horizon/api-reference/resources/transactions/object),
`result_meta_xdr` field is [now nullable](https://github.com/stellar/go/pull/5228), and will be `null` when Horizon has `SKIP_TXMETA=true` set, otherwise if Horizon is configured with `SKIP_TXMETA=false` which is default, then `result_meta_xdr` will be the same value of base64 encoded xdr.
* Operations responses may include a `transaction` field which represents the transaction that created the operation.

Expand All @@ -32,14 +32,14 @@ For each new version we will only track changes from the previous version.

* Assets stats are disabled by default. This can be changed using an environment variable (`ENABLE_ASSET_STATS=true`) or
CLI parameter (`--enable-asset-stats=true`). Please note that it has a negative impact on a DB and ingestion time.
* In ["Offers for Account"](https://developers.stellar.org/api/resources/accounts/offers/),
* In ["Offers for Account"](https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-offers-by-account-id),
`last_modified_time` field endpoint can be `null` when ledger data is not available (has not been ingested yet).
* ["Trades for Offer"](https://developers.stellar.org/api/resources/offers/trades/) endpoint
* ["Trades for Offer"](https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-trades-by-offer-id) endpoint
will query for trades that match the given offer on either side of trades, rather than just the "sell" offer.
Offer IDs are now [synthetic](https://developers.stellar.org/api/resources/trades/).
Offer IDs are now [synthetic](https://developers.stellar.org/docs/data/horizon/api-reference/resources/trades).
* New `/operation_fee_stats` endpoint includes fee stats for the last 5 ledgers.
* ["Trades"](https://developers.stellar.org/api/resources/trades/list/) endpoint can now be streamed.
* In ["Trade Aggregations"](https://developers.stellar.org/api/aggregations/trade-aggregations/list/) endpoint,
* ["Trades"](https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-all-trades) endpoint can now be streamed.
* In ["Trade Aggregations"](https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/trade-aggregations/list) endpoint,
`offset` parameter has been added.
* Account flags now display `auth_immutable` value.
* Rate limiting in streams has been changed to be more fair. Now 1 *credit* has to be *paid* every time there's a new ledger
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/actions/submit_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (handler SubmitTransactionHandler) response(r *http.Request, info envelopeI
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/api/errors/http-status-codes/horizon-specific/transaction-failed/",
"https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/horizon-specific/transaction-failed",
Extras: extras,
}
}
Expand Down
Loading

0 comments on commit c4f067e

Please sign in to comment.