Skip to content

Commit 9ea6bb3

Browse files
committed
Update readme
1 parent 27ae7b7 commit 9ea6bb3

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,30 @@
44
This is an implementation of [Lightning BOLT11 Specification](https://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md) for providing a minimal QR-code-ready format for requesting
55
lightning payments.
66

7-
## WIP
7+
## Usage
8+
9+
Add this to your `Cargo.toml`:
10+
11+
```toml
12+
[dependencies]
13+
bolt11 = "0.1.0"
14+
```
15+
16+
and this to your crate root:
17+
18+
```rust
19+
extern crate bolt11;
20+
```
21+
22+
## Example
23+
24+
```rust
25+
use bolt11::payment_request::PaymentRequest;
26+
27+
let encoded_payment_request = "lnbc2500u1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqf
28+
qqqsyqcyq5rqwzqfqypqdq5xysxxatsyp3k7enxv4jsxqzpuaztrnwngzn3kdzw5hydlzf03qdgm2hdq
29+
27cqv3agm2awhz5se903vruatfhq77w3ls4evs3ch9zw97j25emudupq63nyw24cg27h2rspfj9srp";
30+
31+
let payment_request = PaymentRequest::decode(encoded_payment_request);
32+
33+
```

0 commit comments

Comments
 (0)