This commit will fail in `make` due to unchanged scripts. They will be added in the next commit.
365 lines
11 KiB
JSON
365 lines
11 KiB
JSON
{
|
|
"$schema": "../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"rpc": "askrene-listlayers",
|
|
"title": "Command to display information about layers",
|
|
"added": "v24.11",
|
|
"description": [
|
|
"The **askrene-listlayers** RPC command reports any modifications each layer (or, the layer specified) would make to the topology, if it were used for *getroutes*."
|
|
],
|
|
"request": {
|
|
"required": [],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"layer": {
|
|
"type": "string",
|
|
"description": [
|
|
"The name of the layer to report on."
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"response": {
|
|
"required": [
|
|
"layers"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"layers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"layer",
|
|
"persistent",
|
|
"disabled_nodes",
|
|
"created_channels",
|
|
"channel_updates",
|
|
"constraints"
|
|
],
|
|
"properties": {
|
|
"layer": {
|
|
"type": "string",
|
|
"description": [
|
|
"The name of the layer."
|
|
]
|
|
},
|
|
"persistent": {
|
|
"type": "boolean",
|
|
"description": [
|
|
"Whether the layer is saved across restarts."
|
|
]
|
|
},
|
|
"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",
|
|
"capacity_msat"
|
|
],
|
|
"additionalProperties": false,
|
|
"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."
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"channel_updates": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"short_channel_id_dir"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"short_channel_id_dir": {
|
|
"type": "short_channel_id_dir",
|
|
"description": [
|
|
"The short channel id and direction this update applies to."
|
|
]
|
|
},
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"description": [
|
|
"True if this can be used, false otherwise."
|
|
]
|
|
},
|
|
"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."
|
|
]
|
|
},
|
|
"cltv_expiry_delta": {
|
|
"type": "u16",
|
|
"description": [
|
|
"The CLTV delay required for this direction."
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"constraints": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"short_channel_id_dir"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"short_channel_id_dir": {
|
|
"type": "short_channel_id_dir",
|
|
"description": [
|
|
"The short channel id and direction"
|
|
]
|
|
},
|
|
"timestamp": {
|
|
"type": "u64",
|
|
"description": [
|
|
"The UNIX timestamp when this constraint was created."
|
|
]
|
|
},
|
|
"maximum_msat": {
|
|
"type": "msat",
|
|
"description": [
|
|
"The maximum value which this channel could pass."
|
|
]
|
|
},
|
|
"minimum_msat": {
|
|
"type": "msat",
|
|
"description": [
|
|
"The minimum value which this channel could pass."
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"biases": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"short_channel_id_dir",
|
|
"bias"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"short_channel_id_dir": {
|
|
"type": "short_channel_id_dir",
|
|
"description": [
|
|
"The short channel id and direction"
|
|
]
|
|
},
|
|
"bias": {
|
|
"type": "integer",
|
|
"description": [
|
|
"The bias (-100 to +100)"
|
|
]
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": [
|
|
"Description/annotation for the bias"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"see_also": [
|
|
"lightning-getroutes(7)",
|
|
"lightning-askrene-disable-node(7)",
|
|
"lightning-askrene-create-channel(7)",
|
|
"lightning-askrene-inform-channel(7)",
|
|
"lightning-askrene-bias-channel(7)",
|
|
"lightning-askrene-age(7)"
|
|
],
|
|
"author": [
|
|
"Rusty Russell <<rusty@rustcorp.com.au>> is mainly responsible."
|
|
],
|
|
"resources": [
|
|
"Main web site: <https://github.com/ElementsProject/lightning>"
|
|
],
|
|
"examples": [
|
|
{
|
|
"request": {
|
|
"id": "example:askrene-listlayers#1",
|
|
"method": "askrene-listlayers",
|
|
"params": [
|
|
"test_layers"
|
|
]
|
|
},
|
|
"response": {
|
|
"layers": [
|
|
{
|
|
"layer": "test_layers",
|
|
"persistent": false,
|
|
"disabled_nodes": [
|
|
"nodeid010101010101010101010101010101010101010101010101010101010101"
|
|
],
|
|
"created_channels": [
|
|
{
|
|
"source": "nodeid010101010101010101010101010101010101010101010101010101010101",
|
|
"destination": "nodeid030303030303030303030303030303030303030303030303030303030303",
|
|
"short_channel_id": "0x0x1",
|
|
"capacity_msat": 1000000000
|
|
}
|
|
],
|
|
"channel_updates": [
|
|
{
|
|
"short_channel_id_dir": "0x0x1/0",
|
|
"htlc_minimum_msat": 100,
|
|
"htlc_maximum_msat": 900000000,
|
|
"fee_base_msat": 1,
|
|
"fee_proportional_millionths": 2,
|
|
"cltv_expiry_delta": 18
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"short_channel_id_dir": "0x0x1/1",
|
|
"timestamp": 1738000000,
|
|
"minimum_msat": 100000
|
|
}
|
|
],
|
|
"biases": [
|
|
{
|
|
"short_channel_id_dir": "109x1x1/1",
|
|
"description": "bigger bias",
|
|
"bias": -5
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"request": {
|
|
"id": "example:askrene-listlayers#2",
|
|
"method": "askrene-listlayers",
|
|
"params": {}
|
|
},
|
|
"response": {
|
|
"layers": [
|
|
{
|
|
"layer": "test_layers",
|
|
"persistent": false,
|
|
"disabled_nodes": [
|
|
"nodeid010101010101010101010101010101010101010101010101010101010101"
|
|
],
|
|
"created_channels": [
|
|
{
|
|
"source": "nodeid010101010101010101010101010101010101010101010101010101010101",
|
|
"destination": "nodeid030303030303030303030303030303030303030303030303030303030303",
|
|
"short_channel_id": "0x0x1",
|
|
"capacity_msat": 1000000000
|
|
}
|
|
],
|
|
"channel_updates": [
|
|
{
|
|
"short_channel_id_dir": "0x0x1/0",
|
|
"htlc_minimum_msat": 100,
|
|
"htlc_maximum_msat": 900000000,
|
|
"fee_base_msat": 1,
|
|
"fee_proportional_millionths": 2,
|
|
"cltv_expiry_delta": 18
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"short_channel_id_dir": "0x0x1/1",
|
|
"timestamp": 1738000000,
|
|
"minimum_msat": 100000
|
|
}
|
|
],
|
|
"biases": [
|
|
{
|
|
"short_channel_id_dir": "109x1x1/1",
|
|
"description": "bigger bias",
|
|
"bias": -5
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"layer": "xpay",
|
|
"persistent": true,
|
|
"disabled_nodes": [],
|
|
"created_channels": [],
|
|
"channel_updates": [],
|
|
"constraints": [],
|
|
"biases": []
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|