bolt11_decoder

Creator: coderz1093

Last updated:

0 purchases

bolt11_decoder Image
bolt11_decoder Images

Languages

Categories

Add to Cart

Description:

bolt11 decoder

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
}
copied to clipboard
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.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.