diff --git a/CHANGELOG.md b/CHANGELOG.md index c1671b3..1de2789 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,20 +4,20 @@ This version is compatible with [`960f8d139940fa0814d3fac44da9a2975642f5d3`](https://github.com/Chia-Network/clvm/tree/960f8d139940fa0814d3fac44da9a2975642f5d3) of [clvm](https://github.com/Chia-Network/clvm) ### Breaking Change - The type of `None` is now `undefined` (Previously it was `null`) -- Removed `isSExp()` and `isCLVMObject()` since this doesn't exist in the Python's `clvm` and it brought slightly different behaviour. +- Removed `isSExp()` and `isCLVMObject()` since these don't exist in the Python's `clvm` and they brought slightly different behaviour. ### 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 npm dev dependencies ### Added -- Added `clvm_rs` support - - Added `run_chia_program` - - Added `run_clvm` - - Added `LazyNode` - - Added `Flag` - - Added `serialized_length` - - Added `node_from_bytes` +- Added `clvm_rs`(`clvm_wasm`) support + - Exposed `run_chia_program` + - Exposed `run_clvm` + - Exposed `LazyNode` + - Exposed `Flag` + - Exposed `serialized_length` + - Exposed `node_from_bytes` - Added `asUint8Array()` method to `Stream` - Added tests diff --git a/README.md b/README.md index 777ed2e..2c5801e 100644 --- a/README.md +++ b/README.md @@ -71,11 +71,8 @@ you need to put `blsjs.wasm` to the same directory as the code who loads `clvm`. If you use [React](https://reactjs.org/), copy `blsjs.wasm` and `clvm_wasm_bg.wasm` into `/public/static/js/` folder. It automatically copies wasm file next to main js file. **Note1** -Don't forget to wait `clvm.initialize()` if you are not sure whether `pubkey_for_exp`/`point_add` will be called. +Don't forget to wait `clvm.initialize()`. **Note2** -If you're really sure that `pubkey_for_exp`/`point_add` will never be called, then you can opt out `blsjs.wasm` and `await clvm.initialize()`. -If so, you can make your code fully synchronous. -**Note3** Redistributing your project with bundled `blsjs.wasm` and/or `clvm_wasm_bg.wasm` must be compliant with Apache2.0 License provided by [Chia-Network](https://github.com/Chia-Network/bls-signatures/blob/main/LICENSE) ### Browser compatibility @@ -96,8 +93,8 @@ Just copy and paste below to your `package.json` and you can avoid a lot of runt "and_chr >= 67", "and_ff >= 68", "samsung >= 9.2", - "node >= 10.4.0", - "electron >= 4.0.0" + "node >= 18.0.0", + "electron >= 23.0.0" ] ``` diff --git a/tests/original/clvm_wasm_test.ts b/tests/original/clvm_wasm_test.ts index 74c6975..8619e64 100644 --- a/tests/original/clvm_wasm_test.ts +++ b/tests/original/clvm_wasm_test.ts @@ -39,7 +39,7 @@ test("run transactions generator", async () => { expect(((sexp_as_js as Tuple)[0]).equal_to(h("0x01"))); // q: 0x01 const program = transactions_generator; - const env = SExp.to([]).as_bin().raw(); + const env = SExp.to([]).as_bin().raw(); // 0x80 const max_cost = BigInt(20); // If you don't set a flag to allow backref, it throws an Error.