Releases: stellar/js-stellar-sdk
Releases · stellar/js-stellar-sdk
v11.2.1
v11.2.0
Added
- Support for the new, optional
diagnosticEventsXdr
field on theSorobanRpc.Server.sendTransaction
method. The raw field will be present when using the_sendTransaction
method, while the normal method will have an already-parseddiagnosticEvents: xdr.DiagnosticEvent[]
field, instead (#905). - A new exported interface
SorobanRpc.Api.EventResponse
so that developers can type-check individual events (#904).
Updated
v11.1.0
Added
SorobanRpc.Server.simulateTransaction
now supports an optionaladdlResources
parameter to allow users to specify additional resources that they want to include in a simulation (#896).ContractSpec
now has ajsonSchema()
method to generate a JSON Schema for a particular contract specification (#889).
Fixed
- All dependencies have been updated to their latest versions, including
stellar-base
to v10.0.1 which included a small patch (#897).
New Contributors
- @willemneal made their first contribution in #889
Full Changelog: v11.0.1...v11.1.0
v11.0.1
v11.0.0
This is the stable Protocol 20 release.
v11.0.0: Protocol 20, Soroban!
Breaking Changes
- The package has been renamed: it is now
@stellar/stellar-sdk
. - The new minimum version is Node 18.
- The
soroban-client
library (stellar/js-soroban-client) has been merged into this package, causing significant breaking changes in the module structure (#860):- The namespaces have changed to move each server-dependent component into its own module. Shared components (e.g.
TransactionBuilder
) are still in the top level, Horizon-specific interactions are in theHorizon
namespace (i.e.Server
is nowHorizon.Server
), and new Soroban RPC interactions are in theSorobanRpc
namespace. - There is a detailed migration guide available to outline both the literal (i.e. necessary code changes) and philosophical (i.e. how to find certain functionality) changes needed to adapt to this merge.
- The namespaces have changed to move each server-dependent component into its own module. Shared components (e.g.
- The
SorobanRpc.Server.prepareTransaction
andSorobanRpc.assembleTransaction
methods no longer need an optionalnetworkPassphrase
parameter, because it is implicitly part of the transaction already (#870). - Certain effects have been renamed to align better with the "tense" that other structures have (#844):
DepositLiquidityEffect
->LiquidityPoolDeposited
WithdrawLiquidityEffect
->LiquidityPoolWithdrew
LiquidityPoolTradeEffect
->LiquidityPoolTrade
LiquidityPoolCreatedEffect
->LiquidityPoolCreated
LiquidityPoolRevokedEffect
->LiquidityPoolRevoked
LiquidityPoolRemovedEffect
->LiquidityPoolRemoved
Added
- New effects have been added to support Protocol 20 (Soroban) (#842):
ContractCredited
occurs when a Stellar asset moves into its corresponding Stellar Asset Contract instanceContractDebited
occurs when a Stellar asset moves out of its corresponding Stellar Asset Contract instance
- Asset stat records (
ServerApi.AssetRecord
) contain two new fields to support the Protocol 20 (Soroban) release (#841):num_contracts
- the integer quantity of contracts that hold this assetcontracts_amount
- the total units of that asset held by contracts
- New operation responses (#845):
invokeHostFunction
: seeHorizon.InvokeHostFunctionOperationResponse
bumpFootprintExpiration
: seeHorizon.BumpFootprintExpirationOperationResponse
restoreFootprint
: seeHorizon.RestoreFootprintOperationResponse
- You can refer to the actual definitions for details, but the gist of the schemas is below:
interface InvokeHostFunctionOperationResponse {
function: string;
parameters: {
value: string;
type: string;
}[];
address: string;
salt: string;
asset_balance_changes: {
type: string;
from: string;
to: string;
amount: string;
}[];
}
interface BumpFootprintExpirationOperationResponse {
ledgersToExpire: string;
}
interface RestoreFootprintOperationResponse {};
Updated
- Build system has been overhauled to support Webpack 5 (#814).
stellar-base
has been updated to its corresponding overhaul (#818).- Bundle size has decreased by dropping unnecessary dependencies (
lodash
: #822,es6-promise
: #823, polyfills: #825,detect-node
: #831). - Dependencies have been updated to their latest versions (#825, #827).
- The
stellar-base
library has been upgraded to support the latest Protocol 20 XDR schema and all Soroban functionality (#861).
Fixed
- Missing fields have been added to certain API responses (#801 and #797).
- Some effect definitions that were missing have been added (#842):
ClaimableBalanceClawedBack
is now definedtype EffectRecord
now has all of the effect types
- The
PaymentCallBuilder
was incorrectly indicating that it would return a collection ofPayment
records, while in reality it can return a handful of "payment-like" records (#885).
New Contributors
- @jhuntbach-bc made their first contribution in #801
- @kknownymouss made their first contribution in #797
- @criadoperez made their first contribution in #853
- @IgorShadurin made their first contribution in #879
Full Changelog: v10.4.1...v11.0.0
v11.0.0-beta.6
Fixed
- The
stellar-base
library has been upgraded tobeta.4
which contains a bugfix for large sequence numbers (#877). - The
SorobanRpc.Server.getTransaction()
method will now return the full response when encountering aFAILED
transaction result (#872). - The
SorobanRpc.Server.getEvents()
method will correctly parse the event value (which is anxdr.ScVal
rather than anxdr.DiagnosticEvent
, see the modifiedSorobanRpc.Api.EventResponse.value
; #876).
Full Changelog: v10.4.1...v11.0.0-beta.5
v11.0.0-beta.5
v11.0.0-beta.5
Breaking Changes
- The
soroban-client
library (stellar/js-soroban-client) has been merged into this package, causing significant breaking changes in the module structure (#860):- The namespaces have changed to move each server-dependent component into its own module. Shared components (e.g.
TransactionBuilder
) are still in the top level, Horizon-specific interactions are in theHorizon
namespace (i.e.Server
is nowHorizon.Server
), and new Soroban RPC interactions are in theSorobanRpc
namespace. - There is a detailed migration guide available to outline both the literal (i.e. necessary code changes) and philosophical (i.e. how to find certain functionality) changes needed to adapt to this merge.
- The namespaces have changed to move each server-dependent component into its own module. Shared components (e.g.
- The
SorobanRpc.Server.prepareTransaction
andSorobanRpc.assembleTransaction
methods no longer need an optionalnetworkPassphrase
parameter, because it is implicitly part of the transaction already (#870).
Full Changelog: v10.4.1...v11.0.0-beta.5
v11.0.0-beta.4
Fixed
- The
stellar-base
dependency has been pinned to a specific version to avoid incorrect semver resolution (#867).
v11.0.0-beta.3
v11.0.0-beta.3
Fixed
- Fix a webpack error preventing correct exports of the SDK for browsers (#862).
Full Changelog: v11.0.0-beta.2...v11.0.0-beta.3
v11.0.0-beta.2
v11.0.0-beta.2
Breaking Changes
- Certain effects have been renamed to align better with the "tense" that other structures have (#844):
DepositLiquidityEffect
->LiquidityPoolDeposited
WithdrawLiquidityEffect
->LiquidityPoolWithdrew
LiquidityPoolTradeEffect
->LiquidityPoolTrade
LiquidityPoolCreatedEffect
->LiquidityPoolCreated
LiquidityPoolRevokedEffect
->LiquidityPoolRevoked
LiquidityPoolRemovedEffect
->LiquidityPoolRemoved
Add
- New effects have been added to support Protocol 20 (Soroban) (#842):
ContractCredited
occurs when a Stellar asset moves into its corresponding Stellar Asset Contract instanceContractDebited
occurs when a Stellar asset moves out of its corresponding Stellar Asset Contract instance
- Asset stat records (
ServerApi.AssetRecord
) contain two new fields to support the Protocol 20 (Soroban) release (#841):num_contracts
- the integer quantity of contracts that hold this assetcontracts_amount
- the total units of that asset held by contracts
- New operation responses (#845):
invokeHostFunction
: seeHorizon.InvokeHostFunctionOperationResponse
bumpFootprintExpiration
: seeHorizon.BumpFootprintExpirationOperationResponse
restoreFootprint
: seeHorizon.RestoreFootprintOperationResponse
- You can refer to the actual definitions for details, but the gist of the schemas is below:
interface InvokeHostFunctionOperationResponse {
function: string;
parameters: {
value: string;
type: string;
}[];
address: string;
salt: string;
asset_balance_changes: {
type: string;
from: string;
to: string;
amount: string;
}[];
}
interface BumpFootprintExpirationOperationResponse {
ledgersToExpire: string;
}
interface RestoreFootprintOperationResponse {};