Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
shesek committed Nov 15, 2017
1 parent a454fad commit 708ead7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,26 @@ PHP client for the Lightning Strike REST API.
## Install

```bash
$ composer install blockstream/lightning-strike-client
$ composer require elementsproject/lightning-strike-client-php
```

## Use

```php
<?php
// initialize client
$strike = new LightingStrikeClient('http://localhost:8009');

// create invoice
// Create invoice
$invoice = $strike->invoice(/*msatoshi*/ 50, /*metadata*/ [ 'customer' => 'Satoshi', 'products' => [ 'potato', 'chips' ]]);

echo "to pay, send $invoice->msatoshi milli-satoshis with rhash $invoice->rhash, or copy the BOLT11 payment request: $invoice->payreq"
tell_user("to pay, send $invoice->msatoshi milli-satoshis with rhash $invoice->rhash, or copy the BOLT11 payment request: $invoice->payreq");

// fetch invoice by id
// Fetch invoice by id
$invoice = $strike->fetch('m51vlVWuIKGumTLbJ1RPb');
```

TODO: document missing methods

## Test

```bash
Expand Down

0 comments on commit 708ead7

Please sign in to comment.