lightning-preapprovekeysend -- Ask the HSM to preapprove a keysend payment (low-level)
SYNOPSIS
preapprovekeysend destination payment_hash amount_msat
DESCRIPTION
Command added in v23.02.
The preapprovekeysend RPC command submits the destination, payment_hash, and amount_msat parameters to the HSM to check that they are approved as a keysend payment.
Generally the preapprovekeysend request does not need to be made explicitly, it is automatically generated as part of a keysend request.
By default, the HSM will approve all preapprovekeysend requests.
If a remote signer is being used it might decline an preapprovekeysend request because it would exceed velocity controls, is not covered by allowlist controls, was declined manually, or other reasons.
If a remote signer declines a preapprovekeysend request a subsequent attempt to pay the keysend anyway will fail; the signer will refuse to sign the commitment.
- destination (pubkey): It is a 33 byte, hex-encoded, node ID of the node that the payment should go to. (added v23.02)
- payment_hash (hex) (always 64 characters): It is the unique identifier of a payment. (added v23.02)
- amount_msat (msat): The amount to send in millisatoshi precision; it can be a whole number, or a whole number with suffix
msat
orsat
, or a three decimal point number with suffixsat
, or an 1 to 11 decimal point number suffixed bybtc
. (added v23.02)
RETURN VALUE
On success, an empty object is returned.
AUTHOR
Ken Sedgwick <[email protected]> is mainly responsible.
SEE ALSO
lightning-keysend(7)
RESOURCES
Main web site: https://github.com/ElementsProject/lightning
EXAMPLES
Example 1:
Request:
lightning-cli preapprovekeysend -k "destination"="022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59" "payment_hash"="0000000000000000000000000000000000000000000000000000000000000000" "amount_msat"=1000
{
"id": "example:preapprovekeysend#1",
"method": "preapprovekeysend",
"params": {
"destination": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59",
"payment_hash": "0000000000000000000000000000000000000000000000000000000000000000",
"amount_msat": 1000
}
}
Response:
{}
Example 2:
Request:
lightning-cli preapprovekeysend "032cf15d1ad9c4a08d26eab1918f732d8ef8fdc6abb9640bf3db174372c491304e" "0101010101010101010101010101010101010101010101010101010101010101" "2000"
{
"id": "example:preapprovekeysend#2",
"method": "preapprovekeysend",
"params": [
"032cf15d1ad9c4a08d26eab1918f732d8ef8fdc6abb9640bf3db174372c491304e",
"0101010101010101010101010101010101010101010101010101010101010101",
2000
]
}
Response:
{}