Skip to content

Releases: stellar/js-stellar-sdk

v14.3.1

07 Nov 00:04
30dc07b

Choose a tag to compare

v14.3.1

Added

  • Added optional server: rpc.Server field to ClientOption for HttpClient reuse. (#1234).

Fixed

  • Replaced global HttpClient with per-instance clients in horizon.Server and rpc.Server to prevent cross-instance header contamination (#1234).

Contributors

Full Changelog: v14.3.0...v14.3.1

v14.3.0

20 Oct 20:58
064262c

Choose a tag to compare

Added

  • Spec.scValToNative now supports parsing Options (#1228).
  • Added getLedgers method to rpc.Server for retreiving ledger data. (#1231).

Fixed

  • Spec.scValToNative returns null for voids or Optionals instead of the ambiguous undefined (#1228).
  • The getEvents API now requires either a start and end ledger or a cursor to be provided (#1231).

Deprecated

  • GetEventsRequest interface moved from server.ts to api.ts (#1231).

Contributors

@ElliotFriend @Ryang-21

Full Changelog: v14.2.0...v14.3.0

v14.2.0

19 Sep 18:55
0d5a136

Choose a tag to compare

v14.2.0

Added

  • rpc.Server now includes getAccountEntry, getTrustline, and getClaimableBalance methods to facilitate retrieving those entries without manually constructing the ledger keys (#1218, #1221).

Fixed

  • The getTransactions API no longer requires startLedger when providing cursor because they are mutually exclusive (#1192).
  • Updated @stellar/stellar-base to latest patch (see its release notes, #1221).

New Contributors

@kostekIV, @janewang, @xiv, and @Ryang-21 made their first contributions!

Full Changelog: v14.1.1...v14.2.0

v14.1.1

27 Aug 23:50
f1a22b7

Choose a tag to compare

v14.1.1

Fixed

  • Added missing transactionIndex and operationIndex to getEvents return schema (#1206).
  • Remove previously-deprecated and now-removed pagingToken from getEvents (use id instead or the top-level cursor, depending on pagination needs) (#1207).

Contributors

Full Changelog: v14.1.0...v14.1.1

v14.1.0

21 Aug 02:54
f21f304

Choose a tag to compare

v14.1.0

Added

  • Add support to new contract.Spec(...) for constructing from a stream of ScSpecEntry XDR entries (base64, or binary) (#1198).
  • Add contract.Spec.fromWasm(wasmFile) for extracting contract spec from contract Wasm files. (#1198).

v14.0.0

14 Aug 17:13
5d440a2

Choose a tag to compare

v14.0.0: Protocol 23

Breaking Changes

  • This package requires Node 20.
  • XDR has been upgraded to support Protocol 23, please refer to the @stellar/stellar-base release notes for details and other breaking changes.
  • Removes the defunct destination_muxed_id_type field for Horizon balance changes (#1187).

Added

  • The Horizon API's BalanceChange object for operations now optionally has details about muxed information if the invocation involved a muxed destination address:
export type MuxedIdType = "uint64" | "string" | "bytes";
export interface BalanceChange {
  // ...
  destination_muxed_id_type?: MuxedIdType;
  destination_muxed_id?: string;
}
  • The RPC server's getTransaction and getTransactions responses now include a top-level events object containing a disjoint breakdown of the events:
export interface TransactionEvents {
  transactionEventsXdr: xdr.TransactionEvent[];
  contractEventsXdr: xdr.ContractEvent[][];
}
  • The RPC server's getEvents now includes retention state information:
export interface GetEventsResponse {
  // ...
  oldestLedger: number;
  latestLedgerCloseTime: string;
  oldestLedgerCloseTime: string;
}
  • The RPC server's simulateTransaction method now includes an optional authMode parameter to specify the type of authorization to simulate:
export type SimulationAuthMode = "enforce" | "record" | "record_allow_nonroot";
  • AssembledTransaction#signAndSend now takes a watcher argument (#1174). This watcher is an abstract class with two optional methods:
    • onSubmitted: called with the return value from the sendTransaction call that submits the transaction to the network for processing
    • onProgress: called with each return value of getTransaction that checks on the ongoing status of the transaction

For example, a watcher like this:

await tx.signAndSend({ watcher: {
  onSubmitted: ({ status, hash, latestLedger }) => {
    console.log({ status, hash, latestLedger });
  },
  onProgress: ({ status, txHash, latestLedger }) => {
    console.log({ status, txHash, latestLedger });
  }
}});

...will result in output like:

{
  status: 'PENDING',
  hash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021',
  latestLedger: 25076
}
{
  status: 'NOT_FOUND',
  txHash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021',
  latestLedger: 25076
}
{
  status: 'SUCCESS',
  txHash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021',
  latestLedger: 25077
}

Fixed

  • Fixed type for Horizon streaming endpoints, namely EventSourceOptions.onmessage now extends CollectionPage (#1100).
  • Fix the issue of transaction submission failure in a no axios environment (#1176).

Contributors

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

v14.0.0-rc.3

16 Jul 18:24
232994d

Choose a tag to compare

v14.0.0-rc.3 Pre-release
Pre-release

v14.0.0-rc.3

Please refer to the first and second release candidates for a comprehensive changelog in this major version. The following only covers the differences since the second release candidate.

  • Fixes a bug in Rpc.Server.getTransaction where either transactionEventsXdr and/or contractEventsXdr may not be present in the new events field (#1186).

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

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

15 Jul 00:11
19ccb64

Choose a tag to compare

v14.0.0-rc.2

Please refer to the first release candidate for a comprehensive changelog in this major version. The following only covers the differences since the first release candidate.

Breaking Changes

  • The RPC server's getTransaction and getTransactions responses have dropped the events.diagnosticEventsXdr field (#1183):
export interface TransactionEvents {
-  diagnosticEventsXdr: xdr.DiagnosticEvent[];
  transactionEventsXdr: xdr.TransactionEvent[];
}

Fixed

  • Fixed type for Horizon streaming endpoints, namely EventSourceOptions.onmessage now extends CollectionPage (#1100).

Full Changelog: v14.0.0-rc.1...v14.0.0-rc.2

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

27 Jun 03:47
0ee38d1

Choose a tag to compare

v14.0.0-rc.1

Breaking Changes

  • This package requires Node 20.
  • XDR has been upgraded to support Protocol 23, please refer to the @stellar/stellar-base release notes for details and other breaking changes.
  • Deprecated: getTransaction and getTransactions top-level diagnosticEventsXdr field.

Added

  • The Horizon API's BalanceChange object for operations now optionally has details about muxed information if the invocation involved a muxed destination address:
export type MuxedIdType = "uint64" | "string" | "bytes";
export interface BalanceChange {
  // ...
  destination_muxed_id_type?: MuxedIdType;
  destination_muxed_id?: string;
}
  • The RPC server's getTransaction and getTransactions responses now include a top-level events object containing a disjoint breakdown of the events:
export interface TransactionEvents {
  diagnosticEventsXdr: xdr.DiagnosticEvent[];
  transactionEventsXdr: xdr.TransactionEvent[];
  contractEventsXdr: xdr.ContractEvent[][];
}
  • The RPC server's getEvents now includes retention state information:
export interface GetEventsResponse {
  // ...
  oldestLedger: number;
  latestLedgerCloseTime: string;
  oldestLedgerCloseTime: string;
}
  • The RPC server's simulateTransaction method now includes an optional authMode parameter to specify the type of authorization to simulate:
export type SimulationAuthMode = "enforce" | "record" | "record_allow_nonroot";

Fixed

  • Add muxed payments support for PaymentOperationResponse type (#1149).

New Contributors

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

v13.3.0

21 Apr 22:27
b18004c

Choose a tag to compare

v13.3.0

Added

  • Add includeFailed to PaymentCallBuilder for including failed transactions in calls (#1168).

Fixed

  • Ensure that rpc.Api.GetTransactionsResponse.transactions is always a valid array (#1162).

Contributors

@fnando @overcat

Full Changelog: v13.2.0...v13.3.1