bech32 0.1.0 bech32: ^0.1.0 copied to clipboard
Library implementing Bitcoins BIP173 (Bech32 encoding) specification in a Flutter friendly fashion.
Bech32 #
An implementation of the BIP173 spec for Segwit Bech32 address format.
Examples #
Segwit address = segwit.decode("bc1pw508d6qejxtdg4y5r3zarvary0c5xw7kw508d6qejxtdg4y5r3zarvary0c5xw7k7grplx");
print(address.scriptPubKey);
// => 5128751e76e8199196d454941c45d1b3a323f1433bd6751e76e8199196d454941c45d1b3a323f1433bd6
print(address.version);
// => 1
Exceptions #
The specification defines a myriad of cases in which decoding and encoding
should fail. Please make sure your code catches all the relevant exception
defined in lib/exceptions.dart
.
Installing #
Add it to your pubspec.yaml
:
dependencies:
bech32: any
Licence overview #
All files in this repository fall under the license specified in COPYING. The project is licensed as AGPL with a lesser clause. It may be used within a proprietary project, but the core library and any changes to it must be published online. Source code for this library must always remain free for everybody to access.