Skip to content

Releases: stellar/js-stellar-sdk

v9.0.0-beta.0

02 Sep 21:15
bb58357
Compare
Choose a tag to compare
v9.0.0-beta.0 Pre-release
Pre-release

This beta release adds support for Automated Market Makers. For details, you can refer to CAP-38 for XDR changes and this document for detailed changes to the Horizon API. Install it via yarn upgrade stellar-sdk@beta.

Add

  • Introduced a LiquidityPoolCallBuilder to make calls to a new endpoint:

    • /liquidity_pools[?reserves=...] - a collection of liquidity pools, optionally filtered by one or more assets (#682)
    • /liquidity_pools/:id - a specific liquidity pool (#687)
  • Expanded the TransactionCallBuilder, OperationCallBuilder, and EffectsCallBuilders to apply to specific liquidity pools (#689). This corresponds to the following new endpoints:

    • /liquidity_pools/:id/transactions
    • /liquidity_pools/:id/operations
    • /liquidity_pools/:id/effects
  • Expanded the TradesCallBuilder to support fetching liquidity pool trades and accepts a new trade_type filter (#685):

    • /trades?trade_type={orderbook,liquidity_pools}
    • A liquidity pool trade contains the following fields:
      • liquidity_pool_fee_bp: LP fee expressed in basis points, and either
      • base_liquidity_pool_id or counter_liquidity_pool_id
  • Added new effects related to liquidity pools (#690):

    • DepositLiquidityEffect
    • WithdrawLiquidityEffect
    • LiquidityPoolTradeEffect
    • LiquidityPoolCreatedEffect
    • LiquidityPoolRemovedEffect
    • LiquidityPoolRevokedEffect
  • Added new responses related to liquidity pool operations (#692):

    • DepositLiquidityOperationResponse
    • WithdrawLiquidityOperationResponse

Updates

  • Updated the underlying stellar-base library to v6.0.1 to include CAP-38 changes (#681).

  • Updated various developer dependencies to secure versions (#671).

  • Updated AccountResponse to include liquidity pool shares in its balances field (#688).

  • Updated AccountCallBuilder to allow filtering based on participation in a certain liquidity pool (#688), corresponding to the following new filter:

    • /accounts?reserves=[...list of assets...]
  • Updated RevokeSponsorshipOperationResponse to contain an optional attribute trustline_liquidity_pool_id, for when a liquidity pool trustline is revoked (#690).

Breaking changes

  • A TradeRecord can now correspond to two different types of trades and has changed (#685):

    • Orderbook (the existing structure)
      • counter_offer_id and base_offer_id only show up in these records
      • the redundant offer_id field was removed; it matches base_offer_id
    • LiquidityPool (new)
      • base_account xor counter_account will appear in these records
    • price fields changed from numbers to strings
    • The links to base and counter can now point to either an account or a liquidity pool
  • An account's balances array can now include a new type (#688):

    • asset_type can now be liquidity_pool_shares
    • The following fields are not included in pool share balances:
      • buying_liabilities
      • selling_liabilities
      • asset_code
      • asset_issue
  • The ChangeTrustOperationResponse has changed (#688, #692):

    • asset_type can now be liquidity_pool_shares
    • asset_code, asset_issuer, and trustee are now optional
    • liquidity_pool_id is a new optional field
  • The trustline effects (TrustlineCreated, TrustlineUpdated, TrustlineRevoked) have changed (#690):

    • the asset type can now be liquidity_pool_shares
    • they can optionally include a liquidity_pool_id
  • Trustline sponsorship effects (TrustlineSponsorshipCreated, TrustlineSponsorshipUpdated, TrustlineSponsorshipRemoved) have been updated (#690):

    • the asset field is now optional, and is replaced by
    • the liquidity_pool_id field for liquidity pools

v8.2.5

04 Aug 18:53
0d1ee7f
Compare
Choose a tag to compare

Update

  • The js-stellar-base library has been updated to v5.3.2, which fixes a muxed account bug and updates vulnerable dependencies (#670).

v8.2.4

22 Jul 17:17
cdeb65c
Compare
Choose a tag to compare

Fix

  • Utils.readTransactionTx now checks timebounds with a 5-minute grace period to account for clock drift.

v8.2.3

02 Jul 15:48
6f0bb88
Compare
Choose a tag to compare

Fix

  • Fix server signature verification in Utils.readChallengeTx. The function was not verifying the server account had signed the challenge transaction. Refer to the advisory for more details.

v8.2.2

03 Jun 23:34
ac46a8d
Compare
Choose a tag to compare

Fix

  • Fixes a breaking bug introduced in v8.2.0 in which AccountResponse no longer conformed to the StellarBase.Account interface, which was updated in [email protected] (#655).

v8.2.1

20 May 23:07
fad208d
Compare
Choose a tag to compare

Fix

  • A defunct query paramater (?c=[...]) has been removed now that Horizon properly sends Cache-Control headers (#652).

v8.2.0

11 May 18:58
eac8519
Compare
Choose a tag to compare

Add

  • Added support for querying the relevant transactions and operations for a claimable balance (#628):

    • TransactionCallBuilder.forClaimableBalance(): builds a query to /claimable_balances/:id/transactions/
    • OperationCallBuilder.forClaimableBalance(): builds a query to /claimable_balances/:id/operations/
  • Added support for new stat fields on the /assets endpoint (#628):

    • accounts - a breakdown of accounts using this asset by authorization type
    • balances - a breakdown of balances by account authorization type
    • num_claimable_balances - the number of pending claimable balances
    • claimable_balances_amount - the total balance of pending claimable balances
  • Added types for all Effects supported as an enum, and moved Trade, Asset, Offer, and Account types to separate files (#635).

Update

  • Upgraded js-stellar-base package to version ^5.2.1 from ^5.1.0, refer to its release notes for more (#639):

    • opt-in support for muxed accounts (SEP-23)
    • exposing the AuthClawbackEnabled flag to Typescript to complete Protocol 17 support
    • fixing a public key parsing regression
  • Exposed more Protocol 17 (CAP-35) operations (#633):

    • The /accounts endpoint now resolves the flags.auth_clawback_enabled field.
    • The operation responses for clawback, clawbackClaimableBalance, and setTrustLineFlags are now defined.
    • The operation response for setOptions has been updated to show auth_clawback_enabled.

v8.1.1

07 Apr 22:03
2b79e8b
Compare
Choose a tag to compare

Fix

  • PROTOCOL 17 SUPPORT: Upgraded js-stellar-base package to version ^5.1.0 from ^5.0.0 to expose the Typescript hints for CAP-35 operations (#629).

A summary of the changes introduced by Protocol 17 (to the base library and the SDK) is as follows:

  • New operations: ClawbackOp, ClawbackClaimableBalanceOp, and SetTrustLineFlagsOp
  • Deprecations: SetTrustLineFlagsOp now supercedes the old AllowTrustOp
  • New effects: trustline_flags_updated and claimable_balance_clawed_back
  • Deprecations: trustline_flags_updated supercedes the old trustline_authorized, trustline_authorized_to_maintain_liabilities, and trustline_deauthorized effects

You can see a rundown of the operation details in the implementation gist, as well.

v8.1.0

25 Mar 20:29
cb912a0
Compare
Choose a tag to compare

Update

  • Upgraded js-stellar-base package to version ^5.0.0 from ^4.0.3 to support new CAP-35 operations (#624).

v8.0.0

10 Feb 19:59
2a5f3c6
Compare
Choose a tag to compare

Breaking

  • Updates the SEP-10 utility function parameters to support SEP-10 v3.1 (#607)
    • A new required webAuthDomain parameter was added to the following functions
      • utils.buildChallengeTx()
      • utils.readChallengeTx()
      • utils.verifyChallengeTxThreshold()
      • utils.verifyChallengeTxSigners()
    • The webAuthDomain parameter is expected to match the value of the Manage Data operation with the 'web_auth_domain' key, if present

Fix

  • Fixes bug where the first Manage Data operation in a challenge transaction could have a null value (#591)

Update

  • Upgraded axios package to version ^0.21.1 from ^0.19.0 to fix security vulnerabilities (#608)
  • Upgraded js-stellar-base package to version ^4.0.3 from ^4.0.0 to allow accounts with a balance of zero (#616)