diff --git a/protocols/horizon/main.go b/protocols/horizon/main.go index 4d2d5b3e37..e8e0ccf1f4 100644 --- a/protocols/horizon/main.go +++ b/protocols/horizon/main.go @@ -298,13 +298,22 @@ type Root struct { Accounts *hal.Link `json:"accounts,omitempty"` AccountTransactions hal.Link `json:"account_transactions"` Assets hal.Link `json:"assets"` + Effects hal.Link `json:"effects"` + FeeStats hal.Link `json:"fee_stats"` Friendbot *hal.Link `json:"friendbot,omitempty"` + Ledger hal.Link `json:"ledger"` + Ledgers hal.Link `json:"ledgers"` Offer *hal.Link `json:"offer,omitempty"` Offers *hal.Link `json:"offers,omitempty"` + Operation hal.Link `json:"operation"` + Operations hal.Link `json:"operations"` OrderBook hal.Link `json:"order_book"` + Payments hal.Link `json:"payments"` Self hal.Link `json:"self"` StrictReceivePaths *hal.Link `json:"strict_receive_paths"` StrictSendPaths *hal.Link `json:"strict_send_paths"` + TradeAggregations hal.Link `json:"trade_aggregations"` + Trades hal.Link `json:"trades"` Transaction hal.Link `json:"transaction"` Transactions hal.Link `json:"transactions"` } `json:"_links"` diff --git a/services/horizon/internal/resourceadapter/root.go b/services/horizon/internal/resourceadapter/root.go index b97879dd14..48c19f1f8f 100644 --- a/services/horizon/internal/resourceadapter/root.go +++ b/services/horizon/internal/resourceadapter/root.go @@ -42,6 +42,15 @@ func PopulateRoot( dest.Links.Account = lb.Link("/accounts/{account_id}") dest.Links.AccountTransactions = lb.PagedLink("/accounts/{account_id}/transactions") dest.Links.Assets = lb.Link("/assets{?asset_code,asset_issuer,cursor,limit,order}") + dest.Links.Effects = lb.Link("/effects{?cursor,limit,order}") + dest.Links.Ledger = lb.Link("/ledger/{sequence}") + dest.Links.Ledger = lb.Link("/ledgers{?cursor,limit,order}") + dest.Links.FeeStats = lb.Link("/fee_stats") + dest.Links.Operation = lb.Link("/operations/{id}") + dest.Links.Operations = lb.Link("/operations{?cursor,limit,order,include_failed}") + dest.Links.Payments = lb.Link("/payments{?cursor,limit,order,include_failed}") + dest.Links.TradeAggregations = lb.Link("/trade_aggregations?base_asset_type={base_asset_type}&base_asset_code={base_asset_code}&base_asset_issuer={base_asset_issuer}&counter_asset_type={counter_asset_type}&counter_asset_code={counter_asset_code}&counter_asset_issuer={counter_asset_issuer}") + dest.Links.Trades = lb.Link("/trades?base_asset_type={base_asset_type}&base_asset_code={base_asset_code}&base_asset_issuer={base_asset_issuer}&counter_asset_type={counter_asset_type}&counter_asset_code={counter_asset_code}&counter_asset_issuer={counter_asset_issuer}") accountsLink := lb.Link(templates["accounts"]) offerLink := lb.Link("/offers/{offer_id}")