bolt11_decoder 1.0.1 icon indicating copy to clipboard operation
bolt11_decoder: ^1.0.1 copied to clipboard

A decoder for Bitcoins Lightning Network BOLT11 invoices for use in wallet apps.

A decoder for BOLT #11 invoices.

Usage #

A simple usage example:

import 'package:bolt11_decoder/bolt11_decoder.dart';

main() {
  PaymentRequest req = PaymentRequest(
      "lnbc1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpl2pkx2ctnv5sxxmmwwd5kgetjypeh2ursdae8g6twvus8g6rfwvs8qun0dfjkxaq8rkx3yf5tcsyz3d73gafnh3cax9rn449d9p5uxz9ezhhypd0elx87sjle52x86fux2ypatgddc6k63n7erqz25le42c4u4ecky03ylcqca784w");
  print("amount: ${req.amount}");
  // => amount: 0
  print("timestamp: ${req.timestamp}");
  // => timestamp: 1496314658

  req.tags.forEach((TaggedField t) {
    print("${t.type}: ${t.data}");
  });
  // => payment_hash: 0001020304050607080900010203040506070809000102030405060708090102
  // => description: Please consider supporting this project
}

Features and bugs #

Please file feature requests and bugs at the tracker.

Credits #

Much of this is based on Richard Bondis bolt11 tutorial. Thanks a lot!

License #

Distributed under the MIT license. See LICENSE for more information.

2
likes
120
pub points
67%
popularity

Publisher

verified publisher iconsendmany.app

A decoder for Bitcoins Lightning Network BOLT11 invoices for use in wallet apps.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

bech32, convert, decimal, fixnum

More

Packages that depend on bolt11_decoder