Migration to 9.0.0
This guide describes all breaking changes introduced with v9.0.0
.
drop waitMined
static method
waitMined
static methodIf you used it like
then you have to rewrite it using Stamp composition
or pass it to specific methods, like
or even
drop assertedType
, use decode
instead
assertedType
, use decode
insteadIf you used it like
then you have to rewrite it using decode
method
validator: recursive validator, simplify schema
Instead of TransactionValidator
stamp use verifyTransaction
function. The function accepts a transaction, and a Node instance for validation (instead of network id), it doesn't return an unpacked transaction anymore, just an array of errors. Each error contains a verbose message
(msg
before), unique key
(for easy comparison), checkedKeys
array (txKey
before). Using node
instead of networkId
allows to ensure transaction validation, so warnings are errors now (type
field removed).
SCHEMA
doesn't contain validation schema anymore. This wasn't supposed to be used by external developers.
simplify buildTxHash helper
If you used buildHash
like
then use
If you used it with a falsy raw
then
buildTxHash
don't have raw
switch anymore, it returns th_
-encoded string in all cases, but it still accepts transactions as a string and as a buffer.
enable verification in deep props instead of extra variable
If you were passing verifyTx: false
to sdk factory then use verify: false
instead.
Last updated