Skip to content

v1.0.0

Compare
Choose a tag to compare
@TateB TateB released this 05 Feb 23:34
· 13 commits to master since this release
455a334

address-encoder v1.0.0 is here!

This is a full rewrite of prior versions, which includes:

  • Removal of the Buffer dependency
  • Full tree-shakeability where applicable
  • Async helper functions for dynamic loading of coders
  • Usage of the @noble/* and @scure/base, which are audited, widely-used, and highly regarded.
  • Dramatically reduced overlapping code between coders
  • Reduction of total gzipped bundle size by >50% (80.6kb => 38.3kb)
  • Full TypeScript codebase
  • Easier maintainability (especially for EVM chains)
  • and more!

Breaking Changes:

The API is very different to the prior stable version, and depending on your use-case you may be able to significantly reduce the code you are importing from this library. You should read the README.md.

Coin names in camelCase

Coin names were previously formatted with UPPER_CASE, but have been switched to camelCase since coin names can now be directly imported via the /coins export path.

formatsByName array removed

formatsByName as an array has been removed. To get a coder by coin name you should use getCoderByCoinName or getCoderByCoinNameAsync. Alternatively, if you just want to get the coinType for a coin name, you can use coinNameToTypeMap directly.

formatsByCoinType array removed

formatsByCoinType as an array has been removed. To get a coder by coin type you should use getCoderByCoinType or getCoderByCoinTypeAsync. Alternatively, if you just want to get the coin name for a coin type, you can use coinTypeToNameMap directly.

GRS coin removed

The GRS coin has been removed due to it's lack of overlap with other coders, and very low usage. Generally, low usage coins are happily accepted assuming code overlap is high, and that maintenance is easy. In this particular case, we couldn't justify rewriting the GRS coder. If you'd like to re-add GRS with minimal effect on bundle size, PRs are welcome!