GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
LIGHTNING-ADDPSBTOUTPUT(7) LIGHTNING-ADDPSBTOUTPUT(7)

lightning-addpsbtoutput -- Command to populate PSBT outputs from the wallet

addpsbtoutput satoshi [initialpsbt] [locktime] [destination]

Command added in v23.11.

addpsbtoutput is a low-level RPC command which creates or modifies a PSBT by adding a single output of amount satoshi.

This is used to receive funds into the on-chain wallet interactively using PSBTs.

  • satoshi (sat): The satoshi value of the output. It can be a whole number, a whole number ending in sat, or a number with 1 to 8 decimal places ending in btc.

  • initialpsbt (string, optional): Base 64 encoded PSBT to add the output to. If not specified, one will be generated automatically.

  • locktime (u32, optional): If not set, it is set to a recent block height (if no initial psbt is specified).

  • destination (string, optional): If it is not set, an internal address is generated.

On success, an object is returned, containing:

  • psbt (string): Unsigned PSBT which fulfills the parameters given.

  • estimated_added_weight (u32): The estimated weight of the added output.

  • outnum (u32): The 0-based number where the output was placed.

Dusty <<@dusty_daemon>> is mainly responsible.

lightning-fundpsbt(7), lightning-utxopsbt(7)

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

Example 1: Here is 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 }
Core Lightning v25.02.2

Search for    or go to Top of page |  Section 7 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.