Skip to content

Releases: stellar/js-stellar-sdk

v5.0.0-alpha.1

22 Apr 16:22
e2ccbed
Compare
Choose a tag to compare

Breaking changes

  • Bump stellar-base to v3.0.0-alpha-0: This new version of stellar-base brings support for protocol 13, including multiple breaking changes which might affect your code, please review the list of breaking changes in [email protected] release (#524).
  • Make networkPassphrase a required argument in Utils.buildChallengeTx and Utils.readChallengeTx (#524).
  • Remove Server.paths (#525).

v4.1.0 (#519)

26 Mar 17:38
e5550ae
Compare
Choose a tag to compare

Add

  • Add SEP0029 (memo required) support. (#516)

    Extends server.submitTransaction to always run a memo required check before
    sending the transaction. If any of the destinations require a memo and the
    transaction doesn't include one, then an AccountRequiresMemoError will be thrown.

    You can skip this check by passing {skipMemoRequiredCheck: true} to server.submitTransaction:

    server.submitTransaction(tx, {skipMemoRequiredCheck: true})
    

    The check runs for each operation of type:

    • payment
    • pathPaymentStrictReceive
    • pathPaymentStrictSend
    • mergeAccount

    If the transaction includes a memo, then memo required checking is skipped.

    See SEP0029 for more information about memo required check.

v4.0.2

06 Mar 15:54
42a5552
Compare
Choose a tag to compare

Fix

  • Fix URI TypeScript reference. (#509)
  • Fix docs build. (#503)
  • Fix documentation for method to filter offers by account. (#507)
  • Fix types and add missing attribute to account_response. (#504)

v4.0.1

18 Feb 21:56
50459fe
Compare
Choose a tag to compare

Add

  • Add .offer method to OfferCallBuilder which allows fetching a single offer by ID. (#499)

Fix

  • Fix broken link to Stellar logo+wordmark. (#496)
  • Fix _link omission for AccountResponse class. (#495)

Update

  • Update challenge transaction helpers for SEP0010. (#497)

v4.0.0 - Horizon 1.0 support

06 Feb 19:59
59f4c0c
Compare
Choose a tag to compare

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, or buying asset.

    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 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)
    

v3.3.0 (#458)

13 Nov 23:31
4a9b656
Compare
Choose a tag to compare

Deprecated ⚠️

  • Horizon 0.25.0 will change the data type for multiple attributes from Int64 to
    string. When the JSON payload includes an Int64, there are
    scenarios where large number data can be incorrectly parsed, since JavaScript doesn't support
    Int64 values. You can read more about it in #1363.

    This release extends the data types for the following attributes to be of type string or number:

    • EffectRecord#offer_id
    • EffectRecord#new_seq
    • OfferRecord#id
    • TradeAggregationRecord#timestamp
    • TradeAggregationRecord#trade_count
    • ManageOfferOperationResponse#offer_id
    • PassiveOfferOperationResponse#offer_id

    We recommend you update your code to handle both string or number in
    the fields listed above, so that once Horizon 0.25.0 is released, your application
    will be able to handle the new type without breaking.

v3.2.0

12 Nov 17:39
46c7abf
Compare
Choose a tag to compare

Add ➕

  • Add fee_charged an max_fee to TransactionResponse interface. (455)

Deprecated ⚠️

  • Horizon 0.25 will stop sending the property fee_paid in the transaction response. Use fee_charged and max_fee, read more about it in 450.

v3.1.2

25 Oct 13:01
bcd2e1c
Compare
Choose a tag to compare

Change

  • Upgrade stellar-base to v2.1.2. (452)

v3.1.1

16 Oct 16:54
dba1f54
Compare
Choose a tag to compare

Change ⚠️

  • Change arguments on server.strictReceivePaths since we included destinationAccount as an argument, but it is not longer required by Horizon. (477)

v3.1.0

15 Oct 17:02
c1f7807
Compare
Choose a tag to compare

Add ➕

  • Add server.strictReceivePaths which adds support for /paths/strict-receive. (444)
    This function takes a list of source assets or a source address, a destination
    address, a destination asset and a destination amount.

    You can call it passing a list of source assets:

    server.strictReceivePaths(sourceAssets,destinationAccount,destinationAsset, destinationAmount)
    

    Or a by passing a Stellar source account address:

    server.strictReceivePaths(sourceAccount,destinationAccount,destinationAsset, destinationAmount)
    

    When you call this function with a Stellar account address, it will look at the account’s trustlines and use them to determine all payment paths that can satisfy the desired amount.

  • Add server.strictSendPaths which adds support for /paths/strict-send. (444)
    This function takes the asset you want to send, and the amount of that asset,
    along with either a list of destination assets or a destination address.

    You can call it passing a list of destination assets:

    server.strictSendPaths(sourceAsset, sourceAmount, [destinationAsset]).call()
    

    Or a by passing a Stellar account address:

    server.strictSendPaths(sourceAsset, sourceAmount, "GDRREYWHQWJDICNH4SAH4TT2JRBYRPTDYIMLK4UWBDT3X3ZVVYT6I4UQ").call()
    

    When you call this function with a Stellar account address, it will look at the account’s trustlines and use them to determine all payment paths that can satisfy the desired amount.

Deprecated ⚠️