Skip to content

Releases: stellar/js-stellar-base

v8.0.0-beta.0

12 Apr 22:38
533dac1
Compare
Choose a tag to compare
v8.0.0-beta.0 Pre-release
Pre-release

This release adds support for Protocol 19.

It includes CAP-21 (new transaction preconditions) and CAP-40 (signed payload signers).

This is considered a beta release until the XDR for the Stellar protocol stabilizes and is officially released.

Breaking

  • As of this release, the minimum supported version of NodeJS is 14.x.
  • Two XDR types have been renamed:
    • xdr.OperationId is now xdr.HashIdPreimage
    • xdr.OperationIdId is now xdr.HashIdPreimageOperationId

Add

  • Support for converting signed payloads (CAP-40) to and from their StrKey (P...) representation (#511):

    • Keypair.signPayloadDecorated(data)
    • StrKey.encodeSignedPayload(buf)
    • StrKey.decodeSignedPayload(str)
    • StrKey.isValidSignedPayload(str)
  • Support for creating transactions with the new preconditions (CAP-21) via TransactionBuilder (#513).

  • A way to convert between addresses (like G... and P..., i.e. the StrKey class) and their respective signer keys (i.e. xdr.SignerKeys), particularly for use in the new transaction preconditions (#520):

    • SignerKey.decodeAddress(address)
    • SignerKey.encodeSignerKey(address)
    • TransactionBuilder.setTimebounds(min, max)
    • TransactionBuilder.setLedgerbounds(min, max)
    • TransactionBuilder.setMinAccountSequence(seq)
    • TransactionBuilder.setMinAccountSequenceAge(age)
    • TransactionBuilder.setMinAccountSequenceLedgerGap(gap)
    • TransactionBuilder.setExtraSigners([signers])

Fix

  • Correct a TypeScript definition on the RevokeLiquidityPoolSponsorship operation (#522).

  • Resolves a bug that incorrectly sorted Assets with mixed-case asset codes (it preferred lowercase codes incorrectly) (#516).

  • Update developer dependencies:

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