All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
- Add compatibility with pre-ES2016 environments (like some React Native JS compilers) by adding a custom
Buffer.subarray
polyfill (#118).
- The raw, underlying
XdrReader
andXdrWriter
types are now exposed by the library for reading without consuming the entire stream (#116).
- Added additional type checks for passing a bytearray-like object to
XdrReader
s and improves the error with details (#116).
- This package is now being published to
@stellar/js-xdr
on NPM. - The versions at
js-xdr
are now considered deprecated (#111). - Misc. dependencies have been upgraded (#104, #106, #107, #108, #105).
- Add support for easily encoding integers larger than 32 bits (#100). This (partially) breaks the API for creating
Hyper
andUnsignedHyper
instances. Previously, you would passlow
andhigh
parts to represent the lower and upper 32 bits. Now, you can pass the entire 64-bit value directly as abigint
orstring
instance, or as a list of "chunks" like before, e.g.:
-new Hyper({ low: 1, high: 1 }); // representing (1 << 32) + 1 = 4294967297n
+new Hyper(4294967297n);
+new Hyper("4294967297");
+new Hyper(1, 1);
- Refactor XDR serialization/deserialization logic (#91).
- Replace
long
dependency with nativeBigInt
arithmetics. - Replace
lodash
dependency with built-in Array and Object methods, iterators. - Add
buffer
dependency for WebPack browser polyfill. - Update devDependencies to more recent versions, modernize bundler pipeline.
- Automatically grow underlying buffer on writes (#84 fixed).
- Always check that the entire read buffer is consumed (#32 fixed).
- Check actual byte size of the string on write (#33 fixed).
- Fix babel-polyfill build warnings (#34 fixed).
- Upgrade dependencies to their latest versions (#92).
- Inline and modernize the
cursor
dependency (#).
- Add method
validateXDR(input, format = 'raw')
which validates if a given XDR is valid or not. (#56).
- Remove
core-js
dependency (#45).
- Split out reference class to it's own file to avoid circular import (#39).
- Travis: Deploy to NPM with an env variable instead of an encrypted key
- Instruct Travis to cache node_modules
- Updated some out-of-date dependencies
- Added ESLint and Prettier to enforce code style
- Upgraded dependencies, including Babel to 6
- Bump local node version to 6.14.0
- Updated dependencies
- Improved lodash imports (the browser build should be smaller)
- bugfix: removed
runtime
flag from babel to make this package working in React/Webpack environments
- bugfix: padding bytes are now ensured to be zero when reading
- Strings are now encoded/decoded as utf-8
- bugfix: Hyper.fromString() no longer silently accepts strings with decimal points
- bugfix: UnsignedHyper.fromString() no longer silently accepts strings with decimal points