Skip to content

v17.5.0

Latest

Choose a tag to compare

@Ryang-21 Ryang-21 released this 02 Dec 21:28
c5707a8

v17.5.0

Added

  • rpc.inspectDiagnosticEvents() returns the diagnostic events of a sendTransaction, getTransaction, simulateTransaction or getTransactions response, with topics and data as native values (#1917).
  • inspectTransaction() decodes a Transaction or FeeBumpTransaction into a typed summary to show before signing: the source, memo, fees and each operation, with its Soroban authorization entries (#1881).
  • contract.Client.invoke(client, name, args?, options?) builds a call to a contract function by its on-chain name. It also reaches a function that has no client method because its name is reserved or shared (#1875).
  • rpc.Server.getContractMethods() reports the client method of each function in clientMethod, or why there is none in noMethodReason (#1875).
  • rpc.inspectChargedFees() reports the fees that a landed transaction declared and was charged, from a getTransaction or getTransactions response: the inclusion fee, the Soroban resource fee by part, and the refund (#1894).
  • The stellar-js generate CLI and the stellar-contract-bindings-typescript plugin accept the --network-passphrase, --id and --rpc-header flags of the native stellar contract bindings typescript command (#1897).
  • Bindings generated from --contract-id export networks, with the contract ID and network passphrase, as the native bindings do. BindingGenerator.generate() takes the new optional contractId and networkPassphrase options for this (#1897).
  • The bindings CLI warns about each contract function without a method in the generated Client. BindingGenerator.generate() returns these functions in the new functionDiagnostics field (#1896).
  • SorobanEvent: the type of each event that humanizeEvents() returns is now exported (#1931).

Changed

  • Updated the production smol-toml dependency from ^1.6.1 to ^1.9.1, which fixes a slow parse() that a hostile stellar.toml can trigger (GHSA-r4xh-jqrq-34v2). Some parse errors from StellarToml.Resolver.resolve() have new wording (#1887).

Deprecated

  • The --headers <json> flag of the stellar-js generate CLI and the stellar-contract-bindings-typescript plugin is deprecated in favor of --rpc-header "Name: value". It still works and prints a warning (#1897).

Fixed

  • WebAuth.verifyChallengeTxThreshold() ignores signers with zero weight (#1936).
  • A contract.Client method call, contract.Client.invoke() and rpc.Server.queryContract() build the map of contract error messages in linear time. Before, a spec with many error cases blocked the event loop for seconds on each call (#1925).
  • scValToNative() and humanizeEvents() keep the error type of an scvError that is not a contract error, in the new errorType field, for example "sceStorage". A deep equality assertion or a snapshot of the result now sees the extra field (#1918).
  • rpc.Server, contract.Client and AssembledTransaction use the global Config.setAllowHttp() flag when the allowHttp option is not set, as Horizon.Server does. Before, they refused an http: URL unless the option was true (#1922).
  • XDR encoding and decoding allow 1550 levels of nesting, up from 1500. Before, LedgerCloseMetaBatch.fromXDR() threw "max recursion depth 1500 exceeded" for some ledgers that stellar-core accepts (#1902).
  • Spec.parseEvent() and the parseEvent() method of generated bindings prefer the declaration that fits an event's topics and data exactly. Before, the first declaration that fit loosely won, so the data { amount, memo } parsed as Mint { amount } when Mint came before MintMemo. A map declaration no longer matches when a key is missing, except for an Option, () or Val param (#1900).
  • The --headers <json> flag of the stellar-js generate CLI and the stellar-contract-bindings-typescript plugin rejects JSON that is not an object of valid header names and string values. The error no longer prints the JSON, since it may hold a secret (#1897).
  • Spec finds a function or a UDT when another entry with the same name comes before it in the spec. Before, contract.Client construction threw "is not a function", and UDT conversion threw "failed to parse udt" (#1871).
  • WebAuth.verifyChallengeTxThreshold() no longer adds a stray " to the end of its "do not meet threshold" error message (#1871).
  • rpc.Server.getClaimableBalance() throws a TypeError for an ID that contains non-hex characters or more than 72 hex characters. Before, the decoder threw an XdrError (#1847).
  • Horizon.Server.liquidityPools().liquidityPoolId() throws its TypeError for an ID that is not exactly 64 hex characters. Before, it accepted any string that contained 64 hex characters (#1849).
  • Horizon streams update the cursor only from a paging_token that is a string. Before, an object token threw an uncaught exception or set the cursor to [object Object] (#1870).
  • contract.Client and the generated bindings attach no method for two contract functions that map to one method name, such as delete and delete_. Before, a call to the earlier function went to the later one. Call each by its on-chain name with contract.Client.invoke(). Generated bindings also no longer write a duplicate fromJson key when a function name appears twice in a spec (#1875).
  • contract.Client and the generated bindings no longer attach a contract function whose method name is reserved, such as options, then, toJSON, txFromXDR or toString. Before, the function replaced the client member, so await Client.from() called a contract's then function. Call such a function with contract.Client.invoke() (#1875).
  • rpc.Server.queryContract() no longer reads call options from args for a function with no inputs. Before, args such as { contractId, method } made the query simulate another function or another contract (#1875).
  • StellarToml.Resolver.resolve() strips trailing / and \ from the domain in linear time. Before, a long run of separators could block the event loop for seconds (#1923).
  • The Invalid domain error of StellarToml.Resolver.resolve() shows at most the first 256 characters of the domain. Before, it showed the full input (#1923).

Full Changelog: v17.4.0...v17.5.0