sendPayment

fun sendPayment(destinationPublicKey: String, amountMsats: Long, maxFeesMsats: Long, timeoutSecs: Int = 60): <Error class: unknown class><OutgoingPayment>

Sends a payment directly to a node on the Lightning Network through the public key of the node without an invoice.

Return

An OutgoingPayment object if the payment was successful, or throws if the payment failed.

Parameters

destinationPublicKey

The public key of the destination node.

amountMsats

The amount to pay in milli-satoshis.

maxFeesMsats

The maximum amount of fees that you want to pay for this payment to be sent. As guidance, a maximum fee of 15 basis points should make almost all transactions succeed. For example, for a transaction between 10k sats and 100k sats, this would mean a fee limit of 15 to 150 sats.

timeoutSecs

The timeout in seconds that we will try to make the payment.

Throws

if the payment failed or if the wallet is locked.