Skip to content

v12.2.0

Compare
Choose a tag to compare
@Shaptic Shaptic released this 19 Jul 21:03
· 35 commits to master since this release
41c03ec

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 and Horizon.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 new POST /transactions_async endpoint via the submitAsyncTransaction 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 a getFeeStats 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

Full Changelog: v12.1.0...v12.2.0