bech32 0.1.1 copy "bech32: ^0.1.1" to clipboard
bech32: ^0.1.1 copied to clipboard

outdated

Library implementing Bitcoins BIP173 (Bech32 encoding) specification in a Flutter friendly fashion.

example/main.dart

import 'package:hex/hex.dart';
import 'package:bech32/bech32.dart';

void main() {
  Segwit address = segwit.decode(
      "bc1pw508d6qejxtdg4y5r3zarvary0c5xw7kw508d6qejxtdg4y5r3zarvary0c5xw7k7grplx");
  print("scriptPubKey: ${address.scriptPubKey}");
  print("version: ${address.version}");
  print("program: ${address.program}");

  Segwit otherAddress = Segwit('bc', 1, [0, 0]);
  print(segwit.encode(otherAddress));

  Segwit yetAnOtherAddress = Segwit('bc', 0, HEX.decode("751e76e8199196d454941c45d1b3a323f1433bd6"));
  print(segwit.encode(yetAnOtherAddress));
}
3
likes
0
pub points
87%
popularity

Publisher

verified publishermindshards.net

Library implementing Bitcoins BIP173 (Bech32 encoding) specification in a Flutter friendly fashion.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

convert

More

Packages that depend on bech32