eth_url_parser 0.2.0
eth_url_parser: ^0.2.0 copied to clipboard
A Dart library for parsing and building Ethereum URLs according to ERC-681. Supports ERC-20 transfers, ENS names, and chain IDs.
0.2.0 #
Strict EIP-681 compliance. Fixes silent precision loss on the money path.
- Fixed: amounts are now parsed and formatted with
BigInt— values above int64 (~9.22 ETH in wei) no longer lose wei silently throughnum.parse - Fixed:
buildno longer corrupts amounts via lossytoStringAsExponential— trailing zeros compress into an exact exponent (2014000000000000000→2.014e18), anything else stays plain decimal - Fixed: addresses are validated as exactly 40 hex digits; non-hex
40-character strings are rejected, and a
0xpayload never falls back to ENS (hex takes precedence per the spec) - Added: bare ENS targets (
ethereum:vitalik.eth,ethereum:doge-to-the-moon.eth) parse per the spec grammar - Added: the scientific-notation number grammar is enforced exactly —
the exponent must be ≥ the number of decimals (
1.5e0is rejected) - Breaking: only the spec-defined
pay-prefix is accepted; arbitrary ERC-831 prefixes (foo-) now throw - Breaking: all malformed input throws
FormatExceptionwith a descriptive message (previously a mix of bareExceptionand rawRangeErroron short input) - Breaking:
QueryString.parseuses strict RFC 3986 percent-decoding;+is a literal plus (the number grammar's sign), not a space - Validated
chainIdas decimal digits and thetransferaddressparameter as a valid address or ENS name - Breaking:
EthUrlParserandQueryStringcan no longer be instantiated — both are static-only utility classes - 100% dartdoc coverage of the public API, enforced by the
public_member_api_docslint and strict analyzer language checks
0.1.0 #
- Breaking: Removed
freezedandjson_serializablecode generation dependencies - Migrated
TransactionRequestto a hand-writtenfinal classwith Dart 3.4+ features - Updated SDK constraint to
>=3.4.0 <4.0.0 - Typed
QueryString.parsereturn toMap<String, String> - Removed all
dynamictypes from public and internal APIs - Expanded test suite from 2 to 34 tests covering error cases, model tests, and round-trips
- Updated
analysis_options.yamlto remove code-gen excludes - Updated
lintsto ^5.1.1 andtestto latest
0.0.7 #
- Upgrade dependencies
0.0.6 #
- Update all outdated dependencies
- Add DartDoc comments to model
TransactionRequest
0.0.5 #
- dartdoc
0.0.4 #
- Upgrade dependencies
0.0.3 #
- Scientific notation conversion
0.0.2 #
- Added
TransactionRequestmodel
0.0.1 #
- Initial version.