{ "$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 <> is mainly responsible." ], "see_also": [ "lightningd-config(5)", "lightning-listinvoices(7)" ], "resources": [ "Main web site: " ] }