v12.2.0
Fixed
@stellar/stellar-base
and its underlying dependency@stellar/js-xdr
have been upgraded to their latest versions; reference their release notes (v12.1.0 and v3.1.2, respectively) for details (#1013).
Added
- You can now pass custom headers to both
rpc.Server
andHorizon.Server
(#1013):
import { Server } from "@stellar/stellar-sdk/rpc";
const s = new Server("<some URL>", { headers: { "X-Custom-Header": "hello" }})
Horizon.Server
now supports the newPOST /transactions_async
endpoint via thesubmitAsyncTransaction
method (#989). Its purpose is to provide an immediate response to the submission rather than waiting for Horizon to determine its status. The response schema is as follows:
interface SubmitAsyncTransactionResponse {
// the submitted transaction hash
hash: string;
// one of "PENDING", "DUPLICATE", "TRY_AGAIN_LATER", or "ERROR"
tx_status: string;
// a base64-encoded xdr.TransactionResult iff `tx_status` is "ERROR"
error_result_xdr: string;
}
rpc.Server
now has agetFeeStats
method which retrieves fee statistics for a previous chunk of ledgers to provide users with a way to provide informed decisions about getting their transactions included in the following ledgers (#998):
export interface GetFeeStatsResponse {
sorobanInclusionFee: FeeDistribution;
inclusionFee: FeeDistribution;
latestLedger: number; // uint32
}
interface FeeDistribution {
max: string; // uint64
min: string; // uint64
mode: string; // uint64
p10: string; // uint64
p20: string; // uint64
p30: string; // uint64
p40: string; // uint64
p50: string; // uint64
p60: string; // uint64
p70: string; // uint64
p80: string; // uint64
p90: string; // uint64
p95: string; // uint64
p99: string; // uint64
transactionCount: string; // uint32
ledgerCount: number; // uint32
}
New Contributors
- @celestialkylin made their first contribution in #988
- @aditya1702 made their first contribution in #989
- @kanwalpreetd made their first contribution in #1008
Full Changelog: v12.1.0...v12.2.0