2024-10-04 08:53:53 +09:30
{
"$schema" : "../rpc-schema-draft.json" ,
"type" : "object" ,
"rpc" : "askrene-create-layer" ,
"title" : "Command to create a new layer (EXPERIMENTAL)" ,
"description" : [
"WARNING: experimental, so API may change." ,
"" ,
"The **askrene-create-layer** RPC command tells askrene to create a new, empty layer. This layer can then be populated with `askrene-create-channel` and `askrene-inform-channel`, and be used in `getroutes`."
] ,
"request" : {
"required" : [
"layer"
] ,
2024-10-30 09:38:42 +10:30
"additionalProperties" : false ,
2024-10-04 08:53:53 +09:30
"properties" : {
"layer" : {
"type" : "string" ,
"description" : [
"The name of the layer to create."
]
}
}
} ,
"response" : {
"required" : [
"layers"
] ,
2024-10-30 09:38:42 +10:30
"additionalProperties" : false ,
2024-10-04 08:53:53 +09:30
"properties" : {
"layers" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"additionalProperties" : false ,
"required" : [
"layer" ,
"disabled_nodes" ,
"created_channels" ,
2024-10-04 09:07:53 +09:30
"channel_updates" ,
2024-10-04 08:53:53 +09:30
"constraints"
] ,
"properties" : {
"layer" : {
"type" : "string" ,
"description" : [
"The name of the layer."
]
} ,
"disabled_nodes" : {
"type" : "array" ,
"items" : {
"type" : "pubkey" ,
"description" : [
"The id of the disabled node."
]
}
} ,
"disabled_channels" : {
"type" : "array" ,
"items" : {
"type" : "short_channel_id_dir" ,
"description" : [
"The channel and direction which is disabled."
]
}
} ,
"created_channels" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"required" : [
"source" ,
"destination" ,
"short_channel_id" ,
2024-10-04 09:07:53 +09:30
"capacity_msat"
2024-10-04 08:53:53 +09:30
] ,
2024-10-30 09:38:42 +10:30
"additionalProperties" : false ,
2024-10-04 08:53:53 +09:30
"properties" : {
"source" : {
"type" : "pubkey" ,
"description" : [
"The source node id for the channel."
]
} ,
"destination" : {
"type" : "pubkey" ,
"description" : [
"The destination node id for the channel."
]
} ,
"short_channel_id" : {
"type" : "short_channel_id" ,
"description" : [
"The short channel id for the channel."
]
} ,
"capacity_msat" : {
"type" : "msat" ,
"description" : [
"The capacity (onchain size) of the channel."
]
2024-10-04 09:07:53 +09:30
}
}
}
} ,
"channel_updates" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"required" : [
"short_channel_id_dir"
] ,
2024-10-30 09:38:42 +10:30
"additionalProperties" : false ,
2024-10-04 09:07:53 +09:30
"properties" : {
2024-10-04 08:53:53 +09:30
"htlc_minimum_msat" : {
"type" : "msat" ,
"description" : [
"The minimum value allowed in this direction."
]
} ,
"htlc_maximum_msat" : {
"type" : "msat" ,
"description" : [
"The maximum value allowed in this direction."
]
} ,
"fee_base_msat" : {
"type" : "msat" ,
"description" : [
"The base fee to apply to use the channel in this direction."
]
} ,
"fee_proportional_millionths" : {
"type" : "u32" ,
"description" : [
"The proportional fee (in parts per million) to apply to use the channel in this direction."
]
} ,
"delay" : {
"type" : "u16" ,
"description" : [
"The CLTV delay required for this direction."
]
}
}
}
} ,
"constraints" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"required" : [
"short_channel_id" ,
"direction"
] ,
2024-10-30 09:38:42 +10:30
"additionalProperties" : false ,
2024-10-04 08:53:53 +09:30
"properties" : {
"short_channel_id" : {
"type" : "short_channel_id" ,
"description" : [
"The short channel id."
]
} ,
"direction" : {
"type" : "u32" ,
"description" : [
"The direction."
]
} ,
"maximum_msat" : {
"type" : "msat" ,
"description" : [
"The maximum value which this channel could pass. This or *minimum_msat* will be present, but not both."
]
} ,
"minimum_msat" : {
"type" : "msat" ,
"description" : [
"The minimum value which this channel could pass. This or *minimum_msat* will be present, but not both."
]
}
}
}
}
}
}
}
}
} ,
"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)"
] ,
"author" : [
"Rusty Russell <<rusty@rustcorp.com.au>> is mainly responsible."
] ,
"resources" : [
"Main web site: <https://github.com/ElementsProject/lightning>"
]
}