- fix
Rts.utxo(addr)implementaion in BCH-JS backen that was using old BITBOX REST endpoint.
This is a minor feature release focusing on SDK improvements. See migration guide in docs for details.
- Decoupling compiler from runtime. While the compiler stays in SDK package, the components for working with compiled contracts moved to RTS.
- Decoupling RTS from BITBOX, which is now just one of available backends for RTS.
- Introducing BCH-JS support as another (and recommended) backend for RTS.
- Introducing Portable format - compilation output that can be loaded by RTS without the need for compiler.
- All JS packages are moved to
@spednscope on npmjs:@spedn/cli,@spedn/rts,@spedn/rts-bitbox,@spedn/rts-bchjs,@spedn/sdk. - For better npm tooling support, JS packages use SemVer, while the project as a whole stays with Haskell PVP. So for
MAJOR.major.minor.patchrelease, the JS package will beMAJORmajor.minor.patch.
This is 15th May 2020 hard-fork compatibility update with some new features
- Introducing
reverseBytessupport. - Introducing tuple literals, for example
(1, "abc"), and ability to create type aliases for tuple types. - One such alias is
TxStatewhich is a 10-tuple containing transaction preimage components. - You can get a
TxStateby callingparseon a variable ofPreimagetype. - Introducing functions extracting a single component of the preimage.
- fixed issues with compiling large source code files in JavaScript version [thanks to Tobias Ruck for reporting]
- improved accuracy of type error messages in concatenation (
a . b) expressions [thanks to emergent_reasons for reporting]
- fix SDK bug in validation of Buffer passed as a
[byte]argument [thanks to read.cash for noticing] - allow to pass a string as a
[byte]argument (it will by converted to a Buffer encoded in UTF-8) [thanks to read.cash for inspiration]
This is 15th Nov 2019 hard-fork compatibility update with a bunch of breaking changes and new features.
- Introducing an array type with syntax
[type; length], for example[Sig; 3] signatures, [byte; 10] message. The compiler type-checks the lengths so for example a type ofmessage . messageexpression will be inferred as[byte; 20]. - Syntax for tuple assignment now allows its items to be of different type:
(int a, Sig b, PubKey c) = expr; - Array elements can be accessed with
x[i]syntax. - Introducing a
bittype. In practice only arrays of bits are useful, as they represent a type ofcheckbitsargument in thecheckMultiSigfunction which was upgraded for Schnorr support. Bit array literal is also introduced, ex.[bit; 5] checkbits = 0b00110. - As mentioned -
checkMultiSigaccepts an additionalcheckbitsargument, as described in Nov 15 hard-fork spec. - For a byte array of unknown size there is
[byte]type which replaces the formerbintype. - Introducing (UTF-8) string literals, ex.
[byte] message = "Hello, World";. - Introducing custom type declarations (type aliases) which can be placed before contract declarations and then used as any other type in the contract.
Ex.
type Message = [byte; 10];. Actually,Sig,DataSig,PubKey,Ripemd160,Sha1,Sha256,TimeandTimeSpanare defined internally as aliases. - Introducing
separator;statement that compiles toOP_CODESEPARATOR. - Introducing
fail;statement that compiles toOP_RETURN. - Introducing
checkSize(x)function that returnstrueif the runtime size of a byte array matches the declared type. - Variable names can now contain underscores, ex.
[byte] my_string.
- fix bug with final
elsestatement generating unnecessaryOP_NIP.
- fix bug with
fstandsndfunctions dupicationgOP_SPLIT
- fix bug with stack tracking after
if[thanks to Jonathan Silverblood for reporting] - use Schnorr signatures in
SigningContext.signData()