LIGHTNING-SPLICE_INIT(7)
π LIGHTNING-SPLICE_INIT π
okay bestie, so this is the lightning-splice_init page and honestly it's giving gateway to splicing energy π
β¨
πΈ NAME πΈ
splice_init β the command that kicks off a channel splice to a peer π«Ά
π SYNOPSIS π
splice_init channel_id relative_amount [initialpsbt] [feerate_per_kw]
[force_feerate]
π DESCRIPTION π
Command added in v23.08. β¨
splice_init is a low level RPC command that initiates a channel splice for a given channel β the one you point at with channel_id. lowkey powerful, highkey low-level, iykyk π
channel_id(hash) β the channel id of the channel you wanna splice, periodt.relative_amount(integer) β a positive or negative amount of satoshis to add to or subtract from the channel. β οΈ heads up bestie: you may need to add a double dash (--) aftersplice_initif you're using a negativerelative_amount, so it doesn't get interpretted as a command modifier. like this:
$ lightning-cli splice_init -- $CHANNEL_ID -100000
initialpsbt(string, optional) β the (optional) base 64 encoded PSBT to begin with. if you don't specify one, one gets generated automatically for you, no cap πfeerate_per_kw(u32, optional) β the miner fee we promise our peer to pay for our side of the splice transaction. it's calculated byfeerate_per_kw * our_bytes_in_splice_tx / 1000. math, but make it fashion πβ¨force_feerate(boolean, optional) β by default splices will fail if the fee provided looks too high. this is to protect against accidentally setting your fee higher than intended (we stan a safety check π«Ά). setforce_feeratetotrueto skip this saftey check. π
π₯ RETURN VALUE π₯
on success, an object is returned, containing:
psbt(string) β the (incomplete) PSBT of the splice transaction. it's giving unfinished masterpiece π¨
π AUTHOR π
Dusty @dusty_daemon is mainly responsible. π main character energy fr fr
π¦ SEE ALSO π¦
go read those next bestie, they're the whole trilogy π
β RESOURCES β
Main web site: https://github.com/ElementsProject/lightning β
π USAGE π
here's an example set of splice commands that will splice in 100,000 sats to the first channel that comes out of listpeerchannels. the example assumes you already have at least one confirmed channel π
1: Get the channel id of the first channel.
CHANNEL_ID=$(echo $(lightning-cli listpeerchannels) | jq -r ".channels[0].channel_id")
2: Get the PSBT from fundpsbt.
INITIALPSBT=$(echo $(lightning-cli fundpsbt -k satoshi=100000sat feerate=urgent startweight=800 excess_as_change=true) | jq -r ".psbt")
3: Initiate the splice by passing channel id and initialpsbt received from above steps.
PSBT_SPLICE_INIT=$(echo $(lightning-cli splice_init $CHANNEL_ID 100000 $INITIALPSBT) | jq -r ".psbt")
4: Update the PSBT with the splice_update command.
PSBT_SPLICE_UPDATE=$(echo $(lightning-cli splice_update $CHANNEL_ID $PSBT_SPLICE_INIT) | jq -r ".psbt")
5: Sign the updated PSBT.
SIGNPSBT=$(echo $(lightning-cli signpsbt -k psbt="$PSBT_SPLICE_UPDATE") | jq -r ".signed_psbt")
6: Finally, call splice_signed with channel id and signed PSBT parameters.
$ lightning-cli splice_signed $CHANNEL_ID $SIGNPSBT
π§ EXAMPLES π§
Example 1:
Request:
$ lightning-cli splice_init -k "channel_id"="channelid0780000780000780000780000780000780000780000780000780000" "relative_amount"=100000 "initialpsbt"="cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000"
{
"id": "example:splice_init#1",
"method": "splice_init",
"params": {
"channel_id": "channelid0780000780000780000780000780000780000780000780000780000",
"relative_amount": 100000,
"initialpsbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000713000"
}
}
Response:
{
"psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000711000"
}
Example 2:
Request:
$ lightning-cli splice_init "channelid0780000780000780000780000780000780000780000780000780000" "-105000" "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000"
{
"id": "example:splice_init#2",
"method": "splice_init",
"params": [
"channelid0780000780000780000780000780000780000780000780000780000",
-105000,
"cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000714000"
]
}
Response:
{
"psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000712000"
}
and that's the whole page bestie π«Ά β this was Core Lightning v26.06.9, dated LIGHTNING-SPLICE_INIT(7), slaying as always ππ bye! β¨
π¦ 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