Skip to content

Releases: stellar/js-stellar-base

v7.0.0

11 Jan 21:30
3e38b60
Compare
Choose a tag to compare

This release introduces unconditional support for muxed accounts (#485).

Breaking Changes

In v5.2.0, we introduced opt-in support for muxed accounts, where you would need to explicitly pass a true flag if you wanted to interpret muxed account objects as muxed addresses (in the form M..., see SEP-23). We stated that this would become the default in the future. That is now the case.

The following fields will now always support muxed properties:

  • FeeBumpTransaction.feeSource
  • Transaction.sourceAccount
  • Operation.sourceAccount
  • Payment.destination
  • PathPaymentStrictReceive.destination
  • PathPaymentStrictSend.destination
  • AccountMerge.destination
  • Clawback.from

The following functions had a withMuxing parameter removed:

  • Operation.fromXDRObject
  • Transaction.constructor
  • FeeBumpTransaction.constructor
  • TransactionBuilder.fromXDR
  • TransactionBuilder.buildFeeBumpTransaction

The following functions will no longer check the opts object for a withMuxing field:

  • TransactionBuilder.constructor
  • Operation.setSourceAccount

There are several other breaking changes:

  • TransactionBuilder.enableMuxedAccounts() is removed
  • decodeAddressToMuxedAccount() and encodeMuxedAccountToAddress() no longer accept a second boolean parameter
  • Account.createSubaccount() and MuxedAccount.createSubaccount() are removed (#487). You should prefer to create them manually:
  let mux1 = new MuxedAccount(someAccount, '1');

  // before:
  let mux2 = mux1.createSubaccount('2');

  // now:
  let mux2 = new MuxedAccount(mux1.baseAccount(), '2');
  • Introduced a new helper method to help convert from muxed account addresses to their underlying Stellar addresses (#485):
function extractBaseAddess(address: string): string;
  • The following muxed account validation functions are now available from Typescript (#483):
namespace StrKey {
  function encodeMed25519PublicKey(data: Buffer): string;
  function decodeMed25519PublicKey(data: string): Buffer;
  function isValidMed25519PublicKey(publicKey: string): boolean;
}

function decodeAddressToMuxedAccount(address: string, supportMuxing: boolean): xdr.MuxedAccount;
function encodeMuxedAccountToAddress(account: xdr.MuxedAccount, supportMuxing: boolean): string;
function encodeMuxedAccount(gAddress: string, id: string): xdr.MuxedAccount;
  • Introduced a helper function which lets you pre-determine the hex claimable balance ID of a createClaimableBalance operation prior to submission to the network (#482):
class Transaction {
  // ... 
  function getClaimableBalanceId(opIndex: number): string;
}

Fix

  • Add Buffer as a parameter type option for the Keypair constructor in Typescript (#484).

v6.0.6

16 Nov 20:53
cf7e64c
Compare
Choose a tag to compare

This is a patch version bump intended to update some vulnerable developer dependencies.
These vulnerabilities have no meaningful impact on this repository; this is just dependency housekeeping.

Fix

  • Upgrades dependencies: path-parse (1.0.6 --> 1.0.7) and jszip (3.4.0 --> 3.7.1) (#450, #458).

v6.0.5

23 Oct 00:10
a802d3e
Compare
Choose a tag to compare

This version bump fixes a security vulnerability in a developer dependency; please upgrade as soon as possible! You may be affected if you are working on this package in a developer capacity (i.e. you've cloned this repository) and have run yarn or yarn install any time on Oct 22nd, 2021. Refer to the security advisory for details.

Security Fix

  • Pin ua-parser-js to a known safe version (#477).

v6.0.4

07 Oct 22:27
4b32780
Compare
Choose a tag to compare

Fix

  • Allow muxed accounts when decoding transactions via TransactionBuilder.fromXDR() (#470).

v6.0.3

14 Sep 20:39
a09a1ed
Compare
Choose a tag to compare

Fix

  • When creating a Transaction, forward the optional withMuxing flag along to its operations so that their properties are also decoded with the appropriate muxing state (#469).

v6.0.2

13 Sep 18:27
f73a226
Compare
Choose a tag to compare

Fix

  • Fix Typescript signatures for operations to universally allow setting the withMuxing flag (#466).

v6.0.1

26 Aug 22:22
a37e125
Compare
Choose a tag to compare

This release adds support to CAP-38.

Add

  • Introduced new CAP-38 operations LiquidityPoolDepositOp and LiquidityPoolWithdrawOp.
  • Introduced two new types of assets, LiquidityPoolId and LiquidityPoolAsset.

Update

  • The XDR definitions have been updated to support CAP-38.
  • Extended Operation class with the Operation.revokeLiquidityPoolSponsorship helper that allows revoking a liquidity pool sponsorship.
  • Asset types now include AssetType.liquidityPoolShares.
  • Operation.changeTrust and ChangeTrustOp can now use LiquidityPoolAsset in addition to Asset.
  • Operation.revokeTrustlineSponsorship can now use LiquidityPoolId in addition to Asset.

v6.0.0 (broken)

26 Aug 20:23
3fa1b1e
Compare
Choose a tag to compare

This release adds support to CAP-38.

Add

  • Introduced new CAP-38 operations LiquidityPoolDepositOp and LiquidityPoolWithdrawOp.
  • Introduced two new types of assets, LiquidityPoolId and LiquidityPoolAsset.

Update

  • The XDR definitions have been updated to support CAP-38.
  • Extended Operation class with the Operation.revokeLiquidityPoolSponsorship helper that allows revoking a liquidity pool sponsorship.
  • Asset types now include AssetType.liquidityPoolShares.
  • Operation.changeTrust and ChangeTrustOp can now use LiquidityPoolAsset in addition to Asset.
  • Operation.revokeTrustlineSponsorship can now use LiquidityPoolId in addition to Asset.

v5.3.2

04 Aug 17:14
6e0fa3e
Compare
Choose a tag to compare

With this release, all "critical" (subjective, given these dependencies were used exclusively during development) and most meaningful high-severity vulnerabilities in dependencies have been resolved through minor version updates.

Fix

  • Update various dependencies to secure versions. Most are developer dependencies which means no or minimal downstream effects (#446, #447, #392, #428); the only non-developer dependency upgrade is a minor version bump to lodash (#449).

v5.3.1

03 Aug 23:42
3970ff7
Compare
Choose a tag to compare

Fix

  • Creating operations with both muxed and unmuxed properties resulted in unintuitive XDR. Specifically, the unmuxed property would be transformed into the equivalent property with an ID of 0 (#441).