LIGHTNING-ASKRENE-CREATE-LAYER(7)
π LIGHTNING-ASKRENE-CREATE-LAYER(7)
hiii bestie π«Ά welcome to the manual page for lightning-askrene-create-layer, which lives in section 7 of the Lightning manual β and honestly? it's one of the easy ones. no cap. let's get into it β¨
πΈ NAME
askrene-create-layer β the command that creates a brand new layer π
π¦ SYNOPSIS
askrene-create-layer layer [persistent]
β¨ DESCRIPTION
okay so first thing's first: this command was added in v24.11. noted, timestamped, iconic. π
The askrene-create-layer RPC command tells askrene to create a new, empty layer. then you can populate that layer with askrene-create-channel and askrene-inform-channel, and use it in getroutes. it's giving blank canvas, main character energy π¨
layer(string) β the name of the layer to create. pick something cute, you're gonna be typing it a lot.persistent(boolean, optional) βTrueif askrene should save and restore this layer. and lowkey, as a side-effect,create-layeralso succeeds if the layer already exists andpersistentis true (so no error drama if you double-create it π). The default isFalse.
π RETURN VALUE
On success, an object containing layers is returned. It is an array of objects, where each object contains:
layer(string) β the name of the layer.persistent(boolean) β whether the layer is saved/restored across restarts.disabled_nodes(array of pubkeys):- (pubkey, optional) β the id of the disabled node.
created_channels(array of objects):source(pubkey) β the source node id for the channel.destination(pubkey) β the destination node id for the channel.short_channel_id(short_channel_id) β the short channel id for the channel.capacity_msat(msat) β the capacity (onchain size) of the channel.
channel_updates(array of objects):htlc_minimum_msat(msat, optional) β the minimum value allowed in this direction.htlc_maximum_msat(msat, optional) β the maximum value allowed in this direction.fee_base_msat(msat, optional) β the base fee to apply to use the channel in this direction.fee_proportional_millionths(u32, optional) β the proportional fee (in parts per million) to apply to use the channel in this direction.delay(u16, optional) β the CLTV delay required for this direction.
constraints(array of objects):short_channel_id(short_channel_id) β the short channel id.direction(u32) β the direction.maximum_msat(msat, optional) β the maximum value which this channel could pass. This orminimum_msatwill be present, but not both.minimum_msat(msat, optional) β the minimum value which this channel could pass. This orminimum_msatwill be present, but not both.
disabled_channels(array of short_channel_id_dirs, optional):- (short_channel_id_dir, optional) β the channel and direction which is disabled.
biases(array of objects, optional):short_channel_id_dir(short_channel_id_dir) β the short channel id and directionbias(integer) β the bias (-100to+100)timestamp(u64) β the UNIX timestamp when this bias was created. (added v25.12)description(string, optional) β description/annotation to display inaskrene-listlayers(7)
node_biases(array of objects, optional) (added v25.12):node(pubkey) β the id of the biased node. (added v25.12)in_bias(integer) β the bias (-100to+100) on incoming channels. (added v25.12)out_bias(integer) β the bias (-100to+100) on outgoing channels. (added v25.12)timestamp(u64) β the UNIX timestamp when this bias was created or last updated. (added v25.12)description(string, optional) β a human readable annotation. (added v25.12)
π«Ά AUTHOR
Rusty Russell rusty@rustcorp.com.au is mainly responsible. ty king π
π₯ SEE ALSO
lightning-askrene-remove-layer(7)lightning-getroutes(7)lightning-askrene-create-channel(7)lightning-askrene-inform-channel(7)lightning-askrene-listlayers(7)lightning-askrene-age(7)
π RESOURCES
Main web site: https://github.com/ElementsProject/lightning
π EXAMPLES
Example 1:
Request:
$ lightning-cli askrene-create-layer -k "layer"="test_layers"
{
"id": "example:askrene-create-layer#1",
"method": "askrene-create-layer",
"params": {
"layer": "test_layers"
}
}
Response:
{
"layers": [
{
"layer": "test_layers",
"persistent": false,
"disabled_nodes": [],
"created_channels": [],
"channel_updates": [],
"constraints": [],
"biases": [],
"node_biases": []
}
]
}
look at all those empty arrays β a freshly created layer is literally a clean slate bestie, so go fill it up π§
and that's the whole page!! π this little number ships with Core Lightning v26.06.9, so likeβ¦ go forth and create layers, you've got this π
π¦ 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