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. - ✨
SignatureTemplatecan now be used with BITBOX keypairs,bitcore-lib-cashprivate keys, WIF strings, and raw private key buffers, rather than only BITBOX. - 💥 Remove
Sigalias forSignatureTemplatethat 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 arawflag can be passed into the function to return a raw hex string. - 🛠️ Removed BITBOX as a dependency in favour of libauth for utility functions.