npm / @scure/base
@scure/base
What changed in @scure/base 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
9 breaking3 new APIs and options4 performance3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@scure/base 219 changes
Breaking changes 9
Rejects non-ASCII input that becomes valid only through case folding.
Inputs are limited to 2048 bytes because of quadratic complexity.
Rejects non-printable-ASCII input instead of allowing case folding to normalize it into a valid string.
Enforces the 90-character BIP-173 length limit by default; pass false or a number to override.
Rejects non-printable-ASCII prefixes.
Error messages are improved and type checks are stricter.
The UTF-8 decoder is now strict and uses isWellFormed, which is polyfilled in some environments.
Node v20.19 is now the minimum required version.
The package is now ESM-only, so consumers must use it as an ES module.
New APIs and options 3
Adds a base36 coder for lowercase alphanumeric encoding with the multibase k payload used by IPFS/IPNS addresses.
An overload allows Bech32.decode to handle arbitrary string input.
A strict ASCII decoder is added for character codes in the range 0..127.
Performance 4
Encoding and decoding algorithms are substantially faster, including base64, base32, base16, bech32 toWords, and base58 decode.
Source maps are disabled, reducing the on-disk package size.
Tree-shaking is improved to reduce bundle sizes.
The package is smaller than v1.x, reducing bundle sizes.
Fixes and other changes 3
Compilation issues on TypeScript v6 are fixed.
Byte array types now work with TypeScript 5.6 and TypeScript 5.9+, avoiding incompatibilities and errors such as TS2345.
Package imports now work correctly in bundler-less environments, such as browsers.