php-lightning /
lnaddress
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace PhpLightning\Invoice; |
||
| 6 | |||
| 7 | use Gacela\Framework\AbstractFacade; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @method InvoiceFactory getFactory() |
||
| 11 | */ |
||
| 12 | final class InvoiceFacade extends AbstractFacade |
||
| 13 | { |
||
| 14 | 1 | /** |
|
| 15 | * @return array{ |
||
|
0 ignored issues
–
show
Documentation
Bug
introduced
by
Loading history...
|
|||
| 16 | 1 | * callback: string, |
|
| 17 | 1 | * maxSendable: int, |
|
| 18 | 1 | * minSendable: int, |
|
| 19 | * metadata: string, |
||
| 20 | * tag: string, |
||
| 21 | 1 | * commentAllowed: bool, |
|
| 22 | * } |
||
| 23 | 1 | */ |
|
| 24 | 1 | public function getCallbackUrl(string $username): array |
|
| 25 | 1 | { |
|
| 26 | return $this->getFactory() |
||
| 27 | ->createCallbackUrl($username) |
||
| 28 | ->getCallbackUrl($username); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function generateInvoice(string $username, int $milliSats): array |
||
| 32 | { |
||
| 33 | return $this->getFactory() |
||
| 34 | ->createInvoiceGenerator($username) |
||
| 35 | ->generateInvoice($milliSats); |
||
| 36 | } |
||
| 37 | } |
||
| 38 |