Repository navigation
v17.5.0
Added
rpc.inspectDiagnosticEvents()returns the diagnostic events of asendTransaction,getTransaction,simulateTransactionorgetTransactionsresponse, with topics and data as native values (#1917).inspectTransaction()decodes aTransactionorFeeBumpTransactioninto 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 inclientMethod, or why there is none innoMethodReason(#1875).rpc.inspectChargedFees()reports the fees that a landed transaction declared and was charged, from agetTransactionorgetTransactionsresponse: the inclusion fee, the Soroban resource fee by part, and the refund (#1894).- The
stellar-js generateCLI and thestellar-contract-bindings-typescriptplugin accept the--network-passphrase,--idand--rpc-headerflags of the nativestellar contract bindings typescriptcommand (#1897). - Bindings generated from
--contract-idexportnetworks, with the contract ID and network passphrase, as the native bindings do.BindingGenerator.generate()takes the new optionalcontractIdandnetworkPassphraseoptions 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 newfunctionDiagnosticsfield (#1896). SorobanEvent: the type of each event thathumanizeEvents()returns is now exported (#1931).
Changed
- Updated the production
smol-tomldependency from^1.6.1to^1.9.1, which fixes a slowparse()that a hostilestellar.tomlcan trigger (GHSA-r4xh-jqrq-34v2). Some parse errors fromStellarToml.Resolver.resolve()have new wording (#1887).
Deprecated
- The
--headers <json>flag of thestellar-js generateCLI and thestellar-contract-bindings-typescriptplugin 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.Clientmethod call,contract.Client.invoke()andrpc.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()andhumanizeEvents()keep the error type of anscvErrorthat is not a contract error, in the newerrorTypefield, for example"sceStorage". A deep equality assertion or a snapshot of the result now sees the extra field (#1918).rpc.Server,contract.ClientandAssembledTransactionuse the globalConfig.setAllowHttp()flag when theallowHttpoption is not set, asHorizon.Serverdoes. Before, they refused anhttp:URL unless the option wastrue(#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 theparseEvent()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 asMint { amount }whenMintcame beforeMintMemo. Amapdeclaration no longer matches when a key is missing, except for anOption,()orValparam (#1900).- The
--headers <json>flag of thestellar-js generateCLI and thestellar-contract-bindings-typescriptplugin 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). Specfinds a function or a UDT when another entry with the same name comes before it in the spec. Before,contract.Clientconstruction 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 aTypeErrorfor an ID that contains non-hex characters or more than 72 hex characters. Before, the decoder threw anXdrError(#1847).Horizon.Server.liquidityPools().liquidityPoolId()throws itsTypeErrorfor 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_tokenthat is a string. Before, an object token threw an uncaught exception or set the cursor to[object Object](#1870). contract.Clientand the generated bindings attach no method for two contract functions that map to one method name, such asdeleteanddelete_. Before, a call to the earlier function went to the later one. Call each by its on-chain name withcontract.Client.invoke(). Generated bindings also no longer write a duplicatefromJsonkey when a function name appears twice in a spec (#1875).contract.Clientand the generated bindings no longer attach a contract function whose method name is reserved, such asoptions,then,toJSON,txFromXDRortoString. Before, the function replaced the client member, soawait Client.from()called a contract'sthenfunction. Call such a function withcontract.Client.invoke()(#1875).rpc.Server.queryContract()no longer reads call options fromargsfor a function with no inputs. Before,argssuch 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 domainerror ofStellarToml.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