All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
v7.0.0 - 2021-05-15
None
v6.0.0 - 2021-02-22
None
v5.0.0 - 2020-11-12
None
v4.2.0 - 2020-11-11
None
v4.1.0 - 2020-10-16
None
v4.0.1 - 2020-10-02
None
v4.0.0 - 2020-09-29
Added new client methods and effects supporting Protocol 14.
- New client methods
ClaimableBalances(req ClaimableBalanceRequest)
- returns details about available claimable balances, possibly filtered to a specific sponsor or other parameters.ClaimableBalance(balanceID string)
- returns details about a specific, unique claimable balance.
- New effects:
ClaimableBalance{Created,Updated,Removed}
ClaimabeBalanceSponsorship{Created,Updated,Removed}
AccountSponsorship{Created,Updated,Removed}
TrustlineSponsorship{Created,Updated,Removed}
Data{Created,Updated,Removed}
DataSponsorship{Created,Updated,Removed}
SignerSponsorship{Created,Updated,Removed}
- Removed JSON variant of
GET /metrics
, both in the server and client code. It's using Prometheus format by default now. - Added
NextAccountsPage
. - Fixed
Fund
function that consistently errored. - Added support for Go 1.15.
- Dropped support for Go 1.13.
v3.0.0 - 2020-04-28
- The type for the following fields in the
Transaction
struct have changed fromint32
toint64
:FeeCharged
MaxFee
- The
TransactionSuccess
Horizon response has been removed. Instead, all submit transaction functions return with a full HorizonTransaction
response on success. - The
GetSequenceNumber()
andIncrementSequenceNumber()
functions on theAccount
struct now returnint64
values instead ofxdr.SequenceNumber
values.
- Add
IsNotFoundError
- Add
client.SubmitFeeBumpTransaction
andclient.SubmitFeeBumpTransactionWithOptions
for submitting fee bump transactions. Note that fee bump transactions will only be accepted by Stellar Core once Protocol 13 is enabled.
- To support CAP0018 Fine-Grained Control of Authorization:
- There is a new effect
TrustlineAuthorizedToMaintainLiabilities
which occurs when a trustline has been authorized to maintain liabilities. - The
AuthorizeToMaintainLiabilities
boolean field was added to theAllowTrust
operation struct.
- There is a new effect
- These fields were added to the
Transaction
struct to support fee bump transactions:FeeAccount
(the account which paid the transaction fee)FeeBumpTransaction
(only present in Protocol 13 fee bump transactions)InnerTransaction
(only present in Protocol 13 fee bump transactions).
Transaction
has a newMemoBytes
field which is populated whenMemoType
is equal totext
.MemoBytes
stores the base 64 encoding of the memo bytes set in the transaction envelope.- Fixed a bug where HorizonTimeOut has misleading units of time by:
- Removed HorizonTimeOut (seconds)
- Added HorizonTimeout (nanoseconds)
- Dropped support for Go 1.12.
v2.2.0 - 2020-03-26
-
Add
client.SubmitTransactionWithOptions
with support for SEP0029. If any of the operations included inclient.SubmitTransactionWithOptions
is of typepayment
,pathPaymentStrictReceive
,pathPaymentStrictSend
, ormergeAccount
, then the SDK will load the destination account from Horizon and check ifconfig.memo_required
is set to1
as defined in SEP0029.For performance reasons, you may choose to skip the check by setting the
SkipMemoRequiredCheck
totrue
:client.SubmitTransactionWithOptions(tx, horizonclient.SubmitTxOpts{SkipMemoRequiredCheck: true})
Additionally, the check will be skipped automatically if the transaction includes a memo.
- Change
client.SubmitTransaction
to always check if memo is required. If you want to skip the check, callclient.SubmitTransactionWithOptions
instead.
v2.1.0 - 2020-02-24
- Add
client.StrictReceivePaths
andclient.StrictSendPaths
(#2237).
client.StrictReceivePaths
:
client := horizonclient.DefaultPublicNetClient
// Find paths for XLM->NGN
pr := horizonclient.PathsRequest{
DestinationAccount: "GCLWGQPMKXQSPF776IU33AH4PZNOOWNAWGGKVTBQMIC5IMKUNP3E6NVU",
DestinationAmount: "100",
DestinationAssetCode: "NGN",
DestinationAssetIssuer: "GDZST3XVCDTUJ76ZAV2HA72KYQODXXZ5PTMAPZGDHZ6CS7RO7MGG3DBM",
DestinationAssetType: horizonclient.AssetType4,
SourceAccount: "GDZST3XVCDTUJ76ZAV2HA72KYQODXXZ5PTMAPZGDHZ6CS7RO7MGG3DBM",
}
paths, err := client.StrictReceivePaths(pr)
if err != nil {
fmt.Println(err)
return
}
fmt.Print(paths)
client.StrictSendPaths
:
client := horizonclient.DefaultPublicNetClient
// Find paths for USD->EUR
pr := horizonclient.StrictSendPathsRequest{
SourceAmount: "20",
SourceAssetCode: "USD",
SourceAssetIssuer: "GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX",
SourceAssetType: horizonclient.AssetType4,
DestinationAssets: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S",
}
paths, err := client.StrictSendPaths(pr)
- Add
client.OfferDetails
(#2303).
client := horizonclient.DefaultPublicNetClient
offer, err := client.OfferDetails("2")
if err != nil {
fmt.Println(err)
return
}
fmt.Print(offer)
- Add support to
client.Offers
for the filters:Seller
,Selling
andBuying
(#2230).
offerRequest = horizonclient.OfferRequest{
Seller: "GCLWGQPMKXQSPF776IU33AH4PZNOOWNAWGGKVTBQMIC5IMKUNP3E6NVU",
Selling: "COP:GCLWGQPMKXQSPF776IU33AH4PZNOOWNAWGGKVTBQMIC5IMKUNP3E6NVU",
Buying: "EUR:GCLWGQPMKXQSPF776IU33AH4PZNOOWNAWGGKVTBQMIC5IMKUNP3E6NVU",
Order: horizonclient.OrderDesc,
}
offers, err = client.Offers(offerRequest)
if err != nil {
fmt.Println(err)
return
}
fmt.Print(offers)
- Add
client.Accounts
(#2229).
This feature allows account retrieval filtering by signer or by a trustline to an asset.
client := horizonclient.DefaultPublicNetClient
accountID := "GCLWGQPMKXQSPF776IU33AH4PZNOOWNAWGGKVTBQMIC5IMKUNP3E6NVU"
accountsRequest := horizonclient.AccountsRequest{Signer: accountID}
account, err := client.Accounts(accountsRequest)
if err != nil {
fmt.Println(err)
return
}
fmt.Print(account)
- Add
IsNotFoundError
(#2197).
- Make
hProtocol.FeeStats
backwards compatible with Horizon0.24.1
and1.0
deprecating usage of*_accepted_fee
(#2290).
All the _accepted_fee
fields were removed in Horizon 1.0, however we extended this version of the SDK to backfill the FeeStat
struct using data from MaxFee
. This is a temporary workaround and it will be removed in horizonclient 3.0. Please start using data from FeeStat.MaxFee
instead.
v2.0.0 - 2020-01-13
- Add custom
UnmarshalJSON()
implementations to Horizon protocol structs soint64
fields can be parsed as JSON numbers or JSON strings - Remove deprecated
fee_paid field
from Transaction response - Dropped support for Go 1.10, 1.11.
v1.4.0 - 2019-08-09
- Add support for querying operation endpoint with
join
parameter #1521. - Add support for querying previous and next trade aggregations with
Client.NextTradeAggregationsPage
andClient.PrevTradeAggregationsPage
methods.
v1.3.0 - 2019-07-08
- Transaction information returned by methods now contain new fields:
FeeCharged
andMaxFee
.FeePaid
is deprecated and will be removed in later versions. - Improved unit test for
Client.FetchTimebounds
method. - Added
Client.HomeDomainForAccount
helper method for retrieving the home domain of an account.
v1.2.0 - 2019-05-16
- Added support for returning the previous and next set of pages for a horizon response; issue #985.
- Fixed bug reported in #1254 that causes a panic when using horizonclient in goroutines.
v1.1.0 - 2019-05-02
Client.Root()
method for querying the root endpoint of a horizon server.- Support for returning concrete effect types#1217
- Fix when no HTTP client is provided
-
Client.Fund()
now returnsTransactionSuccess
instead of a http response pointer. -
Querying the effects endpoint now supports returning the concrete effect type for each effect. This is also supported in streaming mode. See the docs for examples.
v1.0.0 - 2019-04-26
- Initial release