LIGHTNING-FUNDCHANNEL_START(7)
π fundchannel_start β initiating channel establishment, the lowkey way π¦
okay so bestie, you're reading the LIGHTNING-FUNDCHANNEL_START(7) page, straight out of the LIGHTNING manual (section 7, fancy). Sit down, grab a strawberry drink π, and let's get into it.
β¨ NAME β¨
fundchannel_start β the command for initiating channel establishment for a lightning channel. it's giving "step one of a glow-up" energy π
πΈ SYNOPSIS πΈ
fundchannel_start id amount [feerate announce close_to push_msat
channel_type mindepth reserve]
she's got a lot of optional args and honestly? iconic for that.
π DESCRIPTION π
okay so fundchannel_start is a lower level RPC command. it lets a user initiate channel establishment with a peer you're already connected to. think of it as sending the "hey bestie let's open a channel π" text.
β οΈ REAL TALK β οΈ the funding transaction MUST NOT be broadcast until after channel establishment has been successfully completed by runningfundchannel_complete, because the commitment transactions for this channel are not secured until thecompletecommand succeeds. broadcasting the transaction before that can lead to unrecoverable loss of funds. like... actual money, gone, no cap. ππ
here's the whole cast of parameters, one by one:
id(pubkey) β the peer id you got fromconnect. bestie's name tag πamount(sat) β the Satoshi value that the channel will be funded at. this value MUST be accurate, otherwise the negotiated commitment transactions will not encompass the correct channel value. no rounding shenanigans, fr fr.feerate(feerate, optional) β feerate for subsequent commitment transactions: seefundchannel. heads up though, this is ignored for channels withoption_anchors(we always use a low commitment fee for these).announce(boolean, optional) β whether or not to announce this channel. do you want the world to know, or is this private? πclose_to(string, optional) β a Bitcoin address to which the channel funds should be sent to on close. only valid if both peers have negotiatedoption_upfront_shutdown_script. returnsclose_toset to the closing script iff is negotiated.push_msat(msat, optional) β amount of millisatoshis to push to the channel peer at open. note that this is a gift to the peer β these satoshis are added to the initial balance of the peer at channel start and are largely unrecoverable once pushed. it's giving "venmo-ing your ex" energy, be careful πΈπmindepth(u32, optional) β number of confirmations required before we consider the channel active. patience is a virtue etc etc β³reserve(sat, optional) β the amount we want the peer to maintain on its side.channel_type(array of u32s, optional) β each bit set in thischannel_type:- (u32, optional) β bit number. cute little number, that's it π
π RETURN VALUE π
on success, an object is returned, containing:
funding_address(string) β the address to send funding to for the channel. DO NOT SEND COINS TO THIS ADDRESS YET. like please, I am begging π«Άscriptpubkey(hex) β the raw scriptPubKey for the address.channel_type(object, optional) β channel_type as negotiated with peer. (added v24.02):bits(array of u32s) β each bit set in thischannel_type. (added v24.02):- (u32, optional) β bit number.
names(array of strings) β feature name for each bit set in thischannel_type. note thatanchors_zero_fee_htlc_txis a deprecated synonym foranchors. (added v24.02):- (string, optional) (one of
"static_remotekey/even","anchor_outputs/even","anchors_zero_fee_htlc_tx/even","anchors/even","scid_alias/even","zeroconf/even") β name of feature bit.
- (string, optional) (one of
close_to(hex, optional) β the raw scriptPubkey which mutual close will go to; only present ifclose_toparameter was specified and peer supportsoption_upfront_shutdown_script.mindepth(u32, optional) β number of confirmations before we consider the channel active.
the following warnings may also be returned:
warning_usageβ a warning not to prematurely broadcast the funding transaction (always present!). yes, always. she never misses π
π₯ ERRORS π₯
on error the returned object will contain code and message properties, with code being one of the following:
-32602β if the given parameters are wrong. vibe check failed π-1β catchall nonspecific error. the classic "idk what happened" π300β the amount exceeded the maximum configured funding amount.301β the providedpush_msatis greater than the providedamount. math is not mathing.304β still syncing with bitcoin network.305β peer is not connected.306β unknown peer id.312β peer negotiatedoption_dual_fund, must useopenchannel_initnotfundchannel_start. (only ifexperimental-dual-fundis enabled)
π AUTHOR π
Lisa Neigut niftynei@gmail.com is mainly responsible. give her her flowers, she ate π
π SEE ALSO π
lightning-connect(7), lightning-fundchannel(7), lightning-multifundchannel(7), lightning-fundchannel_complete(7), lightning-fundchannel_cancel(7), lightning-openchannel_init(7), lightning-openchannel_update(7), lightning-openchannel_signed(7), lightning-openchannel_bump(7), lightning-openchannel_abort(7)
the whole friend group, honestly π«Ά
β RESOURCES β
main web site: https://github.com/ElementsProject/lightning
π§ EXAMPLES π§
Example 1:
request:
$ lightning-cli fundchannel_start "nodeid101010101010101010101010101010101010101010101010101010101010" "16777216"
{
"id": "example:fundchannel_start#1",
"method": "fundchannel_start",
"params": [
"nodeid101010101010101010101010101010101010101010101010101010101010",
16777216
]
}
response:
{
"funding_address": "bcrt1p0002020202020202020202020202020202020202020202020202020202",
"scriptpubkey": "scriptpubkey01010101010101010101010101010101010101010101010101010101",
"channel_type": {
"bits": [
12,
22
],
"names": [
"static_remotekey/even",
"anchors/even"
]
},
"warning_usage": "The funding transaction MUST NOT be broadcast until after channel establishment has been successfully completed by running `fundchannel_complete`"
}
Example 2:
request:
$ lightning-cli fundchannel_start -k "id"="nodeid101010101010101010101010101010101010101010101010101010101010" "amount"=16777216
{
"id": "example:fundchannel_start#2",
"method": "fundchannel_start",
"params": {
"id": "nodeid101010101010101010101010101010101010101010101010101010101010",
"amount": 16777216
}
}
response:
{
"funding_address": "bcrt1p0003030303030303030303030303030303030303030303030303030303",
"scriptpubkey": "scriptpubkey02020202020202020202020202020202020202020202020202020202",
"channel_type": {
"bits": [
12,
22
],
"names": [
"static_remotekey/even",
"anchors/even"
]
},
"warning_usage": "The funding transaction MUST NOT be broadcast until after channel establishment has been successfully completed by running `fundchannel_complete`"
}
and that's the whole page bestie! this lil masterpiece is from Core Lightning v26.06.9 and it's the LIGHTNING-FUNDCHANNEL_START(7) page β go forth and start some channels (just, like, don't broadcast yet, ok?? love u ππ¦β¨)
π¦ 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