Skip to content

Releases: stellar/js-stellar-base

v15.0.0

30 Mar 18:34
591d810

Choose a tag to compare

v15.0.0: Protocol 26

Breaking Changes

  • TransactionBase.networkPassphrase setter now throws an error to enforce immutability (#891).
  • React Native apps using the Hermes engine must polyfill broken typed array methods such as subarray; this compatibility is no longer provided by @stellar/js-xdr. One option is @exodus/patch-broken-hermes-typed-arrays. If needed, please review and consider manually adding it to your project.
  • Construction and encoding of sized XDR integer values now throw on overflow and underflow instead of silently clamping, via @stellar/js-xdr (#133). This may affect code that previously relied on permissive bigint coercion.

Added

  • XDR definitions have been updated to align with Protocol 26 (#944).

Fixed

  • Keypair.verify now returns false instead of throwing when the signature is invalid (#892).
  • Memo.id now correctly rejects negative values, decimal values, and values exceeding the uint64 maximum (2^64 - 1); the error message now correctly says uint64 (#892).
  • Operation._toXDRPrice now accepts price objects with n: 0 (a zero numerator was previously treated as falsy and fell through to float approximation) (#892).
  • SignerKey.decodeSignerKey now reads the exact payload length from the 4-byte length prefix when decoding signedPayload signer keys, preventing data truncation or over-read (#892).
  • TransactionBuilder.cloneFrom now correctly re-encodes extraSigners as StrKey strings (they were previously passed as raw XDR objects) (#892).
  • TransactionBuilder.cloneFrom now uses Math.floor when computing unscaledFee to prevent fractional fee values (#892).
  • TransactionBuilder now floors Date timebounds to integer UNIX timestamps (#892).
  • Auth.bytesToInt64 now correctly handles bytes with upper-32-bit values set by processing each 32-bit half independently (#891).
  • ScInt constructor now correctly handles string input (#891).
  • Soroban.parseTokenAmount now throws when the input value has more decimal places than the specified decimals argument (#891).
  • XDR Array and VarArray decoding now fails fast when the declared array length exceeds the remaining bytes, via @stellar/js-xdr (#132).

Contributors

Full Changelog: v14.1.0...v15.0.0

v14.1.0

27 Feb 18:28
1b03f5b

Choose a tag to compare

v14.1.0

Added

  • Implemented TransactionBuilder.addSacTransferOperation to remove the need for simulation for SAC (Stellar Asset Contract) transfers by creating the appropriate auth entries and footprint (#861).

Fixed

  • TransactionBuilder.build now adds this.sorobanData.resourceFee() to baseFee when provided (#861).
  • The generated XDR type declarations for unions with integer discriminants now use constructors instead of named static methods (stellar/dts-xdr#9) (#874).

Contributors

Full Changelog: v14.0.4...v14.1.0

v14.0.4

22 Dec 19:02
e28e4b5

Choose a tag to compare

v14.0.4

Fixed

  • Fixes a bug in Address which prevented it from decoding claimable balances (#825).
  • Fixes bugs in Soroban.formatTokenAmount that would cause a lack of leading or trailing zeroes at the decimal point in some cases (#821, #823).

Contributors

Full Changelog: v14.0.3...v14.0.4

v14.0.3

01 Dec 16:31
e8e3950

Choose a tag to compare

v14.0.3

Fixed

  • Add conversions for timepoint and duration scval types (#819)

New Contributors

Full Changelog: v14.0.2...v14.0.3

v14.0.2

10 Nov 21:28
c18336d

Choose a tag to compare

v14.0.2

Fixed

  • Lowered the maximum bid for fee-bumped Soroban transactions by not doubling the resource fee (#817).

Contributors

Full Changelog: v14.0.1...v14.0.2

v14.0.1

18 Sep 16:33
5bac0b6

Choose a tag to compare

v14.0.1

Fixed

  • Added missing Asset.toString() TypeScript definition (#1218).

v14.0.0

14 Aug 16:32
b82822b

Choose a tag to compare

v14.0.0: Protocol 23

Breaking Changes

  • This package now requires >= Node 20.
  • XDR definitions have been updated to align with Protocol 23 (#800).
  • Removed the custom Buffer.subarray polyfill introduced in v11.0.1 as a workaround for React Native's Hermes engine. Please use @exodus/patch-broken-hermes-typed-arrays as an alternative, if needed (#795).

Added

  • The sodium-native and tweetnacl dependencies have been replaced with @noble/curves (#802).
  • Support for claimable balances and liquidity pools in StrKey (#799).
  • Support for claimable balances, liquidity pools, and muxed accounts in Address (#801).
  • Added the ability for nativeToScVal to convert arrays with differing types to smart contract values (#803). For example,
nativeToScVal([1, "x", "y"], { type: [ "i128", "symbol" ] })

returns a Vec<i128, symbol, string>.

Fixed

  • Fix browser compatibility with proper module resolution and UMD configuration (#798).
  • Remove MuxedAccount.parseBaseAddress from TypeScript definitions (#797).

Contributors

@overcat @Shaptic

Full Changelog: v13.1.0...v14.0.0

v14.0.0-rc.2: Protocol 23 Release Candidate 2

09 Jul 00:34
440b60d

Choose a tag to compare

v14.0.0-rc.2: Protocol 23, Release Candidate 2

Please refer to v14.0.0-rc.1 for more release notes in this major version update.

Fixed

  • Correctly encode claimable balances and muxed accounts by @Shaptic in #808

Full Changelog: v13.1.0...v14.0.0-rc.2

v14.0.0-rc.1: Protocol 23 Release Candidate

25 Jun 18:23
3f82e7e

Choose a tag to compare

v14.0.0-rc.1: Protocol 23, Release Candidate 1

Breaking Changes

  • This package now requires >= Node 20.
  • XDR definitions have been updated to align with Protocol 23 (#800).
  • Removed the custom Buffer.subarray polyfill introduced in #733 in v11.0.1 as a workaround for React Native's Hermes engine. Please use @exodus/patch-broken-hermes-typed-arrays as an alternative, if needed (#795).

Added

  • The sodium-native and tweetnacl dependencies have been replaced with @noble/curves (#802).
  • Support for claimable balances and liquidity pools in StrKey (#799).
  • Support for claimable balances, liquidity pools, and muxed accounts in Address (#801).
  • Added the ability for nativeToScVal to convert arrays with differing types to smart contract values, e.g., nativeToScVal([1, "x", "y"], { type: [ "i128", "symbol" ]}) will give you a Vec<i128, symbol, string> (#803).

Fixed

  • Fix browser compatibility with proper module resolution and UMD configuration (#798).
  • Remove MuxedAccount.parseBaseAddress from TypeScript definitions (#797).

Full Changelog: v13.1.0...v14.0.0-rc.1

v13.1.0

28 Mar 23:22
087e2d6

Choose a tag to compare

v13.1.0

Added

  • nativeToScVal now supports encoding Keypairs as addresses (#794).
  • Within authorizeEntry, the SigningCallback callback function should now return an object containing both the signature and the identity of the signer. In multi-signature situations, it isn't necessarily the case that the address within the authorization entry is the one that actually signs that entry. Thus, the callback now takes the following form, where the original Promise<BufferLike> option is preserved for backwards compatibility and should be considered deprecated (#783):
export type SigningCallback = (
  preimage: xdr.HashIdPreimage
) => Promise<
  BufferLike |
  { signature: BufferLike, publicKey: string }
>;

Fixed

  • scValToNative will decode addresses more efficiently and reliably (#794).