import { DecodedLnurlPayRequest, LnurlPayParams } from './iLightning'; export declare type ParsedLightningInvoice = { /** * The amount of millisatoshi requested by this invoice. If null then * the invoice does not specify an amount and will accept any payment. */ millisatoshis: string | null; /** The hex encoded payment hash for the invoice */ paymentHash: string; /** The hex encoded node pub key of the payee that created the invoice */ payeeNodeKey: string; /** The hex encoded SHA256 hash of the description of what the invoice is for */ descriptionHash?: string; }; /** * Decodes an LNURL-pay request and makes an HTTP request to the decoded url * to retrieve details for the requested payment. * @param lnurl A bech32 encoded LNURL-pay request string * @returns {DecodedLnurlPayRequest} An LNURL-pay request message specifying * a min and max amount for the payment, metadata describing what the payment * is for, and a callback that can be used to fetch a lightning invoice for * the payment. */ export declare function decodeLnurlPay(lnurl: string): Promise; /** * Fetches a lightning invoice from an LNURL-pay callback server for a specified * amount of millisatoshis. * @param params {LnurlPayParams} An object specifying an amount and a callback * url with which to request a lightning invoice for an LNURL-pay request. * @returns {string} A BOLT #11 encoded lightning invoice */ export declare function fetchLnurlPayInvoice(params: LnurlPayParams): Promise; /** * @param {ParsedLightningInvoice} invoice - a parsed lightning invoice * @param {number} amount - amount intended to pay for the invoice * @param {string} metadata - metadata that is used to verify the fetched invoice * @throws error for invoice that does not match with amount and metadata */ export declare function validateLnurlInvoice(invoice: ParsedLightningInvoice, millisatAmount: string, metadata: string): void; /** * @param {unknown} invoiceStr - a lightning invoice * @return {ParsedLightningInvoice} * @throws error for invalid lightning invoice */ export declare function parseLightningInvoice(invoiceStr: unknown): ParsedLightningInvoice; //# sourceMappingURL=lightningUtils.d.ts.map