Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.0.0 - Horizon 1.0 support #488

Merged
merged 2 commits into from
Feb 6, 2020
Merged

v4.0.0 - Horizon 1.0 support #488

merged 2 commits into from
Feb 6, 2020

Conversation

abuiles
Copy link
Contributor

@abuiles abuiles commented Feb 6, 2020

Added

  • Add support for top-level offers endpoint with seller, selling, and buying filter. (#485)
    Horizon 1.0 includes a new /offers end-point, which allows you to list all offers, supporting filtering by seller, selling asset, or buying asset.

    You can fetch data from this endpoint by doing server.offers() and use any of the following filters:

    • seller: server.offers().accountId(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 asset

    server.offers().accountId(accountId).selling(assetA).buying(assetB)
    
  • Add support for filtering accounts by signer or asset (#474)
    Horizon 1.0 includes a new /accounts end-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 where accountId is a signer.
    • forAsset: server.accounts().forAsset(asset), returns accounts which hold the asset.
  • 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_paid field from transaction response. (#476)

  • Remove all *_accepted_fee from FeeStatsResponse. (#463)

  • Change function signature for server.offers. (#485)
    The signature for the function server.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)
    

@abuiles abuiles force-pushed the v4.0.0 branch 3 times, most recently from f434623 to 91df1c9 Compare February 6, 2020 15:40
Copy link
Contributor

@rice2000 rice2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor copy edits. Otherwise, looks great!

Copy link
Contributor

@rice2000 rice2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried something else.

Copy link
Contributor

@ire-and-curses ire-and-curses left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Minor comments

@abuiles abuiles merged commit 59f4c0c into master Feb 6, 2020
@abuiles abuiles deleted the v4.0.0 branch February 6, 2020 19:57
marcelosalloum added a commit to marcelosalloum/js-stellar-sdk that referenced this pull request Feb 12, 2020
…transaction-helpers-sep-10

* upstream/master:
  Fix broken link to Stellar logo+wordmark (stellar#496)
  Junk the _link omition for AccountResponse class (stellar#495)
  v4.0.0 - Horizon 1.0 support (stellar#488)
  Add is_authorized to BalanceLineAsset. (stellar#491)
  Update yarn.lock. (stellar#490)
  Typescript fixes (stellar#489)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants