LIGHTNING-SETPSBTVERSION(7)
π LIGHTNING-SETPSBTVERSION(7) β setpsbtversion
okay so bestie, you're in the lightning-setpsbtversion section 7 manual page and honestly? it's a little baddie. it's the setpsbtversion command, and its whole lewk is "Command for setting PSBT version" β¨
πΈ SYNOPSIS πΈ
setpsbtversion psbt version
like, two args. that's it. she's low maintenance. π
π DESCRIPTION π
so the setpsbtversion RPC command does exactly what it says on the tin: it converts the PSBT you hand it to the version you asked for, and it returns the base64 result of that conversion. slay. π₯
but listen β if version is invalid, it does not manifest a cute little PSBT for you. it returns an error. periodt. π
psbt(string) β the PSBT you want to change versions. your little base64 baby. π¦version(u32) β the version you want to set it to. an unsigned 32-bit int, no cap. β¨
π RETURN VALUE π
on success, you get an object back, containing:
psbt(string) β a converted PSBT of the requested version. it's giving "glow up complete". π
π ERRORS π
the following error codes may occur, and yes you should know them:
-32602β Parameter missed or malformed. i.e. you forgot something or you fumbled the format. we've all been there bestie, just fix it and rerun. π
π«Ά AUTHOR π«Ά
Gregory Sanders gsanders87@gmail.com is mainly responsible. give him his flowers. πΈπ
π SEE ALSO π
the whole PSBT friend group honestly, go say hi to all of them. π
β RESOURCES β
Main web site: https://github.com/ElementsProject/lightning
β¨ EXAMPLES β¨
Example 1 π
Request:
$ lightning-cli setpsbtversion -k "psbt"="cHNidP8BAgpsbt1001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101" "version"=0
{
"id": "example:setpsbtversion#1",
"method": "setpsbtversion",
"params": {
"psbt": "cHNidP8BAgpsbt1001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101",
"version": 0
}
}
Response:
{
"psbt": "cHNidP8BADUCAAAAAAFAQg8AAAAAACJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbbwAAAAAA"
}
like look at that conversion. ate. π
Example 2 π¦
Request:
$ lightning-cli setpsbtversion "cHNidP8BAgpsbt20020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202" "2"
{
"id": "example:setpsbtversion#2",
"method": "setpsbtversion",
"params": [
"cHNidP8BAgpsbt20020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202",
2
]
}
Response:
{
"psbt": "cHNidP8BAgpsbt20020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202"
}
and that's the whole page bestie β no notes, it's iconic. π§
that's a wrap on LIGHTNING-SETPSBTVERSION(7)! this little masterpiece ships with Core Lightning v26.06.9, so go forth and version your PSBTs responsibly. mwah. ππ
π¦ where this page comes from
- nixpkgs unstable: clightning 26.06.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms