SparkWallet.
Method Signature
Parameters
The BOLT11-encoded Lightning invoice to pay
Maximum fee in satoshis to pay for the invoice
When
true, initiate a Spark transfer if a valid Spark address is found in the invoice (default: false)Amount in satoshis to send for zero-amount invoices
Returns
The Lightning payment request details, or a
WalletTransfer if preferSpark is true and a valid Spark address was found in the invoiceThe payment preimage is not returned immediately. To retrieve the preimage after payment completes, call
getLightningSendRequest(id) with the returned request ID.When
preferSpark: true and the invoice contains a valid Spark fallback address, the method returns a WalletTransfer instead of LightningSendRequest. If no valid Spark address is found, it falls back to Lightning.