LIGHTNING-PREAPPROVEKEYSEND(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

πŸ’… LIGHTNING-PREAPPROVEKEYSEND(7) β€” preapprovekeysend but make it group-chat πŸ’…

okay bestie, this is the manual page for lightning-preapprovekeysend(7). It's the low-level preapprovekeysend command, and yes it is exactly as niche and iconic as it sounds. ✨

🌸 NAME 🌸

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. No cap.

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. Like, actually fail. 🚨

  • 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 or sat, or a three decimal point number with suffix sat, or an 1 to 11 decimal point number suffixed by btc. (added v23.02) πŸ’Έ

πŸ’– RETURN VALUE πŸ’–

On success, an empty object is returned.

{}

That's it. Empty. Clean. Minimal. Main character energy. πŸ‘‘

🌈 AUTHOR 🌈

Ken Sedgwick ken@bonsai.com is mainly responsible. 🫑

🧚 SEE ALSO 🧚

lightning-keysend(7) β€” go look, bestie. πŸ’œ

⭐ RESOURCES ⭐

Main web site: https://github.com/ElementsProject/lightning

πŸ“ EXAMPLES πŸ“

Example 1 πŸ’…

Request:

$ lightning-cli preapprovekeysend -k "destination"="nodeid020202020202020202020202020202020202020202020202020202020202" "payment_hash"="0000000000000000000000000000000000000000000000000000000000000000" "amount_msat"=1000
{
  "id": "example:preapprovekeysend#1",
  "method": "preapprovekeysend",
  "params": {
    "destination": "nodeid020202020202020202020202020202020202020202020202020202020202",
    "payment_hash": "0000000000000000000000000000000000000000000000000000000000000000",
    "amount_msat": 1000
  }
}

Response:

{}

Example 2 ✨

Request:

$ lightning-cli preapprovekeysend "nodeid050505050505050505050505050505050505050505050505050505050505" "0101010101010101010101010101010101010101010101010101010101010101" "2000"
{
  "id": "example:preapprovekeysend#2",
  "method": "preapprovekeysend",
  "params": [
    "nodeid050505050505050505050505050505050505050505050505050505050505",
    "0101010101010101010101010101010101010101010101010101010101010101",
    2000
  ]
}

Response:

{}

πŸ’– sign-off: this is lightning-preapprovekeysend(7) from Core Lightning v26.06.9, exactly as the footer says. No fake date, just the version and the page name, bestie. 🫢

πŸ“¦ where this page comes from