Releases: CashScript/cashscript
Releases · CashScript/cashscript
v0.6.1
v0.6.0
cashc compiler
- ✨ Add date literal (gets converted to int timestamp) (authored by @nathanielCherian through #90)
- 🛠️ Update ParseError messages
- 🐛 The final statement in a contract now MUST be a require statement (in all branches)
- 🐛 Empty contracts and functions are now considered invalid
- 🐛 Fix bug where certain covenants could become unspendable due to incorrect bytesize calculation
- 💥 BREAKING: Covenants using
tx.bytecode
now include a placeholderOP_NOP
that gets replaced when constructor arguments are provided in the CashScript SDK. If you're not using the CashScript SDK, refer to thereplaceBytecodeNop()
function to see the steps required to do so manually.
- 💥 BREAKING: Covenants using
- 💥 BREAKING: Remove
--args
parameter from the CLI, since this is too error prone with the recent changes in mind - 💥 BREAKING: Restructure exports
CashScript SDK
- ✨ Add BitcoinRpcNetworkProvider that connects to a BCH node RPC (authored by @blockparty-sh through #89)
- 💥 Remove dependency on
cashc
and removeCashCompiler
export
@cashscript/utils
- 🎉 Publish package with CashScript utilities
- 🚨 Add tests
v0.5.7
v0.5.6
v0.5.5
v0.5.4
v0.5.3
v0.5.2
v0.5.1
CashScript SDK
- ✨ The
.send()
function now returns aTransactionDetails
object. This extends the libauthTransaction
with addedtxid
andhex
fields.- Because it extends the previous return type, this is backwards compatible.
- Since this now returns the transaction hex as a field, using
.send(true)
to return the transaction hex is deprecated and will be removed in a future release.
- 🐛 Improve reliability of the
ElectrumNetworkProvider
when sending multiple concurrent requests.
v0.5.0
cashc compiler
- 🛠️ Replace BITBOX with Libauth.
CashScript SDK
CashScript used to be very tightly coupled with BITBOX. This proved to be problematic after maintenance for BITBOX was stopped. The main objective of this update is to allow CashScript to be used with many different BCH libraries.
- ✨ Add
withoutChange()
function to disable change outputs for a transaction. - ✨
SignatureTemplate
can now be used with BITBOX keypairs,bitcore-lib-cash
private keys, WIF strings, and raw private key buffers, rather than only BITBOX. - 💥 Remove
Sig
alias forSignatureTemplate
that was deprecated in v0.4.1. - 💥 BREAKING: Refactor contract instantiation flow
- A contract is now instantiated by providing a compiled artifact, constructor arguments and an optional network provider.
- Anyone can implement the NetworkProvider interface to create a custom provider. The CashScript SDK offers three providers out of the box: one based on electrum-cash (default), one based on FullStack.cash' infrastructure, and one based on BITBOX. See the NetworkProvider docs for details.
- See the migration notes for details on migrating from the old contract instantiation flow.
- 💥 BREAKING: Remove the artifacts
'networks'
field and.deployed()
functionality, This proved to be confusing and is better suited to be handled outside of the CashScript SDK. - 💥 BREAKING:
.send()
now returns a libauth Transaction instead of a BITBOX Transaction object. Alternatively araw
flag can be passed into the function to return a raw hex string. - 🛠️ Removed BITBOX as a dependency in favour of libauth for utility functions.