Releases: stellar/js-stellar-base
v12.0.0
Protocol 21: Stable Release
This is exactly the same as v12.0.0-rc.1 with only dependency upgrades, but the full changelog from the previous stable version is replicated below.
Breaking Changes
- The generated XDR has been upgraded to match the upcoming Protocol 21, namely stellar/stellar-xdr@
1a04392
(#738).
Added
- To facilitate serialization and deserialization for downstream systems, this package now exports
cereal.XdrWriter
andcereal.XdrReader
which come directly from@stellar/js-xdr
(#744).
Fixed
- Updated various dependencies (#737, #739).
Buffer
andUint8Array
compatibility has improved inStrKey
(#746).
New Contributors
- @kanwalpreetd made their first contribution in #745
- @jiqiang90 made their first contribution in #746
Full Changelog: v11.0.1...v12.0.0
v12.0.0-rc.1
Protocol 21
Breaking Changes
- The generated XDR has been upgraded to match the upcoming Protocol 21, namely stellar/stellar-xdr@
1a04392
(#738).
Added
- To facilitate serialization and deserialization for downstream systems, this package now exports
cereal.XdrWriter
andcereal.XdrReader
which come directly from@stellar/js-xdr
(#744).
Fixed
- Updated various dependencies (#737, #739).
Buffer
andUint8Array
compatibility has improved inStrKey
(#746).
New Contributors
- @kanwalpreetd made their first contribution in #745
- @jiqiang90 made their first contribution in #746
Full Changelog: v11.0.1...v12.0.0-rc.1
v11.0.1
v11.0.0
Note: This version is (still) compatible with Protocol 20. Most people should be unaffected by the technically-breaking changes below and can treat this more like a v10.0.3 patch release.
Breaking Changes
- Starting from v10.0.0-beta.0, we set
BigNumber.DEBUG
inbignumber.js
totrue
internally, which affects all code usingBigNumber
. This behavior has been fixed and only affects this library: globally,BigNumber.DEBUG
now remains at its default setting (i.e. disabled). This is technically a breaking behavior change and is released as such (#729).
Fixed
Full Changelog: v10.0.2...v11.0.0
v10.0.2
v10.0.1
v10.0.0
This is the stable Protocol 20 release.
v10.0.0
: Protocol 20, Soroban!
Breaking Changes
- The package has been renamed to
@stellar/stellar-base
! - Node 18 is the new minimum version to use the SDKs.
- The XDR has been massively overhauled to support Soroban, the new smart contract platform on Stellar, and Protocol 20. This means new operations, data structures, and a transaction format as well as new overlay features (#538).
The core data structure of Soroban is a generic type called an ScVal
(smart contract value, which is a union of types that can basically represent anything [numbers, strings, arrays, maps, contract bytecode, etc.]). You can refer to the XDR for details, and you can utilize new APIs to make dealing with these complex values easier:
nativeToScVal
helps convert native types to their closest Soroban equivalentscValToNative
helps find the closest native JavaScript type(s) corresponding to a smart contract valuescValToBigInt
helps convert numericScVal
s into nativebigint
sScInt
andXdrLargeInt
help convert to and frombigint
s to other types and form sized integer types for smart contract usage
There are other XDR structures that have abstractions included for building out or certain types of smart contract-related structures:
buildInvocationTree
andwalkInvocationTree
are both ways to visualize invocation calling trees betterauthorizeEntry
andauthorizeInvocation
help multiple parties sign invocation calling treeshumanizeEvents
helps make diagnostic events more readable
Added
The following are new APIs to deal with new Soroban constructs:
Address
, which helps manage "smart" addresses in the Soroban context. Addresses there (used for auth and identity purposes) can either be contracts (strkeyC...
) or accounts (strkeyG...
). This abstraction helps manage them and distinguish between them easily.Contract
, which helps manage contract identifiers. The primary purpose is to build invocations of its methods via the genericcall(...)
, but it also provides utilities for converting to anAddress
or calculating its minimum footprint for state expiration.- Three new operations have been added related to Soroban transactions:
invokeHostFunction
for calling contract codebumpFootprintExpiration
for extending the state lifetime of Soroban datarestoreFootprint
for restoring expired, off-chain state back onto the ledger
- The
TransactionBuilder
now takes asorobanData
parameter (and has a corresponding.setSorobanData()
builder method) which primarily describes the storage footprint of a Soroban (that is, which parts of the ledger state [in the form ofxdr.LedgerKey
s] it plans to read and write as part of the transaction).- To facilitate building this out, there's a new
SorobanDataBuilder
factory to set fields individually - It also now has a
cloneFrom(tx, opts)
constructor method to create an instance from an existing transaction, also allowing parameter overrides viaopts
.
- To facilitate building this out, there's a new
- We've added a GHA to track bundle size changes as PRs are made.
Fixes
- Improves the error messages when passing invalid amounts to deposit and withdraw operations (#679).
- Fixes a TypeScript bug where
Memo.hash
did not accept aBuffer
(#698). - Dependencies have been updated to their latest versions.
New Contributors
- @sreuland made their first contribution in #604
- @chadoh made their first contribution in #658
- @jeesunikim made their first contribution in #667
Full Changelog: v9.0.0...v10.0.0
v10.0.0-beta.4
Fixed
- You can now correctly clone transactions (
TransactionBuilder.cloneFrom
) with large sequence numbers (#711). - Utility functions are now added to the exported TypeScript (#706).
Full Changelog: v9.0.0...v10.0.0-beta.4
v10.0.0-beta.3
THIS IS A PRE-RELEASE. It is NOT compatible with the current mainnet, but it IS compatible with the current testnet (which is running Preview 11, the final futurenet version with XDR at stellar/stellar-xdr@9ac0264).
Fixed
- Fixes a bug where
authorizeEntry
might perform a no-op when it shouldn't (#701). - Fixes a TypeScript bug where
Memo.hash
did not accept aBuffer
(#698). - Upgrades a transient dependency for security (#296).
Full Changelog: v9.0.0...v10.0.0-beta.3
v10.0.0-beta.2
THIS IS A PRE-RELEASE. It is NOT compatible with the current mainnet, but it IS compatible with the current testnet (which is running Preview 11, the final futurenet version with XDR at stellar/stellar-xdr@9ac0264).
Breaking Changes
- The wrappers around multi-party authorization have changed (#678):
authorizeEntry
has been added to help sign auth entries in-place- the signature for
authorizeInvocation
has changed: it now offers a callback approach by default and requires slightly different parameters buildAuthEntry
,buildAuthEnvelope
, andauthorizeInvocationCallback
have been removed
Fixed
- The TypeScript definitions for XDR schemas now point to the current protocol rather than vNext (#694).
- Misc. dependencies have been updated to their latest versions (#694).
Full Changelog: v9.0.0...v10.0.0-beta.2