Skip to content

Commit

Permalink
Updated documents
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiaMineJP committed May 8, 2024
1 parent 2a17fad commit d259530
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
16 changes: 8 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<react-project-root>/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
Expand All @@ -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"
]
```

Expand Down
2 changes: 1 addition & 1 deletion tests/original/clvm_wasm_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test("run transactions generator", async () => {
expect(((sexp_as_js as Tuple<Bytes, any>)[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.
Expand Down

0 comments on commit d259530

Please sign in to comment.