Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ dist
build_error.txt
*.log
.DS_Store
.txt
.coverage/
*.tgz
coverage/
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## Unreleased

### Changed

- An invalid `network` option (anything other than `'mainnet'`, `'testnet'`, or `'auto'`) throws a `RangeError` instead of reporting `NETWORK_MISMATCH`.
- Valid Ripple results include `details: { format: 'classic', checksum: true }`.
- Outside strict mode, uniform-case EVM addresses are accepted without hashing. `details.checksum` is `true` only for a verified mixed-case checksum or an address without hex letters.

### Performance

- Keccak-256 no longer uses BigInt; SHA-256 and Bech32 avoid per-call allocations, and Bech32 verifies both checksum variants in one pass.
- `detectBlockchain` skips validators whose cheap preconditions fail; results and their order are unchanged.
- Throughput versus 0.4.0 (`npm run benchmark`, Node 24): checksummed EVM about 11x, lowercase EVM over 200x, Bitcoin legacy and TRON about 2.3x, Bech32/Cosmos/Solana about 1.5-1.7x, `detectBlockchain` 2.4-10x.

## 0.4.0

- JavaScript EVM and Cosmos constructors reject unsupported family identifiers.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ The full minified ESM bundle is approximately **7.2 kB gzip**, and the Solana-on
| `dogecoin` | Base58Check P2PKH/P2SH; mainnet and testnet |
| `solana` | Base58 decoding to exactly 32 bytes, including program addresses and PDAs |
| `cardano` | Shelley base, enterprise, pointer, and stake addresses; header/network/length/padding checks; Byron CBOR envelope and CRC32 |
| `ripple` | XRP classic account addresses with the XRP Base58 alphabet and checksum |
| `ripple` | XRP classic account addresses with the XRP Base58 alphabet and checksum; X-addresses (XLS-5d) are not supported |
| `tron` | 34-character Base58Check or 42-character hex beginning with `41` |
| `cosmos`, `osmosis`, `sei` | Bech32 account prefixes `cosmos`, `osmo`, `sei`; 20- or 32-byte payloads |
| `celestia`, `injective` | Bech32 account prefixes `celestia`, `inj`; 20-byte payloads |
Expand All @@ -155,8 +155,8 @@ validateAddress(address, chain, {
});
```

- `strict` defaults to `false`. On EVM, `true` requires the exact EIP-55 capitalization, including the rare valid all-lowercase/all-uppercase checksums. Invalid mixed-case EVM checksums are always rejected. On Aptos, strict mode requires lowercase AIP-40 canonical representation. Other formats always verify their mandatory checksums.
- `network` defaults to `auto`. It filters networks **only when encoded in the address**, currently Bitcoin, Litecoin, Dogecoin, and Cardano. `details.network` is omitted for formats that cannot identify mainnet/testnet. Selecting a network never proves an address belongs to it.
- `strict` defaults to `false`. On EVM, `true` requires the exact EIP-55 capitalization, including the rare valid all-lowercase/all-uppercase checksums. Invalid mixed-case EVM checksums are always rejected. Outside strict mode, uniform-case EVM input is accepted without hashing, and `details.checksum` is `true` only when a mixed-case checksum was verified (or the address has no hex letters). On Aptos, strict mode requires lowercase AIP-40 canonical representation. Other formats always verify their mandatory checksums.
- `network` defaults to `auto`; any other value than `'mainnet'`, `'testnet'`, or `'auto'` throws a `RangeError`. It filters networks **only when encoded in the address**, currently Bitcoin, Litecoin, Dogecoin, and Cardano. `details.network` is omitted for formats that cannot identify mainnet/testnet. Selecting a network never proves an address belongs to it.
- `allowTestnet: false` rejects identifiable testnet addresses, including when `network: 'testnet'` is also supplied. It is not an on-chain network check.
- `allowBurnAddress` defaults to `false` and controls only the EVM all-zero address. It is not a comprehensive burn-address database. Other reserved/program addresses may be syntactically valid.

Expand Down
31 changes: 0 additions & 31 deletions commands.txt

This file was deleted.

Loading