Added
-
Add support for top-level offers endpoint with
seller,selling, andbuyingfilter. (#485)
Horizon 1.0 includes a new/offersend-point, which allows you to list all offers, supporting filtering byseller,selling, orbuyingasset.You can fetch data from this endpoint by doing
server.offers()and use any of the following filters:seller:server.offers().forAccount(accountId)buying:server.offers().buying(asset)selling:server.offers().selling(asset)
This introduced a breaking change since it modified the signature for the function
server.offers().Before, if you wanted to list all the offers for a given account, you'd do:
server.offers('accounts', accountID)Starting on this version you'll need to do:
server.offers().accountId(accountId)You can do now things that were not possible before, like finding
all offers for an account filtering by the selling or buying assetserver.offers().accountId(accountId).selling(assetA).buying(assetB) -
Add support for filtering accounts by
signerorasset(#474)
Horizon 1.0 includes a new/accountsend-point, which allows you to list all accounts who have another account as a signer or hold a given asset.You can fetch data from this endpoint by doing
server.accounts()and use any of the following filters:accountID:server.accounts().accountId(accountId), returns a single account.forSigner:server.accounts().forSigner(accountId), returns accounts whereaccountIdis a signer.forAsset:server.accounts().forAsset(asset), returns accounts which hold theasset.
-
Add TypeScript typings for new fields in
fee_stats. (#462)
Changed
- Changed TypeScript typing for multiple operations "type", it will match the new value on Horizon. (#477)
Fixed
- Fix fetchTimebounds() (#487)
- Clone the passed URI in CallBuilder constructor, to not mutate the outside ref (#473)
- Use axios CancelToken to ensure timeout (#482)
Breaking
-
Remove
fee_paidfield from transaction response. (#476) -
Remove all
*_accepted_feefrom FeeStatsResponse. (#463) -
Change function signature for
server.offers. (#485)
The signature for the functionserver.offers()was changed to bring suppport for other filters.Before, if you wanted to list all the offers for a given account, you'd do:
server.offers('accounts', accountID)Starting on this version you'll need to do:
server.offers().accountId(accountId)