Skip to content

v3.0.0

Latest
Compare
Choose a tag to compare
@ChiaMineJP ChiaMineJP released this 15 May 14:27
· 1 commit to main since this release
18cfeec

This version is compatible with 960f8d139940fa0814d3fac44da9a2975642f5d3 of clvm

Breaking Change

  • The type of None is now undefined (Previously it was null)
  • Removed isSExp() and isCLVMObject() since these don't exist in the Python's clvm and they brought slightly different behaviour.
  • run_program() has been deprecated. Use run_chia_program or run_clvm instead.
    Note: run_program() is still available, but it cannot handle new CHIP-0011 operators like secp256k1_verify.

Changed

  • Now op_div does not accept negative operands.
  • convert_atom_to_bytes() now is able to convert an object which has toBytes() method.
  • SExp can be initialized from LazyNode of clvm_wasm (Rust version of clvm)
  • Upgraded bls-signatures to 2.0.3
  • Upgraded npm dev dependencies
  • Replaced yarn.lock with pnpm-lock.yaml

Added

  • Added clvm_rs(clvm_wasm) support
    • Exposed run_chia_program
    • Exposed run_clvm
    • Exposed LazyNode
      • Added toJSON() method to LazyNode (This is not implemented in clvm_wasm)
    • Exposed Flag
    • Exposed serialized_length
    • Exposed node_from_bytes
  • Added asUint8Array() method to Stream
  • Added toJSON() method to Bytes
  • Added toJSON() method to SExp
  • Added tests
  • Added example code

Known Issues

  • Loading blsjs.wasm into a web browser from ESModule code requires to put the wasm file into url's root path.
    For example, when the main (compiled) js file is loaded by
    <script type='module' src="https://xxx.yyy.zzz/aaa/bbb/ccc/main.js"></script>
    blsjs.wasm will be fetched from https://xxx.yyy.zzz/blsjs.wasm.
    This is module context only. if the main js file is not on module context like
    <script defer src="https://xxx.yyy.zzz/aaa/bbb/ccc/main.js"></script>,
    blsjs.wasm will be fetched from https://xxx.yyy.zzz/aaa/bbb/ccc/blsjs.wasm.
    However, with clvm >= 3.0.0, most of bls operations run inside clvm_wasm_bg.wasm.
    So I believe you don't need to load blsjs.wasm in most cases.