mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-24 23:18:25 +01:00
147 lines
3.6 KiB
JSON
147 lines
3.6 KiB
JSON
{
|
|
"$schema": "../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"rpc": "askrene-bias-channel",
|
|
"title": "Command to apply a manual bias to a channel in a layer",
|
|
"added": "v24.11",
|
|
"description": [
|
|
"The **askrene-bias-channel** RPC command tells askrene to favor or disfavor a channel when considering it for routing."
|
|
],
|
|
"request": {
|
|
"required": [
|
|
"layer",
|
|
"short_channel_id_dir",
|
|
"bias"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"layer": {
|
|
"type": "string",
|
|
"description": [
|
|
"The name of the layer to apply this bias to."
|
|
]
|
|
},
|
|
"short_channel_id_dir": {
|
|
"type": "short_channel_id_dir",
|
|
"description": [
|
|
"The short channel id and direction to apply this bias to."
|
|
]
|
|
},
|
|
"bias": {
|
|
"type": "integer",
|
|
"description": [
|
|
"The bias, positive being good and negative being bad (0 being no bias). Useful values are +/-1 through +/-10, though -100 through +100 are possible values."
|
|
]
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": [
|
|
"Description/annotation to display in askrene-listlayers(7)"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"response": {
|
|
"required": [
|
|
"biases"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"biases": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"layer",
|
|
"short_channel_id_dir",
|
|
"bias"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"layer": {
|
|
"type": "string",
|
|
"description": [
|
|
"The name of the layer this bias applies to."
|
|
]
|
|
},
|
|
"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": [
|
|
"The bias (-100 to +100)"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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>"
|
|
],
|
|
"examples": [
|
|
{
|
|
"request": {
|
|
"id": "example:askrene-bias-channel#1",
|
|
"method": "askrene-bias-channel",
|
|
"params": {
|
|
"layer": "test_layers",
|
|
"short_channel_id_dir": "109x1x1/1",
|
|
"bias": 1
|
|
}
|
|
},
|
|
"response": {
|
|
"biases": [
|
|
{
|
|
"layer": "test_layers",
|
|
"short_channel_id_dir": "109x1x1/1",
|
|
"bias": 1
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"request": {
|
|
"id": "example:askrene-bias-channel#2",
|
|
"method": "askrene-bias-channel",
|
|
"params": [
|
|
"test_layers",
|
|
"109x1x1/1",
|
|
-5,
|
|
"bigger bias"
|
|
]
|
|
},
|
|
"response": {
|
|
"biases": [
|
|
{
|
|
"layer": "test_layers",
|
|
"short_channel_id_dir": "109x1x1/1",
|
|
"description": "bigger bias",
|
|
"bias": -5
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|