createInvoice

suspend fun createInvoice(amountMsats: Long, memo: String? = null, type: InvoiceType = InvoiceType.STANDARD): InvoiceData

Creates a lightning invoice from the current wallet.

Return

The created invoice.

Parameters

amountMsats

The amount of the invoice in milli-satoshis.

memo

Optional memo to include in the invoice.

type

The type of invoice to create. Defaults to InvoiceType.STANDARD.

Throws

if there is no valid authentication.