core-lightning/doc/schemas/lightning-askrene-inform-channel.json
Rusty Russell 321ec0875f askrene: rework constraints to exist in pairs.
This is a bit more efficient, but moreover the JSONRPC API is more
logical this way.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-10-04 11:27:53 +09:30

100 lines
2.8 KiB
JSON

{
"$schema": "../rpc-schema-draft.json",
"type": "object",
"additionalProperties": false,
"rpc": "askrene-inform-channel",
"title": "Command to add channel capacity restrictions to layer (EXPERIMENTAL)",
"description": [
"WARNING: experimental, so API may change.",
"",
"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"
],
"properties": {
"layer": {
"type": "string",
"description": [
"The name of the layer to apply this change to."
]
},
"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"
],
"properties": {
"constraints": {
"type": "array",
"items": {
"type": "object",
"required": [
"short_channel_id_dir"
],
"properties": {
"short_channel_id_dir": {
"type": "short_channel_id_dir",
"description": [
"The short channel id and direction"
]
},
"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>> is mainly responsible."
],
"resources": [
"Main web site: <https://github.com/ElementsProject/lightning>"
]
}