v0.11.0
v0.11.0
Fixed
- The
SimulateTransactionResponse
's error field now has the correct type (that is,string
: #123). - Many irrelevant or unused dependencies have been eliminated (such as
eventsource
,lodash
, and others), lowering overall bundle size (#126).
Added
- A new
ContractSpec
class to facilitate building native JavaScript structures from custom contract types. Given a specification for the data structure (i.e.xdr.ScSpecEntry[]
), it will interpret the values via the specified type (#115).
Breaking Changes
- The minimum supported NodeJS version is now Node 16.
Server.prepareTransaction
now returns aTransactionBuilder
instance rather than an immutableTransaction
, in order to facilitate modifying your transaction after assembling it alongside the simulation response (#127).- The intent is to avoid cloning the transaction again (via
TransactionBuilder.cloneFrom
) if you need to modify parameters such as the storage access footprint. - To migrate your code, just call
.build()
on the return value.
- The intent is to avoid cloning the transaction again (via
- The RPC response schemas for simulation (see
Server.simulateTransaction()
) have been upgraded to parse the base64-encoded XDR automatically. The full interface changes are in the pull request (#127), but succinctly:SimulateTransactionResponse
->RawSimulateTransactionResponse
SimulateHostFunctionResult
->RawSimulateHostFunctionResult
- Now,
SimulateTransactionResponse
andSimulateHostFunctionResult
include the full, decoded XDR structures instead of raw, base64-encoded strings for the relevant fields (e.g.SimulateTransactionResponse.transactionData
is now an instance ofSorobanDataBuilder
,events
is now anxdr.DiagnosticEvent[]
[try outhumanizeEvents
for a friendlier representation of this field]). - The
SimulateTransactionResponse.results[]
field has been moved toSimulateTransactionResponse.result?
, since there will always be exactly zero or one result.
- The
GetTransactionStatus
is now anenum
with actual values rather than atype
(#129). - The RPC response schemas for retrieving transaction details (
Server.getTransaction()
) have been upgraded to parse the base64-encoded XDR automatically. The full interface changes are in the pull request (#129), but succinctly:GetTransactionResponse
->RawGetTransactionResponse
GetTransactionResponse
is now one ofGetSuccessfulTransactionResponse | GetFailedTransactionResponse | GetMissingTransactionResponse
, which gives proper typing to the interface depending on the response'sstatus
field.- All of the
*Xdr
properties are now full, decoded XDR structures. - There is a new
returnValue
field which is a decodedxdr.ScVal
, present iff the transaction was a successful Soroban function invocation.
Not all schemas have been broken in this manner in order to facilitate user feedback on this approach. Please add your 👍 or 👎 to #128 to vote on whether or not we should do this for the other response schemas.
Full Changelog: v0.10.1...v0.11.0