- Removes need for bundlers to polyfill the `Buffer` class. `UInt8Array` are used instead which are native to the browser and node.
- Reduces bundle size 7.1kb gzipped and eliminates 4 runtime dependencies: `base-x`, `base64-js`, `buffer`, and `ieee754`.
BREAKING CHANGE: All methods that previously took a `Buffer` now accept a `UInt8Array`.
---------
Co-authored-by: Jackson Mills <jmills@ripple.com>
Switch to using `@noble/hashes`, `@noble/curves`, `@scure/base`,
`@scure/bip32`, and `@scure/bip39`. This replaces `crypto` polyfills
(such as `crypto-browserify`), `create-hash`, `elliptic`, `hash.js`,
`bn.js` (both versions), and their many dependencies. This also means
there are 33 less dependencies downloaded when running a fresh
`npm install` and will make the project much easier to maintain.
This reduces the bundle size by 44% (82kb minified and gzipped) over
the current 3.0 branch as well as reducing the amount of configuration
required to bundle.
Closes#1814, #1817, #2272, and #2306
Co-authored-by: Caleb Kniffen <ckniffen@ripple.com>
Update tests to use jasmine compatible functions.
This means changing `test` to `it`, `toStrictEqual` to `toEqual` (which
is still strict), `toThrowError` to `toError`, and updating the param
for toError to pass an `Error` object.
Remove the need to specify --single-run.
- Switch files to typescript
- Add missing types in test files
- Change how the codec functions were imported. They now count towards the "% Funcs" calculation, increasing it from 75% to 100%.
- Lint test files