Releases: stellar/js-stellar-sdk
v14.3.1
v14.3.1
Added
- Added optional
server: rpc.Serverfield toClientOptionfor HttpClient reuse. (#1234).
Fixed
- Replaced global
HttpClientwith per-instance clients inhorizon.Serverandrpc.Serverto prevent cross-instance header contamination (#1234).
Contributors
- @ScottyPoi made their first contribution in #1238, @Ryang-21
Full Changelog: v14.3.0...v14.3.1
v14.3.0
Added
Spec.scValToNativenow supports parsingOptions (#1228).- Added
getLedgersmethod torpc.Serverfor retreiving ledger data. (#1231).
Fixed
Spec.scValToNativereturnsnullforvoids orOptionals instead of the ambiguousundefined(#1228).- The
getEventsAPI now requires either a start and end ledger or a cursor to be provided (#1231).
Deprecated
GetEventsRequestinterface moved fromserver.tstoapi.ts(#1231).
Contributors
Full Changelog: v14.2.0...v14.3.0
v14.2.0
v14.2.0
Added
rpc.Servernow includesgetAccountEntry,getTrustline, andgetClaimableBalancemethods to facilitate retrieving those entries without manually constructing the ledger keys (#1218, #1221).
Fixed
- The
getTransactionsAPI no longer requiresstartLedgerwhen providingcursorbecause they are mutually exclusive (#1192). - Updated
@stellar/stellar-baseto 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
v14.1.1
Fixed
- Added missing
transactionIndexandoperationIndextogetEventsreturn schema (#1206). - Remove previously-deprecated and now-removed
pagingTokenfromgetEvents(useidinstead or the top-levelcursor, depending on pagination needs) (#1207).
Contributors
- @fondation451 made their first contribution in #1206
Full Changelog: v14.1.0...v14.1.1
v14.1.0
v14.0.0
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-baserelease notes for details and other breaking changes. - Removes the defunct
destination_muxed_id_typefield for Horizon balance changes (#1187).
Added
- The Horizon API's
BalanceChangeobject 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
getTransactionandgetTransactionsresponses now include a top-leveleventsobject containing a disjoint breakdown of the events:
export interface TransactionEvents {
transactionEventsXdr: xdr.TransactionEvent[];
contractEventsXdr: xdr.ContractEvent[][];
}- The RPC server's
getEventsnow includes retention state information:
export interface GetEventsResponse {
// ...
oldestLedger: number;
latestLedgerCloseTime: string;
oldestLedgerCloseTime: string;
}- The RPC server's
simulateTransactionmethod now includes an optionalauthModeparameter to specify the type of authorization to simulate:
export type SimulationAuthMode = "enforce" | "record" | "record_allow_nonroot";AssembledTransaction#signAndSendnow takes awatcherargument (#1174). Thiswatcheris an abstract class with two optional methods:onSubmitted: called with the return value from thesendTransactioncall that submits the transaction to the network for processingonProgress: called with each return value ofgetTransactionthat 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.onmessagenow extendsCollectionPage(#1100). - Fix the issue of transaction submission failure in a no axios environment (#1176).
Contributors
- @scottym5797 made their first contribution in #1173
- @luchenhan made their first contribution in #1129
- @maximevtush made their first contribution in #1141
- @chadoh @kknownymouss @jeesunikim @Shaptic @kalepail @fnando @overcat
Full Changelog: v13.1.0...v14.0.0
v14.0.0-rc.3
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.getTransactionwhere eithertransactionEventsXdrand/orcontractEventsXdrmay not be present in the neweventsfield (#1186).
Full Changelog: v13.1.0...v14.0.0-rc.2
v14.0.0-rc.2: Protocol 23 Release Candidate 2
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
getTransactionandgetTransactionsresponses have dropped theevents.diagnosticEventsXdrfield (#1183):
export interface TransactionEvents {
- diagnosticEventsXdr: xdr.DiagnosticEvent[];
transactionEventsXdr: xdr.TransactionEvent[];
}Fixed
- Fixed type for Horizon streaming endpoints, namely
EventSourceOptions.onmessagenow extendsCollectionPage(#1100).
Full Changelog: v14.0.0-rc.1...v14.0.0-rc.2
v14.0.0-rc.1: Protocol 23 Release Candidate
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-baserelease notes for details and other breaking changes. - Deprecated:
getTransactionandgetTransactionstop-leveldiagnosticEventsXdrfield.
Added
- The Horizon API's
BalanceChangeobject 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
getTransactionandgetTransactionsresponses now include a top-leveleventsobject containing a disjoint breakdown of the events:
export interface TransactionEvents {
diagnosticEventsXdr: xdr.DiagnosticEvent[];
transactionEventsXdr: xdr.TransactionEvent[];
contractEventsXdr: xdr.ContractEvent[][];
}- The RPC server's
getEventsnow includes retention state information:
export interface GetEventsResponse {
// ...
oldestLedger: number;
latestLedgerCloseTime: string;
oldestLedgerCloseTime: string;
}- The RPC server's
simulateTransactionmethod now includes an optionalauthModeparameter to specify the type of authorization to simulate:
export type SimulationAuthMode = "enforce" | "record" | "record_allow_nonroot";Fixed
- Add muxed payments support for
PaymentOperationResponsetype (#1149).
New Contributors
- @luchenhan made their first contribution in #1129
Full Changelog: v13.1.0...v14.0.0-rc.1