LIGHTNING-ADDPSBTOUTPUT(7)
๐ LIGHTNING-ADDPSBTOUTPUT(7) โจ
okay so bestie, welcome to the lightning-addpsbtoutput page of the Core Lightning manual โ section 7, we're in the big leagues now ๐
๐ธ NAME
addpsbtoutput โ the command that populates PSBT outputs straight from your wallet, no cap ๐
๐ฆ SYNOPSIS
addpsbtoutput satoshi [initialpsbt] [locktime] [destination]
โจ DESCRIPTION
So this command literally got added in v23.11 โ it's giving fresh-out-the-oven energy ๐ฅ
addpsbtoutput is a low-level RPC command (yes, low-level, meaning the big kids use it directly) that creates or modifies a PSBT by adding exactly one output worth satoshi.
What's the vibe? It's how you receive funds into your on-chain wallet interactively using PSBTs ๐ซถ like, you're hand-crafting the transaction instead of letting the wallet do everything behind your back.
Here's the rundown of what you can pass in, iconically bulleted:
satoshi(sat) โ the satoshi value of the output. It can be a whole number, a whole number ending insat, or a number with 1 to 8 decimal places ending inbtc. Math queen behavior honestly ๐งฎinitialpsbt(string, optional) โ a Base 64 encoded PSBT you want to add the output to. Don't have one? Don't stress โ if you skip it, one gets generated automatically for you ๐locktime(u32, optional) โ if you don't set it, it's set to a recent block height (but only if no initial PSBT was specified, iykyk โฐ)destination(string, optional) โ if you don't set it, an internal address is generated. Slay, the wallet's got you ๐
๐ RETURN VALUE
On success (and bestie, we love success), you get an object back containing:
psbt(string) โ the unsigned PSBT which fulfills the parameters you gave it ๐estimated_added_weight(u32) โ the estimated weight of the output that got added. Not the real weight, the estimated one, so don't come for me ๐outnum(u32) โ the 0-based number where they placed the output. Zero-based, bestie, so the first one is0โญ
๐ง AUTHOR
Dusty @dusty_daemon is mainly responsible. Iconic, honestly ๐
๐ SEE ALSO
go read those next, they're literally the sibling commands ๐
๐ฅ RESOURCES
Main web site: https://github.com/ElementsProject/lightning
๐ EXAMPLES
Example 1
Here's a command to make a PSBT with a 1,000,000 sat output that leads to the on-chain wallet ๐
Request:
$ lightning-cli addpsbtoutput -k "satoshi"=1000000 "locktime"=111
{
"id": "example:addpsbtoutput#1",
"method": "addpsbtoutput",
"params": {
"satoshi": 1000000,
"locktime": 111
}
}
Response:
{
"psbt": "cHNidP8BAgpsbt1001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101",
"estimated_added_weight": 172,
"outnum": 1
}
Example 2
Request:
$ lightning-cli addpsbtoutput "3333333" "cHNidP8BAgpsbt20020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202"
{
"id": "example:addpsbtoutput#2",
"method": "addpsbtoutput",
"params": [
3333333,
"cHNidP8BAgpsbt20020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202"
]
}
Response:
{
"psbt": "cHNidP8BAgpsbt20020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202",
"estimated_added_weight": 172,
"outnum": 1
}
Example 3
Request:
$ lightning-cli addpsbtoutput -k "satoshi"=3333333 "initialpsbt"="cHNidP8BAgpsbt20020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202" "destination"="bcrt1p5201010101010101010101010101010101010101010101010101010101"
{
"id": "example:addpsbtoutput#3",
"method": "addpsbtoutput",
"params": {
"satoshi": 3333333,
"initialpsbt": "cHNidP8BAgpsbt20020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202",
"destination": "bcrt1p5201010101010101010101010101010101010101010101010101010101"
}
}
Response:
{
"psbt": "cHNidP8BAgpsbt300303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303",
"estimated_added_weight": 172,
"outnum": 1
}
okay that's the whole page!! this is Core Lightning v26.06.9, LIGHTNING-ADDPSBTOUTPUT(7), and yeah that's the date spot on the footer โ go forth and PSBT, bestie ๐ฆ๐ periodt.
๐ฆ 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