Releases: CashScript/cashscript
Releases · CashScript/cashscript
v0.8.0
require() to import cashscript or cashc.
This release also contains several breaking changes, please refer to the migration notes for more information.
cashc compiler
- ✨ Add support for the new CashTokens introspection functionality (
tokenCategory,nftCommitmentandtokenAmountfor both in- and outputs). - ✨ Add
LockingBytecodeP2SH32to generate the new P2SH32 standard locking script. - 🐛 Fix optimisation bug that caused
OP_0NOTEQUALto be applied to non-integer values. - 💥 BREAKING: Move to Pure ESM.
- 💥 BREAKING: Rename
LockingBytecodeP2SHtoLockingBytecodeP2SH20- but it is recommended to change over to the new P2SH32 for security reasons.
CashScript SDK
- ✨ Add support for CashTokens.
.to()now takes atokenparameter that can be used to send CashTokens.- UTXOs that are retrieved with
contract.getUtxos()include atokenfield if they are token UTXOs. - UTXOs that are passed into
.from()can also include thistokenfield to send tokens. - Add
.withoutTokenChange()to disable automatic token change outputs. - Note that only the
ElectrumNetworkProvidersupports CashTokens at this time. - Note that NFTs do not support automatic UTXO selection
- ✨ Add
contract.tokenAddressto get the token-enabled address of a contract. - ✨ Add
fromP2PKH()to add P2PKH inputs to a smart contract transaction.- Note: this was in the SDK before as
experimentalFromP2PKH(). It has now been released as an official feature.
- Note: this was in the SDK before as
- 💥 BREAKING: Move to Pure ESM.
- 💥 BREAKING: Remove
"testnet"&"staging"network options. - 💥 BREAKING:
contract.addressreturnsp2sh32address by default, this can be configured to bep2sh20on contract initialization. - 💥 BREAKING: Move the configuration of the network provider to an options object on contract initialization.
- 💥 BREAKING: Use
bigintrather thannumberfor all instances of "script numbers" (e.g. function arguments) and satoshi amounts. - 💥 BREAKING: Replace
contract.getRedeemScriptHex()withcontract.bytecode. - 💥 BREAKING: Remove
BitboxNetworkProvider. - 💥 BREAKING: All signature templates use
SIGHASH_ALL | SIGHASH_UTXOSnow, this new default can be overwritten in the constructor of theSignatureTemplate.
v0.7.5
v0.7.4
cashc compiler
- 🛠️ Internal refactoring (authored by @nathanielCherian in #127)
CashScript SDK
- 🐛 Fix a bug with ESM exports (authored by @mainnet-pat in #135)
v0.7.3
v0.7.2
v0.7.1
v0.7.0
cashc compiler
- ✨ Add destructuring assignments, e.g.
bytes2 left, bytes1 right = 0x123456.split(2)(authored by @nathanielCherian in #101) - ✨ Add
constantkeyword, e.g.int constant x = 10;(authored by @nathanielCherian in #119) - ✨ Add multiplication, e.g.
int x = 5 * 5 - ✨ Add native introspection/covenants
- 💥 BREAKING: Remove all old introspection/covenant functionality (
tx.version,tx.hashPrevouts,tx.hashSequence,tx.outpoint,tx.bytecode,tx.value,tx.sequence,tx.hashOutputs,tx.locktime,tx.hashtype,OutputP2PKH,OutputP2SH,OutputNullData)- See the migration notes for details on migrating from the old introspection to the new native introspection methods.
- 💥 BREAKING: Remove
sigtodatasigcasting since this was only useful for old covenants - 🐛 Fix ESM build (authored by @bitjson in #123)
CashScript SDK
- ✨ Add
"staging"network option to ElectrumNetworkProvider, used to connect to the staging testnet if it exists - 🛠️ Deprecate old introspection/covenant functionality. You can still use pre-0.7 contracts with the new SDK, but this support will be removed in a future release.
- 💥 BREAKING: arguments of type
datasigmust be 64 bytes in length, effectively enforcing Schnorr - 🐛 Fix ESM build (authored by @bitjson in #123)
- 🐛 Small fixes
v0.7.0-next.0
cashc compiler
- ✨ Add destructuring assignments, e.g.
bytes2 left, bytes1 right = 0x123456.split(2)(authored by @nathanielCherian in #101) - ✨ Add multiplication, e.g.
int x = 5 * 5 - ✨ Add native introspection/covenants
- 💥 BREAKING: Remove all old introspection/covenant functionality (
tx.version,tx.hashPrevouts,tx.hashSequence,tx.outpoint,tx.bytecode,tx.value,tx.sequence,tx.hashOutputs,tx.locktime,tx.hashtype,OutputP2PKH,OutputP2SH,OutputNullData)- See the migration notes for details on migrating from the old introspection to the new native introspection methods.
- 💥 BREAKING: Remove
sigtodatasigcasting since this was only useful for old covenants
CashScript SDK
- ✨ Add
"staging"network option to ElectrumNetworkProvider, used to connect to the May 2022 testnet - 🛠️ Deprecate old introspection/covenant functionality. You can still use pre-0.7 contracts with the new SDK, but this support will be removed in a future release.
- 💥 BREAKING: arguments of type
datasigmust be 64 bytes in length, effectively enforcing Schnorr - 🐛 Small fixes