package
0.0.0-20230925091837-55f7a6b23beb
Repository: https://github.com/xdbfoundation/go.git
Documentation: pkg.go.dev

# README

Frontier Protocol Changelog

Any changes to the Frontier Public API should be included in this doc.

SDK support

We started tracking SDK support at version 0.12.3. Support for 0.12.3 means that SDK can correctly:

  • Send requests using all available query params / POST params / headers,
  • Parse all fields in responses structs and headers.

For each new version we will only track changes from the previous version.

Changes

Unreleased

Changes

  • Operations responses may include a transaction field which represents the transaction that created the operation.

0.15.0

SDKs with full support

Changes

  • 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", last_modified_time field endpoint can be null when ledger data is not available (has not been ingested yet).
  • "Trades for Offer" 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.
  • New /operation_fee_stats endpoint includes fee stats for the last 5 ledgers.
  • "Trades" endpoint can now be streamed.
  • In "Trade Aggregations" 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 instead of per request.
ResourceChangesGo SDK 1JS SDKJava SDK
GET /assetsDisabled by default.+0.10.20.4.0
GET /accounts/{account_id}/offerslast_modified_time field can be null-0.10.20.4.0
GET /offers/{offer_id}/tradesQuery fields and syntetic IDs-0.10.20.4.0
GET /trades SSECan be streamed--0.4.0
GET /operation_fee_statsNew endpoint--0.4.0
GET /trade_aggregationsNew offset parameter--0.4.0
GET /accounts/{account_id}Displaying auth_immutable flag-0.10.20.4.0

0.14.0

SDKs with full support

Changes

  • New bump_sequence operation.
  • New sequence_bumped effect.
  • New fields in Account > Balances collection: buying_liabilities and selling_liabilities.
  • Offer resource last_modified field removed, replaced by last_modified_ledger and last_modified_time.
  • Trade aggregations endpoint accepts only specific time ranges now (1/5/15 minutes, 1 hour, 1 day, 1 week).
  • Frontier now sends Cache-Control: no-cache, no-store, max-age=0 HTTP header for all responses.
ResourceChangesGo SDK 1JS SDKJava SDK
GET /accounts/{account_id}Liabilities fields in Balances collection.+0.10.20.3.1
GET /accounts/{account_id}/effectssequence_bumped effect-0.10.20.3.1
GET /accounts/{account_id}/effects SSEsequence_bumped effect-0.10.20.3.1
GET /accounts/{account_id}/offerslast_modified field removed-0.10.20.3.1
GET /accounts/{account_id}/operationsbump_sequence operation-0.10.20.3.1
GET /accounts/{account_id}/operations SSEbump_sequence operation-0.10.20.3.1
GET /effectssequence_bumped effect-0.10.20.3.1
GET /effects SSEsequence_bumped effect-0.10.20.3.1
GET /ledgers/{ledger_id}/operationsbump_sequence operation-0.10.20.3.1
GET /ledgers/{ledger_id}/operations SSEbump_sequence operation-0.10.20.3.1
GET /ledgers/{ledger_id}/effectssequence_bumped effect-0.10.20.3.1
GET /ledgers/{ledger_id}/effects SSEsequence_bumped effect-0.10.20.3.1
GET /operationsbump_sequence operation-0.10.20.3.1
GET /operations SSEbump_sequence operation-0.10.20.3.1
GET /operations/{op_id}bump_sequence operation+0.10.20.3.1
GET /trades_aggregationsOnly specific time ranges allowed+0.10.20.3.1
GET /transactions/{tx_id}/operationsbump_sequence operation-0.10.20.3.1
GET /transactions/{tx_id}/operations SSEbump_sequence operation-0.10.20.3.1
GET /transactions/{tx_id}/effectssequence_bumped effect-0.10.20.3.1
GET /transactions/{tx_id}/effects SSEsequence_bumped effect-0.10.20.3.1

0.13.0

SDKs with full support

Changes

  • amount field in /assets is now a String (to support DigitalBits amounts larger than int64).
  • Effect resource contains a new created_at field.
ResourceChangesGo SDK 1JS SDKJava SDK
GET /assetsamount can be larger than MAX_INT64/10^7+0.8.2 20.2.0
GET /ledgers/{ledger_id}/effectscreated_at field added+0.8.2 20.2.1
GET /ledgers/{ledger_id}/effects SSEcreated_at field added+0.8.2 20.2.1
GET /accounts/{account_id}/effectscreated_at field added+0.8.2 20.2.1
GET /accounts/{account_id}/effects SSEcreated_at field added+0.8.2 20.2.1
GET /transactions/{tx_id}/effectscreated_at field added+0.8.2 20.2.1
GET /transactions/{tx_id}/effects SSEcreated_at field added+0.8.2 20.2.1
GET /operations/{op_id}/effectscreated_at field added+0.8.2 20.2.1
GET /operations/{op_id}/effects SSEcreated_at field added+0.8.2 20.2.1
GET /effectscreated_at field added+0.8.2 20.2.1
GET /effects SSEcreated_at field added+0.8.2 20.2.1

0.12.3

SDKs with full support

Changes

ResourceGo SDK 1JS SDKJava SDK
GET /+
(some _links missing)
-0.2.1
GET /metrics---
GET /ledgers-0.8.20.2.0
GET /ledgers SSE+0.8.20.2.0
GET /ledgers/{ledger_id}-0.8.20.2.0
GET /ledgers/{ledger_id}/transactions-0.8.20.2.0
GET /ledgers/{ledger_id}/transactions SSE-0.8.20.2.0
GET /ledgers/{ledger_id}/operations-0.8.20.2.0
GET /ledgers/{ledger_id}/operations SSE-0.8.20.2.1
GET /ledgers/{ledger_id}/payments-0.8.20.2.0
GET /ledgers/{ledger_id}/payments SSE-0.8.20.2.0
GET /ledgers/{ledger_id}/effects-0.8.20.2.0
(no support for data, inflation types)
GET /ledgers/{ledger_id}/effects SSE-0.8.20.2.0
(no support for data, inflation types)
GET /accounts/{account_id}+0.8.20.2.0
GET /accounts/{account_id}/transactions-0.8.20.2.0
GET /accounts/{account_id}/transactions SSE-0.8.20.2.0
GET /accounts/{account_id}/operations-0.8.20.2.0
GET /accounts/{account_id}/operations SSE-0.8.20.2.1
GET /accounts/{account_id}/payments-0.8.20.2.0
GET /accounts/{account_id}/payments SSE-0.8.20.2.0
GET /accounts/{account_id}/effects-0.8.20.2.0
(no support for data, inflation types)
GET /accounts/{account_id}/effects SSE-0.8.20.2.0
(no support for data, inflation types)
GET /accounts/{account_id}/offers+0.8.20.2.0
GET /accounts/{account_id}/trades-0.8.20.2.1
GET /accounts/{account_id}/data/{key}---
POST /transactions-0.8.20.2.0
GET /transactions+0.8.20.2.0
GET /transactions SSE+0.8.20.2.0
GET /transactions/{tx_id}+0.8.20.2.0
GET /transactions/{tx_id}/operations-0.8.20.2.0
GET /transactions/{tx_id}/operations SSE-0.8.20.2.1
GET /transactions/{tx_id}/payments-0.8.20.2.0
GET /transactions/{tx_id}/payments SSE-0.8.20.2.0
GET /transactions/{tx_id}/effects-0.8.20.2.0
(no support for data, inflation types)
GET /transactions/{tx_id}/effects SSE-0.8.20.2.0
(no support for data, inflation types)
GET /operations-0.8.20.2.0
GET /operations SSE-0.8.20.2.1
GET /operations/{op_id}-0.8.20.2.0
GET /operations/{op_id}/effects-0.8.20.2.0
(no support for data, inflation types)
GET /operations/{op_id}/effects SSE-0.8.20.2.0
(no support for data, inflation types)
GET /payments-0.8.20.2.0
GET /payments SSE+0.8.20.2.0
GET /effects-0.8.20.2.0
(no support for data, inflation types)
GET /effects SSE-0.8.20.2.0
(no support for data, inflation types)
GET /trades+0.8.20.2.0
(no price field)
GET /trades_aggregations+0.8.20.2.0
GET /offers/{offer_id}/trades-0.8.20.2.1
GET /order_book+0.8.20.2.0
GET /order_book SSE-0.8.20.2.1
GET /paths-0.8.20.2.0
GET /assets-0.8.20.2.0

1 We don't do proper versioning for GO SDK yet. + means implemented in master branch.

2 Native JSON support in JS, no changes needed.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

KeyTypeFromAddress converts the version byte of the provided strkey encoded value (for example an account id or a signer key) and returns the appropriate frontier-specific type name.
MustKeyTypeFromAddress is the panicking variant of KeyTypeFromAddress.

# Variables

KeyTypeNames maps from strkey version bytes into json string values to use in frontier responses.

# Structs

Account is the summary of an account.
AccountData represents a single data object stored on by an account.
No description provided by the author
AccountFlags represents the state of an account's flags.
AccountsPage returns a list of account records.
AccountThresholds represents an accounts "thresholds", the numerical values needed to satisfy the authorization of a given operation.
No description provided by the author
AssetsPage contains page of assets returned by Frontier.
AssetStat represents the statistics for a single Asset.
AssetStatAccounts represents the summarized acount numbers for a single Asset.
AssetStatBalances represents the summarized balances for a single Asset.
Balance represents an account's holdings for either a single currency type or shares in a liquidity pool.
ClaimableBalance represents a claimable balance.
ClaimableBalanceFlags represents the state of a claimable balance's flags.
No description provided by the author
Claimant represents a claimable balance claimant.
FeeBumpTransaction contains information about a fee bump transaction.
No description provided by the author
FeeStats represents a response of fees from frontier To do: implement fee suggestions if agreement is reached in https://github.com/xdbfoundation/go/issues/926.
InnerTransaction contains information about the inner transaction contained within a fee bump transaction.
Ledger represents a single closed ledger.
LedgersPage contains page of ledger information returned by Frontier.
LiquidityPool represents a liquidity pool.
LiquidityPoolReserve represents a liquidity pool asset reserve.
LiquidityPoolsPage returns a list of liquidity pool records.
Offer is the display form of an offer to trade currency.
OffersPage returns a list of offers.
OrderBookSummary represents a snapshot summary of a given order book.
Path represents a single payment path.
PathsPage contains records of payment paths found by frontier.
PriceLevel represents an aggregation of offers that share a given price.
Root is the initial map of links into the api.
Signer represents one of an account's signers.
Trade represents a frontier digested trade.
TradeAggregation represents trade data aggregation over a period of time.
TradeAggregationsPage returns a list of aggregated trade records, aggregated by resolution.
TradeEffect represents a trade effect resource.
TradePrice represents a price for a trade.
TradesPage returns a list of trade records.
Transaction represents a single, successful transaction.
No description provided by the author
No description provided by the author
No description provided by the author
TransactionResultCodes represent a summary of result codes returned from a single xdr TransactionResult.
TransactionsPage contains records of transaction information returned by Frontier.

# Type aliases

Asset represents a single asset.
Price represents a price for an offer.