v3.3.0 stellar-rpc v27.1 support
Summary
This release adds support for the stellar-rpc v27.1 API: the useUpgradedAuth
simulateTransaction flag and the new getHealth ledger close-time fields. It also
fixes automatic state restore, Soroban fee-bump fee math, SEP-10 challenge
validation, and XDR uint32 decoding, adds SorobanServer injection to the
contract-client entry points, updates the contract-binding test fixtures for the
next release of the community bindings generator
(stellar-contract-bindings),
and refreshes CI dependencies.
simulateTransaction useUpgradedAuth flag (#159)
New optional useUpgradedAuth flag on SimulateTransactionRequest and, for the
contract-client path, on MethodOptions. When set, recording-mode simulation on a
supporting RPC (stellar-rpc v27.1.0+) returns ADDRESS_V2 credential entries
(Protocol 27, CAP-71) instead of legacy ADDRESS entries. The key is omitted from
the JSON-RPC params when false (the default); servers without support silently
ignore it and return legacy entries — detect support by inspecting the credential
arm of the returned entries. Additive and opt-in; existing call sites are
unaffected.
getHealth ledger close times (aea7b1d)
GetHealthResponse gains latestLedgerCloseTime and oldestLedgerCloseTime, the
unix timestamps (seconds) at which the latest and oldest ledgers closed, returned
by stellar-rpc v27.1.0+. The values are exposed as strings, consistent with the
close-time field on SendTransactionResponse. On older servers the fields are
absent from the response and parse as null.
Bug fixes (#158, 1b37927)
- Automatic state restore (
AssembledTransaction.simulatewithrestore: true):
a successful restore no longer throws "Automatic restore failed"; the
transaction is rebuilt with the bumped sequence number and re-simulated,
keeping its original operation and configured fee, and the restore
transaction's own simulation is awaited before signing. FeeBumpTransactionBuilder.setBaseFeefor Soroban transactions: the inner
transaction's resource fee is excluded from the per-operation rate check and
added once to the total (baseFee * (operations + 1) + resourceFee); the
minimum rate for inner fees not divisible by the operation count is rounded up.- SEP-10
validateChallenge: the first operation's data value is validated as
required by the spec (present, 64 bytes, base64-decoding to a 48-byte nonce);
non-compliant challenges now fail with a challenge validation error instead of
an unhandledTypeError. - XDR decoding of
unsigned int(uint32) values: values of 2^31 or greater no
longer decode as negative numbers, correct across native and web (dart2js)
platforms.
API additions (#158)
ClientOptions, InstallRequest and DeployRequest accept an optional server
parameter with a preconfigured SorobanServer, used for all RPC calls instead of
constructing one from rpcUrl. This allows reusing a single RPC connection
across operations and injecting custom HTTP client configurations.
Contract-binding fixtures and tests (#157)
The checked-in fixtures for the community bindings generator are regenerated for
the generator's next release, and two new fixtures with testnet integration tests
verify that the generated Dart code runs correctly:
BindingsSpecTestContract, generated from the generator repository's
reference contract, covers the entire contract-spec type surface.OptionShapesContractcovers option values in nested positions and the
Dart-keyword-escapeddefaultmethod.