v0.10.0
In this version we added proper debugging support for transactions and integration with the BitAuth IDE.
Thanks mainnet_pat for the initiative and significant contributions!
cashc compiler
- ✨ Add
console.log()statements for debugging. - ✨ Extend
require()statements to allow custom error messages for debugging. - 🛠️ Update artifact format to allow for new debugging features.
- 🛠️ Update dependencies to new major versions.
CashScript SDK
- ✨ Add support for transaction evaluation and debugging using libauth templates.
transaction.debug()&transaction.bitauthUri()- Output BitAuth IDE URI for debugging when transaction is rejected.
- ✨ Add
MockNetworkProviderto simulate network interaction for debugging and testing.- Add
randomUtxo(),randomToken()andrandomNft()functions to generate dummy UTXOs for testing.
- Add
- ✨ Add CashScript Jest utilities for automated testing.
expect(transaction).toLog(message)expect(transaction).toFailRequire()expect(transaction).toFailRequireWith(message)
- 🐛 Fix bug with type exports.
- 🛠️ Update visibility of several classes.
- Make
artifact,networkProvider,addressTypeandencodedConstructorArgspublic onContractclass. - Make
contract,abiFunction,encodedFunctionArgs,inputsandoutputspublic onTransactionclass. - Make
networkProvider,inputsandoutputspublic onTransactionBuilderclass. - Make
privateKeypublic onSignatureTemplateclass and addgetSignatureAlgorithm()method.
- Make
- 🛠️ Improve some error messages.
- 🛠️ Add new
FailedRequireError,FailedTransactionEvaluationErrorandFailedTransactionErrorclasses. - 💥 BREAKING: Remove exported transaction error
Reasonenum +FailedTimeCheckErrorandFailedSigCheckErrorclasses in favour of the new error classes. - 💥 BREAKING: Remove all deprecated references to
meepincludingmeepstrings from errors andtransaction.meep(). - 💥 BREAKING: Separate the
Argumenttype intoFunctionArgumentandConstructorArgumentand renameencodeArgumenttoencodeFunctionArgument.
https://twitter.com/CashScriptBCH/status/1833454128426615174