core-lightning/doc/schemas/lightning-autocleaninvoice.json
2024-04-04 13:16:27 +10:30

122 lines
2.7 KiB
JSON

{
"$schema": "../rpc-schema-draft.json",
"type": "object",
"additionalProperties": false,
"rpc": "setchannel",
"title": "Command for configuring fees / htlc range advertized for a channel",
"description": [],
"request": {
"required": [],
"properties": {
"expired_by": {
"type": "u64",
"description": [
"How long an invoice must be expired (seconds) before we delete it."
]
},
"cycle_seconds": {
"type": "u64",
"description": [
"The interval (in seconds) between cleaning expired invoices."
]
}
}
},
"response": {
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean",
"description": [
"Whether invoice autocleaning is active."
]
}
},
"allOf": [
{
"if": {
"properties": {
"enabled": {
"type": "boolean",
"enum": [
true
]
}
}
},
"then": {
"additionalProperties": false,
"required": [
"expired_by",
"cycle_seconds"
],
"properties": {
"enabled": {},
"expired_by": {
"type": "u64",
"description": [
"How long an invoice must be expired (seconds) before we delete it."
]
},
"cycle_seconds": {
"type": "u64",
"description": [
"How long an invoice must be expired (seconds) before we delete it."
]
}
}
},
"else": {
"additionalProperties": false,
"properties": {
"enabled": {}
}
}
}
]
},
"json_example": [
{
"request": {
"id": "example:autocleaninvoice#1",
"method": "autocleaninvoice",
"params": {
"cycle_seconds": 8,
"expired_by": 2
}
},
"response": {
"enabled": true,
"cycle_seconds": 8,
"expired_by": 2
}
},
{
"request": {
"id": "example:autocleaninvoice#2",
"method": "autocleaninvoice",
"params": {
"cycle_seconds": 1,
"expired_by": 1
}
},
"response": {
"enabled": true,
"cycle_seconds": 1,
"expired_by": 1
}
}
],
"author": [
"Rusty Russell <<rusty@rustcorp.com.au>> is mainly responsible."
],
"see_also": [
"lightningd-config(5)",
"lightning-listinvoices(7)"
],
"resources": [
"Main web site: <https://github.com/ElementsProject/lightning>"
]
}