makeInvoice method

Future<MakeInvoiceResponse> makeInvoice(
  1. NwcConnection connection, {
  2. required int amountSats,
  3. String? description,
  4. String? descriptionHash,
  5. int? expiry,
})

Does a make_invoie request

Implementation

Future<MakeInvoiceResponse> makeInvoice(NwcConnection connection,
    {required int amountSats,
    String? description,
    String? descriptionHash,
    int? expiry}) async {
  return _executeRequest<MakeInvoiceResponse>(
      connection,
      MakeInvoiceRequest(
          amountMsat: amountSats * 1000,
          description: description,
          descriptionHash: descriptionHash,
          expiry: expiry));
}