Skip to content
pubscout

bech32

0.2.2, released 4 years ago by mindshards.net

Implementation of Bitcoin's BIP173 Bech32 encoding specification.

WASM-ready
$ flutter pub add bech32
Source repository

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.

Works with

Packages commonly used together with bech32: ones it builds on, ones built on it, and its own family.