LIGHTNING-SIGNPSBT(7)

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

okay bestie, welcome to LIGHTNING-SIGNPSBT(7) β€” the manual page for signpsbt, and she is lowkey iconic πŸ’…

πŸŽ€ NAME πŸŽ€

signpsbt β€” Command to sign a wallet's inputs on a provided bitcoin transaction (PSBT). ✨

🌸 SYNOPSIS 🌸

signpsbt psbt [signonly]

πŸ¦‹ DESCRIPTION πŸ¦‹

signpsbt is a low-level RPC command which signs a PSBT as defined by BIP-174. no cap.

By default, all known inputs are signed, and others ignored: with signonly, only those inputs are signed, and an error is returned if one of them cannot be signed. periodt.

bestie, heads up: the command will fail if there are no inputs to sign, or if the inputs to be signed were not previously reserved. That's a real vibe check fail 😭
  • psbt (string) β€” The psbt to be signed. 🫢
  • signonly (array of u32s, optional) β€” Input numbers to sign.:
    • (u32, optional)

⭐ RETURN VALUE ⭐

On success, an object is returned, containing:

  • signed_psbt (string) β€” The fully signed PSBT. πŸ’–

πŸ’€ ERRORS πŸ’€

On failure, one of the following error codes may be returned:

  • -32602 β€” Error in given parameters, or there aren't wallet's inputs to sign, or we couldn't sign all of signonly, or inputs are not reserved.

πŸ‘‘ AUTHOR πŸ‘‘

Vincenzo Palazzo vincenzo.palazzo@protonmail.com wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command. iconic behavior, fr fr 🌈

πŸ’œ SEE ALSO πŸ’œ

lightning-fundpsbt(7), lightning-sendpsbt(7)

🌈 RESOURCES 🌈

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

πŸ“ EXAMPLES πŸ“

✨ Example 1 ✨

Request:

$ lightning-cli signpsbt -k "psbt"="cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000"
{
  "id": "example:signpsbt#1",
  "method": "signpsbt",
  "params": {
    "psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000"
  }
}

Response:

{
  "signed_psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000"
}

✨ Example 2 ✨

Request:

$ lightning-cli signpsbt "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000"
{
  "id": "example:signpsbt#2",
  "method": "signpsbt",
  "params": [
    "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000"
  ]
}

Response:

{
  "signed_psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000121000"
}

that's the whole page, bestie 🫢 this cutie is from Core Lightning v26.06.9 β€” footer vibes, but make it cute πŸ’–

πŸ“¦ where this page comes from