core-lightning/doc/lightning-addpsbtoutput.7.md
Rusty Russell dadbdf488c schemas: deprecated is now a range.
Don't assume removal is +6 months, but have a start deprecation/end support range.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-01-26 10:30:22 +10:30

1.7 KiB

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

SYNOPSIS

addpsbtoutput satoshi [initialpsbt] [locktime] [destination]

DESCRIPTION

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 is the satoshi value of the output. It can be a whole number, a whole number ending in sat, a whole number ending in 000msat, or a number with 1 to 8 decimal places ending in btc.

initialpsbt is a PSBT to add the output to. If not speciifed, a PSBT will be created automatically.

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

If destination is not set, an internal address is generated.

EXAMPLE USAGE

Here is a command to make a PSBT with a 100,000 sat output that leads to the on-chain wallet.

lightning-cli addpsbtoutput 100000sat

RETURN VALUE

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

AUTHOR

@dusty_daemon

SEE ALSO

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

RESOURCES

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