Releases: Chia-Mine/clvm-js
v1.0.2
This version is compatible with 1a5cb17895d8707f784a85180bc97d3c6ebe71a0
of [email protected]
Fixed
- Fixed an issue where
op_pubkey_for_exp
was missing. - Fixed an issue where arithmetic op of atoms larger than 32 bit integer did not work.
Added
- Added
bigint_to_bytes
function insrc/casts.ts
- Added tests for Bytes-BigInt conversion.
v1.0.1
This version is compatible with 1a5cb17895d8707f784a85180bc97d3c6ebe71a0
of [email protected]
Changed
- Improved
Stream::read
performance by removing extra memory copy.
v1.0.0
This version is compatible with 1a5cb17895d8707f784a85180bc97d3c6ebe71a0
of [email protected]
Removed
- Removed
.dist
folder from git.- This folder made it harder to check diffs between versions.
Added
- Added GitHub Action
- Added
str()
,repr()
utility functions. - Added
Bytes::subarray
to get bytes data without additional memory allocation/copy.
Changed
- Updated README.md
- Changed method name
Bytes::get_byte_at
toBytes::at
(Breaking change).
Deprecated
- Deprecated python specific type definition such as
str
,int
. Usestring
,number
instead.
v0.0.19
There are 2 breaking changes.
-
Changed
OperatorDict
arguments format.
Past:OperatorDict(atom_op_function_map, quote_atom, apply_atom, unknown_op_handler)
New:OperatorDict(atom_op_function_map, option)
whereoption
is{quote_atom: Bytes, apply_atom: Bytes, unknown_op_handler: typeof default_unknown_op}
-
When you initialize
Bytes
using constructor likenew Byte(data)
,data
is not copied but just stored and keeps reference ofdata
, for performance enhancement.
In javascript, byte copy byTypedArray
constructor is not sufficiently fast.
So I left user an option how to initializeBytes
instance. Data copy, or Store reference.
If you want to copy data and cut reference apart, then please getBytes
instance byBytes.from
factory function.
Resolved a deep tree performance issue
Before this version, yarn test serialize_test --testNamePattern=test_very_deep_tree
was really slow. It took around 80 seconds to complete test.
At this version, I've managed to improve test complete time to 79s
-> 2s
by pre-allocating buffer memory on Stream
instance.
Changed
- Changed
OperatorDict
arguments format. - When you initialize
Bytes
using constructor likenew Byte(data)
,data
is not copied but just stored and keeps reference ofdata
, for performance enhancement. - Greatly improved overall performance by pre-allocating buffer memory on
Stream
instance. - Improved performance of
Bytes::equal_to
. - Changed parameter type of
SExp::equal_to
fromCastableType
toany
- Replaced use of
instanceof
operator for non-native types. - Updated bls-signatures version to 0.2.1-beta.1
- Improved
Bytes::concat
performance. - Reorganized dist folder
Fixed
- Fixed an issue where
SExp.to(<boolean>)
did not work the same as python's clvm. - Fixed an issue where Bytes-SExp comparison like
b('aaa').equal_to(SExp.null())
did not work. - Fixed an issue where
OperatorDict
did not throw Error when eitherquote
orapply
is not specified.
Added
- Added
list()
function working similar to Python'slist()
. - Added
Bytes::repeat
function.
v0.0.18
Changed
- Fixed an issue where
int_to_bytes
did not work as expected if the argument is a negative number. - Changed
Bytes::toString()
to return python'sbytes.__repr__
style string.
v0.0.17
Changed
- Updated
jscrypto
version to 1.0.2
v0.0.16
Added
- Added license information to README.md
Fixed
- Fixed a bug in
sexp_from_stream
- Fixed incorrect use of
int_to_bytes
v0.0.15
Fixed
- Fixed a bug in
pre_build.js
v0.0.14
Changed
- Changed new line style for files in
dist/
from windows-style(CR) to linux-style(LF).
Removed
- Removed
WordArray32
from possible argument ofBytes.from
.
Added
- Added
Bytes.SHA256()
.