bech32
0.2.2, released 4 years ago by mindshards.net
Implementation of Bitcoin's BIP173 Bech32 encoding specification.
WASM-ready
What it does
It implements Bitcoin's BIP173 specification for Bech32 encoding and decoding in Flutter. It allows encoding and decoding Segwit addresses and handles longer inputs such as lightning BOLT #11 specs.
AI-written summary of version 0.2.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to encode or decode Bitcoin Segwit addresses using Bech32 format.
- You are working with Lightning Network BOLT #11 payment requests.
Skip it when
- You do not need Bitcoin or cryptocurrency address encoding in your project.
Strengths
- Provides support for BIP173 spec and Lightning BOLT #11 specs.
- Flutter-friendly and cross-platform.
Weaknesses
- Licensed under AGPL with a lesser clause, requiring changes to the library to be published online.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Segwit address = segwit.decode("bc1pw508d6qejxtdg4y5r3zarvary0c5xw7kw508d6qejxtdg4y5r3zarvary0c5xw7k7grplx");
print(address.scriptPubKey);
print(address.version);Alternatives
Packages that do the same job and could replace bech32.
- dart_bip32_bip44
Implements Bitcoin BIP32 and BIP44 hierarchical deterministic key derivation in Dart.
41Compare
Works with
Packages commonly used together with bech32: ones it builds on, ones built on it, and its own family.
- convertbech32 depends on itEncoders and decoders for converting between different data representations.
- flutter_multi_formatterBuilt on bech32Input formatters for international phone numbers, credit/debit cards, currencies, and custom masks.
- nostrBuilt on bech32Pure-Dart Nostr protocol library supporting events, signing, encryption, and 35+ NIPs.
- ndkBuilt on bech32Dart library for building Nostr clients with relay discovery, caching and signing support.