Skip to content

Releases: CashScript/cashscript

v0.8.2

27 Sep 10:16
Compare
Choose a tag to compare

CashScript SDK

  • 🐛 Fix bug with Vite build.
  • ✨ Expose ElectrumNetworkProvider#performRequest to allow raw Electrum requests if needed.

v0.8.1

13 Jun 12:42
Compare
Choose a tag to compare

CashScript SDK

  • 🐛 Fix bug where a different property order of NFT inputs/outputs would cause errors. (see #149)

v0.8.0

26 May 12:58
Compare
Choose a tag to compare

⚠️ From v0.8.0 onwards, CashScript is a Pure ESM package. This means that you can no longer use 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,nftCommitmentand tokenAmountfor both in- and outputs).
  • ✨ Add LockingBytecodeP2SH32 to generate the new P2SH32 standard locking script.
  • 🐛 Fix optimisation bug that caused OP_0NOTEQUAL to be applied to non-integer values.
  • 💥 BREAKING: Move to Pure ESM.
  • 💥 BREAKING: Rename LockingBytecodeP2SH to LockingBytecodeP2SH20 - but it is recommended to change over to the new P2SH32 for security reasons.

CashScript SDK

  • ✨ Add support for CashTokens.
    • .to() now takes a token parameter that can be used to send CashTokens.
    • UTXOs that are retrieved with contract.getUtxos() include a token field if they are token UTXOs.
    • UTXOs that are passed into .from() can also include this token field to send tokens.
    • Add .withoutTokenChange() to disable automatic token change outputs.
    • Note that only the ElectrumNetworkProvider supports CashTokens at this time.
    • Note that NFTs do not support automatic UTXO selection
  • ✨ Add contract.tokenAddress to 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.
  • 💥 BREAKING: Move to Pure ESM.
  • 💥 BREAKING: Remove "testnet" & "staging" network options.
  • 💥 BREAKING: contract.address returns p2sh32 address by default, this can be configured to be p2sh20 on contract initialization.
  • 💥 BREAKING: Move the configuration of the network provider to an options object on contract initialization.
  • 💥 BREAKING: Use bigint rather than number for all instances of "script numbers" (e.g. function arguments) and satoshi amounts.
  • 💥 BREAKING: Replace contract.getRedeemScriptHex() with contract.bytecode.
  • 💥 BREAKING: Remove BitboxNetworkProvider.
  • 💥 BREAKING: All signature templates use SIGHASH_ALL | SIGHASH_UTXOS now, this new default can be overwritten in the constructor of the SignatureTemplate.

v0.7.5

28 Dec 16:56
Compare
Choose a tag to compare

CashScript SDK

  • 🐛 Fix a bug with chipnet connection

v0.7.4

05 Dec 19:52
Compare
Choose a tag to compare

cashc compiler

CashScript SDK

v0.7.3

14 Nov 16:12
39a835a
Compare
Choose a tag to compare

CashScript SDK

  • ✨ Add "chipnet" network option to ElectrumNetworkProvider, used to connect to the May 2023 testnet.
  • 🛠️ Renamed network options "testnet" & "staging" to "testnet3" and "testnet4" respectively. Old options will be removed in a future release.

v0.7.2

14 Jul 12:25
Compare
Choose a tag to compare

cashc compiler

  • 🐛 Fix bug where contracts using checkMultiSig() were unspendable.

CashScript SDK

  • ✨ Add signatureAlgorithm parameter to SignatureTemplate to allow ECDSA signatures.

v0.7.1

12 Jun 16:07
Compare
Choose a tag to compare

@cashscript/utils

  • 🐛 Fix bug where 64bit integers could not be decoded.

v0.7.0

24 May 12:04
ebbbcc4
Compare
Choose a tag to compare

cashc compiler

  • ✨ Add destructuring assignments, e.g. bytes2 left, bytes1 right = 0x123456.split(2) (authored by @nathanielCherian in #101)
  • ✨ Add constant keyword, 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 sig to datasig casting 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 datasig must be 64 bytes in length, effectively enforcing Schnorr
  • 🐛 Fix ESM build (authored by @bitjson in #123)
  • 🐛 Small fixes

https://twitter.com/RoscoKalis/status/1529072055756414976

v0.7.0-next.0

17 Dec 09:35
Compare
Choose a tag to compare
v0.7.0-next.0 Pre-release
Pre-release

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 sig to datasig casting 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 datasig must be 64 bytes in length, effectively enforcing Schnorr
  • 🐛 Small fixes