Skip to main content

bip21_uri 2.2.0 copy "bip21_uri: ^2.2.0" to clipboard
bip21_uri: ^2.2.0 copied to clipboard

A Bip21 compatible URL encoding package developed for DartLang.

2.2.0 #

  • fix: amount was encoded through double.toString(), which switches to scientific notation below 1e-6 — one satoshi was emitted as amount=1e-8, which no BIP21 grammar accepts (an optional X/x exponent, never e). Amounts are now formatted at satoshi precision with trailing zeros trimmed, so canonical values such as 20.3 are unchanged.
  • fix: the pj fragment separator is preserved as received instead of being rewritten to +. - is the separator of the current payjoin specification and + the legacy one; rust-payjoin accepts both and chooses between them in check_fragment_delimiter, so the 2.1.2 retrocompatibility shim for payjoin-flutter now only turns current URIs back into their deprecated form. Behaviour change: decoding a - separated endpoint no longer returns a + separated one.
  • fix: only the BIP77 fragment is uppercased. The URL before it is case-sensitive, so a directory host containing a hyphen, or a mailbox path that is not already uppercase, is no longer corrupted. A BIP78 v1 endpoint, which has no fragment, is left untouched.

2.1.3 #

  • fix: illegal percent encoding

2.1.2 #

  • refactor: payjoin-flutter is not compatible with hyphens - symbol defined in the latest payjoin specification. To ensure retrocompatibility with payjoin-flutter, bip21_uri is returning the pj field with + sign.

2.1.1 #

  • fix: regression on uppercase

2.1.0 #

  • If pj is passed among the options of the query parameters, the package now process it as a payjoin Uri specified in BIP77 supporting both percent encoded or not, + and -. Keep the # encoded as %23 and the Uri is uppercase.
  • Payjoin unit tests

2.0.1 #

  • Empty amount is decoded as null
  • Empty message or label is decoded/encoded as empty
  • Empty options are encoded/decoded

2.0.0 #

Breaking Changes #

  • Package renamed: dart_bip21 → bip21_uri
  • Model renamed: BIP21 → Bip21Uri
  • Amount type changed: num? → double?
  • API restructured: Complete rewrite of the codebase with new file structure

1.0.0 #

  • Initial version.
2
likes
160
points
1.46k
downloads

Documentation

API reference

Publisher

verified publisherethicnology.com

Weekly Downloads

A Bip21 compatible URL encoding package developed for DartLang.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on bip21_uri