Skip to content

Commit

Permalink
Updated documents
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiaMineJP committed Mar 31, 2024
1 parent dc714bd commit 36350fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ This version is compatible with [`960f8d139940fa0814d3fac44da9a2975642f5d3`](htt
### 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`)
- Update tests.
### Added
- Added `clvm_rs` support
- Added `run_chia_program`
- Added `asUint8Array()` method to `Stream`

## [2.0.1]
This version is compatible with [`480b32840c525e17b5ab2f29036c033febaae71e`](https://github.com/Chia-Network/clvm/tree/480b32840c525e17b5ab2f29036c033febaae71e) of [clvm](https://github.com/Chia-Network/clvm)
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,19 @@ you need to put `blsjs.wasm` to the same directory as the code who loads `clvm`.
<pre>
├── ...
├── main.js # js file which clvm is compiled into
└── blsjs.wasm # copy it from npm_modules/clvm/browser/blsjs.wasm
├── blsjs.wasm # copy it from npm_modules/clvm/browser/blsjs.wasm
└── clvm_wasm_bg.wasm # copy it from npm_modules/clvm/browser/clvm_wasm_bg.wasm
</pre>

If you use [React](https://reactjs.org/), copy `blsjs.wasm` into `<react-project-root>/public/static/js/` folder. It automatically copies wasm file next to main js file.
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.
**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` must be compliant with Apache2.0 License provided by [Chia-Network](https://github.com/Chia-Network/bls-signatures/blob/main/LICENSE)
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
`clvm-js` uses `BigInt`. So if runtime environment does not support `BigInt`, `clvm-js` doesn't work as well.
Expand Down

0 comments on commit 36350fb

Please sign in to comment.