Releases: stellar/js-stellar-base
Releases · stellar/js-stellar-base
v15.0.0
v15.0.0: Protocol 26
Breaking Changes
TransactionBase.networkPassphrasesetter 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.verifynow returnsfalseinstead of throwing when the signature is invalid (#892).Memo.idnow correctly rejects negative values, decimal values, and values exceeding the uint64 maximum (2^64 - 1); the error message now correctly saysuint64(#892).Operation._toXDRPricenow accepts price objects withn: 0(a zero numerator was previously treated as falsy and fell through to float approximation) (#892).SignerKey.decodeSignerKeynow reads the exact payload length from the 4-byte length prefix when decodingsignedPayloadsigner keys, preventing data truncation or over-read (#892).TransactionBuilder.cloneFromnow correctly re-encodesextraSignersas StrKey strings (they were previously passed as raw XDR objects) (#892).TransactionBuilder.cloneFromnow usesMath.floorwhen computingunscaledFeeto prevent fractional fee values (#892).TransactionBuildernow floorsDatetimebounds to integer UNIX timestamps (#892).Auth.bytesToInt64now correctly handles bytes with upper-32-bit values set by processing each 32-bit half independently (#891).ScIntconstructor now correctly handles string input (#891).Soroban.parseTokenAmountnow throws when the input value has more decimal places than the specifieddecimalsargument (#891).- XDR
ArrayandVarArraydecoding 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
v14.1.0
Added
- Implemented
TransactionBuilder.addSacTransferOperationto remove the need for simulation for SAC (Stellar Asset Contract) transfers by creating the appropriate auth entries and footprint (#861).
Fixed
TransactionBuilder.buildnow addsthis.sorobanData.resourceFee()tobaseFeewhen 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
- @wpalmeri made their first contribution in #831
- @janewang made their first contribution in #835
- @leighmcculloch, @quietbits, @Ryang-21
Full Changelog: v14.0.4...v14.1.0
v14.0.4
v14.0.4
Fixed
- Fixes a bug in
Addresswhich prevented it from decoding claimable balances (#825). - Fixes bugs in
Soroban.formatTokenAmountthat would cause a lack of leading or trailing zeroes at the decimal point in some cases (#821, #823).
Contributors
- @JakeUrban made their first contribution in #825
- @Shaptic
Full Changelog: v14.0.3...v14.0.4
v14.0.3
v14.0.2
v14.0.1
v14.0.0
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.subarraypolyfill introduced in v11.0.1 as a workaround for React Native's Hermes engine. Please use@exodus/patch-broken-hermes-typed-arraysas an alternative, if needed (#795).
Added
- The
sodium-nativeandtweetnacldependencies 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
nativeToScValto 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.parseBaseAddressfrom TypeScript definitions (#797).
Contributors
Full Changelog: v13.1.0...v14.0.0
v14.0.0-rc.2: Protocol 23 Release Candidate 2
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
Full Changelog: v13.1.0...v14.0.0-rc.2
v14.0.0-rc.1: Protocol 23 Release Candidate
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.subarraypolyfill introduced in #733 in v11.0.1 as a workaround for React Native's Hermes engine. Please use@exodus/patch-broken-hermes-typed-arraysas an alternative, if needed (#795).
Added
- The
sodium-nativeandtweetnacldependencies 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
nativeToScValto convert arrays with differing types to smart contract values, e.g.,nativeToScVal([1, "x", "y"], { type: [ "i128", "symbol" ]})will give you aVec<i128, symbol, string>(#803).
Fixed
- Fix browser compatibility with proper module resolution and UMD configuration (#798).
- Remove
MuxedAccount.parseBaseAddressfrom TypeScript definitions (#797).
Full Changelog: v13.1.0...v14.0.0-rc.1
v13.1.0
v13.1.0
Added
nativeToScValnow supports encodingKeypairs as addresses (#794).- Within
authorizeEntry, theSigningCallbackcallback 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 originalPromise<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
scValToNativewill decode addresses more efficiently and reliably (#794).