Changelog-Fixed: Ensure documentation renders correctly when adding/updating new RPCs by detecting non-MDX-compatible pages.
140 lines
4.0 KiB
JSON
140 lines
4.0 KiB
JSON
{
|
|
"$schema": "../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"rpc": "askrene-inform-channel",
|
|
"title": "Command to add channel capacity restrictions to layer",
|
|
"added": "v24.11",
|
|
"description": [
|
|
"The **askrene-inform-channel** RPC command tells askrene about channels we used so it can update its capacity estimates. For most accuracy, you should remove your own reservations before calling this. It can be applied whether the current channel exists or not."
|
|
],
|
|
"request": {
|
|
"required": [
|
|
"layer",
|
|
"short_channel_id_dir",
|
|
"amount_msat",
|
|
"inform"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"layer": {
|
|
"type": "string",
|
|
"description": [
|
|
"The name of the layer to apply this change to. Also causes us to consider any reservations which are local to that layer (which is useful for fake channels where `layer` is set in an `askrene-reserve` `path` object)."
|
|
]
|
|
},
|
|
"short_channel_id_dir": {
|
|
"type": "short_channel_id_dir",
|
|
"description": [
|
|
"The short channel id and direction to apply this change to."
|
|
]
|
|
},
|
|
"amount_msat": {
|
|
"type": "msat",
|
|
"description": [
|
|
"The amount we used on the channel"
|
|
]
|
|
},
|
|
"inform": {
|
|
"type": "string",
|
|
"enum": [
|
|
"constrained",
|
|
"unconstrained",
|
|
"succeeded"
|
|
],
|
|
"description": [
|
|
"Whether this payment passed (implying capacity of at least that amount), failed (implying maximum capacity of one msat less), or succeeded (implying capacity has been reduced in this direction)"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"response": {
|
|
"required": [
|
|
"constraints"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"constraints": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"layer",
|
|
"short_channel_id_dir",
|
|
"timestamp"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"short_channel_id_dir": {
|
|
"type": "short_channel_id_dir",
|
|
"description": [
|
|
"The short channel id and direction"
|
|
]
|
|
},
|
|
"layer": {
|
|
"type": "string",
|
|
"description": [
|
|
"The name of the layer to apply this change to."
|
|
]
|
|
},
|
|
"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."
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"see_also": [
|
|
"lightning-getroutes(7)",
|
|
"lightning-askrene-disable-node(7)",
|
|
"lightning-askrene-create-channel(7)",
|
|
"lightning-askrene-listlayers(7)",
|
|
"lightning-askrene-age(7)"
|
|
],
|
|
"author": [
|
|
"Rusty Russell [rusty@rustcorp.com.au](mailto:rusty@rustcorp.com.au) is mainly responsible."
|
|
],
|
|
"resources": [
|
|
"Main web site: [https://github.com/ElementsProject/lightning](https://github.com/ElementsProject/lightning)"
|
|
],
|
|
"examples": [
|
|
{
|
|
"request": {
|
|
"id": "example:askrene-inform-channel#1",
|
|
"method": "askrene-inform-channel",
|
|
"params": {
|
|
"layer": "test_layers",
|
|
"short_channel_id_dir": "0x0x1/1",
|
|
"amount_msat": 100000,
|
|
"inform": "unconstrained"
|
|
}
|
|
},
|
|
"response": {
|
|
"constraints": [
|
|
{
|
|
"layer": "test_layers",
|
|
"short_channel_id_dir": "0x0x1/1",
|
|
"timestamp": 1738000000,
|
|
"minimum_msat": 100000
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|