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