Skip to content

Releases: stellar/js-stellar-sdk

v12.0.0-rc.2

07 May 21:35
e4db91c
Compare
Choose a tag to compare
v12.0.0-rc.2 Pre-release
Pre-release

v12.0.0-rc.2: Protocol 21 Release Candidate

This update supports Protocol 21. It is an additive change to the protocol so there are no true backwards incompatibilities, but your software may break if you encounter new unexpected fields from this Protocol (#949).

Please refer to RC1 for additional changes since the last major version.

Breaking Changes

  • The default timeout for transaction calls is now set to 300 seconds (5 minutes) from the previous default of 10 seconds. 10 seconds is often not enough time to review transactions before signing, especially in Freighter or using a hardware wallet like a Ledger, which would cause a txTooLate error response from the server. Five minutes is also the value used by the CLI, so this brings the two into alignment (#956).

Fixed

  • Dependencies have been properly updated to pull in Protocol 21 XDR, where RC1 was not pulling properly for existing installs (#959).

New Contributors

Full Changelog: v11.3.0...v12.0.0-rc.2

v12.0.0-rc.1

02 May 20:07
356bf80
Compare
Choose a tag to compare
v12.0.0-rc.1 Pre-release
Pre-release

v12.0.0-rc.1: Protocol 21 Release Candidate

Breaking Changes

  • This update supports Protocol 21. It is an additive change to the protocol so there are no true backwards incompatibilities, but your software may break if you encounter new unexpected fields from this Protocol (#949).

Fixed

  • Each item in the GetEventsResponse.events list will now have a txHash item corresponding to the transaction hash that triggered a particular event (#939).
  • ContractClient now properly handles methods that take no arguments by making MethodOptions the only parameter, bringing it inline with the types generated by Soroban CLI's soroban contract bindings typescript (#940).
  • ContractClient now allows publicKey to be undefined (#941).
  • SentTransaction will only pass allowHttp if (and only if) its corresponding AssembledTransaction#options config allowed it (#952).

New Contributors

Full Changelog: v11.3.0...v12.0.0-rc.1

v11.3.0

20 Mar 22:10
ce2c166
Compare
Choose a tag to compare

Added

  • Introduces an entire suite of helpers to assist with interacting with smart contracts (#929):
    • ContractClient: generate a class from the contract specification where each Rust contract method gets a matching method in this class. Each method returns an AssembledTransaction that can be used to modify, simulate, decode results, and possibly sign, & submit the transaction.
    • AssembledTransaction: used to wrap a transaction-under-construction and provide high-level interfaces to the most common workflows, while still providing access to low-level transaction manipulation.
    • SentTransaction: transaction sent to the Soroban network, in two steps - initial submission and waiting for it to finalize to get the result (retried with exponential backoff)

Fixed

  • Upgrade underlying dependencies, including @stellar/js-xdr which should broaden compatibility to pre-ES2016 environments (#932, #930).
  • SorobanRpc.Server will no longer use array-based passing to invoke JSON-RPC methods (#924).

Full Changelog: v11.2.2...v11.3.0

v11.2.2

12 Feb 20:38
4c42a4d
Compare
Choose a tag to compare

Fixed

  • @stellar/stellar-base has been upgraded to its latest major version (#918, see v11.0.0 for release notes).
  • Event streaming tests now pass on Node 20, which seems to have tighter conformance to the spec (#917).

Full Changelog: v11.2.1...v11.2.2

v11.2.1

23 Jan 01:45
bacbf8e
Compare
Choose a tag to compare

Fixed

  • An unnecessary dependency has been removed which was causing a TypeScript error in certain environments (#912).
  • Dependencies have been upgraded (see stellar-base@v10.0.2 for release notes, #913).

v11.2.0

11 Jan 21:39
77d7de6
Compare
Choose a tag to compare

Added

  • Support for the new, optional diagnosticEventsXdr field on the SorobanRpc.Server.sendTransaction method. The raw field will be present when using the _sendTransaction method, while the normal method will have an already-parsed diagnosticEvents: xdr.DiagnosticEvent[] field, instead (#905).
  • A new exported interface SorobanRpc.Api.EventResponse so that developers can type-check individual events (#904).

Updated

  • Dependencies have been updated to their latest versions (#906, #908).

v11.1.0

15 Dec 22:50
f1358a5
Compare
Choose a tag to compare

Added

  • SorobanRpc.Server.simulateTransaction now supports an optional addlResources parameter to allow users to specify additional resources that they want to include in a simulation (#896).
  • ContractSpec now has a jsonSchema() 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

Full Changelog: v11.0.1...v11.1.0

v11.0.1

08 Dec 00:32
ff2e9f1
Compare
Choose a tag to compare

This is a hotfix on the major v11 release, see that for the full release notes.

Fixed

  • SorobanRpc.Server.getEvents uses the correct type for the start ledger (#890).

v11.0.0

07 Dec 20:26
69f7699
Compare
Choose a tag to compare

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 the Horizon namespace (i.e. Server is now Horizon.Server), and new Soroban RPC interactions are in the SorobanRpc 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 SorobanRpc.Server.prepareTransaction and SorobanRpc.assembleTransaction methods no longer need an optional networkPassphrase 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 instance
    • ContractDebited 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 asset
    • contracts_amount - the total units of that asset held by contracts
  • New operation responses (#845):
    • invokeHostFunction: see Horizon.InvokeHostFunctionOperationResponse
    • bumpFootprintExpiration: see Horizon.BumpFootprintExpirationOperationResponse
    • restoreFootprint: see Horizon.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 defined
    • type EffectRecord now has all of the effect types
  • The PaymentCallBuilder was incorrectly indicating that it would return a collection of Payment records, while in reality it can return a handful of "payment-like" records (#885).

New Contributors

Full Changelog: v10.4.1...v11.0.0

v11.0.0-beta.6

03 Nov 19:56
f1a53d3
Compare
Choose a tag to compare
v11.0.0-beta.6 Pre-release
Pre-release

Fixed

  • The stellar-base library has been upgraded to beta.4 which contains a bugfix for large sequence numbers (#877).
  • The SorobanRpc.Server.getTransaction() method will now return the full response when encountering a FAILED transaction result (#872).
  • The SorobanRpc.Server.getEvents() method will correctly parse the event value (which is an xdr.ScVal rather than an xdr.DiagnosticEvent, see the modified SorobanRpc.Api.EventResponse.value; #876).

Full Changelog: v10.4.1...v11.0.0-beta.5