diff --git a/Makefile b/Makefile index e6da7a1b8..5a5622fa9 100644 --- a/Makefile +++ b/Makefile @@ -356,6 +356,7 @@ include connectd/Makefile include lightningd/Makefile include cli/Makefile include doc/Makefile +include contrib/msggen/Makefile include devtools/Makefile include tools/Makefile include plugins/Makefile @@ -368,8 +369,8 @@ ifneq ($(RUST),0) include cln-rpc/Makefile include cln-grpc/Makefile -$(MSGGEN_GENALL)&: doc/schemas/*.request.json doc/schemas/*.schema.json - PYTHONPATH=contrib/msggen $(PYTHON) contrib/msggen/msggen/__main__.py +$(MSGGEN_GENALL)&: contrib/msggen/msggen/schema.json + PYTHONPATH=contrib/msggen $(PYTHON) contrib/msggen/msggen/__main__.py generate # The compiler assumes that the proto files are in the same # directory structure as the generated files will be. Since we diff --git a/cln-rpc/src/model.rs b/cln-rpc/src/model.rs index 80c383717..caaa6a29e 100644 --- a/cln-rpc/src/model.rs +++ b/cln-rpc/src/model.rs @@ -3,7 +3,7 @@ // This file was automatically generated using the following command: // // ```bash -// contrib/msggen/msggen/__main__.py +// contrib/msggen/msggen/__main__.py generate // ``` // // Do not edit this file, it'll be overwritten. Rather edit the schema that diff --git a/contrib/msggen/.gitignore b/contrib/msggen/.gitignore new file mode 100644 index 000000000..da61665fd --- /dev/null +++ b/contrib/msggen/.gitignore @@ -0,0 +1 @@ +contrib/msggen/dist/ \ No newline at end of file diff --git a/contrib/msggen/Makefile b/contrib/msggen/Makefile new file mode 100644 index 000000000..ff1d85210 --- /dev/null +++ b/contrib/msggen/Makefile @@ -0,0 +1,4 @@ +#! /usr/bin/make + +contrib/msggen/msggen/schema.json: ${SCHEMAS} + PYTHONPATH=contrib/msggen ${PYTHON} contrib/msggen/msggen/__main__.py bundle doc/schemas diff --git a/contrib/msggen/msggen/__main__.py b/contrib/msggen/msggen/__main__.py index 20fcbc6f6..ee1a5d1df 100644 --- a/contrib/msggen/msggen/__main__.py +++ b/contrib/msggen/msggen/__main__.py @@ -6,7 +6,7 @@ from msggen.gen.grpc import GrpcGenerator, GrpcConverterGenerator, GrpcUnconvert from msggen.gen.grpc2py import Grpc2PyGenerator from msggen.gen.rust import RustGenerator from msggen.gen.generator import GeneratorChain -from msggen.utils import load_jsonrpc_service +from msggen.utils import load_jsonrpc_service, combine_schemas import logging from msggen.patch import VersionAnnotationPatch, OptionalPatch, OverridePatch from msggen.checks import VersioningCheck @@ -62,11 +62,9 @@ def write_msggen_meta(meta): os.rename(f'.msggen.json.tmp.{pid}', '.msggen.json') -def run(rootdir: Path): - schemadir = rootdir / "doc" / "schemas" +def run(): meta = load_msggen_meta() service = load_jsonrpc_service( - schema_dir=schemadir, ) p = VersionAnnotationPatch(meta=meta) @@ -91,14 +89,25 @@ def run(rootdir: Path): write_msggen_meta(meta) -if __name__ == "__main__": +def main(): parser = argparse.ArgumentParser() - parser.add_argument( - '--rootdir', - dest='rootdir', - default='.' - ) + subcmds = parser.add_subparsers(required=True, dest='command') + bundle = subcmds.add_parser("bundle", help="bundle schemas into package") + bundle.add_argument('schema_dir', action='store') + + subcmds.add_parser("generate", help="generate all files") args = parser.parse_args() - run( - rootdir=Path(args.rootdir) - ) + + if args.command == 'generate': + run() + elif args.command == 'bundle': + dest = Path(__file__).parent / 'schema.json' + src = Path(__file__).parent / '..' / '..' / '..' / 'doc' / 'schemas' + + print(f"Combining schemas from {src.resolve()} into {dest.resolve()}") + schema = combine_schemas(src, dest) + print(f"Created {dest} from {len(schema)} files") + + +if __name__ == "__main__": + main() diff --git a/contrib/msggen/msggen/schema.json b/contrib/msggen/msggen/schema.json new file mode 100644 index 000000000..21f39a027 --- /dev/null +++ b/contrib/msggen/msggen/schema.json @@ -0,0 +1,16739 @@ +{ + "addgossip.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "message" + ], + "properties": { + "message": { + "type": "hex", + "description": "The raw, hex-encoded, gossip message to add to the local gossip view." + } + } + }, + "addgossip.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": {} + }, + "addpsbtoutput.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "satoshi" + ], + "added": "v23.11", + "properties": { + "satoshi": { + "type": "msat" + }, + "locktime": { + "type": "u32" + }, + "initialpsbt": { + "type": "string", + "description": "the (optional) base 64 encoded PSBT to begin with. If not specified, one will be generated automatically" + }, + "destination": { + "type": "string" + } + } + }, + "addpsbtoutput.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "psbt", + "estimated_added_weight", + "outnum" + ], + "added": "v23.11", + "properties": { + "psbt": { + "type": "string", + "description": "Unsigned PSBT which fulfills the parameters given" + }, + "estimated_added_weight": { + "type": "u32", + "description": "The estimated weight of the added output" + }, + "outnum": { + "type": "u32", + "description": "The 0-based number where the output was placed" + } + } + }, + "autoclean-once.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "subsystem", + "age" + ], + "properties": { + "subsystem": { + "type": "string", + "enum": [ + "succeededforwards", + "failedforwards", + "succeededpays", + "failedpays", + "paidinvoices", + "expiredinvoices" + ], + "description": "What subsystem to clean" + }, + "age": { + "type": "u64", + "description": "How many seconds old an entry must be to delete it" + } + } + }, + "autoclean-once.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "autoclean" + ], + "properties": { + "autoclean": { + "type": "object", + "additionalProperties": false, + "properties": { + "succeededforwards": { + "type": "object", + "additionalProperties": false, + "required": [ + "cleaned", + "uncleaned" + ], + "properties": { + "cleaned": { + "type": "u64", + "description": "total number of deletions done this run" + }, + "uncleaned": { + "type": "u64", + "description": "the total number of entries *not* deleted this run" + } + } + }, + "failedforwards": { + "type": "object", + "additionalProperties": false, + "required": [ + "cleaned", + "uncleaned" + ], + "properties": { + "cleaned": { + "type": "u64", + "description": "total number of deletions done this run" + }, + "uncleaned": { + "type": "u64", + "description": "the total number of entries *not* deleted this run" + } + } + }, + "succeededpays": { + "type": "object", + "additionalProperties": false, + "required": [ + "cleaned", + "uncleaned" + ], + "properties": { + "cleaned": { + "type": "u64", + "description": "total number of deletions done this run" + }, + "uncleaned": { + "type": "u64", + "description": "the total number of entries *not* deleted this run" + } + } + }, + "failedpays": { + "type": "object", + "additionalProperties": false, + "required": [ + "cleaned", + "uncleaned" + ], + "properties": { + "cleaned": { + "type": "u64", + "description": "total number of deletions done this run" + }, + "uncleaned": { + "type": "u64", + "description": "the total number of entries *not* deleted this run" + } + } + }, + "paidinvoices": { + "type": "object", + "additionalProperties": false, + "required": [ + "cleaned", + "uncleaned" + ], + "properties": { + "cleaned": { + "type": "u64", + "description": "total number of deletions done this run" + }, + "uncleaned": { + "type": "u64", + "description": "the total number of entries *not* deleted this run" + } + } + }, + "expiredinvoices": { + "type": "object", + "additionalProperties": false, + "required": [ + "cleaned", + "uncleaned" + ], + "properties": { + "cleaned": { + "type": "u64", + "description": "total number of deletions done this run" + }, + "uncleaned": { + "type": "u64", + "description": "the total number of entries *not* deleted this run" + } + } + } + } + } + } + }, + "autoclean-status.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "subsystem": { + "type": "string", + "enum": [ + "succeededforwards", + "failedforwards", + "succeededpays", + "failedpays", + "paidinvoices", + "expiredinvoices" + ], + "description": "What subsystem to ask about" + } + } + }, + "autoclean-status.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "autoclean" + ], + "properties": { + "autoclean": { + "type": "object", + "additionalProperties": false, + "properties": { + "succeededforwards": { + "type": "object", + "additionalProperties": true, + "required": [ + "enabled", + "cleaned" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "whether autocleaning is enabled for successful listforwards" + }, + "cleaned": { + "type": "u64", + "description": "total number of deletions done (ever)" + } + }, + "if": { + "properties": { + "enabled": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "enabled", + "age", + "cleaned" + ], + "properties": { + "enabled": {}, + "cleaned": {}, + "age": { + "type": "u64", + "description": "age (in seconds) to delete successful listforwards" + } + } + }, + "else": { + "additionalProperties": false, + "required": [ + "enabled", + "cleaned" + ], + "properties": { + "enabled": {}, + "cleaned": {} + } + } + }, + "failedforwards": { + "type": "object", + "additionalProperties": true, + "required": [ + "enabled", + "cleaned" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "whether autocleaning is enabled for failed listforwards" + }, + "cleaned": { + "type": "u64", + "description": "total number of deletions done (ever)" + } + }, + "if": { + "properties": { + "enabled": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "enabled", + "age", + "cleaned" + ], + "properties": { + "enabled": {}, + "cleaned": {}, + "age": { + "type": "u64", + "description": "age (in seconds) to delete failed listforwards" + } + } + }, + "else": { + "additionalProperties": false, + "required": [ + "enabled", + "cleaned" + ], + "properties": { + "enabled": {}, + "cleaned": {} + } + } + }, + "succeededpays": { + "type": "object", + "additionalProperties": true, + "required": [ + "enabled", + "cleaned" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "whether autocleaning is enabled for successful listpays/listsendpays" + }, + "cleaned": { + "type": "u64", + "description": "total number of deletions done (ever)" + } + }, + "if": { + "properties": { + "enabled": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "enabled", + "age", + "cleaned" + ], + "properties": { + "enabled": {}, + "cleaned": {}, + "age": { + "type": "u64", + "description": "age (in seconds) to delete successful listpays/listsendpays" + } + } + }, + "else": { + "additionalProperties": false, + "required": [ + "enabled", + "cleaned" + ], + "properties": { + "enabled": {}, + "cleaned": {} + } + } + }, + "failedpays": { + "type": "object", + "additionalProperties": true, + "required": [ + "enabled", + "cleaned" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "whether autocleaning is enabled for failed listpays/listsendpays" + }, + "cleaned": { + "type": "u64", + "description": "total number of deletions done (ever)" + } + }, + "if": { + "properties": { + "enabled": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "enabled", + "age", + "cleaned" + ], + "properties": { + "enabled": {}, + "cleaned": {}, + "age": { + "type": "u64", + "description": "age (in seconds) to delete failed listpays/listsendpays" + } + } + }, + "else": { + "additionalProperties": false, + "required": [ + "enabled", + "cleaned" + ], + "properties": { + "enabled": {}, + "cleaned": {} + } + } + }, + "paidinvoices": { + "type": "object", + "additionalProperties": true, + "required": [ + "enabled", + "cleaned" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "whether autocleaning is enabled for paid listinvoices" + }, + "cleaned": { + "type": "u64", + "description": "total number of deletions done (ever)" + } + }, + "if": { + "properties": { + "enabled": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "enabled", + "age", + "cleaned" + ], + "properties": { + "enabled": {}, + "cleaned": {}, + "age": { + "type": "u64", + "description": "age (in seconds) to paid listinvoices" + } + } + }, + "else": { + "additionalProperties": false, + "required": [ + "enabled", + "cleaned" + ], + "properties": { + "enabled": {}, + "cleaned": {} + } + } + }, + "expiredinvoices": { + "type": "object", + "additionalProperties": true, + "required": [ + "enabled", + "cleaned" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "whether autocleaning is enabled for expired (unpaid) listinvoices" + }, + "cleaned": { + "type": "u64", + "description": "total number of deletions done (ever)" + } + }, + "if": { + "properties": { + "enabled": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "enabled", + "age", + "cleaned" + ], + "properties": { + "enabled": {}, + "cleaned": {}, + "age": { + "type": "u64", + "description": "age (in seconds) to expired listinvoices" + } + } + }, + "else": { + "additionalProperties": false, + "required": [ + "enabled", + "cleaned" + ], + "properties": { + "enabled": {}, + "cleaned": {} + } + } + } + } + } + } + }, + "autocleaninvoice.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "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" + } + } + }, + "autocleaninvoice.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "whether invoice autocleaning is active" + } + }, + "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": {} + } + } + }, + "batching.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "enable" + ], + "properties": { + "enable": { + "type": "boolean", + "description": "Whether to enable or disable transaction batching" + } + } + }, + "batching.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": {} + }, + "bkpr-channelsapy.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channels_apy" + ], + "properties": { + "channels_apy": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "account", + "routed_out_msat", + "routed_in_msat", + "lease_fee_paid_msat", + "lease_fee_earned_msat", + "pushed_out_msat", + "pushed_in_msat", + "our_start_balance_msat", + "channel_start_balance_msat", + "fees_out_msat", + "utilization_out", + "utilization_in", + "apy_out", + "apy_in", + "apy_total" + ], + "properties": { + "account": { + "type": "string", + "description": "The account name. If the account is a channel, the channel_id. The 'net' entry is the rollup of all channel accounts" + }, + "routed_out_msat": { + "type": "msat", + "description": "Sats routed (outbound)" + }, + "routed_in_msat": { + "type": "msat", + "description": "Sats routed (inbound)" + }, + "lease_fee_paid_msat": { + "type": "msat", + "description": "Sats paid for leasing inbound (liquidity ads)" + }, + "lease_fee_earned_msat": { + "type": "msat", + "description": "Sats earned for leasing outbound (liquidity ads)" + }, + "pushed_out_msat": { + "type": "msat", + "description": "Sats pushed to peer at open" + }, + "pushed_in_msat": { + "type": "msat", + "description": "Sats pushed in from peer at open" + }, + "our_start_balance_msat": { + "type": "msat", + "description": "Starting balance in channel at funding. Note that if our start balance is zero, any _initial field will be omitted (can't divide by zero)" + }, + "channel_start_balance_msat": { + "type": "msat", + "description": "Total starting balance at funding" + }, + "fees_out_msat": { + "type": "msat", + "description": "Fees earned on routed outbound" + }, + "fees_in_msat": { + "type": "msat", + "description": "Fees earned on routed inbound" + }, + "utilization_out": { + "type": "string", + "description": "Sats routed outbound / total start balance" + }, + "utilization_out_initial": { + "type": "string", + "description": "Sats routed outbound / our start balance" + }, + "utilization_in": { + "type": "string", + "description": "Sats routed inbound / total start balance" + }, + "utilization_in_initial": { + "type": "string", + "description": "Sats routed inbound / our start balance" + }, + "apy_out": { + "type": "string", + "description": "Fees earned on outbound routed payments / total start balance for the length of time this channel has been open amortized to a year (APY)" + }, + "apy_out_initial": { + "type": "string", + "description": "Fees earned on outbound routed payments / our start balance for the length of time this channel has been open amortized to a year (APY)" + }, + "apy_in": { + "type": "string", + "description": "Fees earned on inbound routed payments / total start balance for the length of time this channel has been open amortized to a year (APY)" + }, + "apy_in_initial": { + "type": "string", + "description": "Fees earned on inbound routed payments / our start balance for the length of time this channel has been open amortized to a year (APY)" + }, + "apy_total": { + "type": "string", + "description": "Total fees earned on routed payments / total start balance for the length of time this channel has been open amortized to a year (APY)" + }, + "apy_total_initial": { + "type": "string", + "description": "Total fees earned on routed payments / our start balance for the length of time this channel has been open amortized to a year (APY)" + }, + "apy_lease": { + "type": "string", + "description": "Lease fees earned over total amount leased for the lease term, amortized to a year (APY). Only appears if channel was leased out by us" + } + } + } + } + } + }, + "bkpr-dumpincomecsv.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "unevaluatedProperties": false, + "required": [ + "csv_file", + "csv_format" + ], + "properties": { + "csv_file": { + "type": "string", + "description": "File that the csv was generated to" + }, + "csv_format": { + "type": "string", + "enum": [ + "cointracker", + "koinly", + "harmony", + "quickbooks" + ], + "description": "Format to print csv as" + } + } + }, + "bkpr-inspect.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "txs" + ], + "properties": { + "txs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "txid", + "fees_paid_msat", + "outputs" + ], + "properties": { + "txid": { + "type": "txid", + "description": "transaction id" + }, + "blockheight": { + "type": "u32", + "description": "Blockheight of transaction" + }, + "fees_paid_msat": { + "type": "msat", + "description": "Amount paid in sats for this tx" + }, + "outputs": { + "type": "array", + "items": { + "type": "object", + "required": [ + "account", + "outnum", + "output_value_msat", + "currency" + ], + "additionalProperties": false, + "properties": { + "account": { + "type": "string", + "description": "Account this output affected" + }, + "outnum": { + "type": "u32", + "description": "Index of output" + }, + "output_value_msat": { + "type": "msat", + "description": "Value of the output" + }, + "currency": { + "type": "string", + "description": "human-readable bech32 part for this coin type" + }, + "credit_msat": { + "type": "msat", + "description": "Amount credited to account" + }, + "debit_msat": { + "type": "msat", + "description": "Amount debited from account" + }, + "originating_account": { + "type": "string", + "description": "Account this output originated from" + }, + "output_tag": { + "type": "string", + "description": "Description of output creation event" + }, + "spend_tag": { + "type": "string", + "description": "Description of output spend event" + }, + "spending_txid": { + "type": "txid", + "description": "Transaction this output was spent in" + }, + "payment_id": { + "type": "hex", + "description": "lightning payment identifier. For an htlc, this will be the preimage." + } + }, + "allOf": [ + { + "if": { + "required": [ + "credit_msat" + ] + }, + "then": { + "required": [ + "output_tag" + ], + "additionalProperties": false, + "properties": { + "account": {}, + "outnum": {}, + "output_value_msat": {}, + "currency": {}, + "credit_msat": {}, + "originating_account": {}, + "debit_msat": {}, + "output_tag": {}, + "spend_tag": {}, + "spending_txid": {}, + "payment_id": {} + } + } + }, + { + "if": { + "required": [ + "spending_txid" + ] + }, + "then": { + "required": [ + "spend_tag", + "debit_msat" + ], + "additionalProperties": false, + "properties": { + "account": {}, + "outnum": {}, + "output_value_msat": {}, + "currency": {}, + "credit_msat": {}, + "originating_account": {}, + "debit_msat": {}, + "output_tag": {}, + "spend_tag": {}, + "spending_txid": {}, + "payment_id": {} + } + } + } + ] + } + } + } + } + } + } + }, + "bkpr-listaccountevents.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "events" + ], + "properties": { + "events": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "account", + "type", + "tag", + "credit_msat", + "debit_msat", + "currency", + "timestamp" + ], + "properties": { + "account": { + "type": "string", + "description": "The account name. If the account is a channel, the channel_id" + }, + "type": { + "type": "string", + "enum": [ + "onchain_fee", + "chain", + "channel" + ], + "description": "Coin movement type" + }, + "tag": { + "type": "string", + "description": "Description of movement" + }, + "credit_msat": { + "type": "msat", + "description": "Amount credited" + }, + "debit_msat": { + "type": "msat", + "description": "Amount debited" + }, + "currency": { + "type": "string", + "description": "human-readable bech32 part for this coin type" + }, + "timestamp": { + "type": "u32", + "description": "Timestamp this event was recorded by the node. For consolidated events such as onchain_fees, the most recent timestamp" + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "chain" + ] + } + } + }, + "then": { + "properties": { + "account": {}, + "type": {}, + "tag": {}, + "credit_msat": {}, + "debit_msat": {}, + "currency": {}, + "timestamp": {}, + "outpoint": { + "type": "string", + "description": "The txid:outnum for this event" + }, + "blockheight": { + "type": "u32", + "description": "For chain events, blockheight this occured at" + }, + "origin": { + "type": "string", + "description": "The account this movement originated from" + }, + "payment_id": { + "type": "hex", + "description": "lightning payment identifier. For an htlc, this will be the preimage." + }, + "txid": { + "type": "txid", + "description": "The txid of the transaction that created this event" + }, + "description": { + "type": "string", + "description": "The description of this event" + } + }, + "required": [ + "outpoint", + "blockheight" + ], + "additionalProperties": false + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "onchain_fee" + ] + } + } + }, + "then": { + "properties": { + "account": {}, + "type": {}, + "tag": {}, + "credit_msat": {}, + "debit_msat": {}, + "currency": {}, + "timestamp": {}, + "description": {}, + "txid": { + "type": "txid", + "description": "The txid of the transaction that created this event" + } + }, + "required": [ + "txid" + ], + "additionalProperties": false + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "channel" + ] + } + } + }, + "then": { + "properties": { + "account": {}, + "type": {}, + "tag": {}, + "credit_msat": {}, + "debit_msat": {}, + "currency": {}, + "timestamp": {}, + "description": {}, + "fees_msat": { + "type": "msat", + "description": "Amount paid in fees" + }, + "is_rebalance": { + "type": "boolean", + "description": "Is this payment part of a rebalance" + }, + "payment_id": { + "type": "hex", + "description": "lightning payment identifier. For an htlc, this will be the preimage." + }, + "part_id": { + "type": "u32", + "description": "Counter for multi-part payments" + } + }, + "additionalProperties": false + } + } + ] + } + } + } + }, + "bkpr-listbalances.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "accounts" + ], + "properties": { + "accounts": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "account", + "balances" + ], + "properties": { + "account": { + "type": "string", + "description": "The account name. If the account is a channel, the channel_id" + }, + "balances": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "balance_msat", + "coin_type" + ], + "properties": { + "balance_msat": { + "type": "msat", + "description": "Current account balance" + }, + "coin_type": { + "type": "string", + "description": "coin type, same as HRP for bech32" + } + } + } + } + }, + "if": { + "required": [ + "peer_id" + ] + }, + "then": { + "required": [ + "account", + "balances", + "peer_id", + "we_opened", + "account_closed", + "account_resolved" + ], + "additionalProperties": false, + "properties": { + "account": {}, + "balances": {}, + "peer_id": { + "type": "pubkey", + "description": "Node id for the peer this account is with" + }, + "we_opened": { + "type": "boolean", + "description": "Did we initiate this account open (open the channel)" + }, + "account_closed": { + "type": "boolean", + "description": "" + }, + "account_resolved": { + "type": "boolean", + "description": "Has this channel been closed and all outputs resolved?" + }, + "resolved_at_block": { + "type": "u32", + "description": "Blockheight account resolved on chain" + } + } + }, + "else": { + "properties": { + "account": {}, + "balances": {} + }, + "additionalProperties": false + } + } + } + } + }, + "bkpr-listincome.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "added": "pre-v0.10.1", + "required": [], + "additionalProperties": false, + "properties": { + "consolidate_fees": { + "type": "boolean", + "description": "A brief description about consolidate_fees" + }, + "start_time": { + "type": "u32", + "description": "Filters the events after the time" + }, + "end_time": { + "type": "u32", + "description": "Filters the events up to the timestamp" + } + } + }, + "bkpr-listincome.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "income_events" + ], + "properties": { + "income_events": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "account", + "tag", + "credit_msat", + "debit_msat", + "currency", + "timestamp" + ], + "properties": { + "account": { + "type": "string", + "description": "The account name. If the account is a channel, the channel_id" + }, + "tag": { + "type": "string", + "description": "Type of income event" + }, + "credit_msat": { + "type": "msat", + "description": "Amount earned (income)" + }, + "debit_msat": { + "type": "msat", + "description": "Amount spent (expenses)" + }, + "currency": { + "type": "string", + "description": "human-readable bech32 part for this coin type" + }, + "timestamp": { + "type": "u32", + "description": "Timestamp this event was recorded by the node. For consolidated events such as onchain_fees, the most recent timestamp" + }, + "description": { + "type": "string", + "description": "More information about this event. If a `invoice` type, typically the bolt11/bolt12 description" + }, + "outpoint": { + "type": "string", + "description": "The txid:outnum for this event, if applicable" + }, + "txid": { + "type": "txid", + "description": "The txid of the transaction that created this event, if applicable" + }, + "payment_id": { + "type": "hex", + "description": "lightning payment identifier. For an htlc, this will be the preimage." + } + } + } + } + } + }, + "blacklistrune.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "added": "v23.08", + "properties": { + "start": { + "type": "u64", + "description": "first rune unique id to blacklist" + }, + "end": { + "type": "u64", + "description": "final rune unique id to blacklist (defaults to start)" + } + } + }, + "blacklistrune.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "blacklist" + ], + "properties": { + "blacklist": { + "type": "array", + "description": "the resulting blacklist ranges after the command", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "start", + "end" + ], + "properties": { + "start": { + "type": "u64", + "description": "Unique id of first rune in this blacklist range" + }, + "end": { + "type": "u64", + "description": "Unique id of last rune in this blacklist range" + } + } + } + } + } + }, + "check.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": { + "command_to_check": { + "type": "string", + "description": "the *command_to_check* argument" + } + }, + "required": [ + "command_to_check" + ] + }, + "checkmessage.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "message", + "zbase" + ], + "properties": { + "message": { + "type": "string", + "description": "Message to be checked against the signature." + }, + "zbase": { + "type": "string", + "description": "The Zbase32 encoded signature to verify." + }, + "pubkey": { + "type": "pubkey", + "description": "The Zbase32 encoded signature to verify." + } + } + }, + "checkmessage.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "verified", + "pubkey" + ], + "additionalProperties": false, + "properties": { + "verified": { + "type": "boolean", + "enum": [ + true + ], + "description": "whether the signature was valid" + }, + "pubkey": { + "type": "pubkey", + "description": "the *pubkey* parameter, or the pubkey found by looking for known nodes" + } + } + }, + "checkrune.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "rune" + ], + "added": "v23.08", + "properties": { + "rune": { + "type": "string", + "description": "rune to check for authorization" + }, + "nodeid": { + "type": "string", + "description": "node id of requesting node *(required until v23.11)*" + }, + "method": { + "type": "string", + "description": "method for which rune needs to be validated *(required until v23.11)*" + }, + "params": { + "oneOf": [ + { + "type": "array", + "description": "array of positional parameters" + }, + { + "type": "object", + "description": "parameters for method" + } + ] + } + } + }, + "checkrune.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "valid" + ], + "properties": { + "valid": { + "type": "boolean", + "description": "true if the rune is valid" + } + } + }, + "close.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "peer id, channel id or short_channel_id" + }, + "unilateraltimeout": { + "type": "u32", + "description": "" + }, + "destination": { + "type": "string", + "description": "" + }, + "fee_negotiation_step": { + "type": "string", + "description": "" + }, + "wrong_funding": { + "type": "outpoint", + "description": "" + }, + "force_lease_closed": { + "type": "boolean", + "description": "" + }, + "feerange": { + "type": "array", + "items": { + "type": "feerate" + }, + "description": "" + } + } + }, + "close.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mutual", + "unilateral", + "unopened" + ], + "description": "Whether we successfully negotiated a mutual close, closed without them, or discarded not-yet-opened channel" + } + }, + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "mutual", + "unilateral" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "tx", + "txid" + ], + "properties": { + "type": {}, + "tx": { + "type": "hex", + "description": "the raw bitcoin transaction used to close the channel (if it was open)" + }, + "txid": { + "type": "txid", + "description": "the transaction id of the *tx* field" + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "type": {} + } + } + }, + "commando-blacklist.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "added": "v23.05", + "deprecated": [ + "v23.08", + "v24.08" + ], + "properties": { + "start": { + "type": "u64", + "description": "first rune unique id to blacklist" + }, + "end": { + "type": "u64", + "description": "final rune unique id to blacklist (defaults to start)" + } + } + }, + "commando-blacklist.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "blacklist" + ], + "properties": { + "blacklist": { + "type": "array", + "description": "the resulting blacklist ranges after the command", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "start", + "end" + ], + "properties": { + "start": { + "type": "u64", + "description": "Unique id of first rune in this blacklist range" + }, + "end": { + "type": "u64", + "description": "Unique id of last rune in this blacklist range" + } + } + } + } + } + }, + "commando-listrunes.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "added": "v23.05", + "deprecated": [ + "v23.08", + "v24.05" + ], + "properties": { + "rune": { + "type": "string", + "description": "optional rune to list" + } + } + }, + "commando-listrunes.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "runes" + ], + "properties": { + "runes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "rune", + "unique_id", + "restrictions", + "restrictions_as_english" + ], + "properties": { + "rune": { + "type": "string", + "description": "Base64 encoded rune" + }, + "unique_id": { + "type": "string", + "description": "Unique id assigned when the rune was generated; this is always a u64 for commando runes" + }, + "restrictions": { + "type": "array", + "description": "The restrictions on what commands this rune can authorize", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "alternatives", + "english" + ], + "properties": { + "alternatives": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "fieldname", + "value", + "condition", + "english" + ], + "properties": { + "fieldname": { + "type": "string", + "description": "The field this restriction applies to; see commando-rune(7)" + }, + "value": { + "type": "string", + "description": "The value accepted for this field" + }, + "condition": { + "type": "string", + "description": "The way to compare fieldname and value" + }, + "english": { + "type": "string", + "description": "English readable description of this alternative" + } + } + } + }, + "english": { + "type": "string", + "description": "English readable summary of alternatives above" + } + } + } + }, + "restrictions_as_english": { + "type": "string", + "description": "English readable description of the restrictions array above" + }, + "stored": { + "type": "boolean", + "enum": [ + false + ], + "description": "This is false if the rune does not appear in our datastore (only possible when `rune` is specified)" + }, + "blacklisted": { + "type": "boolean", + "enum": [ + true + ], + "description": "The rune has been blacklisted; see commando-blacklist(7)" + }, + "last_used": { + "type": "number", + "description": "The last time this rune was successfully used", + "added": "23.11" + }, + "our_rune": { + "type": "boolean", + "enum": [ + false + ], + "description": "This is not a rune for this node (only possible when `rune` is specified)" + } + } + } + } + } + }, + "commando-rune.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "deprecated": [ + "v23.08", + "v23.05" + ], + "properties": { + "rune": { + "type": "string", + "description": "optional rune to add to" + }, + "restrictions": { + "oneOf": [ + { + "type": "array", + "description": "array of restrictions to add to rune", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "type": "string", + "enum": [ + "readonly" + ], + "description": "readonly string to indicate standard readonly restrictions." + } + ] + } + } + }, + "commando-rune.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "rune", + "unique_id" + ], + "properties": { + "rune": { + "type": "string", + "description": "the resulting rune" + }, + "unique_id": { + "type": "string", + "description": "the id of this rune: this is set at creation and cannot be changed (even as restrictions are added)" + }, + "warning_unrestricted_rune": { + "type": "string", + "description": "A warning shown when runes are created with powers that could drain your node" + } + } + }, + "commando.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "peer_id", + "method" + ], + "properties": { + "peer_id": { + "type": "pubkey", + "description": "peer to command" + }, + "method": { + "type": "string", + "description": "method to invoke on peer" + }, + "params": { + "oneOf": [ + { + "type": "array", + "description": "array of positional parameters" + }, + { + "type": "object", + "description": "parameters for method" + } + ] + }, + "rune": { + "type": "string", + "description": "rune to authorize the command" + }, + "filter": { + "type": "object", + "additionalProperties": true, + "description": "filter to peer to apply to any successful result" + } + } + }, + "connect.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "" + }, + "host": { + "type": "string", + "description": "The hostname of the node." + }, + "port": { + "type": "u16", + "description": "Port to try connecting to" + } + } + }, + "connect.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "features", + "direction", + "address" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "the peer we connected to" + }, + "features": { + "type": "hex", + "description": "BOLT 9 features bitmap offered by peer" + }, + "direction": { + "type": "string", + "enum": [ + "in", + "out" + ], + "description": "Whether they initiated connection or we did" + }, + "address": { + "type": "object", + "description": "Address information (mainly useful if **direction** is *out*)", + "additionalProperties": true, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local socket", + "ipv4", + "ipv6", + "torv2", + "torv3" + ], + "description": "Type of connection (*torv2*/*torv3* only if **direction** is *out*)" + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "local socket" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "socket" + ], + "properties": { + "type": {}, + "socket": { + "type": "string", + "description": "socket filename" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "ipv4", + "ipv6", + "torv2", + "torv3" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "address", + "port" + ], + "properties": { + "type": {}, + "address": { + "type": "string", + "description": "address in expected format for **type**" + }, + "port": { + "type": "u16", + "description": "port number" + } + } + } + } + ] + } + } + }, + "createinvoice.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "invstring", + "label", + "preimage" + ], + "properties": { + "invstring": { + "type": "string", + "description": "" + }, + "label": { + "type": "string", + "description": "" + }, + "preimage": { + "type": "hex", + "description": "" + } + } + }, + "createinvoice.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "label", + "created_index", + "payment_hash", + "status", + "description", + "expires_at" + ], + "properties": { + "label": { + "type": "string", + "description": "the label for the invoice" + }, + "bolt11": { + "type": "string", + "description": "the bolt11 string (always present unless **bolt12** is)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string instead of **bolt11** (**experimental-offers** only)" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "amount_msat": { + "type": "msat", + "description": "The amount of the invoice (if it has one)" + }, + "status": { + "type": "string", + "enum": [ + "paid", + "expired", + "unpaid" + ], + "description": "Whether it has been paid, or can no longer be paid" + }, + "description": { + "type": "string", + "description": "Description extracted from **bolt11** or **bolt12**" + }, + "expires_at": { + "type": "u64", + "description": "UNIX timestamp of when invoice expires (or expired)" + }, + "created_index": { + "type": "u64", + "added": "v23.08", + "description": "1-based index indicating order this invoice was created in" + }, + "pay_index": { + "type": "u64", + "description": "Incrementing id for when this was paid (**status** *paid* only)" + }, + "amount_received_msat": { + "type": "msat", + "description": "Amount actually received (**status** *paid* only)" + }, + "paid_at": { + "type": "u64", + "description": "UNIX timestamp of when invoice was paid (**status** *paid* only)" + }, + "paid_outpoint": { + "type": "object", + "description": "Outpoint this invoice was paid with (**status** *paid* only)", + "added": "v23.11", + "additionalProperties": false, + "required": [ + "txid", + "outnum" + ], + "properties": { + "txid": { + "added": "v23.11", + "type": "txid", + "description": "ID of the transaction that paid the invoice (**status** *paid* only)" + }, + "outnum": { + "added": "v23.11", + "type": "u32", + "description": "The 0-based output number of the transaction that paid the invoice (**status** *paid* only)" + } + } + }, + "payment_preimage": { + "type": "secret", + "description": "the proof of payment: SHA256 of this **payment_hash**" + }, + "local_offer_id": { + "type": "hex", + "description": "the *id* of our offer which created this invoice (**experimental-offers** only).", + "maxLength": 64, + "minLength": 64 + }, + "invreq_payer_note": { + "type": "string", + "description": "the optional *invreq_payer_note* from invoice_request which created this invoice (**experimental-offers** only)." + } + } + }, + "createonion.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "hops", + "assocdata" + ], + "properties": { + "hops": { + "type": "array", + "description": "", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "pubkey", + "payload" + ], + "properties": { + "pubkey": { + "type": "pubkey" + }, + "payload": { + "type": "hex" + } + } + } + }, + "assocdata": { + "type": "hex", + "description": "" + }, + "session_key": { + "type": "secret" + }, + "onion_size": { + "type": "u16" + } + } + }, + "createonion.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "onion", + "shared_secrets" + ], + "properties": { + "onion": { + "type": "hex", + "description": "the onion packet (*onion_size* bytes)" + }, + "shared_secrets": { + "type": "array", + "description": "one shared secret for each node in the *hops* parameter", + "items": { + "type": "secret", + "description": "the shared secret with this hop" + } + } + } + }, + "createrune.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "added": "v23.08", + "properties": { + "rune": { + "type": "string", + "description": "optional rune to add to" + }, + "restrictions": { + "oneOf": [ + { + "type": "array", + "description": "array of restrictions to add to rune", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "type": "string", + "enum": [ + "readonly" + ], + "description": "readonly string to indicate standard readonly restrictions." + } + ] + } + } + }, + "createrune.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "rune", + "unique_id" + ], + "properties": { + "rune": { + "type": "string", + "description": "the resulting rune" + }, + "unique_id": { + "type": "string", + "description": "the id of this rune: this is set at creation and cannot be changed (even as restrictions are added)" + }, + "warning_unrestricted_rune": { + "type": "string", + "description": "A warning shown when runes are created with powers that could drain your node" + } + } + }, + "datastore.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "key" + ], + "properties": { + "key": { + "oneOf": [ + { + "type": "array", + "description": "key is an array of values (though a single value is treated as a one-element array), to form a heirarchy. Using the first element of the key as the plugin name (e.g. [ 'summary' ]) is recommended. A key can either have children or a value, never both: parents are created and removed automatically.", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] + }, + "string": { + "type": "string", + "description": "" + }, + "hex": { + "type": "hex", + "description": "" + }, + "mode": { + "type": "string", + "enum": [ + "must-create", + "must-replace", + "create-or-replace", + "must-append", + "create-or-append" + ], + "description": "" + }, + "generation": { + "type": "u64", + "description": "If specified, means that the update will fail if the previously-existing data is not exactly that generation. This allows for simple atomicity. This is only legal with mode \u201cmust-replace\u201d or \u201cmust-append\u201d." + } + } + }, + "datastore.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "key" + ], + "properties": { + "key": { + "type": "array", + "items": { + "type": "string", + "description": "Part of the key added to the datastore" + } + }, + "generation": { + "type": "u64", + "description": "The number of times this has been updated" + }, + "hex": { + "type": "hex", + "description": "The hex data which has been added to the datastore" + }, + "string": { + "type": "string", + "description": "The data as a string, if it's valid utf-8" + } + } + }, + "datastoreusage.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "added": "v23.11", + "properties": { + "key": { + "oneOf": [ + { + "type": "array", + "description": "key is an array of values (though a single value is treated as a one-element array). Used as the starting point to traverse the datastore.", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] + } + } + }, + "datastoreusage.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "datastoreusage" + ], + "properties": { + "datastoreusage": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "total_bytes" + ], + "properties": { + "key": { + "type": "string", + "description": "The key from which the database was traversed." + }, + "total_bytes": { + "type": "u64", + "description": "The total bytes that are stored under the *key*, including the all descendants data and the size of the keys themselves." + } + } + } + } + }, + "decode.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "added": "v23.05", + "required": [ + "string" + ], + "properties": { + "string": { + "type": "string" + } + } + }, + "decode.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "type", + "valid" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt12 offer", + "bolt12 invoice", + "bolt12 invoice_request", + "bolt11 invoice", + "rune", + "emergency recover" + ], + "description": "what kind of object it decoded to" + }, + "valid": { + "type": "boolean", + "description": "if this is false, you *MUST* not use the result except for diagnostics!" + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt12 offer" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "required": [ + "offer_id", + "offer_node_id", + "offer_description" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "valid": {}, + "offer_id": { + "type": "hex", + "description": "the id we use to identify this offer", + "maxLength": 64, + "minLength": 64 + }, + "offer_chains": { + "type": "array", + "description": "which blockchains this offer is for (missing implies bitcoin mainnet only)", + "items": { + "type": "hash", + "description": "the genesis blockhash" + } + }, + "offer_metadata": { + "type": "hex", + "description": "any metadata the creater of the offer includes" + }, + "offer_currency": { + "type": "string", + "description": "ISO 4217 code of the currency (missing implies Bitcoin)", + "maxLength": 3, + "minLength": 3 + }, + "warning_unknown_offer_currency": { + "type": "string", + "description": "The currency code is unknown (so no `currency_minor_unit`)" + }, + "currency_minor_unit": { + "type": "u32", + "description": "the number of decimal places to apply to amount (if currency known)" + }, + "offer_amount": { + "type": "u64", + "description": "the amount in the `offer_currency` adjusted by `currency_minor_unit`, if any" + }, + "offer_amount_msat": { + "type": "msat", + "description": "the amount in bitcoin (if specified, and no `offer_currency`)" + }, + "offer_description": { + "type": "string", + "description": "the description of the purpose of the offer" + }, + "offer_issuer": { + "type": "string", + "description": "the description of the creator of the offer" + }, + "offer_features": { + "type": "hex", + "description": "the feature bits of the offer" + }, + "offer_absolute_expiry": { + "type": "u64", + "description": "UNIX timestamp of when this offer expires" + }, + "offer_quantity_max": { + "type": "u64", + "description": "the maximum quantity (or, if 0, means any quantity)" + }, + "offer_paths": { + "type": "array", + "description": "Paths to the destination", + "items": { + "type": "object", + "required": [ + "first_node_id", + "blinding", + "path" + ], + "additionalProperties": false, + "properties": { + "first_node_id": { + "type": "pubkey", + "description": "the (presumably well-known) public key of the start of the path" + }, + "blinding": { + "type": "pubkey", + "description": "blinding factor for this path" + }, + "path": { + "type": "array", + "description": "an individual path", + "items": { + "type": "object", + "required": [ + "blinded_node_id", + "encrypted_recipient_data" + ], + "additionalProperties": false, + "properties": { + "blinded_node_id": { + "type": "pubkey", + "description": "node_id of the hop" + }, + "encrypted_recipient_data": { + "type": "hex", + "description": "encrypted TLV entry for this hop" + } + } + } + } + } + } + }, + "offer_node_id": { + "type": "pubkey", + "description": "public key of the offering node" + }, + "offer_recurrence": { + "type": "object", + "description": "how often to this offer should be used", + "required": [ + "period", + "time_unit" + ], + "additionalProperties": false, + "properties": { + "time_unit": { + "type": "u32", + "description": "the BOLT12 time unit" + }, + "time_unit_name": { + "type": "string", + "description": "the name of `time_unit` (if valid)" + }, + "period": { + "type": "u32", + "description": "how many `time_unit` per payment period" + }, + "basetime": { + "type": "u64", + "description": "period starts at this UNIX timestamp" + }, + "start_any_period": { + "type": "u64", + "description": "you can start at any period (only if `basetime` present)" + }, + "limit": { + "type": "u32", + "description": "maximum period number for recurrence" + }, + "paywindow": { + "type": "object", + "description": "when within a period will payment be accepted (default is prior and during the period)", + "required": [ + "seconds_before", + "seconds_after" + ], + "additionalProperties": false, + "properties": { + "seconds_before": { + "type": "u32", + "description": "seconds prior to period start" + }, + "seconds_after": { + "type": "u32", + "description": "seconds after to period start" + }, + "proportional_amount": { + "type": "boolean", + "enum": [ + true + ], + "description": "amount should be scaled if payed after period start" + } + } + } + } + }, + "unknown_offer_tlvs": { + "type": "array", + "description": "Any extra fields we didn't know how to parse", + "items": { + "type": "object", + "required": [ + "type", + "length", + "value" + ], + "additionalProperties": false, + "properties": { + "type": { + "type": "u64", + "description": "The type" + }, + "length": { + "type": "u64", + "description": "The length" + }, + "value": { + "type": "hex", + "description": "The value" + } + } + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt12 offer" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + false + ] + } + } + }, + "then": { + "required": [], + "additionalProperties": false, + "properties": { + "type": {}, + "valid": {}, + "offer_id": {}, + "node_id": {}, + "signature": {}, + "chains": {}, + "currency": {}, + "minor_unit": {}, + "warning_unknown_offer_currency": {}, + "amount": {}, + "amount_msat": {}, + "send_invoice": {}, + "description": {}, + "vendor": {}, + "features": {}, + "absolute_expiry": {}, + "paths": {}, + "quantity_max": {}, + "unknown_offer_tlvs": {}, + "recurrence": {}, + "warning_missing_offer_node_id": { + "type": "string", + "description": "`offer_node_id` is not present" + }, + "warning_invalid_offer_description": { + "type": "string", + "description": "`offer_description` is not valid UTF8" + }, + "warning_missing_offer_description": { + "type": "string", + "description": "`offer_description` is not present" + }, + "warning_invalid_offer_currency": { + "type": "string", + "description": "`offer_currency_code` is not valid UTF8" + }, + "warning_invalid_offer_issuer": { + "type": "string", + "description": "`offer_issuer` is not valid UTF8" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt12 invoice_request" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "required": [ + "offer_node_id", + "offer_description", + "invreq_metadata", + "invreq_payer_id", + "signature" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "valid": {}, + "offer_id": { + "type": "hex", + "description": "the id we use to identify this offer", + "maxLength": 64, + "minLength": 64 + }, + "offer_chains": { + "type": "array", + "description": "which blockchains this offer is for (missing implies bitcoin mainnet only)", + "items": { + "type": "hex", + "description": "the genesis blockhash", + "maxLength": 64, + "minLength": 64 + } + }, + "offer_metadata": { + "type": "hex", + "description": "any metadata the creator of the offer includes" + }, + "offer_currency": { + "type": "string", + "description": "ISO 4217 code of the currency (missing implies Bitcoin)", + "maxLength": 3, + "minLength": 3 + }, + "warning_unknown_offer_currency": { + "type": "string", + "description": "The currency code is unknown (so no `currency_minor_unit`)" + }, + "currency_minor_unit": { + "type": "u32", + "description": "the number of decimal places to apply to amount (if currency known)" + }, + "offer_amount": { + "type": "u64", + "description": "the amount in the `offer_currency` adjusted by `currency_minor_unit`, if any" + }, + "offer_amount_msat": { + "type": "msat", + "description": "the amount in bitcoin (if specified, and no `offer_currency`)" + }, + "offer_description": { + "type": "string", + "description": "the description of the purpose of the offer" + }, + "offer_issuer": { + "type": "string", + "description": "the description of the creator of the offer" + }, + "offer_features": { + "type": "hex", + "description": "the feature bits of the offer" + }, + "offer_absolute_expiry": { + "type": "u64", + "description": "UNIX timestamp of when this offer expires" + }, + "offer_quantity_max": { + "type": "u64", + "description": "the maximum quantity (or, if 0, means any quantity)" + }, + "offer_paths": { + "type": "array", + "description": "Paths to the destination", + "items": { + "type": "object", + "required": [ + "first_node_id", + "blinding", + "path" + ], + "additionalProperties": false, + "properties": { + "first_node_id": { + "type": "pubkey", + "description": "the (presumably well-known) public key of the start of the path" + }, + "blinding": { + "type": "pubkey", + "description": "blinding factor for this path" + }, + "path": { + "type": "array", + "description": "an individual path", + "items": { + "type": "object", + "required": [ + "blinded_node_id", + "encrypted_recipient_data" + ], + "additionalProperties": false, + "properties": { + "blinded_node_id": { + "type": "pubkey", + "description": "node_id of the hop" + }, + "encrypted_recipient_data": { + "type": "hex", + "description": "encrypted TLV entry for this hop" + } + } + } + } + } + } + }, + "offer_node_id": { + "type": "pubkey", + "description": "public key of the offering node" + }, + "offer_recurrence": { + "type": "object", + "description": "how often to this offer should be used", + "required": [ + "period", + "time_unit" + ], + "additionalProperties": false, + "properties": { + "time_unit": { + "type": "u32", + "description": "the BOLT12 time unit" + }, + "time_unit_name": { + "type": "string", + "description": "the name of `time_unit` (if valid)" + }, + "period": { + "type": "u32", + "description": "how many `time_unit` per payment period" + }, + "basetime": { + "type": "u64", + "description": "period starts at this UNIX timestamp" + }, + "start_any_period": { + "type": "u64", + "description": "you can start at any period (only if `basetime` present)" + }, + "limit": { + "type": "u32", + "description": "maximum period number for recurrence" + }, + "paywindow": { + "type": "object", + "description": "when within a period will payment be accepted (default is prior and during the period)", + "required": [ + "seconds_before", + "seconds_after" + ], + "additionalProperties": false, + "properties": { + "seconds_before": { + "type": "u32", + "description": "seconds prior to period start" + }, + "seconds_after": { + "type": "u32", + "description": "seconds after to period start" + }, + "proportional_amount": { + "type": "boolean", + "enum": [ + true + ], + "description": "amount should be scaled if payed after period start" + } + } + } + } + }, + "invreq_metadata": { + "type": "hex", + "description": "the payer-provided blob to derive invreq_payer_id" + }, + "invreq_payer_id": { + "type": "hex", + "description": "the payer-provided key" + }, + "invreq_chain": { + "type": "hex", + "description": "which blockchain this offer is for (missing implies bitcoin mainnet only)", + "maxLength": 64, + "minLength": 64 + }, + "invreq_amount_msat": { + "type": "msat", + "description": "the amount the invoice should be for" + }, + "invreq_features": { + "type": "hex", + "description": "the feature bits of the invoice_request" + }, + "invreq_quantity": { + "type": "u64", + "description": "the number of items to invoice for" + }, + "invreq_payer_note": { + "type": "string", + "description": "a note attached by the payer" + }, + "invreq_recurrence_counter": { + "type": "u32", + "description": "which number request this is for the same invoice" + }, + "invreq_recurrence_start": { + "type": "u32", + "description": "when we're requesting to start an invoice at a non-zero period" + }, + "signature": { + "type": "bip340sig", + "description": "BIP-340 signature of the `invreq_payer_id` on this invoice_request" + }, + "unknown_invoice_request_tlvs": { + "type": "array", + "description": "Any extra fields we didn't know how to parse", + "items": { + "type": "object", + "required": [ + "type", + "length", + "value" + ], + "additionalProperties": false, + "properties": { + "type": { + "type": "u64", + "description": "The type" + }, + "length": { + "type": "u64", + "description": "The length" + }, + "value": { + "type": "hex", + "description": "The value" + } + } + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt12 invoice_request" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + false + ] + } + } + }, + "then": { + "required": [], + "additionalProperties": false, + "properties": { + "type": {}, + "valid": {}, + "offer_id": {}, + "offer_chains": {}, + "offer_metadata": {}, + "offer_currency": {}, + "warning_unknown_offer_currency": {}, + "currency_minor_unit": {}, + "offer_amount": {}, + "offer_amount_msat": {}, + "offer_description": {}, + "offer_issuer": {}, + "offer_features": {}, + "offer_absolute_expiry": {}, + "offer_quantity_max": {}, + "offer_paths": {}, + "offer_node_id": {}, + "offer_recurrence": {}, + "invreq_metadata": {}, + "invreq_payer_id": {}, + "invreq_chain": {}, + "invreq_amount_msat": {}, + "invreq_features": {}, + "invreq_quantity": {}, + "invreq_payer_note": {}, + "invreq_recurrence_counter": {}, + "invreq_recurrence_start": {}, + "warning_invalid_offer_description": { + "type": "string", + "description": "`offer_description` is not valid UTF8" + }, + "warning_missing_offer_description": { + "type": "string", + "description": "`offer_description` is not present" + }, + "warning_invalid_offer_currency": { + "type": "string", + "description": "`offer_currency_code` is not valid UTF8" + }, + "warning_invalid_offer_issuer": { + "type": "string", + "description": "`offer_issuer` is not valid UTF8" + }, + "warning_missing_invreq_metadata": { + "type": "string", + "description": "`invreq_metadata` is not present" + }, + "warning_missing_invreq_payer_id": { + "type": "string", + "description": "`invreq_payer_id` is not present" + }, + "warning_invalid_invreq_payer_note": { + "type": "string", + "description": "`invreq_payer_note` is not valid UTF8" + }, + "warning_missing_invoice_request_signature": { + "type": "string", + "description": "`signature` is not present" + }, + "warning_invalid_invoice_request_signature": { + "type": "string", + "description": "Incorrect `signature`" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt12 invoice" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "required": [ + "offer_node_id", + "offer_description", + "invreq_metadata", + "invreq_payer_id", + "invoice_paths", + "invoice_created_at", + "invoice_payment_hash", + "invoice_amount_msat", + "signature" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "valid": {}, + "offer_id": { + "type": "hex", + "description": "the id we use to identify this offer", + "maxLength": 64, + "minLength": 64 + }, + "offer_chains": { + "type": "array", + "description": "which blockchains this offer is for (missing implies bitcoin mainnet only)", + "items": { + "type": "hex", + "description": "the genesis blockhash", + "maxLength": 64, + "minLength": 64 + } + }, + "offer_metadata": { + "type": "hex", + "description": "any metadata the creator of the offer includes" + }, + "offer_currency": { + "type": "string", + "description": "ISO 4217 code of the currency (missing implies Bitcoin)", + "maxLength": 3, + "minLength": 3 + }, + "warning_unknown_offer_currency": { + "type": "string", + "description": "The currency code is unknown (so no `currency_minor_unit`)" + }, + "currency_minor_unit": { + "type": "u32", + "description": "the number of decimal places to apply to amount (if currency known)" + }, + "offer_amount": { + "type": "u64", + "description": "the amount in the `offer_currency` adjusted by `currency_minor_unit`, if any" + }, + "offer_amount_msat": { + "type": "msat", + "description": "the amount in bitcoin (if specified, and no `offer_currency`)" + }, + "offer_description": { + "type": "string", + "description": "the description of the purpose of the offer" + }, + "offer_issuer": { + "type": "string", + "description": "the description of the creator of the offer" + }, + "offer_features": { + "type": "hex", + "description": "the feature bits of the offer" + }, + "offer_absolute_expiry": { + "type": "u64", + "description": "UNIX timestamp of when this offer expires" + }, + "offer_quantity_max": { + "type": "u64", + "description": "the maximum quantity (or, if 0, means any quantity)" + }, + "offer_paths": { + "type": "array", + "description": "Paths to the destination", + "items": { + "type": "object", + "required": [ + "first_node_id", + "blinding", + "path" + ], + "additionalProperties": false, + "properties": { + "first_node_id": { + "type": "pubkey", + "description": "the (presumably well-known) public key of the start of the path" + }, + "blinding": { + "type": "pubkey", + "description": "blinding factor for this path" + }, + "path": { + "type": "array", + "description": "an individual path", + "items": { + "type": "object", + "required": [ + "blinded_node_id", + "encrypted_recipient_data" + ], + "additionalProperties": false, + "properties": { + "blinded_node_id": { + "type": "pubkey", + "description": "node_id of the hop" + }, + "encrypted_recipient_data": { + "type": "hex", + "description": "encrypted TLV entry for this hop" + } + } + } + } + } + } + }, + "offer_node_id": { + "type": "pubkey", + "description": "public key of the offering node" + }, + "offer_recurrence": { + "type": "object", + "description": "how often to this offer should be used", + "required": [ + "period", + "time_unit" + ], + "additionalProperties": false, + "properties": { + "time_unit": { + "type": "u32", + "description": "the BOLT12 time unit" + }, + "time_unit_name": { + "type": "string", + "description": "the name of `time_unit` (if valid)" + }, + "period": { + "type": "u32", + "description": "how many `time_unit` per payment period" + }, + "basetime": { + "type": "u64", + "description": "period starts at this UNIX timestamp" + }, + "start_any_period": { + "type": "u64", + "description": "you can start at any period (only if `basetime` present)" + }, + "limit": { + "type": "u32", + "description": "maximum period number for recurrence" + }, + "paywindow": { + "type": "object", + "description": "when within a period will payment be accepted (default is prior and during the period)", + "required": [ + "seconds_before", + "seconds_after" + ], + "additionalProperties": false, + "properties": { + "seconds_before": { + "type": "u32", + "description": "seconds prior to period start" + }, + "seconds_after": { + "type": "u32", + "description": "seconds after to period start" + }, + "proportional_amount": { + "type": "boolean", + "enum": [ + true + ], + "description": "amount should be scaled if payed after period start" + } + } + } + } + }, + "invreq_metadata": { + "type": "hex", + "description": "the payer-provided blob to derive invreq_payer_id" + }, + "invreq_payer_id": { + "type": "hex", + "description": "the payer-provided key" + }, + "invreq_chain": { + "type": "hex", + "description": "which blockchain this offer is for (missing implies bitcoin mainnet only)", + "maxLength": 64, + "minLength": 64 + }, + "invreq_amount_msat": { + "type": "msat", + "description": "the amount the invoice should be for" + }, + "invreq_features": { + "type": "hex", + "description": "the feature bits of the invoice_request" + }, + "invreq_quantity": { + "type": "u64", + "description": "the number of items to invoice for" + }, + "invreq_payer_note": { + "type": "string", + "description": "a note attached by the payer" + }, + "invreq_recurrence_counter": { + "type": "u32", + "description": "which number request this is for the same invoice" + }, + "invreq_recurrence_start": { + "type": "u32", + "description": "when we're requesting to start an invoice at a non-zero period" + }, + "invoice_paths": { + "type": "array", + "description": "Paths to pay the destination", + "items": { + "type": "object", + "required": [ + "first_node_id", + "blinding", + "payinfo", + "path" + ], + "additionalProperties": false, + "properties": { + "first_node_id": { + "type": "pubkey", + "description": "the (presumably well-known) public key of the start of the path" + }, + "blinding": { + "type": "pubkey", + "description": "blinding factor for this path" + }, + "payinfo": { + "type": "object", + "required": [ + "fee_base_msat", + "fee_proportional_millionths", + "cltv_expiry_delta", + "features" + ], + "additionalProperties": false, + "properties": { + "fee_base_msat": { + "type": "msat", + "description": "basefee for path" + }, + "fee_proportional_millionths": { + "type": "u32", + "description": "proportional fee for path" + }, + "cltv_expiry_delta": { + "type": "u32", + "description": "CLTV delta for path" + }, + "features": { + "type": "hex", + "description": "features allowed for path" + } + } + }, + "path": { + "type": "array", + "description": "an individual path", + "items": { + "type": "object", + "required": [ + "blinded_node_id", + "encrypted_recipient_data" + ], + "additionalProperties": false, + "properties": { + "blinded_node_id": { + "type": "pubkey", + "description": "node_id of the hop" + }, + "encrypted_recipient_data": { + "type": "hex", + "description": "encrypted TLV entry for this hop" + } + } + } + } + } + } + }, + "invoice_created_at": { + "type": "u64", + "description": "the UNIX timestamp of invoice creation" + }, + "invoice_relative_expiry": { + "type": "u32", + "description": "the number of seconds after *invoice_created_at* when this expires" + }, + "invoice_payment_hash": { + "type": "hex", + "description": "the hash of the *payment_preimage*", + "maxLength": 64, + "minLength": 64 + }, + "invoice_amount_msat": { + "type": "msat", + "description": "the amount required to fulfill invoice" + }, + "invoice_fallbacks": { + "type": "array", + "description": "onchain addresses", + "items": { + "type": "object", + "required": [ + "version", + "hex" + ], + "additionalProperties": false, + "properties": { + "version": { + "type": "u8", + "description": "Segwit address version" + }, + "hex": { + "type": "hex", + "description": "Raw encoded segwit address" + }, + "address": { + "type": "string", + "description": "bech32 segwit address" + } + } + } + }, + "invoice_features": { + "type": "hex", + "description": "the feature bits of the invoice" + }, + "invoice_node_id": { + "type": "pubkey", + "description": "the id to pay (usually the same as offer_node_id)" + }, + "invoice_recurrence_basetime": { + "type": "u64", + "description": "the UNIX timestamp to base the invoice periods on" + }, + "signature": { + "type": "bip340sig", + "description": "BIP-340 signature of the `offer_node_id` on this invoice" + }, + "unknown_invoice_tlvs": { + "type": "array", + "description": "Any extra fields we didn't know how to parse", + "items": { + "type": "object", + "required": [ + "type", + "length", + "value" + ], + "additionalProperties": false, + "properties": { + "type": { + "type": "u64", + "description": "The type" + }, + "length": { + "type": "u64", + "description": "The length" + }, + "value": { + "type": "hex", + "description": "The value" + } + } + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt12 invoice" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + false + ] + } + } + }, + "then": { + "required": [], + "additionalProperties": false, + "properties": { + "type": {}, + "valid": {}, + "offer_id": {}, + "offer_chains": {}, + "offer_metadata": {}, + "offer_currency": {}, + "warning_unknown_offer_currency": {}, + "currency_minor_unit": {}, + "offer_amount": {}, + "offer_amount_msat": {}, + "offer_description": {}, + "offer_issuer": {}, + "offer_features": {}, + "offer_absolute_expiry": {}, + "offer_quantity_max": {}, + "offer_paths": {}, + "offer_node_id": {}, + "offer_recurrence": {}, + "invreq_metadata": {}, + "invreq_payer_id": {}, + "invreq_chain": {}, + "invreq_amount_msat": {}, + "invreq_features": {}, + "invreq_quantity": {}, + "invreq_payer_note": {}, + "invreq_node_id": {}, + "invreq_recurrence_counter": {}, + "invreq_recurrence_start": {}, + "warning_invalid_offer_description": { + "type": "string", + "description": "`offer_description` is not valid UTF8" + }, + "warning_missing_offer_description": { + "type": "string", + "description": "`offer_description` is not present" + }, + "warning_invalid_offer_currency": { + "type": "string", + "description": "`offer_currency_code` is not valid UTF8" + }, + "warning_invalid_offer_issuer": { + "type": "string", + "description": "`offer_issuer` is not valid UTF8" + }, + "warning_missing_invreq_metadata": { + "type": "string", + "description": "`invreq_metadata` is not present" + }, + "warning_invalid_invreq_payer_note": { + "type": "string", + "description": "`invreq_payer_note` is not valid UTF8" + }, + "warning_missing_invoice_paths": { + "type": "string", + "description": "`invoice_paths` is not present" + }, + "warning_missing_invoice_blindedpay": { + "type": "string", + "description": "`invoice_blindedpay` is not present" + }, + "warning_missing_invoice_created_at": { + "type": "string", + "description": "`invoice_created_at` is not present" + }, + "warning_missing_invoice_payment_hash": { + "type": "string", + "description": "`invoice_payment_hash` is not present" + }, + "warning_missing_invoice_amount": { + "type": "string", + "description": "`invoice_amount` is not present" + }, + "warning_missing_invoice_recurrence_basetime": { + "type": "string", + "description": "`invoice_recurrence_basetime` is not present" + }, + "warning_missing_invoice_node_id": { + "type": "string", + "description": "`invoice_node_id` is not present" + }, + "warning_missing_invoice_signature": { + "type": "string", + "description": "`signature` is not present" + }, + "warning_invalid_invoice_signature": { + "type": "string", + "description": "Incorrect `signature`" + }, + "fallbacks": { + "type": "array", + "items": { + "type": "object", + "required": [ + "version", + "hex" + ], + "properties": { + "version": {}, + "hex": {}, + "address": {}, + "warning_invoice_fallbacks_version_invalid": { + "type": "string", + "description": "`version` is > 16" + } + } + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "bolt11 invoice" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "required": [ + "currency", + "created_at", + "expiry", + "payee", + "min_final_cltv_expiry", + "payment_hash", + "signature" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "valid": {}, + "currency": { + "type": "string", + "description": "the BIP173 name for the currency" + }, + "created_at": { + "type": "u64", + "description": "the UNIX-style timestamp of the invoice" + }, + "expiry": { + "type": "u64", + "description": "the number of seconds this is valid after `created_at`" + }, + "payee": { + "type": "pubkey", + "description": "the public key of the recipient" + }, + "amount_msat": { + "type": "msat", + "description": "Amount the invoice asked for" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage*" + }, + "signature": { + "type": "signature", + "description": "signature of the *payee* on this invoice" + }, + "description": { + "type": "string", + "description": "the description of the purpose of the purchase" + }, + "description_hash": { + "type": "hash", + "description": "the hash of the description, in place of *description*" + }, + "min_final_cltv_expiry": { + "type": "u32", + "description": "the minimum CLTV delay for the final node" + }, + "payment_secret": { + "type": "secret", + "description": "the secret to hand to the payee node" + }, + "features": { + "type": "hex", + "description": "the features bitmap for this invoice" + }, + "payment_metadata": { + "type": "hex", + "description": "the payment_metadata to put in the payment" + }, + "fallbacks": { + "type": "array", + "description": "onchain addresses", + "items": { + "type": "object", + "required": [ + "type", + "hex" + ], + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "description": "the address type (if known)", + "enum": [ + "P2PKH", + "P2SH", + "P2WPKH", + "P2WSH", + "P2TR" + ] + }, + "addr": { + "type": "string", + "description": "the address in appropriate format for *type*" + }, + "hex": { + "type": "hex", + "description": "Raw encoded address" + } + } + } + }, + "routes": { + "type": "array", + "description": "Route hints to the *payee*", + "items": { + "type": "array", + "description": "hops in the route", + "items": { + "type": "object", + "required": [ + "pubkey", + "short_channel_id", + "fee_base_msat", + "fee_proportional_millionths", + "cltv_expiry_delta" + ], + "additionalProperties": false, + "properties": { + "pubkey": { + "type": "pubkey", + "description": "the public key of the node" + }, + "short_channel_id": { + "type": "short_channel_id", + "description": "a channel to the next peer" + }, + "fee_base_msat": { + "type": "msat", + "description": "the base fee for payments" + }, + "fee_proportional_millionths": { + "type": "u32", + "description": "the parts-per-million fee for payments" + }, + "cltv_expiry_delta": { + "type": "u32", + "description": "the CLTV delta across this hop" + } + } + } + } + }, + "extra": { + "type": "array", + "description": "Any extra fields we didn't know how to parse", + "items": { + "type": "object", + "required": [ + "tag", + "data" + ], + "additionalProperties": false, + "properties": { + "tag": { + "type": "string", + "description": "The bech32 letter which identifies this field", + "maxLength": 1, + "minLength": 1 + }, + "data": { + "type": "string", + "description": "The bech32 data for this field" + } + } + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "rune" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "required": [ + "string", + "restrictions", + "valid" + ], + "additionalProperties": false, + "properties": { + "unique_id": { + "type": "string", + "description": "unique id (always a numeric id on runes we create)" + }, + "version": { + "type": "string", + "description": "rune version, not currently set on runes we create" + }, + "valid": { + "type": "boolean", + "enum": [ + true + ] + }, + "type": {}, + "string": { + "type": "string", + "description": "the string encoding of the rune" + }, + "restrictions": { + "type": "array", + "description": "restrictions built into the rune: all must pass", + "items": { + "type": "object", + "required": [ + "alternatives", + "summary" + ], + "additionalProperties": false, + "properties": { + "alternatives": { + "type": "array", + "description": "each way restriction can be met: any can pass", + "items": { + "type": "string", + "description": "the alternative of form fieldname condition fieldname" + } + }, + "summary": { + "type": "string", + "description": "human-readable summary of this restriction" + } + } + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "rune" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + false + ] + } + } + }, + "then": { + "required": [ + "valid" + ], + "additionalProperties": false, + "properties": { + "valid": { + "type": "boolean", + "enum": [ + false + ] + }, + "type": {}, + "warning_rune_invalid_utf8": { + "type": "string", + "description": "the rune contains invalid UTF-8 strings" + }, + "hex": { + "type": "hex", + "description": "the raw rune in hex" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "emergency recover" + ] + }, + "valid": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "required": [ + "decrypted" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "valid": {}, + "decrypted": { + "type": "hex", + "description": "The decrypted value of the provided bech32 of emergency.recover", + "added": "v23.11" + } + } + } + } + ] + }, + "decodepay.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "added": "v23.05", + "required": [ + "bolt11" + ], + "properties": { + "bolt11": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "decodepay.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "currency", + "created_at", + "expiry", + "payee", + "min_final_cltv_expiry", + "payment_hash", + "signature" + ], + "additionalProperties": false, + "properties": { + "currency": { + "type": "string", + "description": "the BIP173 name for the currency" + }, + "created_at": { + "type": "u64", + "description": "the UNIX-style timestamp of the invoice" + }, + "expiry": { + "type": "u64", + "description": "the number of seconds this is valid after *timestamp*" + }, + "payee": { + "type": "pubkey", + "description": "the public key of the recipient" + }, + "amount_msat": { + "type": "msat", + "description": "Amount the invoice asked for" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage*" + }, + "signature": { + "type": "signature", + "description": "signature of the *payee* on this invoice" + }, + "description": { + "type": "string", + "description": "the description of the purpose of the purchase" + }, + "description_hash": { + "type": "hash", + "description": "the hash of the description, in place of *description*" + }, + "min_final_cltv_expiry": { + "type": "u32", + "description": "the minimum CLTV delay for the final node" + }, + "payment_secret": { + "type": "hash", + "description": "the secret to hand to the payee node" + }, + "features": { + "type": "hex", + "description": "the features bitmap for this invoice" + }, + "payment_metadata": { + "type": "hex", + "description": "the payment_metadata to put in the payment" + }, + "fallbacks": { + "type": "array", + "description": "onchain addresses", + "items": { + "type": "object", + "required": [ + "type", + "hex" + ], + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "description": "the address type (if known)", + "enum": [ + "P2PKH", + "P2SH", + "P2WPKH", + "P2WSH", + "P2TR" + ] + }, + "addr": { + "type": "string", + "description": "the address in appropriate format for *type*" + }, + "hex": { + "type": "hex", + "description": "Raw encoded address" + } + } + } + }, + "routes": { + "type": "array", + "description": "Route hints to the *payee*", + "items": { + "type": "array", + "description": "hops in the route", + "items": { + "type": "object", + "required": [ + "pubkey", + "short_channel_id", + "fee_base_msat", + "fee_proportional_millionths", + "cltv_expiry_delta" + ], + "additionalProperties": false, + "properties": { + "pubkey": { + "type": "pubkey", + "description": "the public key of the node" + }, + "short_channel_id": { + "type": "short_channel_id", + "description": "a channel to the next peer" + }, + "fee_base_msat": { + "type": "msat", + "description": "the base fee for payments" + }, + "fee_proportional_millionths": { + "type": "u32", + "description": "the parts-per-million fee for payments" + }, + "cltv_expiry_delta": { + "type": "u32", + "description": "the CLTV delta across this hop" + } + } + } + } + }, + "extra": { + "type": "array", + "description": "Any extra fields we didn't know how to parse", + "items": { + "type": "object", + "required": [ + "tag", + "data" + ], + "additionalProperties": false, + "properties": { + "tag": { + "type": "string", + "description": "The bech32 letter which identifies this field", + "maxLength": 1, + "minLength": 1 + }, + "data": { + "type": "string", + "description": "The bech32 data for this field" + } + } + } + } + } + }, + "deldatastore.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "key" + ], + "properties": { + "key": { + "oneOf": [ + { + "type": "array", + "description": "key is an array of values (though a single value is treated as a one-element array), to form a heirarchy. Using the first element of the key as the plugin name (e.g. [ 'summary' ]) is recommended. A key can either have children or a value, never both: parents are created and removed automatically.", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] + }, + "generation": { + "type": "u64", + "description": "If specified, means that the update will fail if the previously-existing data is not exactly that generation. This allows for simple atomicity. This is only legal with mode \u201cmust-replace\u201d or \u201cmust-append\u201d." + } + } + }, + "deldatastore.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "key" + ], + "properties": { + "key": { + "type": "array", + "items": { + "type": "string", + "description": "Part of the key added to the datastore" + } + }, + "generation": { + "type": "u64", + "description": "The number of times this has been updated" + }, + "hex": { + "type": "hex", + "description": "The hex data which has removed from the datastore" + }, + "string": { + "type": "string", + "description": "The data as a string, if it's valid utf-8" + } + } + }, + "delexpiredinvoice.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "maxexpirytime": { + "type": "u64", + "description": "" + } + } + }, + "delexpiredinvoice.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": {} + }, + "delforward.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "properties": { + "in_channel": { + "type": "short_channel_id" + }, + "in_htlc_id": { + "type": "u64" + }, + "status": { + "type": "string", + "enum": [ + "settled", + "local_failed", + "failed" + ] + } + } + }, + "delforward.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": {} + }, + "delinvoice.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "label", + "status" + ], + "properties": { + "label": { + "oneOf": [ + { + "type": "string", + "description": "" + }, + { + "type": "integer", + "description": "" + } + ] + }, + "status": { + "type": "string", + "enum": [ + "paid", + "expired", + "unpaid" + ] + }, + "desconly": { + "type": "boolean" + } + } + }, + "delinvoice.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "label", + "payment_hash", + "status", + "created_index", + "expires_at" + ], + "additionalProperties": true, + "properties": { + "label": { + "type": "string", + "description": "Unique label given at creation time" + }, + "bolt11": { + "type": "string", + "description": "BOLT11 string" + }, + "bolt12": { + "type": "string", + "description": "BOLT12 string" + }, + "amount_msat": { + "type": "msat", + "description": "the amount required to pay this invoice" + }, + "description": { + "type": "string", + "description": "description used in the invoice" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "created_index": { + "type": "u64", + "added": "v23.08", + "description": "1-based index indicating order this invoice was created in" + }, + "updated_index": { + "type": "u64", + "added": "v23.08", + "description": "1-based index indicating order this invoice was changed (only present if it has changed since creation)" + }, + "status": { + "type": "string", + "description": "State of invoice", + "enum": [ + "paid", + "expired", + "unpaid" + ] + }, + "expires_at": { + "type": "u64", + "description": "UNIX timestamp when invoice expires (or expired)" + } + }, + "allOf": [ + { + "if": { + "required": [ + "bolt12" + ] + }, + "then": { + "required": [], + "additionalProperties": false, + "properties": { + "label": {}, + "bolt12": {}, + "status": {}, + "expires_at": {}, + "msatoshi": {}, + "amount_msat": {}, + "description": {}, + "payment_hash": {}, + "pay_index": {}, + "created_index": {}, + "updated_index": {}, + "amount_received_msat": {}, + "paid_at": {}, + "payment_preimage": {}, + "local_offer_id": { + "type": "hex", + "description": "offer for which this invoice was created" + }, + "invreq_payer_note": { + "type": "string", + "description": "the optional *invreq_payer_note* from invoice_request which created this invoice" + } + } + }, + "else": { + "required": [ + "bolt11" + ], + "additionalProperties": false, + "properties": { + "label": {}, + "bolt11": {}, + "status": {}, + "expires_at": {}, + "msatoshi": {}, + "amount_msat": {}, + "description": {}, + "payment_hash": {}, + "pay_index": {}, + "created_index": {}, + "updated_index": {}, + "amount_received_msat": {}, + "msatoshi_received": {}, + "paid_at": {}, + "payment_preimage": {} + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "paid" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "pay_index", + "amount_received_msat", + "paid_at", + "payment_preimage" + ], + "properties": { + "label": {}, + "bolt11": {}, + "bolt12": {}, + "status": {}, + "expires_at": {}, + "msatoshi": {}, + "amount_msat": {}, + "description": {}, + "payment_hash": {}, + "invreq_payer_note": {}, + "local_offer_id": {}, + "created_index": {}, + "updated_index": {}, + "pay_index": { + "type": "u64", + "description": "unique index for this invoice payment" + }, + "amount_received_msat": { + "type": "msat", + "description": "how much was actually received" + }, + "paid_at": { + "type": "u64", + "description": "UNIX timestamp of when payment was received" + }, + "payment_preimage": { + "type": "secret", + "description": "SHA256 of this is the *payment_hash* offered in the invoice" + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "label": {}, + "bolt11": {}, + "bolt12": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "description": {}, + "payment_hash": {}, + "expires_at": {}, + "created_index": {}, + "updated_index": {}, + "pay_index": {}, + "invreq_payer_note": {}, + "local_offer_id": {} + } + } + } + ] + }, + "delpay.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "payment_hash", + "status" + ], + "additionalProperties": false, + "properties": { + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "status": { + "type": "string", + "enum": [ + "complete", + "failed" + ] + }, + "partid": { + "type": "u64" + }, + "groupid": { + "type": "u64" + } + } + }, + "delpay.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "payments" + ], + "additionalProperties": false, + "properties": { + "payments": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "created_index", + "id", + "payment_hash", + "status", + "amount_sent_msat", + "created_at" + ], + "properties": { + "created_index": { + "added": "v23.11", + "type": "u64", + "description": "1-based index indicating order this payment was created in" + }, + "id": { + "type": "u64", + "description": "old synonym for created_index" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "failed", + "complete" + ], + "description": "status of the payment" + }, + "amount_sent_msat": { + "type": "msat", + "description": "the amount we actually sent, including fees" + }, + "partid": { + "type": "u64", + "description": "unique ID within this (multi-part) payment" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment if known" + }, + "amount_msat": { + "type": "msat", + "description": "the amount the destination received, if known" + }, + "created_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "updated_index": { + "added": "v23.11", + "type": "u64", + "description": "1-based index indicating order this payment was changed (only present if it has changed since creation)" + }, + "completed_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was completed" + }, + "groupid": { + "type": "u64", + "description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" + }, + "payment_preimage": { + "type": "secret", + "description": "proof of payment" + }, + "label": { + "type": "string", + "description": "the label, if given to sendpay" + }, + "bolt11": { + "type": "string", + "description": "the bolt11 string (if pay supplied one)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string (if supplied for pay: **experimental-offers** only)." + }, + "erroronion": { + "type": "hex", + "description": "the error onion returned on failure, if any." + } + } + } + } + } + }, + "disableinvoicerequest.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "invreq_id" + ], + "properties": { + "invreq_id": { + "type": "string", + "description": "" + } + } + }, + "disableinvoicerequest.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "invreq_id", + "single_use", + "active", + "bolt12", + "used" + ], + "added": "v22.11", + "properties": { + "invreq_id": { + "type": "hash", + "description": "the SHA256 hash of all invoice_request fields less than 160" + }, + "active": { + "type": "boolean", + "enum": [ + false + ], + "description": "whether the invoice_request is currently active" + }, + "single_use": { + "type": "boolean", + "description": "whether the invoice_request will become inactive after we pay an invoice for it" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string starting with lnr" + }, + "used": { + "type": "boolean", + "description": "whether the invoice_request has already been used" + }, + "label": { + "type": "string", + "description": "the label provided when creating the invoice_request" + } + } + }, + "disableoffer.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "offer_id", + "active", + "single_use", + "bolt12", + "used" + ], + "additionalProperties": false, + "properties": { + "offer_id": { + "type": "hash", + "description": "the merkle hash of the offer" + }, + "active": { + "type": "boolean", + "enum": [ + false + ], + "description": "Whether the offer can produce invoices/payments" + }, + "single_use": { + "type": "boolean", + "description": "Whether the offer is disabled after first successful use" + }, + "bolt12": { + "type": "string", + "description": "The bolt12 string representing this offer" + }, + "used": { + "type": "boolean", + "description": "Whether the offer has had an invoice paid / payment made" + }, + "label": { + "type": "string", + "description": "The label provided when offer was created" + } + } + }, + "disconnect.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "id": { + "type": "pubkey" + }, + "force": { + "type": "boolean" + } + } + }, + "disconnect.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": {} + }, + "emergencyrecover.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": {} + }, + "emergencyrecover.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "stubs" + ], + "properties": { + "stubs": { + "type": "array", + "items": { + "type": "string", + "description": "Channel IDs of channels successfully inserted." + } + } + } + }, + "feerates.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "style" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "perkb", + "perkw" + ] + } + } + }, + "feerates.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "warning_missing_feerates": { + "type": "string", + "description": "Some fee estimates are missing" + }, + "perkb": { + "type": "object", + "description": "If *style* parameter was perkb", + "additionalProperties": false, + "required": [ + "min_acceptable", + "max_acceptable", + "floor", + "estimates" + ], + "properties": { + "min_acceptable": { + "type": "u32", + "description": "The smallest feerate that we allow peers to specify: half the 100-block estimate" + }, + "max_acceptable": { + "type": "u32", + "description": "The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet)." + }, + "floor": { + "type": "u32", + "added": "v23.05", + "description": "The smallest feerate that our backend tells us it will accept (i.e. minrelayfee or mempoolminfee)" + }, + "estimates": { + "type": "array", + "added": "v23.05", + "description": "Feerate estimates from plugin which we are using (usuallly bcli)", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "blockcount", + "feerate", + "smoothed_feerate" + ], + "properties": { + "blockcount": { + "type": "u32", + "added": "v23.05", + "description": "The number of blocks the feerate is expected to get a transaction in" + }, + "feerate": { + "type": "u32", + "added": "v23.05", + "description": "The feerate for this estimate, in given *style*" + }, + "smoothed_feerate": { + "type": "u32", + "added": "v23.05", + "description": "The feerate, smoothed over time (useful for coordinating with other nodes)" + } + } + } + }, + "opening": { + "type": "u32", + "description": "Default feerate for lightning-fundchannel(7) and lightning-withdraw(7)" + }, + "mutual_close": { + "type": "u32", + "description": "Feerate to aim for in cooperative shutdown. Note that since mutual close is a **negotiation**, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer." + }, + "unilateral_close": { + "type": "u32", + "description": "Feerate for commitment_transaction in a live channel which we originally funded" + }, + "unilateral_anchor_close": { + "type": "u32", + "added": "v23.08", + "description": "Feerate for commitment_transaction in a live channel which we originally funded (if anchor_outputs was negotiated)" + }, + "delayed_to_us": { + "type": "u32", + "deprecated": [ + "v23.05", + "v24.05" + ], + "description": "Feerate for returning unilateral close funds to our wallet" + }, + "htlc_resolution": { + "type": "u32", + "deprecated": [ + "v23.05", + "v24.05" + ], + "description": "Feerate for returning unilateral close HTLC outputs to our wallet" + }, + "penalty": { + "type": "u32", + "description": "Feerate to use when creating penalty tx for watchtowers" + } + } + }, + "perkw": { + "type": "object", + "description": "If *style* parameter was perkw", + "additionalProperties": false, + "required": [ + "min_acceptable", + "max_acceptable", + "floor", + "estimates" + ], + "properties": { + "min_acceptable": { + "type": "u32", + "description": "The smallest feerate that you can use, usually the minimum relayed feerate of the backend" + }, + "max_acceptable": { + "type": "u32", + "description": "The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet)." + }, + "floor": { + "type": "u32", + "added": "v23.05", + "description": "The smallest feerate that our backend tells us it will accept (i.e. minrelayfee or mempoolminfee)" + }, + "estimates": { + "type": "array", + "added": "v23.05", + "description": "Feerate estimates from plugin which we are using (usuallly bcli)", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "blockcount", + "feerate", + "smoothed_feerate" + ], + "properties": { + "blockcount": { + "type": "u32", + "added": "v23.05", + "description": "The number of blocks the feerate is expected to get a transaction in" + }, + "feerate": { + "type": "u32", + "added": "v23.05", + "description": "The feerate for this estimate, in given *style*" + }, + "smoothed_feerate": { + "type": "u32", + "added": "v23.05", + "description": "The feerate, smoothed over time (useful for coordinating with other nodes)" + } + } + } + }, + "opening": { + "type": "u32", + "description": "Default feerate for lightning-fundchannel(7) and lightning-withdraw(7)" + }, + "mutual_close": { + "type": "u32", + "description": "Feerate to aim for in cooperative shutdown. Note that since mutual close is a **negotiation**, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer." + }, + "unilateral_close": { + "type": "u32", + "description": "Feerate for commitment_transaction in a live channel which we originally funded (if anchor_outputs was not negotiated)" + }, + "unilateral_anchor_close": { + "type": "u32", + "added": "v23.08", + "description": "Feerate for commitment_transaction in a live channel which we originally funded (if anchor_outputs was negotiated)" + }, + "delayed_to_us": { + "type": "u32", + "deprecated": [ + "v23.05", + "v24.05" + ], + "description": "Feerate for returning unilateral close funds to our wallet" + }, + "htlc_resolution": { + "type": "u32", + "deprecated": [ + "v23.05", + "v24.05" + ], + "description": "Feerate for returning unilateral close HTLC outputs to our wallet" + }, + "penalty": { + "type": "u32", + "description": "Feerate to use when creating penalty tx for watchtowers" + } + } + }, + "onchain_fee_estimates": { + "type": "object", + "additionalProperties": false, + "required": [ + "opening_channel_satoshis", + "mutual_close_satoshis", + "unilateral_close_satoshis", + "htlc_timeout_satoshis", + "htlc_success_satoshis" + ], + "properties": { + "opening_channel_satoshis": { + "type": "u64", + "description": "Estimated cost of typical channel open" + }, + "mutual_close_satoshis": { + "type": "u64", + "description": "Estimated cost of typical channel close" + }, + "unilateral_close_satoshis": { + "type": "u64", + "description": "Estimated cost of typical unilateral close (without HTLCs). If anchors are supported, this assumes a channel with anchors." + }, + "unilateral_close_nonanchor_satoshis": { + "added": "v23.08", + "type": "u64", + "description": "Estimated cost of non-anchor typical unilateral close (without HTLCs)." + }, + "htlc_timeout_satoshis": { + "type": "u64", + "description": "Estimated cost of typical HTLC timeout transaction (non-anchors)" + }, + "htlc_success_satoshis": { + "type": "u64", + "description": "Estimated cost of typical HTLC fulfillment transaction (non-anchors)" + } + } + } + } + }, + "fetchinvoice.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "offer" + ], + "additionalProperties": false, + "properties": { + "offer": { + "type": "string", + "description": "" + }, + "amount_msat": { + "type": "msat", + "description": "amount_msat is required if the offer does not specify an amount at all, otherwise it is optional (but presumably if you set it to less than the offer, you will get an error from the issuer)." + }, + "quantity": { + "type": "u64", + "description": "quantity is is required if the offer specifies quantity_max, otherwise it is not allowed." + }, + "recurrence_counter": { + "type": "u64", + "description": "recurrence_counter is required if the offer specifies recurrence, otherwise it is not allowed. recurrence_counter should first be set to 0, and incremented for each successive invoice in a given series." + }, + "recurrence_start": { + "type": "number", + "description": "recurrence_start is required if the offer specifies recurrence_base with start_any_period set, otherwise it is not allowed. It indicates what period number to start at." + }, + "recurrence_label": { + "type": "string", + "description": "recurrence_label is required if recurrence_counter is set, and otherwise is not allowed. It must be the same as prior fetchinvoice calls for the same recurrence, as it is used to link them together." + }, + "timeout": { + "type": "number", + "description": "timeout is an optional timeout; if we don't get a reply before this we fail (default, 60 seconds)." + }, + "payer_note": { + "type": "string", + "description": "payer_note is an optional payer note to ask the issuer to include in the fetched invoice." + } + } + }, + "fetchinvoice.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "invoice", + "changes" + ], + "properties": { + "invoice": { + "type": "string", + "description": "The BOLT12 invoice we fetched" + }, + "changes": { + "type": "object", + "description": "Summary of changes from offer", + "additionalProperties": false, + "required": [], + "properties": { + "description_appended": { + "type": "string", + "description": "extra characters appended to the *description* field." + }, + "description": { + "type": "string", + "description": "a completely replaced *description* field" + }, + "vendor_removed": { + "type": "string", + "description": "The *vendor* from the offer, which is missing in the invoice" + }, + "vendor": { + "type": "string", + "description": "a completely replaced *vendor* field" + }, + "amount_msat": { + "type": "msat", + "description": "the amount, if different from the offer amount multiplied by any *quantity* (or the offer had no amount, or was not in BTC)." + } + } + }, + "next_period": { + "type": "object", + "description": "Only for recurring invoices if the next period is under the *recurrence_limit*", + "additionalProperties": false, + "required": [ + "counter", + "starttime", + "endtime", + "paywindow_start", + "paywindow_end" + ], + "properties": { + "counter": { + "type": "u64", + "description": "the index of the next period to fetchinvoice" + }, + "starttime": { + "type": "u64", + "description": "UNIX timestamp that the next period starts" + }, + "endtime": { + "type": "u64", + "description": "UNIX timestamp that the next period ends" + }, + "paywindow_start": { + "type": "u64", + "description": "UNIX timestamp of the earliest time that the next invoice can be fetched" + }, + "paywindow_end": { + "type": "u64", + "description": "UNIX timestamp of the latest time that the next invoice can be fetched" + } + } + } + } + }, + "fundchannel.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "amount" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "id is the peer id obtained from connect." + }, + "amount": { + "type": "msat_or_all" + }, + "feerate": { + "type": "feerate" + }, + "announce": { + "type": "boolean" + }, + "minconf": { + "type": "u32" + }, + "push_msat": { + "type": "msat" + }, + "close_to": { + "type": "string" + }, + "request_amt": { + "type": "msat" + }, + "compact_lease": { + "type": "string" + }, + "utxos": { + "type": "array", + "items": { + "type": "outpoint" + } + }, + "mindepth": { + "description": "Number of confirmations required before we consider the channel active", + "type": "u32" + }, + "reserve": { + "type": "msat", + "description": "The amount we want the peer to maintain on its side" + }, + "channel_type": { + "added": "v24.02", + "type": "array", + "items": { + "type": "u32" + } + } + } + }, + "fundchannel.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "tx", + "txid", + "outnum", + "channel_type", + "channel_id" + ], + "properties": { + "tx": { + "type": "hex", + "description": "The raw transaction which funded the channel" + }, + "txid": { + "type": "txid", + "description": "The txid of the transaction which funded the channel" + }, + "outnum": { + "type": "u32", + "description": "The 0-based output index showing which output funded the channel" + }, + "channel_id": { + "type": "hex", + "description": "The channel_id of the resulting channel", + "minLength": 64, + "maxLength": 64 + }, + "channel_type": { + "type": "object", + "description": "channel_type as negotiated with peer", + "added": "v24.02", + "additionalProperties": false, + "required": [ + "bits", + "names" + ], + "properties": { + "bits": { + "type": "array", + "description": "Each bit set in this channel_type", + "added": "v24.02", + "items": { + "type": "u32", + "description": "Bit number" + } + }, + "names": { + "type": "array", + "description": "Feature name for each bit set in this channel_type", + "added": "v24.02", + "items": { + "type": "string", + "enum": [ + "static_remotekey/even", + "anchor_outputs/even", + "anchors_zero_fee_htlc_tx/even", + "scid_alias/even", + "zeroconf/even" + ], + "description": "Name of feature bit" + } + } + } + }, + "close_to": { + "type": "hex", + "description": "The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`" + }, + "mindepth": { + "type": "u32", + "description": "Number of confirmations before we consider the channel active." + } + } + }, + "fundchannel_cancel.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "the node id of the remote peer with which to cancel" + } + } + }, + "fundchannel_cancel.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "cancelled" + ], + "properties": { + "cancelled": { + "type": "string", + "description": "A message indicating it was cancelled by RPC" + } + } + }, + "fundchannel_complete.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "psbt" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "id is the node id of the remote peer." + }, + "psbt": { + "type": "string", + "description": "the transaction to use for funding (does not need to be signed but must be otherwise complete)" + } + } + }, + "fundchannel_complete.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "commitments_secured" + ], + "properties": { + "channel_id": { + "type": "hex", + "description": "The channel_id of the resulting channel", + "minLength": 64, + "maxLength": 64 + }, + "commitments_secured": { + "type": "boolean", + "enum": [ + true + ], + "description": "Indication that channel is safe to use" + } + } + }, + "fundchannel_start.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "amount" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "id is the peer id obtained from connect." + }, + "amount": { + "type": "msat_or_all", + "description": "The amount that the channel will be funded." + }, + "feerate": { + "type": "feerate", + "description": "Sets the feerate for the subsequent commitment transaction." + }, + "announce": { + "type": "boolean", + "description": "Whether or not to announce the channel." + }, + "close_to": { + "type": "string", + "description": "A bitcoin address to which the channel funds should be sent to on close." + }, + "push_msat": { + "type": "msat", + "description": "The amount of millisatoshis to push to the channel at open. This is a gift to the peer." + }, + "mindepth": { + "type": "u32", + "description": "Number of confirmations required before we consider the channel active" + }, + "reserve": { + "type": "msat", + "description": "The amount we want the peer to maintain on its side" + }, + "channel_type": { + "type": "array", + "description": "Each bit set in this channel_type", + "items": { + "type": "u32", + "description": "Bit number" + } + } + } + }, + "fundchannel_start.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "funding_address", + "scriptpubkey", + "channel_type", + "warning_usage" + ], + "properties": { + "funding_address": { + "type": "string", + "description": "The address to send funding to for the channel. DO NOT SEND COINS TO THIS ADDRESS YET." + }, + "scriptpubkey": { + "type": "hex", + "description": "The raw scriptPubkey for the address" + }, + "channel_type": { + "type": "object", + "description": "channel_type as negotiated with peer", + "added": "v24.02", + "additionalProperties": false, + "required": [ + "bits", + "names" + ], + "properties": { + "bits": { + "type": "array", + "added": "v24.02", + "description": "Each bit set in this channel_type", + "items": { + "type": "u32", + "description": "Bit number" + } + }, + "names": { + "type": "array", + "description": "Feature name for each bit set in this channel_type", + "added": "v24.02", + "items": { + "type": "string", + "enum": [ + "static_remotekey/even", + "anchor_outputs/even", + "anchors_zero_fee_htlc_tx/even", + "scid_alias/even", + "zeroconf/even" + ], + "description": "Name of feature bit" + } + } + } + }, + "close_to": { + "type": "hex", + "description": "The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`" + }, + "warning_usage": { + "type": "string", + "description": "A warning not to prematurely broadcast the funding transaction (always present!)" + }, + "mindepth": { + "type": "u32", + "description": "Number of confirmations before we consider the channel active." + } + } + }, + "funderupdate.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "summary", + "policy", + "policy_mod", + "leases_only", + "min_their_funding_msat", + "max_their_funding_msat", + "per_channel_min_msat", + "per_channel_max_msat", + "reserve_tank_msat", + "fuzz_percent", + "fund_probability" + ], + "properties": { + "summary": { + "type": "string", + "description": "Summary of the current funding policy e.g. (match 100)" + }, + "policy": { + "type": "string", + "enum": [ + "match", + "available", + "fixed" + ], + "description": "Policy funder plugin will use to decide how much captial to commit to a v2 open channel request" + }, + "policy_mod": { + "type": "u32", + "description": "The *policy_mod* is the number or 'modification' to apply to the policy." + }, + "leases_only": { + "type": "boolean", + "description": "Only contribute funds to `option_will_fund` lease requests." + }, + "min_their_funding_msat": { + "type": "msat", + "description": "The minimum funding sats that we require from peer to activate our funding policy." + }, + "max_their_funding_msat": { + "type": "msat", + "description": "The maximum funding sats that we'll allow from peer to activate our funding policy." + }, + "per_channel_min_msat": { + "type": "msat", + "description": "The minimum amount that we will fund a channel open with." + }, + "per_channel_max_msat": { + "type": "msat", + "description": "The maximum amount that we will fund a channel open with." + }, + "reserve_tank_msat": { + "type": "msat", + "description": "Amount of sats to leave available in the node wallet." + }, + "fuzz_percent": { + "type": "u32", + "description": "Percentage to fuzz our funding amount by." + }, + "fund_probability": { + "type": "u32", + "description": "Percent of opens to consider funding. 100 means we'll consider funding every requested open channel request." + }, + "lease_fee_base_msat": { + "type": "msat", + "description": "Flat fee to charge for a channel lease." + }, + "lease_fee_basis": { + "type": "u32", + "description": "Proportional fee to charge for a channel lease, calculated as 1/10,000th of requested funds." + }, + "funding_weight": { + "type": "u32", + "description": "Transaction weight the channel opener will pay us for a leased funding transaction." + }, + "channel_fee_max_base_msat": { + "type": "msat", + "description": "Maximum channel_fee_base_msat we'll charge for routing funds leased on this channel." + }, + "channel_fee_max_proportional_thousandths": { + "type": "u32", + "description": "Maximum channel_fee_proportional_millitionths we'll charge for routing funds leased on this channel, in thousandths." + }, + "compact_lease": { + "type": "hex", + "description": "Compact description of the channel lease parameters." + } + } + }, + "fundpsbt.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "satoshi", + "feerate", + "startweight" + ], + "properties": { + "satoshi": { + "type": "msat_or_all" + }, + "feerate": { + "type": "feerate" + }, + "startweight": { + "type": "u32" + }, + "minconf": { + "type": "u32" + }, + "reserve": { + "type": "u32", + "description": "reserve is a number: if non-zero number then reserveinputs is called (successfully, with exclusive true) on the returned PSBT for this number of blocks (default: 72)." + }, + "locktime": { + "type": "u32" + }, + "min_witness_weight": { + "type": "u32" + }, + "excess_as_change": { + "type": "boolean" + }, + "nonwrapped": { + "added": "v23.02", + "type": "boolean" + }, + "opening_anchor_channel": { + "added": "v23.08", + "type": "boolean" + } + } + }, + "fundpsbt.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "psbt", + "feerate_per_kw", + "estimated_final_weight", + "excess_msat" + ], + "properties": { + "psbt": { + "type": "string", + "description": "Unsigned PSBT which fulfills the parameters given" + }, + "feerate_per_kw": { + "type": "u32", + "description": "The feerate used to create the PSBT, in satoshis-per-kiloweight" + }, + "estimated_final_weight": { + "type": "u32", + "description": "The estimated weight of the transaction once fully signed" + }, + "excess_msat": { + "type": "msat", + "description": "The amount above *satoshi* which is available. This could be zero, or dust; it will be zero if *change_outnum* is also returned" + }, + "change_outnum": { + "type": "u32", + "description": "The 0-based output number where change was placed (only if parameter *excess_as_change* was true and there was sufficient funds)" + }, + "reservations": { + "type": "array", + "description": "If *reserve* was true or a non-zero number, just as per lightning-reserveinputs(7)", + "items": { + "type": "object", + "required": [ + "txid", + "vout", + "was_reserved", + "reserved", + "reserved_to_block" + ], + "additionalProperties": false, + "properties": { + "txid": { + "type": "txid", + "description": "The txid of the transaction" + }, + "vout": { + "type": "u32", + "description": "The 0-based output number" + }, + "was_reserved": { + "type": "boolean", + "enum": [ + false + ], + "description": "Whether this output was previously reserved" + }, + "reserved": { + "type": "boolean", + "enum": [ + true + ], + "description": "Whether this output is now reserved" + }, + "reserved_to_block": { + "type": "u32", + "description": "The blockheight the reservation will expire" + } + } + } + } + } + }, + "getinfo.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": {} + }, + "getinfo.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "alias", + "color", + "num_peers", + "num_pending_channels", + "num_active_channels", + "num_inactive_channels", + "version", + "blockheight", + "network", + "fees_collected_msat", + "lightning-dir", + "address" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "The public key unique to this node" + }, + "alias": { + "type": "string", + "description": "The fun alias this node will advertize", + "maxLength": 32 + }, + "color": { + "type": "hex", + "description": "The favorite RGB color this node will advertize", + "minLength": 6, + "maxLength": 6 + }, + "num_peers": { + "type": "u32", + "description": "The total count of peers, connected or with channels" + }, + "num_pending_channels": { + "type": "u32", + "description": "The total count of channels being opened" + }, + "num_active_channels": { + "type": "u32", + "description": "The total count of channels in normal state" + }, + "num_inactive_channels": { + "type": "u32", + "description": "The total count of channels waiting for opening or closing transactions to be mined" + }, + "version": { + "type": "string", + "description": "Identifies what bugs you are running into" + }, + "lightning-dir": { + "type": "string", + "description": "Identifies where you can find the configuration and other related files" + }, + "our_features": { + "type": "object", + "description": "Our BOLT #9 feature bits (as hexstring) for various contexts", + "additionalProperties": true, + "required": [ + "init", + "node", + "channel", + "invoice" + ], + "properties": { + "init": { + "type": "hex", + "description": "features (incl. globalfeatures) in our init message, these also restrict what we offer in open_channel or accept in accept_channel" + }, + "node": { + "type": "hex", + "description": "features in our node_announcement message" + }, + "channel": { + "type": "hex", + "description": "negotiated channel features we (as channel initiator) publish in the channel_announcement message" + }, + "invoice": { + "type": "hex", + "description": "features in our BOLT11 invoices" + } + } + }, + "blockheight": { + "type": "u32", + "description": "The highest block height we've learned" + }, + "network": { + "type": "string", + "description": "represents the type of network on the node are working (e.g: `bitcoin`, `testnet`, or `regtest`)" + }, + "fees_collected_msat": { + "type": "msat", + "description": "Total routing fees collected by this node" + }, + "address": { + "type": "array", + "description": "The addresses we announce to the world", + "items": { + "type": "object", + "required": [ + "type", + "port" + ], + "additionalProperties": true, + "properties": { + "type": { + "type": "string", + "enum": [ + "dns", + "ipv4", + "ipv6", + "torv2", + "torv3" + ], + "description": "Type of connection (until 23.08, `websocket` was also allowed)" + }, + "port": { + "type": "u16", + "description": "port number" + } + }, + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "dns", + "ipv4", + "ipv6", + "torv2", + "torv3" + ] + } + } + }, + "then": { + "required": [ + "type", + "address", + "port" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "port": {}, + "address": { + "type": "string", + "description": "address in expected format for **type**" + } + } + }, + "else": { + "required": [ + "type", + "port" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "port": {} + } + } + } + }, + "binding": { + "type": "array", + "description": "The addresses we are listening on", + "items": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "*FIXME*": "The variant in connect.schema.json is more complete", + "enum": [ + "local socket", + "websocket", + "ipv4", + "ipv6", + "torv2", + "torv3" + ], + "description": "Type of connection" + }, + "address": { + "type": "string", + "description": "address in expected format for **type**" + }, + "port": { + "type": "u16", + "description": "port number" + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "local socket" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "type", + "socket" + ], + "properties": { + "type": {}, + "socket": { + "type": "string", + "description": "socket filename" + } + } + }, + "else": { + "additionalProperties": false, + "required": [ + "type", + "address", + "port" + ], + "properties": { + "type": {}, + "address": {}, + "port": {}, + "subtype": {} + } + } + }, + { + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "websocket" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "type", + "address", + "port", + "subtype" + ], + "properties": { + "type": {}, + "address": {}, + "port": {}, + "subtype": { + "type": "string", + "description": "type of address" + } + } + }, + "else": { + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": {}, + "address": {}, + "port": {}, + "socket": {} + } + } + } + ] + } + }, + "warning_bitcoind_sync": { + "type": "string", + "description": "Bitcoind is not up-to-date with network." + }, + "warning_lightningd_sync": { + "type": "string", + "description": "Lightningd is still loading latest blocks from bitcoind." + } + } + }, + "getlog.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "created_at", + "bytes_used", + "bytes_max", + "log" + ], + "properties": { + "created_at": { + "type": "string", + "description": "UNIX timestamp with 9 decimal places, when logging was initialized" + }, + "bytes_used": { + "type": "u32", + "description": "The number of bytes used by logging records" + }, + "bytes_max": { + "type": "u32", + "description": "The bytes_used values at which records will be trimmed " + }, + "log": { + "type": "array", + "items": { + "type": "object", + "required": [ + "type" + ], + "additionalProperties": true, + "properties": { + "type": { + "type": "string", + "enum": [ + "SKIPPED", + "BROKEN", + "UNUSUAL", + "INFO", + "DEBUG", + "IO_IN", + "IO_OUT" + ] + } + }, + "allOf": [ + { + "if": { + "additionalProperties": true, + "properties": { + "type": { + "enum": [ + "SKIPPED" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "num_skipped" + ], + "properties": { + "type": {}, + "num_skipped": { + "type": "u32", + "description": "number of unprinted log entries (deleted or below *level* parameter)" + } + } + } + }, + { + "if": { + "additionalProperties": true, + "properties": { + "type": { + "enum": [ + "BROKEN", + "UNUSUAL", + "INFO", + "DEBUG" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "time", + "source", + "log" + ], + "properties": { + "type": {}, + "time": { + "type": "string", + "description": "UNIX timestamp with 9 decimal places after **created_at**" + }, + "source": { + "type": "string", + "description": "The particular logbook this was found in" + }, + "log": { + "type": "string", + "description": "The actual log message" + }, + "node_id": { + "type": "pubkey", + "description": "The peer this is associated with" + } + } + } + }, + { + "if": { + "additionalProperties": true, + "properties": { + "type": { + "enum": [ + "IO_IN", + "IO_OUT" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "time", + "source", + "log", + "data" + ], + "properties": { + "type": {}, + "time": { + "type": "string", + "description": "Seconds after **created_at**, with 9 decimal places" + }, + "source": { + "type": "string", + "description": "The particular logbook this was found in" + }, + "log": { + "type": "string", + "description": "The associated log message" + }, + "node_id": { + "type": "pubkey", + "description": "The peer this is associated with" + }, + "data": { + "type": "hex", + "description": "The IO which occurred" + } + } + } + } + ] + } + } + } + }, + "getroute.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "id", + "amount_msat", + "riskfactor" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "" + }, + "amount_msat": { + "type": "msat", + "description": "" + }, + "riskfactor": { + "type": "u64", + "description": "" + }, + "cltv": { + "type": "u32", + "description": "" + }, + "fromid": { + "type": "pubkey", + "description": "" + }, + "fuzzpercent": { + "type": "u32", + "description": "" + }, + "exclude": { + "type": "array", + "description": "", + "items": { + "type": "string" + } + }, + "maxhops": { + "type": "u32", + "description": "" + } + } + }, + "getroute.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "route" + ], + "properties": { + "route": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "direction", + "channel", + "amount_msat", + "delay", + "style" + ], + "additionalProperties": false, + "properties": { + "id": { + "type": "pubkey", + "description": "The node at the end of this hop" + }, + "channel": { + "type": "short_channel_id", + "description": "The channel joining these nodes" + }, + "direction": { + "type": "u32", + "description": "0 if this channel is traversed from lesser to greater **id**, otherwise 1" + }, + "amount_msat": { + "type": "msat", + "description": "The amount expected by the node at the end of this hop" + }, + "delay": { + "type": "u32", + "description": "The total CLTV expected by the node at the end of this hop" + }, + "style": { + "type": "string", + "description": "The features understood by the destination node", + "enum": [ + "tlv" + ] + } + } + } + } + } + }, + "help.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "help" + ], + "properties": { + "help": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "command", + "category", + "description", + "verbose" + ], + "properties": { + "command": { + "type": "string", + "description": "the command" + }, + "category": { + "type": "string", + "description": "the category for this command (useful for grouping)" + }, + "description": { + "type": "string", + "description": "a one-line description of the purpose of this command" + }, + "verbose": { + "type": "string", + "description": "a full description of this command (including whether it's deprecated)" + } + } + } + }, + "format-hint": {} + } + }, + "invoice.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "amount_msat", + "label", + "description" + ], + "properties": { + "amount_msat": { + "type": "msat_or_any", + "description": "" + }, + "description": { + "type": "string", + "description": "" + }, + "label": { + "oneOf": [ + { + "type": "string", + "description": "" + }, + { + "type": "integer", + "description": "" + } + ] + }, + "expiry": { + "type": "u64", + "description": "" + }, + "fallbacks": { + "type": "array", + "description": "", + "items": { + "type": "string" + } + }, + "preimage": { + "type": "hex", + "description": "" + }, + "exposeprivatechannels": { + "oneOf": [ + { + "type": "boolean", + "description": "" + }, + { + "type": "array", + "items": { + "type": "short_channel_id" + } + }, + { + "type": "short_channel_id" + } + ] + }, + "cltv": { + "type": "u32", + "description": "" + }, + "deschashonly": { + "type": "boolean", + "description": "" + } + } + }, + "invoice.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "payment_hash", + "expires_at", + "created_index", + "bolt11", + "payment_secret" + ], + "properties": { + "bolt11": { + "type": "string", + "description": "the bolt11 string" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "payment_secret": { + "type": "secret", + "description": "the *payment_secret* to place in the onion" + }, + "expires_at": { + "type": "u64", + "description": "UNIX timestamp of when invoice expires" + }, + "created_index": { + "type": "u64", + "added": "v23.08", + "description": "1-based index indicating order this invoice was created in" + }, + "warning_capacity": { + "type": "string", + "description": "even using all possible channels, there's not enough incoming capacity to pay this invoice." + }, + "warning_offline": { + "type": "string", + "description": "there would be enough incoming capacity, but some channels are offline, so there isn't." + }, + "warning_deadends": { + "type": "string", + "description": "there would be enough incoming capacity, but some channels are dead-ends (no other public channels from those peers), so there isn't." + }, + "warning_private_unused": { + "type": "string", + "description": "there would be enough incoming capacity, but some channels are unannounced and *exposeprivatechannels* is *false*, so there isn't." + }, + "warning_mpp": { + "type": "string", + "description": "there is sufficient capacity, but not in a single channel, so the payer will have to use multi-part payments." + } + } + }, + "invoicerequest.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "amount", + "description" + ], + "added": "v22.11", + "properties": { + "amount": { + "type": "msat", + "description": "" + }, + "description": { + "type": "string", + "description": "" + }, + "issuer": { + "type": "string", + "description": "" + }, + "label": { + "type": "string", + "description": "" + }, + "absolute_expiry": { + "type": "u64", + "description": "" + }, + "single_use": { + "type": "boolean", + "description": "" + } + } + }, + "invoicerequest.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "invreq_id", + "single_use", + "active", + "bolt12", + "used" + ], + "properties": { + "invreq_id": { + "type": "hash", + "description": "the SHA256 hash of all invoice_request fields less than 160" + }, + "active": { + "type": "boolean", + "enum": [ + true + ], + "description": "whether the invoice_request is currently active" + }, + "single_use": { + "type": "boolean", + "description": "whether the invoice_request will become inactive after we pay an invoice for it" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string starting with lnr" + }, + "used": { + "type": "boolean", + "enum": [ + false + ], + "description": "whether the invoice_request has already been used" + }, + "label": { + "type": "string", + "description": "the label provided when creating the invoice_request" + } + } + }, + "keysend.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "destination", + "amount_msat" + ], + "properties": { + "destination": { + "type": "pubkey" + }, + "amount_msat": { + "type": "msat" + }, + "label": { + "type": "string" + }, + "maxfeepercent": { + "type": "number" + }, + "retry_for": { + "type": "u32" + }, + "maxdelay": { + "type": "u32" + }, + "exemptfee": { + "type": "msat" + }, + "routehints": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "scid", + "feebase", + "feeprop", + "expirydelta" + ], + "properties": { + "id": { + "type": "pubkey" + }, + "scid": { + "type": "short_channel_id" + }, + "feebase": { + "type": "msat" + }, + "feeprop": { + "type": "u32" + }, + "expirydelta": { + "type": "u16" + } + } + } + } + }, + "extratlvs": { + "type": "object", + "additionalProperties": true, + "required": [] + } + } + }, + "keysend.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "payment_preimage", + "payment_hash", + "created_at", + "parts", + "amount_msat", + "amount_sent_msat", + "status" + ], + "properties": { + "payment_preimage": { + "type": "secret", + "description": "the proof of payment: SHA256 of this **payment_hash**" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "created_at": { + "type": "number", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "parts": { + "type": "u32", + "description": "how many attempts this took" + }, + "amount_msat": { + "type": "msat", + "description": "Amount the recipient received" + }, + "amount_sent_msat": { + "type": "msat", + "description": "Total amount we sent (including fees)" + }, + "warning_partial_completion": { + "type": "string", + "description": "Not all parts of a multi-part payment have completed" + }, + "status": { + "type": "string", + "enum": [ + "complete" + ], + "description": "status of payment" + } + } + }, + "listchannels.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": { + "short_channel_id": { + "type": "short_channel_id", + "description": "If short_channel_id is a short channel id, then only known channels with a matching short_channel_id are returned. Otherwise, it must be null." + }, + "source": { + "type": "pubkey", + "description": "If source is a node id, then only channels leading from that node id are returned." + }, + "destination": { + "type": "pubkey", + "description": "If destination is a node id, then only channels leading to that node id are returned." + } + } + }, + "listchannels.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channels" + ], + "properties": { + "channels": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "source", + "destination", + "short_channel_id", + "direction", + "public", + "amount_msat", + "message_flags", + "channel_flags", + "active", + "last_update", + "base_fee_millisatoshi", + "fee_per_millionth", + "delay", + "htlc_minimum_msat", + "features" + ], + "properties": { + "source": { + "type": "pubkey", + "description": "the source node" + }, + "destination": { + "type": "pubkey", + "description": "the destination node" + }, + "short_channel_id": { + "type": "short_channel_id", + "description": "short channel id of channel" + }, + "direction": { + "type": "u32", + "description": "direction (0 if source < destination, 1 otherwise)." + }, + "public": { + "type": "boolean", + "description": "true if this is announced (from *v24.02*, being false is deprecated)" + }, + "amount_msat": { + "type": "msat", + "description": "the total capacity of this channel (always a whole number of satoshis)" + }, + "message_flags": { + "type": "u8", + "description": "as defined by BOLT #7" + }, + "channel_flags": { + "type": "u8", + "description": "as defined by BOLT #7" + }, + "active": { + "type": "boolean", + "description": "true unless source has disabled it (or (deprecated in *v24.02*) it's a local channel and the peer is disconnected or it's still opening or closing)" + }, + "last_update": { + "type": "u32", + "description": "UNIX timestamp on the last channel_update from *source*" + }, + "base_fee_millisatoshi": { + "type": "u32", + "description": "Base fee changed by *source* to use this channel" + }, + "fee_per_millionth": { + "type": "u32", + "description": "Proportional fee changed by *source* to use this channel, in parts-per-million" + }, + "delay": { + "type": "u32", + "description": "The number of blocks delay required by *source* to use this channel" + }, + "htlc_minimum_msat": { + "type": "msat", + "description": "The smallest payment *source* will allow via this channel" + }, + "satoshis": {}, + "htlc_maximum_msat": { + "type": "msat", + "description": "The largest payment *source* will allow via this channel" + }, + "features": { + "type": "hex", + "description": "BOLT #9 features bitmap for this channel" + } + } + } + } + } + }, + "listclosedchannels.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "added": "v23.05", + "properties": { + "id": { + "type": "pubkey", + "description": "If supplied, limits the channels to just the peer with the given ID, if it exists." + } + } + }, + "listclosedchannels.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "added": "v23.05", + "required": [ + "closedchannels" + ], + "properties": { + "closedchannels": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "channel_id", + "opener", + "private", + "total_msat", + "total_local_commitments", + "total_remote_commitments", + "total_htlcs_sent", + "funding_txid", + "funding_outnum", + "leased", + "final_to_us_msat", + "min_to_us_msat", + "max_to_us_msat", + "close_cause" + ], + "properties": { + "peer_id": { + "type": "pubkey", + "description": "Peer public key (can be missing with pre-v23.05 closes!)" + }, + "channel_id": { + "type": "hash", + "description": "The full channel_id (funding txid Xored with output number)" + }, + "short_channel_id": { + "type": "short_channel_id", + "description": "The short_channel_id" + }, + "alias": { + "type": "object", + "required": [], + "properties": { + "local": { + "type": "short_channel_id", + "description": "An alias assigned by this node to this channel, used for outgoing payments" + }, + "remote": { + "type": "short_channel_id", + "description": "An alias assigned by the remote node to this channel, usable in routehints and invoices" + } + } + }, + "opener": { + "type": "string", + "enum": [ + "local", + "remote" + ], + "description": "Who initiated the channel" + }, + "closer": { + "type": "string", + "enum": [ + "local", + "remote" + ], + "description": "Who initiated the channel close (only present if closing)" + }, + "private": { + "type": "boolean", + "description": "if True, we will not announce this channel" + }, + "channel_type": { + "type": "object", + "description": "channel_type as negotiated with peer", + "additionalProperties": false, + "required": [ + "bits", + "names" + ], + "properties": { + "bits": { + "type": "array", + "description": "Each bit set in this channel_type", + "items": { + "type": "u32", + "description": "Bit number" + } + }, + "names": { + "type": "array", + "description": "Feature name for each bit set in this channel_type", + "items": { + "type": "string", + "enum": [ + "static_remotekey/even", + "anchor_outputs/even", + "anchors_zero_fee_htlc_tx/even", + "scid_alias/even", + "zeroconf/even" + ], + "description": "Name of feature bit" + } + } + } + }, + "total_local_commitments": { + "type": "u64", + "description": "Number of commitment transaction we made" + }, + "total_remote_commitments": { + "type": "u64", + "description": "Number of commitment transaction they made" + }, + "total_htlcs_sent": { + "type": "u64", + "description": "Number of HTLCs we ever sent" + }, + "funding_txid": { + "type": "txid", + "description": "ID of the funding transaction" + }, + "funding_outnum": { + "type": "u32", + "description": "The 0-based output number of the funding transaction which opens the channel" + }, + "leased": { + "type": "boolean", + "description": "Whether this channel was leased from `opener`" + }, + "funding_fee_paid_msat": { + "type": "msat", + "description": "How much we paid to lease the channel (iff `leased` is true and `opener` is local)" + }, + "funding_fee_rcvd_msat": { + "type": "msat", + "description": "How much they paid to lease the channel (iff `leased` is true and `opener` is remote)" + }, + "funding_pushed_msat": { + "type": "msat", + "description": "How much `opener` pushed immediate (if non-zero)" + }, + "total_msat": { + "type": "msat", + "description": "total amount in the channel" + }, + "final_to_us_msat": { + "type": "msat", + "description": "Our balance in final commitment transaction" + }, + "min_to_us_msat": { + "type": "msat", + "description": "Least amount owed to us ever. If the peer were to succesfully steal from us, this is the amount we would still retain." + }, + "max_to_us_msat": { + "type": "msat", + "description": "Most amount owed to us ever. If we were to successfully steal from the peer, this is the amount we could potentially get." + }, + "last_commitment_txid": { + "type": "hash", + "description": "The final commitment tx's txid (or mutual close, if we accepted it). Not present for some very old, small channels pre-0.7.0." + }, + "last_commitment_fee_msat": { + "type": "msat", + "description": "The fee on `last_commitment_txid`" + }, + "close_cause": { + "type": "string", + "enum": [ + "unknown", + "local", + "user", + "remote", + "protocol", + "onchain" + ], + "description": "What caused the channel to close" + }, + "last_stable_connection": { + "type": "u64", + "added": "v24.02", + "description": "Last time we reestablished the open channel and stayed connected for 1 minute" + } + } + } + } + } + }, + "listconfigs.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "configs": { + "added": "v23.08", + "type": "object", + "comment": "Plugins can add fields to this, so we can't rule out additional properties :(", + "additionalProperties": true, + "required": [], + "properties": { + "conf": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "description": "field from cmdline" + }, + "source": { + "type": "string", + "enum": [ + "cmdline" + ], + "description": "source of configuration setting" + } + } + }, + "developer": { + "type": "object", + "added": "v23.08", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "clear-plugins": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "disable-mpp": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + }, + "plugin": { + "type": "string", + "description": "plugin which registered this configuration setting" + } + } + }, + "mainnet": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "regtest": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "signet": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "testnet": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "important-plugin": { + "type": "object", + "additionalProperties": false, + "required": [ + "values_str", + "sources" + ], + "properties": { + "values_str": { + "type": "array", + "items": { + "type": "string", + "description": "field from config or cmdline" + } + }, + "sources": { + "type": "array", + "items": { + "type": "string", + "description": "source of configuration setting" + } + } + } + }, + "plugin": { + "type": "object", + "additionalProperties": false, + "required": [ + "values_str", + "sources" + ], + "properties": { + "values_str": { + "type": "array", + "items": { + "type": "string", + "description": "field from config or cmdline" + } + }, + "sources": { + "type": "array", + "items": { + "type": "string", + "description": "source of configuration setting" + } + } + } + }, + "plugin-dir": { + "type": "object", + "additionalProperties": false, + "required": [ + "values_str", + "sources" + ], + "properties": { + "values_str": { + "type": "array", + "items": { + "type": "string", + "description": "field from config or cmdline" + } + }, + "sources": { + "type": "array", + "items": { + "type": "string", + "description": "source of configuration setting" + } + } + } + }, + "lightning-dir": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "network": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "description": "field from config or cmdline, or default (can also be changed by `testnet`, `signet`, `regtest` options!)" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "allow-deprecated-apis": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_bool", + "source" + ], + "properties": { + "value_bool": { + "type": "boolean", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "rpc-file": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "disable-plugin": { + "type": "object", + "additionalProperties": false, + "required": [ + "values_str", + "sources" + ], + "properties": { + "values_str": { + "type": "array", + "items": { + "type": "string", + "description": "field from config or cmdline" + } + }, + "sources": { + "type": "array", + "items": { + "type": "string", + "description": "source of configuration setting" + } + } + } + }, + "always-use-proxy": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_bool", + "source" + ], + "properties": { + "value_bool": { + "type": "boolean", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "daemon": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "wallet": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "large-channels": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "experimental-dual-fund": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "experimental-splicing": { + "added": "v23.08", + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "experimental-onion-messages": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "experimental-offers": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "experimental-shutdown-wrong-funding": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "experimental-websocket-port": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "u32", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "experimental-peer-storage": { + "added": "v23.02", + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "experimental-anchors": { + "type": "object", + "added": "v23.08", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "database-upgrade": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_bool", + "source" + ], + "properties": { + "value_bool": { + "type": "boolean", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "rgb": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "hex", + "description": "field from config or cmdline, or default", + "maxLength": 6, + "minLength": 6 + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "alias": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "pid-file": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "ignore-fee-limits": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_bool", + "source" + ], + "properties": { + "value_bool": { + "type": "boolean", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "watchtime-blocks": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "u32", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "max-locktime-blocks": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "u32", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "funding-confirms": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "u32", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "cltv-delta": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "u32", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "cltv-final": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "u32", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "commit-time": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "u32", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "fee-base": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "u32", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "rescan": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "integer", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "fee-per-satoshi": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "u32", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "max-concurrent-htlcs": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "u32", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "htlc-minimum-msat": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_msat", + "source" + ], + "properties": { + "value_msat": { + "type": "msat", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "htlc-maximum-msat": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_msat", + "source" + ], + "properties": { + "value_msat": { + "type": "msat", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "max-dust-htlc-exposure-msat": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_msat", + "source" + ], + "properties": { + "value_msat": { + "type": "msat", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "min-capacity-sat": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "u64", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + }, + "dynamic": { + "type": "boolean", + "enum": [ + true + ], + "description": "Can this be set by setconfig()" + } + } + }, + "addr": { + "type": "object", + "additionalProperties": false, + "required": [ + "values_str", + "sources" + ], + "properties": { + "values_str": { + "type": "array", + "items": { + "type": "string", + "description": "field from config or cmdline" + } + }, + "sources": { + "type": "array", + "items": { + "type": "string", + "description": "source of configuration setting" + } + } + } + }, + "announce-addr": { + "type": "object", + "additionalProperties": false, + "required": [ + "values_str", + "sources" + ], + "properties": { + "values_str": { + "type": "array", + "items": { + "type": "string", + "description": "field from config or cmdline" + } + }, + "sources": { + "type": "array", + "items": { + "type": "string", + "description": "source of configuration setting" + } + } + } + }, + "bind-addr": { + "type": "object", + "additionalProperties": false, + "required": [ + "values_str", + "sources" + ], + "properties": { + "values_str": { + "type": "array", + "items": { + "type": "string", + "description": "field from config or cmdline" + } + }, + "sources": { + "type": "array", + "items": { + "type": "string", + "description": "source of configuration setting" + } + } + } + }, + "offline": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "autolisten": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_bool", + "source" + ], + "properties": { + "value_bool": { + "type": "boolean", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "proxy": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "disable-dns": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "announce-addr-discovered": { + "added": "v23.02", + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "enum": [ + "true", + "false", + "auto" + ], + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "announce-addr-discovered-port": { + "added": "v23.02", + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "u32", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "encrypted-hsm": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "rpc-file-mode": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "log-level": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "log-prefix": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "log-file": { + "type": "object", + "additionalProperties": false, + "required": [ + "values_str", + "sources" + ], + "properties": { + "values_str": { + "type": "array", + "items": { + "type": "string", + "description": "field from config or cmdline" + } + }, + "sources": { + "type": "array", + "items": { + "type": "string", + "description": "source of configuration setting" + } + } + } + }, + "log-timestamps": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_bool", + "source" + ], + "properties": { + "value_bool": { + "type": "boolean", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "force-feerates": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "subdaemon": { + "type": "object", + "additionalProperties": false, + "required": [ + "values_str", + "sources" + ], + "properties": { + "values_str": { + "type": "array", + "items": { + "type": "string", + "description": "field from config or cmdline" + } + }, + "sources": { + "type": "array", + "items": { + "type": "string", + "description": "source of configuration setting" + } + } + } + }, + "fetchinvoice-noconnect": { + "type": "object", + "additionalProperties": false, + "required": [ + "set", + "source" + ], + "properties": { + "set": { + "type": "boolean", + "description": "`true` if set in config or cmdline" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "accept-htlc-tlv-types": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "tor-service-password": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_str", + "source" + ], + "properties": { + "value_str": { + "type": "string", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "announce-addr-dns": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_bool", + "source" + ], + "properties": { + "value_bool": { + "type": "boolean", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "require-confirmed-inputs": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_bool", + "source" + ], + "properties": { + "value_bool": { + "type": "boolean", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "commit-fee": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "u64", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + }, + "commit-feerate-offset": { + "type": "object", + "additionalProperties": false, + "required": [ + "value_int", + "source" + ], + "properties": { + "value_int": { + "type": "u32", + "description": "field from config or cmdline, or default" + }, + "source": { + "type": "string", + "description": "source of configuration setting" + } + } + } + } + }, + "# version": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "Special field indicating the current version" + }, + "plugins": { + "type": "array", + "deprecated": [ + "v23.08", + "v24.02" + ], + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "path", + "name" + ], + "description": "`plugin` field from config or cmdline", + "properties": { + "path": { + "type": "string", + "description": "Full path of the plugin" + }, + "name": { + "type": "string", + "description": "short name of the plugin" + }, + "options": { + "type": "object", + "additionalProperties": true, + "required": [], + "description": "Specific options set for this plugin", + "properties": {} + } + } + } + }, + "important-plugins": { + "type": "array", + "deprecated": [ + "v23.08", + "v24.02" + ], + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "path", + "name" + ], + "description": "`important-plugin` field from config or cmdline, or built-in", + "properties": { + "path": { + "type": "string", + "description": "Full path of the plugin" + }, + "name": { + "type": "string", + "description": "short name of the plugin" + }, + "options": { + "type": "object", + "additionalProperties": true, + "required": [], + "description": "Specific options set for this plugin", + "properties": {} + } + } + } + }, + "conf": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`conf` field from cmdline, or default" + }, + "lightning-dir": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`lightning-dir` field from config or cmdline, or default" + }, + "network": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`network` field from config or cmdline, or default" + }, + "allow-deprecated-apis": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`allow-deprecated-apis` field from config or cmdline, or default" + }, + "rpc-file": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`rpc-file` field from config or cmdline, or default" + }, + "disable-plugin": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "array", + "items": { + "type": "string", + "description": "`disable-plugin` field from config or cmdline" + } + }, + "bookkeeper-dir": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`bookkeeper-dir` field from config or cmdline, or default" + }, + "bookkeeper-db": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`bookkeeper-db` field from config or cmdline, or default" + }, + "always-use-proxy": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`always-use-proxy` field from config or cmdline, or default" + }, + "daemon": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`daemon` field from config or cmdline, or default" + }, + "wallet": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`wallet` field from config or cmdline default" + }, + "large-channels": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`large-channels` field from config or cmdline, or default" + }, + "experimental-dual-fund": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`experimental-dual-fund` field from config or cmdline, or default" + }, + "experimental-splicing": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`experimental-splicing` field from config or cmdline, or default" + }, + "experimental-onion-messages": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`experimental-onion-messages` field from config or cmdline, or default" + }, + "experimental-offers": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`experimental-offers` field from config or cmdline, or default" + }, + "experimental-shutdown-wrong-funding": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`experimental-shutdown-wrong-funding` field from config or cmdline, or default" + }, + "experimental-websocket-port": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "u16", + "description": "`experimental-websocket-port` field from config or cmdline, or default" + }, + "experimental-peer-storage": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "added": "v23.02", + "description": "`experimental-peer-storage` field from config or cmdline, or default" + }, + "experimental-quiesce": { + "type": "boolean", + "added": "v23.08", + "deprecated": [ + "v23.08", + "v24.02" + ], + "description": "`experimental-quiesce` field from config or cmdline, or default" + }, + "experimental-upgrade-protocol": { + "type": "boolean", + "added": "v23.08", + "deprecated": [ + "v23.08", + "v24.02" + ], + "description": "`experimental-upgrade-protocol` field from config or cmdline, or default" + }, + "invoices-onchain-fallback": { + "type": "boolean", + "added": "v23.11", + "description": "`invoices-onchain-fallback` field from config or cmdline, or default" + }, + "database-upgrade": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`database-upgrade` field from config or cmdline" + }, + "rgb": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "hex", + "description": "`rgb` field from config or cmdline, or default", + "maxLength": 6, + "minLength": 6 + }, + "alias": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`alias` field from config or cmdline, or default" + }, + "pid-file": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`pid-file` field from config or cmdline, or default" + }, + "ignore-fee-limits": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`ignore-fee-limits` field from config or cmdline, or default" + }, + "watchtime-blocks": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "u32", + "description": "`watchtime-blocks` field from config or cmdline, or default" + }, + "max-locktime-blocks": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "u32", + "description": "`max-locktime-blocks` field from config or cmdline, or default" + }, + "funding-confirms": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "u32", + "description": "`funding-confirms` field from config or cmdline, or default" + }, + "cltv-delta": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "u32", + "description": "`cltv-delta` field from config or cmdline, or default" + }, + "cltv-final": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "u32", + "description": "`cltv-final` field from config or cmdline, or default" + }, + "commit-time": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "u32", + "description": "`commit-time` field from config or cmdline, or default" + }, + "fee-base": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "u32", + "description": "`fee-base` field from config or cmdline, or default" + }, + "rescan": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "integer", + "description": "`rescan` field from config or cmdline, or default" + }, + "fee-per-satoshi": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "u32", + "description": "`fee-per-satoshi` field from config or cmdline, or default" + }, + "max-concurrent-htlcs": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "u32", + "description": "`max-concurrent-htlcs` field from config or cmdline, or default" + }, + "htlc-minimum-msat": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "msat", + "description": "`htlc-minimum-msat` field from config or cmdline, or default" + }, + "htlc-maximum-msat": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "msat", + "description": "`htlc-maximum-msat` field from config or cmdline, or default" + }, + "max-dust-htlc-exposure-msat": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "msat", + "description": "`max-dust-htlc-exposure-mast` field from config or cmdline, or default" + }, + "min-capacity-sat": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "u64", + "description": "`min-capacity-sat` field from config or cmdline, or default" + }, + "addr": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`addr` field from config or cmdline (can be more than one)" + }, + "announce-addr": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`announce-addr` field from config or cmdline (can be more than one)" + }, + "bind-addr": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`bind-addr` field from config or cmdline (can be more than one)" + }, + "offline": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`true` if `offline` was set in config or cmdline" + }, + "autolisten": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`autolisten` field from config or cmdline, or default" + }, + "proxy": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`proxy` field from config or cmdline, or default" + }, + "disable-dns": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`true` if `disable-dns` was set in config or cmdline" + }, + "announce-addr-discovered": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`true`/`false`/`auto` depending on how `announce-addr-discovered` was set in config or cmdline", + "added": "v23.02" + }, + "announce-addr-discovered-port": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "integer", + "description": "Sets the announced TCP port for dynamically discovered IPs.", + "added": "v23.02" + }, + "encrypted-hsm": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`true` if `encrypted-hsm` was set in config or cmdline" + }, + "rpc-file-mode": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`rpc-file-mode` field from config or cmdline, or default" + }, + "log-level": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`log-level` field from config or cmdline, or default" + }, + "log-prefix": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`log-prefix` field from config or cmdline, or default" + }, + "log-file": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`log-file` field from config or cmdline, or default" + }, + "log-timestamps": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`log-timestamps` field from config or cmdline, or default" + }, + "force-feerates": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "force-feerate configuration setting, if any" + }, + "subdaemon": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`subdaemon` fields from config or cmdline if any (can be more than one)" + }, + "fetchinvoice-noconnect": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "`fetchinvoice-noconnect` fields from config or cmdline, or default" + }, + "accept-htlc-tlv-types": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`accept-htlc-tlv-types` field from config or cmdline, or not present" + }, + "tor-service-password": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "string", + "description": "`tor-service-password` field from config or cmdline, if any" + }, + "dev-allowdustreserve": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "Whether we allow setting dust reserves" + }, + "announce-addr-dns": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "added": "v22.11.1", + "description": "Whether we put DNS entries into node_announcement" + }, + "require-confirmed-inputs": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "boolean", + "description": "Request peers to only send confirmed inputs (dual-fund only)" + }, + "developer": { + "added": "v23.08", + "type": "boolean", + "description": "Whether developer mode is enabled" + }, + "commit-fee": { + "deprecated": [ + "v23.08", + "v24.02" + ], + "type": "u64", + "added": "v23.05", + "description": "The percentage of the 6-block fee estimate to use for commitment transactions" + }, + "min-emergency-msat": { + "type": "msat", + "added": "v23.08", + "description": "field from config or cmdline, or default" + }, + "commit-feerate-offset": { + "type": "u32", + "added": "v23.11", + "description": "additional commitment feerate applied by channel owner" + } + } + }, + "listdatastore.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "key": { + "oneOf": [ + { + "type": "array", + "description": "key is an array of values (though a single value is treated as a one-element array), to form a heirarchy. Using the first element of the key as the plugin name (e.g. [ 'summary' ]) is recommended. A key can either have children or a value, never both: parents are created and removed automatically.", + "items": { + "type": "string" + } + }, + { + "type": "string", + "description": "" + } + ] + } + } + }, + "listdatastore.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "datastore" + ], + "properties": { + "datastore": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key" + ], + "properties": { + "key": { + "type": "array", + "items": { + "type": "string", + "description": "Part of the key added to the datastore" + } + }, + "generation": { + "type": "u64", + "description": "The number of times this has been updated" + }, + "hex": { + "type": "hex", + "description": "The hex data from the datastore" + }, + "string": { + "type": "string", + "description": "The data as a string, if it's valid utf-8" + } + } + } + } + } + }, + "listforwards.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "properties": { + "status": { + "type": "string", + "enum": [ + "offered", + "settled", + "local_failed", + "failed" + ] + }, + "in_channel": { + "type": "short_channel_id" + }, + "out_channel": { + "type": "short_channel_id" + }, + "index": { + "type": "string", + "added": "v23.11", + "enum": [ + "created", + "updated" + ], + "description": "" + }, + "start": { + "type": "u64", + "added": "v23.11", + "description": "" + }, + "limit": { + "type": "u32", + "added": "v23.11", + "description": "" + } + } + }, + "listforwards.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "forwards" + ], + "properties": { + "forwards": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "created_index", + "in_channel", + "in_msat", + "status", + "received_time" + ], + "properties": { + "created_index": { + "added": "v23.11", + "type": "u64", + "description": "1-based index indicating order this forward was created in" + }, + "in_channel": { + "type": "short_channel_id", + "description": "the channel that received the HTLC" + }, + "in_htlc_id": { + "type": "u64", + "description": "the unique HTLC id the sender gave this (not present if incoming channel was closed before ugprade to v22.11)" + }, + "in_msat": { + "type": "msat", + "description": "the value of the incoming HTLC" + }, + "status": { + "type": "string", + "enum": [ + "offered", + "settled", + "local_failed", + "failed" + ], + "description": "still ongoing, completed, failed locally, or failed after forwarding" + }, + "received_time": { + "type": "number", + "description": "the UNIX timestamp when this was received" + }, + "out_channel": { + "type": "short_channel_id", + "description": "the channel that the HTLC (trying to) forward to" + }, + "out_htlc_id": { + "type": "u64", + "description": "the unique HTLC id we gave this when sending (may be missing even if out_channel is present, for old forwards before v22.11)" + }, + "updated_index": { + "added": "v23.11", + "type": "u64", + "description": "1-based index indicating order this forward was changed (only present if it has changed since creation)" + }, + "style": { + "type": "string", + "enum": [ + "legacy", + "tlv" + ], + "description": "Either a legacy onion format or a modern tlv format" + } + }, + "allOf": [ + { + "if": { + "required": [ + "out_msat" + ] + }, + "then": { + "additionalProperties": false, + "required": [ + "fee_msat", + "out_msat", + "out_channel" + ], + "properties": { + "created_index": {}, + "updated_index": {}, + "in_channel": {}, + "in_htlc_id": {}, + "in_msatoshi": {}, + "in_msat": {}, + "status": {}, + "style": {}, + "received_time": {}, + "resolved_time": {}, + "out_channel": {}, + "out_htlc_id": {}, + "failcode": {}, + "failreason": {}, + "fee_msat": { + "type": "msat", + "description": "the amount this paid in fees" + }, + "out_msat": { + "type": "msat", + "description": "the amount we sent out the *out_channel*" + } + } + }, + "else": { + "additionalProperties": false, + "required": [], + "properties": { + "created_index": {}, + "updated_index": {}, + "in_channel": {}, + "in_htlc_id": {}, + "in_msatoshi": {}, + "in_msat": {}, + "status": {}, + "style": {}, + "received_time": {}, + "resolved_time": {}, + "failcode": {}, + "failreason": {}, + "out_channel": {} + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "settled", + "failed" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "resolved_time" + ], + "properties": { + "created_index": {}, + "updated_index": {}, + "in_channel": {}, + "in_htlc_id": {}, + "in_msatoshi": {}, + "in_msat": {}, + "status": {}, + "style": {}, + "received_time": {}, + "out_channel": {}, + "out_htlc_id": {}, + "fee": {}, + "fee_msat": {}, + "out_msatoshi": {}, + "out_msat": {}, + "failcode": {}, + "failreason": {}, + "resolved_time": { + "type": "number", + "description": "the UNIX timestamp when this was resolved" + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "created_index": {}, + "updated_index": {}, + "in_channel": {}, + "in_htlc_id": {}, + "in_msatoshi": {}, + "in_msat": {}, + "status": {}, + "style": {}, + "received_time": {}, + "out_channel": {}, + "out_htlc_id": {}, + "fee": {}, + "fee_msat": {}, + "failcode": {}, + "failreason": {}, + "out_msatoshi": {}, + "out_msat": {} + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "local_failed", + "failed" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [], + "properties": { + "created_index": {}, + "updated_index": {}, + "in_channel": {}, + "in_htlc_id": {}, + "in_msatoshi": {}, + "in_msat": {}, + "status": {}, + "style": {}, + "received_time": {}, + "out_channel": {}, + "out_htlc_id": {}, + "fee": {}, + "fee_msat": {}, + "out_msatoshi": {}, + "out_msat": {}, + "resolved_time": {}, + "failcode": { + "type": "u32", + "description": "the numeric onion code returned" + }, + "failreason": { + "type": "string", + "description": "the name of the onion code returned" + } + } + }, + "else": { + "additionalProperties": false, + "required": [], + "properties": { + "created_index": {}, + "updated_index": {}, + "in_channel": {}, + "in_htlc_id": {}, + "in_msatoshi": {}, + "in_msat": {}, + "status": {}, + "style": {}, + "received_time": {}, + "out_channel": {}, + "out_htlc_id": {}, + "fee": {}, + "fee_msat": {}, + "out_msatoshi": {}, + "out_msat": {}, + "resolved_time": {} + } + } + } + ] + } + } + } + }, + "listfunds.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": { + "spent": { + "type": "boolean", + "description": "Should outputs that are already spent be included in the result?" + } + } + }, + "listfunds.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "outputs", + "channels" + ], + "properties": { + "outputs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "txid", + "output", + "amount_msat", + "scriptpubkey", + "status", + "reserved" + ], + "properties": { + "txid": { + "type": "txid", + "description": "the ID of the spendable transaction" + }, + "output": { + "type": "u32", + "description": "the index within *txid*" + }, + "amount_msat": { + "type": "msat", + "description": "the amount of the output" + }, + "scriptpubkey": { + "type": "hex", + "description": "the scriptPubkey of the output" + }, + "address": { + "type": "string", + "description": "the bitcoin address of the output" + }, + "redeemscript": { + "type": "hex", + "description": "the redeemscript, only if it's p2sh-wrapped" + }, + "status": { + "type": "string", + "enum": [ + "unconfirmed", + "confirmed", + "spent", + "immature" + ] + }, + "reserved": { + "type": "boolean", + "description": "whether this UTXO is currently reserved for an in-flight tx" + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "confirmed" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "blockheight" + ], + "properties": { + "txid": {}, + "output": {}, + "amount_msat": {}, + "scriptpubkey": {}, + "address": {}, + "value": {}, + "redeemscript": {}, + "status": {}, + "reserved": {}, + "reserved_to_block": {}, + "blockheight": { + "type": "u32", + "description": "Block height where it was confirmed" + } + } + } + }, + { + "if": { + "properties": { + "reserved": { + "type": "boolean", + "enum": [ + "true" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "reserved_to_block" + ], + "properties": { + "txid": {}, + "output": {}, + "amount_msat": {}, + "scriptpubkey": {}, + "address": {}, + "value": {}, + "redeemscript": {}, + "status": {}, + "blockheight": {}, + "reserved": {}, + "reserved_to_block": { + "type": "u32", + "description": "Block height where reservation will expire" + } + } + } + } + ] + } + }, + "channels": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "peer_id", + "our_amount_msat", + "amount_msat", + "funding_txid", + "funding_output", + "connected", + "state", + "channel_id" + ], + "properties": { + "peer_id": { + "type": "pubkey", + "description": "the peer with which the channel is opened" + }, + "our_amount_msat": { + "type": "msat", + "description": "available satoshis on our node's end of the channel" + }, + "amount_msat": { + "type": "msat", + "description": "total channel value" + }, + "funding_txid": { + "type": "txid", + "description": "funding transaction id" + }, + "funding_output": { + "type": "u32", + "description": "the 0-based index of the output in the funding transaction" + }, + "connected": { + "type": "boolean", + "description": "whether the channel peer is connected" + }, + "state": { + "type": "string", + "enum": [ + "OPENINGD", + "CHANNELD_AWAITING_LOCKIN", + "CHANNELD_NORMAL", + "CHANNELD_SHUTTING_DOWN", + "CLOSINGD_SIGEXCHANGE", + "CLOSINGD_COMPLETE", + "AWAITING_UNILATERAL", + "FUNDING_SPEND_SEEN", + "ONCHAIN", + "DUALOPEND_OPEN_INIT", + "DUALOPEND_AWAITING_LOCKIN", + "DUALOPEND_OPEN_COMMITTED", + "DUALOPEND_OPEN_COMMIT_READY" + ], + "description": "the channel state, in particular \"CHANNELD_NORMAL\" means the channel can be used normally" + }, + "channel_id": { + "type": "hash", + "description": "The full channel_id (funding txid Xored with output number)", + "added": "v23.05" + } + }, + "allOf": [ + { + "if": { + "properties": { + "state": { + "type": "string", + "enum": [ + "CHANNELD_NORMAL" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "short_channel_id" + ], + "properties": { + "peer_id": {}, + "our_amount_msat": {}, + "channel_sat": {}, + "amount_msat": {}, + "channel_total_sat": {}, + "funding_txid": {}, + "funding_output": {}, + "connected": {}, + "state": {}, + "channel_id": {}, + "short_channel_id": { + "type": "short_channel_id", + "description": "short channel id of channel" + } + } + } + }, + { + "if": { + "properties": { + "state": { + "type": "string", + "enum": [ + "CHANNELD_SHUTTING_DOWN", + "CLOSINGD_SIGEXCHANGE", + "CLOSINGD_COMPLETE", + "AWAITING_UNILATERAL", + "FUNDING_SPEND_SEEN", + "ONCHAIN" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [], + "properties": { + "peer_id": {}, + "our_amount_msat": {}, + "channel_sat": {}, + "amount_msat": {}, + "channel_total_sat": {}, + "funding_txid": {}, + "funding_output": {}, + "connected": {}, + "state": {}, + "channel_id": {}, + "short_channel_id": { + "type": "short_channel_id", + "description": "short channel id of channel (only if funding reached lockin depth before closing)" + } + } + } + } + ] + } + } + } + }, + "listhtlcs.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "properties": { + "id": { + "type": "string", + "description": "channel id or short_channel_id" + } + } + }, + "listhtlcs.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "htlcs" + ], + "properties": { + "htlcs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "short_channel_id", + "id", + "expiry", + "direction", + "amount_msat", + "payment_hash", + "state" + ], + "properties": { + "short_channel_id": { + "type": "short_channel_id", + "description": "the channel that contains/contained the HTLC" + }, + "id": { + "type": "u64", + "description": "the unique, incrementing HTLC id the creator gave this" + }, + "expiry": { + "type": "u32", + "description": "the block number where this HTLC expires/expired" + }, + "amount_msat": { + "type": "msat", + "description": "the value of the HTLC" + }, + "direction": { + "type": "string", + "enum": [ + "out", + "in" + ], + "description": "out if we offered this to the peer, in if they offered it" + }, + "payment_hash": { + "type": "hash", + "description": "payment hash sought by HTLC" + }, + "state": { + "type": "string", + "enum": [ + "SENT_ADD_HTLC", + "SENT_ADD_COMMIT", + "RCVD_ADD_REVOCATION", + "RCVD_ADD_ACK_COMMIT", + "SENT_ADD_ACK_REVOCATION", + "RCVD_REMOVE_HTLC", + "RCVD_REMOVE_COMMIT", + "SENT_REMOVE_REVOCATION", + "SENT_REMOVE_ACK_COMMIT", + "RCVD_REMOVE_ACK_REVOCATION", + "RCVD_ADD_HTLC", + "RCVD_ADD_COMMIT", + "SENT_ADD_REVOCATION", + "SENT_ADD_ACK_COMMIT", + "RCVD_ADD_ACK_REVOCATION", + "SENT_REMOVE_HTLC", + "SENT_REMOVE_COMMIT", + "RCVD_REMOVE_REVOCATION", + "RCVD_REMOVE_ACK_COMMIT", + "SENT_REMOVE_ACK_REVOCATION" + ], + "description": "The first 10 states are for `in`, the next 10 are for `out`." + } + } + } + } + } + }, + "listinvoicerequests.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "added": "v22.11", + "properties": { + "invreq_id": { + "type": "string", + "description": "" + }, + "active_only": { + "type": "boolean", + "description": "" + } + } + }, + "listinvoicerequests.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "invoicerequests" + ], + "properties": { + "invoicerequests": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "invreq_id", + "single_use", + "active", + "bolt12", + "used" + ], + "properties": { + "invreq_id": { + "type": "hash", + "description": "the SHA256 hash of all invoice_request fields less than 160" + }, + "active": { + "type": "boolean", + "description": "whether the invoice_request is currently active" + }, + "single_use": { + "type": "boolean", + "description": "whether the invoice_request will become inactive after we pay an invoice for it" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string starting with lnr" + }, + "used": { + "type": "boolean", + "description": "whether the invoice_request has already been used" + }, + "label": { + "type": "string", + "description": "the label provided when creating the invoice_request" + } + } + } + } + } + }, + "listinvoices.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "label": { + "oneOf": [ + { + "type": "string", + "description": "" + }, + { + "type": "integer", + "description": "" + } + ] + }, + "invstring": { + "type": "string", + "description": "" + }, + "payment_hash": { + "type": "hex", + "description": "" + }, + "offer_id": { + "type": "string", + "description": "" + }, + "index": { + "type": "string", + "added": "v23.08", + "enum": [ + "created", + "updated" + ], + "description": "" + }, + "start": { + "type": "u64", + "added": "v23.08", + "description": "" + }, + "limit": { + "type": "u32", + "added": "v23.08", + "description": "" + } + } + }, + "listinvoices.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "invoices" + ], + "properties": { + "invoices": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "label", + "created_index", + "payment_hash", + "status", + "expires_at" + ], + "properties": { + "label": { + "type": "string", + "description": "unique label supplied at invoice creation" + }, + "description": { + "type": "string", + "description": "description used in the invoice" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "status": { + "type": "string", + "enum": [ + "unpaid", + "paid", + "expired" + ], + "description": "Whether it's paid, unpaid or unpayable" + }, + "expires_at": { + "type": "u64", + "description": "UNIX timestamp of when it will become / became unpayable" + }, + "amount_msat": { + "type": "msat", + "description": "the amount required to pay this invoice" + }, + "bolt11": { + "type": "string", + "description": "the BOLT11 string (always present unless *bolt12* is)" + }, + "bolt12": { + "type": "string", + "description": "the BOLT12 string (always present unless *bolt11* is)" + }, + "local_offer_id": { + "type": "hash", + "description": "the *id* of our offer which created this invoice (**experimental-offers** only)." + }, + "invreq_payer_note": { + "type": "string", + "description": "the optional *invreq_payer_note* from invoice_request which created this invoice (**experimental-offers** only)." + }, + "created_index": { + "type": "u64", + "added": "v23.08", + "description": "1-based index indicating order this invoice was created in" + }, + "updated_index": { + "type": "u64", + "added": "v23.08", + "description": "1-based index indicating order this invoice was changed (only present if it has changed since creation)" + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "paid" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "pay_index", + "amount_received_msat", + "paid_at", + "payment_preimage" + ], + "properties": { + "label": {}, + "description": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "bolt11": {}, + "bolt12": {}, + "local_offer_id": {}, + "invreq_payer_note": {}, + "expires_at": {}, + "created_index": {}, + "updated_index": {}, + "pay_index": { + "type": "u64", + "description": "Unique incrementing index for this payment" + }, + "amount_received_msat": { + "type": "msat", + "description": "the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)" + }, + "paid_at": { + "type": "u64", + "description": "UNIX timestamp of when it was paid" + }, + "paid_outpoint": { + "type": "object", + "description": "Outpoint this invoice was paid with", + "added": "v23.11", + "additionalProperties": false, + "required": [ + "txid", + "outnum" + ], + "properties": { + "txid": { + "added": "v23.11", + "type": "txid", + "description": "ID of the transaction that paid the invoice" + }, + "outnum": { + "added": "v23.11", + "type": "u32", + "description": "The 0-based output number of the transaction that paid the invoice" + } + } + }, + "payment_preimage": { + "type": "secret", + "description": "proof of payment" + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "label": {}, + "description": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "bolt11": {}, + "bolt12": {}, + "local_offer_id": {}, + "invreq_payer_note": {}, + "created_index": {}, + "updated_index": {}, + "expires_at": {} + } + } + } + ] + } + } + } + }, + "listnodes.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": { + "id": { + "type": "pubkey" + } + } + }, + "listnodes.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "nodes" + ], + "properties": { + "nodes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "nodeid" + ], + "properties": { + "nodeid": { + "type": "pubkey", + "description": "the public key of the node" + }, + "last_timestamp": { + "type": "u32", + "description": "A node_announcement has been received for this node (UNIX timestamp)" + } + }, + "allOf": [ + { + "if": { + "required": [ + "last_timestamp" + ] + }, + "then": { + "additionalProperties": false, + "required": [ + "nodeid", + "last_timestamp", + "alias", + "color", + "features", + "addresses" + ], + "properties": { + "nodeid": {}, + "last_timestamp": {}, + "option_will_fund": {}, + "alias": { + "type": "string", + "description": "The fun alias this node advertized", + "maxLength": 32 + }, + "color": { + "type": "hex", + "description": "The favorite RGB color this node advertized", + "minLength": 6, + "maxLength": 6 + }, + "features": { + "type": "hex", + "description": "BOLT #9 features bitmap this node advertized" + }, + "addresses": { + "type": "array", + "description": "The addresses this node advertized", + "items": { + "type": "object", + "required": [ + "type", + "port" + ], + "additionalProperties": true, + "properties": { + "type": { + "type": "string", + "enum": [ + "dns", + "ipv4", + "ipv6", + "torv2", + "torv3" + ], + "description": "Type of connection (until 23.08, `websocket` was also allowed)" + }, + "port": { + "type": "u16", + "description": "port number" + } + }, + "if": { + "properties": { + "type": { + "type": "string", + "enum": [ + "dns", + "ipv4", + "ipv6", + "torv2", + "torv3" + ] + } + } + }, + "then": { + "required": [ + "type", + "address", + "port" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "port": {}, + "address": { + "type": "string", + "description": "address in expected format for **type**" + } + } + }, + "else": { + "required": [ + "type", + "port" + ], + "additionalProperties": false, + "properties": { + "type": {}, + "port": {} + } + } + } + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "nodeid": {} + } + } + }, + { + "if": { + "required": [ + "option_will_fund" + ] + }, + "then": { + "additionalProperties": true, + "required": [ + "option_will_fund" + ], + "properties": { + "option_will_fund": { + "type": "object", + "additionalProperties": false, + "required": [ + "lease_fee_base_msat", + "lease_fee_basis", + "funding_weight", + "channel_fee_max_base_msat", + "channel_fee_max_proportional_thousandths", + "compact_lease" + ], + "properties": { + "lease_fee_base_msat": { + "type": "msat", + "description": "the fixed fee for a lease (whole number of satoshis)" + }, + "lease_fee_basis": { + "type": "u32", + "description": "the proportional fee in basis points (parts per 10,000) for a lease" + }, + "funding_weight": { + "type": "u32", + "description": "the onchain weight you'll have to pay for a lease" + }, + "channel_fee_max_base_msat": { + "type": "msat", + "description": "the maximum base routing fee this node will charge during the lease" + }, + "channel_fee_max_proportional_thousandths": { + "type": "u32", + "description": "the maximum proportional routing fee this node will charge during the lease (in thousandths, not millionths like channel_update)" + }, + "compact_lease": { + "type": "hex", + "description": "the lease as represented in the node_announcement" + } + } + } + } + } + } + ] + } + } + } + }, + "listoffers.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "offers" + ], + "properties": { + "offers": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "offer_id", + "active", + "single_use", + "bolt12", + "used" + ], + "properties": { + "offer_id": { + "type": "hash", + "description": "the id of this offer (merkle hash of non-signature fields)" + }, + "active": { + "type": "boolean", + "description": "whether this can still be used" + }, + "single_use": { + "type": "boolean", + "description": "whether this expires as soon as it's paid" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 encoding of the offer" + }, + "used": { + "type": "boolean", + "description": "True if an associated invoice has been paid" + }, + "label": { + "type": "string", + "description": "the (optional) user-specified label" + } + } + } + } + } + }, + "listpays.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": { + "bolt11": { + "type": "string" + }, + "payment_hash": { + "type": "hash" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "complete", + "failed" + ] + } + } + }, + "listpays.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "pays" + ], + "properties": { + "pays": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "payment_hash", + "status", + "created_at" + ], + "properties": { + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "failed", + "complete" + ], + "description": "status of the payment" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment if known" + }, + "created_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "completed_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was completed" + }, + "label": { + "type": "string", + "description": "the label, if given to sendpay" + }, + "bolt11": { + "type": "string", + "description": "the bolt11 string (if pay supplied one)" + }, + "description": { + "type": "string", + "description": "the description matching the bolt11 description hash (if pay supplied one)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string (if supplied for pay: **experimental-offers** only)." + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "complete" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "amount_sent_msat", + "preimage" + ], + "properties": { + "payment_hash": {}, + "status": {}, + "destination": {}, + "created_at": {}, + "completed_at": {}, + "label": {}, + "bolt11": {}, + "description": {}, + "bolt12": {}, + "amount_msat": { + "type": "msat", + "description": "The amount of millisatoshi we intended to send to the destination" + }, + "amount_sent_msat": { + "type": "msat", + "description": "The amount of millisatoshi we sent in order to pay (may include fees and not match amount_msat)" + }, + "preimage": { + "type": "secret", + "description": "proof of payment" + }, + "number_of_parts": { + "type": "u64", + "description": "the number of parts for a successful payment (only if more than one)." + } + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "failed" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "amount_sent_msat" + ], + "properties": { + "payment_hash": {}, + "status": {}, + "destination": {}, + "created_at": {}, + "label": {}, + "bolt11": {}, + "description": {}, + "bolt12": {}, + "amount_sent_msat": {}, + "erroronion": { + "type": "hex", + "description": "the error onion returned on failure, if any." + } + } + } + } + ] + } + } + } + }, + "listpeerchannels.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "added": "v23.02", + "properties": { + "id": { + "type": "pubkey", + "description": "If supplied, limits the channels to just the peer with the given ID, if it exists." + } + } + }, + "listpeerchannels.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "added": "v23.02", + "required": [ + "channels" + ], + "properties": { + "channels": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "state", + "opener", + "features", + "peer_connected", + "peer_id" + ], + "properties": { + "peer_id": { + "type": "pubkey", + "description": "Node Public key" + }, + "peer_connected": { + "type": "boolean", + "description": "A boolean flag that is set to true if the peer is online" + }, + "reestablished": {}, + "state": { + "type": "string", + "enum": [ + "OPENINGD", + "CHANNELD_AWAITING_LOCKIN", + "CHANNELD_NORMAL", + "CHANNELD_SHUTTING_DOWN", + "CLOSINGD_SIGEXCHANGE", + "CLOSINGD_COMPLETE", + "AWAITING_UNILATERAL", + "FUNDING_SPEND_SEEN", + "ONCHAIN", + "DUALOPEND_OPEN_INIT", + "DUALOPEND_AWAITING_LOCKIN", + "CHANNELD_AWAITING_SPLICE", + "DUALOPEND_OPEN_COMMITTED", + "DUALOPEND_OPEN_COMMIT_READY" + ], + "description": "the channel state, in particular \"CHANNELD_NORMAL\" means the channel can be used normally" + }, + "scratch_txid": { + "type": "txid", + "description": "The txid we would use if we went onchain now" + }, + "channel_type": { + "type": "object", + "description": "channel_type as negotiated with peer", + "added": "v23.05", + "additionalProperties": false, + "required": [ + "bits", + "names" + ], + "properties": { + "bits": { + "type": "array", + "description": "Each bit set in this channel_type", + "items": { + "type": "u32", + "description": "Bit number" + } + }, + "names": { + "type": "array", + "description": "Feature name for each bit set in this channel_type", + "items": { + "type": "string", + "enum": [ + "static_remotekey/even", + "anchor_outputs/even", + "anchors_zero_fee_htlc_tx/even", + "scid_alias/even", + "zeroconf/even" + ], + "description": "Name of feature bit" + } + } + } + }, + "updates": { + "type": "object", + "added": "v24.02", + "description": "Latest gossip updates sent/received", + "additionalProperties": false, + "required": [ + "local" + ], + "properties": { + "local": { + "type": "object", + "description": "Our gossip for channel", + "additionalProperties": false, + "added": "v24.02", + "required": [ + "htlc_minimum_msat", + "htlc_maximum_msat", + "cltv_expiry_delta", + "fee_base_msat", + "fee_proportional_millionths" + ], + "properties": { + "htlc_minimum_msat": { + "type": "msat", + "added": "v24.02", + "description": "Minimum msat amount we allow" + }, + "htlc_maximum_msat": { + "type": "msat", + "added": "v24.02", + "description": "Maximum msat amount we allow" + }, + "cltv_expiry_delta": { + "type": "u32", + "added": "v24.02", + "description": "Blocks delay required between incoming and outgoing HTLCs" + }, + "fee_base_msat": { + "type": "msat", + "added": "v24.02", + "description": "Amount we charge to use the channel" + }, + "fee_proportional_millionths": { + "type": "u32", + "added": "v24.02", + "description": "Amount we charge to use the channel in parts-per-million" + } + } + }, + "remote": { + "type": "object", + "added": "v24.02", + "description": "Peer's gossip for channel", + "additionalProperties": false, + "required": [ + "htlc_minimum_msat", + "htlc_maximum_msat", + "cltv_expiry_delta", + "fee_base_msat", + "fee_proportional_millionths" + ], + "properties": { + "htlc_minimum_msat": { + "type": "msat", + "added": "v24.02", + "description": "Minimum msat amount they allow" + }, + "htlc_maximum_msat": { + "type": "msat", + "added": "v24.02", + "description": "Maximum msat amount they allow" + }, + "cltv_expiry_delta": { + "type": "u32", + "added": "v24.02", + "description": "Blocks delay required between incoming and outgoing HTLCs" + }, + "fee_base_msat": { + "type": "msat", + "added": "v24.02", + "description": "Amount they charge to use the channel" + }, + "fee_proportional_millionths": { + "type": "u32", + "added": "v24.02", + "description": "Amount they charge to use the channel in parts-per-million" + } + } + } + } + }, + "ignore_fee_limits": { + "type": "boolean", + "added": "v23.08", + "description": "set if we allow this peer to set fees to anything they want" + }, + "feerate": { + "type": "object", + "description": "Feerates for the current tx", + "additionalProperties": false, + "required": [ + "perkw", + "perkb" + ], + "properties": { + "perkw": { + "type": "u32", + "description": "Feerate per 1000 weight (i.e kSipa)" + }, + "perkb": { + "type": "u32", + "description": "Feerate per 1000 virtual bytes" + } + } + }, + "owner": { + "type": "string", + "description": "The current subdaemon controlling this connection" + }, + "short_channel_id": { + "type": "short_channel_id", + "description": "The short_channel_id (once locked in)" + }, + "channel_id": { + "type": "hash", + "description": "The full channel_id (funding txid Xored with output number)" + }, + "funding_txid": { + "type": "txid", + "description": "ID of the funding transaction" + }, + "funding_outnum": { + "type": "u32", + "description": "The 0-based output number of the funding transaction which opens the channel" + }, + "initial_feerate": { + "type": "string", + "description": "For inflight opens, the first feerate used to initiate the channel open" + }, + "last_feerate": { + "type": "string", + "description": "For inflight opens, the most recent feerate used on the channel open" + }, + "next_feerate": { + "type": "string", + "description": "For inflight opens, the next feerate we'll use for the channel open" + }, + "next_fee_step": { + "type": "u32", + "description": "For inflight opens, the next feerate step we'll use for the channel open" + }, + "inflight": { + "type": "array", + "description": "Current candidate funding transactions", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "funding_txid", + "funding_outnum", + "feerate", + "total_funding_msat", + "splice_amount", + "our_funding_msat" + ], + "properties": { + "funding_txid": { + "type": "txid", + "description": "ID of the funding transaction" + }, + "funding_outnum": { + "type": "u32", + "description": "The 0-based output number of the funding transaction which opens the channel" + }, + "feerate": { + "type": "string", + "description": "The feerate for this funding transaction in per-1000-weight, with \"kpw\" appended" + }, + "total_funding_msat": { + "type": "msat", + "description": "total amount in the channel" + }, + "splice_amount": { + "type": "integer", + "added": "v23.08", + "description": "The amouont of sats we're splicing in or out" + }, + "our_funding_msat": { + "type": "msat", + "description": "amount we have in the channel" + }, + "scratch_txid": { + "type": "txid", + "description": "The commitment transaction txid we would use if we went onchain now" + } + } + } + }, + "close_to": { + "type": "hex", + "description": "scriptPubkey which we have to close to if we mutual close" + }, + "private": { + "type": "boolean", + "description": "if True, we will not announce this channel" + }, + "opener": { + "type": "string", + "enum": [ + "local", + "remote" + ], + "description": "Who initiated the channel" + }, + "closer": { + "type": "string", + "enum": [ + "local", + "remote" + ], + "description": "Who initiated the channel close (only present if closing)" + }, + "features": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "option_static_remotekey", + "option_anchor_outputs", + "option_anchors_zero_fee_htlc_tx", + "option_scid_alias", + "option_zeroconf" + ], + "description": "BOLT #9 features which apply to this channel" + } + }, + "funding": { + "type": "object", + "additionalProperties": false, + "required": [ + "local_funds_msat", + "remote_funds_msat" + ], + "properties": { + "pushed_msat": { + "type": "msat", + "description": "Amount pushed from opener to peer" + }, + "local_funds_msat": { + "type": "msat", + "description": "Amount of channel we funded" + }, + "remote_funds_msat": { + "type": "msat", + "description": "Amount of channel they funded" + }, + "fee_paid_msat": { + "type": "msat", + "description": "Amount we paid peer at open" + }, + "fee_rcvd_msat": { + "type": "msat", + "description": "Amount we were paid by peer at open" + } + } + }, + "to_us_msat": { + "type": "msat", + "description": "How much of channel is owed to us" + }, + "min_to_us_msat": { + "type": "msat", + "description": "Least amount owed to us ever. If the peer were to succesfully steal from us, this is the amount we would still retain." + }, + "max_to_us_msat": { + "type": "msat", + "description": "Most amount owed to us ever. If we were to successfully steal from the peer, this is the amount we could potentially get." + }, + "total_msat": { + "type": "msat", + "description": "total amount in the channel" + }, + "fee_base_msat": { + "type": "msat", + "description": "amount we charge to use the channel" + }, + "fee_proportional_millionths": { + "type": "u32", + "description": "amount we charge to use the channel in parts-per-million" + }, + "dust_limit_msat": { + "type": "msat", + "description": "Minimum amount for an output on the channel transactions" + }, + "max_total_htlc_in_msat": { + "type": "msat", + "description": "Max amount accept in a single payment" + }, + "their_reserve_msat": { + "type": "msat", + "description": "Minimum we insist they keep in channel (default is 1% of the total channel capacity). If they have less than this in the channel, they cannot send to us on that channel" + }, + "our_reserve_msat": { + "type": "msat", + "description": "Minimum they insist we keep in channel. If you have less than this in the channel, you cannot send out via this channel." + }, + "spendable_msat": { + "type": "msat", + "description": "An estimate of the total we could send through channel (can be wrong because adding HTLCs requires an increase in fees paid to onchain miners, and onchain fees change dynamically according to onchain activity)" + }, + "receivable_msat": { + "type": "msat", + "description": "An estimate of the total peer could send through channel" + }, + "minimum_htlc_in_msat": { + "type": "msat", + "description": "The minimum amount HTLC we accept" + }, + "minimum_htlc_out_msat": { + "type": "msat", + "description": "The minimum amount HTLC we will send" + }, + "maximum_htlc_out_msat": { + "type": "msat", + "description": "The maximum amount HTLC we will send" + }, + "their_to_self_delay": { + "type": "u32", + "description": "The number of blocks before they can take their funds if they unilateral close" + }, + "our_to_self_delay": { + "type": "u32", + "description": "The number of blocks before we can take our funds if we unilateral close" + }, + "max_accepted_htlcs": { + "type": "u32", + "description": "Maximum number of incoming HTLC we will accept at once" + }, + "alias": { + "type": "object", + "required": [], + "properties": { + "local": { + "type": "short_channel_id", + "description": "An alias assigned by this node to this channel, used for outgoing payments" + }, + "remote": { + "type": "short_channel_id", + "description": "An alias assigned by the remote node to this channel, usable in routehints and invoices" + } + } + }, + "state_changes": { + "type": "array", + "description": "Prior state changes", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "timestamp", + "old_state", + "new_state", + "cause", + "message" + ], + "properties": { + "timestamp": { + "type": "string", + "description": "UTC timestamp of form YYYY-mm-ddTHH:MM:SS.%03dZ" + }, + "old_state": { + "type": "string", + "enum": [ + "OPENINGD", + "CHANNELD_AWAITING_LOCKIN", + "CHANNELD_NORMAL", + "CHANNELD_SHUTTING_DOWN", + "CLOSINGD_SIGEXCHANGE", + "CLOSINGD_COMPLETE", + "AWAITING_UNILATERAL", + "FUNDING_SPEND_SEEN", + "ONCHAIN", + "DUALOPEND_OPEN_INIT", + "DUALOPEND_AWAITING_LOCKIN", + "DUALOPEND_OPEN_COMMITTED", + "DUALOPEND_OPEN_COMMIT_READY", + "CHANNELD_AWAITING_SPLICE" + ], + "description": "Previous state" + }, + "new_state": { + "type": "string", + "enum": [ + "OPENINGD", + "CHANNELD_AWAITING_LOCKIN", + "CHANNELD_NORMAL", + "CHANNELD_SHUTTING_DOWN", + "CLOSINGD_SIGEXCHANGE", + "CLOSINGD_COMPLETE", + "AWAITING_UNILATERAL", + "FUNDING_SPEND_SEEN", + "ONCHAIN", + "DUALOPEND_OPEN_INIT", + "DUALOPEND_AWAITING_LOCKIN", + "DUALOPEND_OPEN_COMMITTED", + "DUALOPEND_OPEN_COMMIT_READY", + "CHANNELD_AWAITING_SPLICE" + ], + "description": "New state" + }, + "cause": { + "type": "string", + "enum": [ + "unknown", + "local", + "user", + "remote", + "protocol", + "onchain" + ], + "description": "What caused the change" + }, + "message": { + "type": "string", + "description": "Human-readable explanation" + } + } + } + }, + "status": { + "type": "array", + "items": { + "type": "string", + "description": "Billboard log of significant changes" + } + }, + "in_payments_offered": { + "type": "u64", + "description": "Number of incoming payment attempts" + }, + "in_offered_msat": { + "type": "msat", + "description": "Total amount of incoming payment attempts" + }, + "in_payments_fulfilled": { + "type": "u64", + "description": "Number of successful incoming payment attempts" + }, + "in_fulfilled_msat": { + "type": "msat", + "description": "Total amount of successful incoming payment attempts" + }, + "out_payments_offered": { + "type": "u64", + "description": "Number of outgoing payment attempts" + }, + "out_offered_msat": { + "type": "msat", + "description": "Total amount of outgoing payment attempts" + }, + "out_payments_fulfilled": { + "type": "u64", + "description": "Number of successful outgoing payment attempts" + }, + "out_fulfilled_msat": { + "type": "msat", + "description": "Total amount of successful outgoing payment attempts" + }, + "last_stable_connection": { + "type": "u64", + "added": "v24.02", + "description": "Last time we reestablished the open channel and stayed connected for 1 minute" + }, + "htlcs": { + "type": "array", + "description": "current HTLCs in this channel", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "direction", + "id", + "amount_msat", + "expiry", + "payment_hash", + "state" + ], + "properties": { + "direction": { + "type": "string", + "enum": [ + "in", + "out" + ], + "description": "Whether it came from peer, or is going to peer" + }, + "id": { + "type": "u64", + "description": "Unique ID for this htlc on this channel in this direction" + }, + "amount_msat": { + "type": "msat", + "description": "Amount send/received for this HTLC" + }, + "expiry": { + "type": "u32", + "description": "Block this HTLC expires at (after which an `in` direction HTLC will be returned to the peer, an `out` returned to us). If this expiry is too close, lightningd(8) will automatically unilaterally close the channel in order to enforce the timeout onchain." + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the payment_preimage which will prove payment" + }, + "local_trimmed": { + "type": "boolean", + "enum": [ + true + ], + "description": "If this is too small to enforce onchain; it doesn't appear in the commitment transaction and will not be enforced in a unilateral close. Generally true if the HTLC (after subtracting onchain fees) is below the `dust_limit_msat` for the channel." + }, + "status": { + "type": "string", + "description": "set if this HTLC is currently waiting on a hook (and shows what plugin)" + } + }, + "allOf": [ + { + "if": { + "properties": { + "direction": { + "enum": [ + "out" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "state" + ], + "properties": { + "direction": {}, + "id": {}, + "amount_msat": {}, + "msatoshi": {}, + "expiry": {}, + "payment_hash": {}, + "local_trimmed": {}, + "status": {}, + "alias": {}, + "peer_id": {}, + "peer_connected": {}, + "reestablished": {}, + "state": { + "type": "string", + "enum": [ + "SENT_ADD_HTLC", + "SENT_ADD_COMMIT", + "RCVD_ADD_REVOCATION", + "RCVD_ADD_ACK_COMMIT", + "SENT_ADD_ACK_REVOCATION", + "RCVD_REMOVE_HTLC", + "RCVD_REMOVE_COMMIT", + "SENT_REMOVE_REVOCATION", + "SENT_REMOVE_ACK_COMMIT", + "RCVD_REMOVE_ACK_REVOCATION" + ], + "description": "Status of the HTLC" + } + } + } + }, + { + "if": { + "properties": { + "direction": { + "enum": [ + "in" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "state" + ], + "properties": { + "direction": {}, + "id": {}, + "amount_msat": {}, + "msatoshi": {}, + "expiry": {}, + "payment_hash": {}, + "local_trimmed": {}, + "status": {}, + "peer_id": {}, + "peer_connected": {}, + "reestablished": {}, + "state": { + "type": "string", + "enum": [ + "RCVD_ADD_HTLC", + "RCVD_ADD_COMMIT", + "SENT_ADD_REVOCATION", + "SENT_ADD_ACK_COMMIT", + "RCVD_ADD_ACK_REVOCATION", + "SENT_REMOVE_HTLC", + "SENT_REMOVE_COMMIT", + "RCVD_REMOVE_REVOCATION", + "RCVD_REMOVE_ACK_COMMIT", + "SENT_REMOVE_ACK_REVOCATION" + ], + "description": "Status of the HTLC" + } + } + } + } + ] + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "peer_connected": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "then": { + "properties": { + "reestablished": { + "type": "boolean", + "description": "True if we have successfully exchanged reestablish messages this connection" + } + } + } + }, + { + "if": { + "required": [ + "close_to" + ] + }, + "then": { + "additionalProperties": false, + "required": [], + "properties": { + "state": {}, + "peer_id": {}, + "peer_connected": {}, + "reestablished": {}, + "scratch_txid": {}, + "channel_type": {}, + "feerate": {}, + "ignore_fee_limits": {}, + "owner": {}, + "short_channel_id": {}, + "channel_id": {}, + "updates": {}, + "funding_txid": {}, + "funding_outnum": {}, + "close_to": {}, + "private": {}, + "alias": {}, + "opener": {}, + "closer": {}, + "features": {}, + "funding": {}, + "to_us_msat": {}, + "min_to_us_msat": {}, + "max_to_us_msat": {}, + "total_msat": {}, + "fee_base_msat": {}, + "fee_proportional_millionths": {}, + "dust_limit_msat": {}, + "max_total_htlc_in_msat": {}, + "their_reserve_msat": {}, + "our_reserve_msat": {}, + "spendable_msat": {}, + "receivable_msat": {}, + "minimum_htlc_in_msat": {}, + "minimum_htlc_out_msat": {}, + "maximum_htlc_out_msat": {}, + "spendable_msatoshi": {}, + "receivable_msatoshi": {}, + "their_to_self_delay": {}, + "our_to_self_delay": {}, + "max_accepted_htlcs": {}, + "msatoshi_to_us": {}, + "msatoshi_to_us_min": {}, + "msatoshi_to_us_max": {}, + "msatoshi_total": {}, + "dust_limit_satoshis": {}, + "max_htlc_value_in_flight_msat": {}, + "our_channel_reserve_satoshis": {}, + "their_channel_reserve_satoshis": {}, + "spendable_satoshis": {}, + "receivable_satoshis": {}, + "htlc_minimum_msat": {}, + "state_changes": {}, + "status": {}, + "in_payments_offered": {}, + "in_offered_msat": {}, + "in_msatoshi_offered": {}, + "in_payments_fulfilled": {}, + "in_fulfilled_msat": {}, + "in_msatoshi_fulfilled": {}, + "out_payments_offered": {}, + "out_offered_msat": {}, + "out_msatoshi_offered": {}, + "out_payments_fulfilled": {}, + "out_fulfilled_msat": {}, + "out_msatoshi_fulfilled": {}, + "last_stable_connection": {}, + "htlcs": {}, + "initial_feerate": {}, + "last_feerate": {}, + "next_feerate": {}, + "inflight": {}, + "last_tx_fee_msat": {}, + "direction": {}, + "close_to_addr": { + "type": "string", + "description": "The bitcoin address we will close to (present if close_to_addr is a standardized address)" + } + } + } + }, + { + "if": { + "required": [ + "scratch_txid" + ] + }, + "then": { + "additionalProperties": false, + "required": [ + "last_tx_fee_msat" + ], + "properties": { + "state": {}, + "peer_id": {}, + "peer_connected": {}, + "reestablished": {}, + "alias": {}, + "scratch_txid": {}, + "channel_type": {}, + "feerate": {}, + "ignore_fee_limits": {}, + "owner": {}, + "short_channel_id": {}, + "channel_id": {}, + "updates": {}, + "funding_txid": {}, + "funding_outnum": {}, + "inflight": {}, + "close_to": {}, + "private": {}, + "opener": {}, + "closer": {}, + "features": {}, + "funding": {}, + "to_us_msat": {}, + "min_to_us_msat": {}, + "max_to_us_msat": {}, + "total_msat": {}, + "fee_base_msat": {}, + "fee_proportional_millionths": {}, + "dust_limit_msat": {}, + "max_total_htlc_in_msat": {}, + "their_reserve_msat": {}, + "our_reserve_msat": {}, + "spendable_msat": {}, + "receivable_msat": {}, + "minimum_htlc_in_msat": {}, + "minimum_htlc_out_msat": {}, + "maximum_htlc_out_msat": {}, + "spendable_msatoshi": {}, + "receivable_msatoshi": {}, + "their_to_self_delay": {}, + "our_to_self_delay": {}, + "max_accepted_htlcs": {}, + "msatoshi_to_us": {}, + "msatoshi_to_us_min": {}, + "msatoshi_to_us_max": {}, + "msatoshi_total": {}, + "dust_limit_satoshis": {}, + "max_htlc_value_in_flight_msat": {}, + "our_channel_reserve_satoshis": {}, + "their_channel_reserve_satoshis": {}, + "spendable_satoshis": {}, + "receivable_satoshis": {}, + "htlc_minimum_msat": {}, + "state_changes": {}, + "status": {}, + "in_payments_offered": {}, + "in_offered_msat": {}, + "in_msatoshi_offered": {}, + "in_payments_fulfilled": {}, + "in_fulfilled_msat": {}, + "in_msatoshi_fulfilled": {}, + "out_payments_offered": {}, + "out_offered_msat": {}, + "out_msatoshi_offered": {}, + "out_payments_fulfilled": {}, + "out_fulfilled_msat": {}, + "out_msatoshi_fulfilled": {}, + "last_stable_connection": {}, + "htlcs": {}, + "initial_feerate": {}, + "last_feerate": {}, + "next_feerate": {}, + "close_to_addr": {}, + "direction": {}, + "last_tx_fee_msat": { + "type": "msat", + "description": "fee attached to this the current tx" + } + } + } + }, + { + "if": { + "required": [ + "short_channel_id" + ] + }, + "then": { + "additionalProperties": false, + "required": [ + "direction" + ], + "properties": { + "alias": {}, + "peer_id": {}, + "peer_connected": {}, + "reestablished": {}, + "state": {}, + "scratch_txid": {}, + "channel_type": {}, + "feerate": {}, + "ignore_fee_limits": {}, + "owner": {}, + "short_channel_id": {}, + "channel_id": {}, + "updates": {}, + "funding_txid": {}, + "funding_outnum": {}, + "inflight": {}, + "close_to": {}, + "private": {}, + "opener": {}, + "closer": {}, + "features": {}, + "funding": {}, + "to_us_msat": {}, + "min_to_us_msat": {}, + "max_to_us_msat": {}, + "total_msat": {}, + "fee_base_msat": {}, + "fee_proportional_millionths": {}, + "dust_limit_msat": {}, + "max_total_htlc_in_msat": {}, + "their_reserve_msat": {}, + "our_reserve_msat": {}, + "spendable_msat": {}, + "receivable_msat": {}, + "minimum_htlc_in_msat": {}, + "minimum_htlc_out_msat": {}, + "maximum_htlc_out_msat": {}, + "spendable_msatoshi": {}, + "receivable_msatoshi": {}, + "their_to_self_delay": {}, + "our_to_self_delay": {}, + "max_accepted_htlcs": {}, + "msatoshi_to_us": {}, + "msatoshi_to_us_min": {}, + "msatoshi_to_us_max": {}, + "msatoshi_total": {}, + "dust_limit_satoshis": {}, + "max_htlc_value_in_flight_msat": {}, + "our_channel_reserve_satoshis": {}, + "their_channel_reserve_satoshis": {}, + "spendable_satoshis": {}, + "receivable_satoshis": {}, + "htlc_minimum_msat": {}, + "state_changes": {}, + "status": {}, + "in_payments_offered": {}, + "in_offered_msat": {}, + "in_msatoshi_offered": {}, + "in_payments_fulfilled": {}, + "in_fulfilled_msat": {}, + "in_msatoshi_fulfilled": {}, + "out_payments_offered": {}, + "out_offered_msat": {}, + "out_msatoshi_offered": {}, + "out_payments_fulfilled": {}, + "out_fulfilled_msat": {}, + "out_msatoshi_fulfilled": {}, + "last_stable_connection": {}, + "htlcs": {}, + "initial_feerate": {}, + "last_feerate": {}, + "next_feerate": {}, + "close_to_addr": {}, + "last_tx_fee_msat": {}, + "direction": { + "type": "u32", + "description": "0 if we're the lesser node_id, 1 if we're the greater (as used in BOLT #7 channel_update)" + } + } + } + }, + { + "if": { + "required": [ + "inflight" + ] + }, + "then": { + "additionalProperties": false, + "required": [ + "initial_feerate", + "last_feerate", + "next_feerate" + ], + "properties": { + "state": {}, + "peer_id": {}, + "peer_connected": {}, + "reestablished": {}, + "scratch_txid": {}, + "channel_type": {}, + "feerate": {}, + "ignore_fee_limits": {}, + "owner": {}, + "alias": {}, + "short_channel_id": {}, + "channel_id": {}, + "updates": {}, + "funding_txid": {}, + "funding_outnum": {}, + "close_to": {}, + "private": {}, + "opener": {}, + "closer": {}, + "features": {}, + "funding": {}, + "to_us_msat": {}, + "min_to_us_msat": {}, + "max_to_us_msat": {}, + "total_msat": {}, + "fee_base_msat": {}, + "fee_proportional_millionths": {}, + "dust_limit_msat": {}, + "max_total_htlc_in_msat": {}, + "their_reserve_msat": {}, + "our_reserve_msat": {}, + "spendable_msat": {}, + "receivable_msat": {}, + "minimum_htlc_in_msat": {}, + "minimum_htlc_out_msat": {}, + "maximum_htlc_out_msat": {}, + "spendable_msatoshi": {}, + "receivable_msatoshi": {}, + "their_to_self_delay": {}, + "our_to_self_delay": {}, + "max_accepted_htlcs": {}, + "msatoshi_to_us": {}, + "msatoshi_to_us_min": {}, + "msatoshi_to_us_max": {}, + "msatoshi_total": {}, + "dust_limit_satoshis": {}, + "max_htlc_value_in_flight_msat": {}, + "our_channel_reserve_satoshis": {}, + "their_channel_reserve_satoshis": {}, + "spendable_satoshis": {}, + "receivable_satoshis": {}, + "htlc_minimum_msat": {}, + "state_changes": {}, + "status": {}, + "in_payments_offered": {}, + "in_offered_msat": {}, + "in_msatoshi_offered": {}, + "in_payments_fulfilled": {}, + "in_fulfilled_msat": {}, + "in_msatoshi_fulfilled": {}, + "out_payments_offered": {}, + "out_offered_msat": {}, + "out_msatoshi_offered": {}, + "out_payments_fulfilled": {}, + "out_fulfilled_msat": {}, + "out_msatoshi_fulfilled": {}, + "last_stable_connection": {}, + "htlcs": {}, + "inflight": {}, + "close_to_addr": {}, + "direction": {}, + "last_tx_fee_msat": {}, + "initial_feerate": { + "type": "string", + "description": "The feerate for the initial funding transaction in per-1000-weight, with \"kpw\" appended" + }, + "last_feerate": { + "type": "string", + "description": "The feerate for the latest funding transaction in per-1000-weight, with \"kpw\" appended" + }, + "next_feerate": { + "type": "string", + "description": "The minimum feerate for the next funding transaction in per-1000-weight, with \"kpw\" appended" + } + } + } + } + ] + } + } + } + }, + "listpeers.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": { + "id": { + "type": "pubkey", + "description": "If supplied, limits the result to just the peer with the given ID, if it exists." + }, + "level": { + "type": "string", + "description": "Supplying level will show log entries related to that peer at the given log level. Valid log levels are \u201cio\u201d, \u201cdebug\u201d, \u201cinfo\u201d, and \u201cunusual\u201d." + } + } + }, + "listpeers.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "peers" + ], + "properties": { + "peers": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "id", + "connected", + "num_channels" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "the public key of the peer" + }, + "connected": { + "type": "boolean", + "description": "True if the peer is currently connected" + }, + "num_channels": { + "type": "u32", + "description": "The number of channels the peer has with this node", + "added": "v23.02" + }, + "log": { + "type": "array", + "description": "if *level* is specified, logs for this peer", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "SKIPPED", + "BROKEN", + "UNUSUAL", + "INFO", + "DEBUG", + "IO_IN", + "IO_OUT" + ] + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "enum": [ + "SKIPPED" + ] + } + } + }, + "then": { + "type": "object", + "additionalProperties": false, + "required": [ + "num_skipped" + ], + "properties": { + "type": {}, + "num_skipped": { + "type": "u32", + "description": "number of deleted/omitted entries" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "enum": [ + "BROKEN", + "UNUSUAL", + "INFO", + "DEBUG" + ] + } + } + }, + "then": { + "type": "object", + "additionalProperties": false, + "required": [ + "time", + "source", + "log", + "node_id" + ], + "properties": { + "type": {}, + "time": { + "type": "string", + "description": "UNIX timestamp with 9 decimal places" + }, + "source": { + "type": "string", + "description": "The particular logbook this was found in" + }, + "log": { + "type": "string", + "description": "The actual log message" + }, + "node_id": { + "type": "pubkey", + "description": "The peer this is associated with" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "enum": [ + "IO_IN", + "IO_OUT" + ] + } + } + }, + "then": { + "type": "object", + "additionalProperties": false, + "required": [ + "time", + "source", + "log", + "node_id", + "data" + ], + "properties": { + "type": {}, + "time": { + "type": "string", + "description": "UNIX timestamp with 9 decimal places" + }, + "source": { + "type": "string", + "description": "The particular logbook this was found in" + }, + "log": { + "type": "string", + "description": "The actual log message" + }, + "node_id": { + "type": "pubkey", + "description": "The peer this is associated with" + }, + "data": { + "type": "hex", + "description": "The IO which occurred" + } + } + } + } + ] + } + }, + "channels": { + "deprecated": [ + "v23.02", + "v24.02" + ], + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "state", + "opener", + "features" + ], + "properties": { + "state": { + "type": "string", + "enum": [ + "OPENINGD", + "CHANNELD_AWAITING_LOCKIN", + "CHANNELD_NORMAL", + "CHANNELD_SHUTTING_DOWN", + "CLOSINGD_SIGEXCHANGE", + "CLOSINGD_COMPLETE", + "AWAITING_UNILATERAL", + "FUNDING_SPEND_SEEN", + "ONCHAIN", + "DUALOPEND_OPEN_INIT", + "DUALOPEND_AWAITING_LOCKIN", + "DUALOPEND_OPEN_COMMITTED", + "DUALOPEND_OPEN_COMMIT_READY" + ], + "description": "the channel state, in particular \"CHANNELD_NORMAL\" means the channel can be used normally" + }, + "scratch_txid": { + "type": "txid", + "description": "The txid we would use if we went onchain now" + }, + "feerate": { + "type": "object", + "description": "Feerates for the current tx", + "additionalProperties": false, + "required": [ + "perkw", + "perkb" + ], + "properties": { + "perkw": { + "type": "u32", + "description": "Feerate per 1000 weight (i.e kSipa)" + }, + "perkb": { + "type": "u32", + "description": "Feerate per 1000 virtual bytes" + } + } + }, + "owner": { + "type": "string", + "description": "The current subdaemon controlling this connection" + }, + "short_channel_id": { + "type": "short_channel_id", + "description": "The short_channel_id (once locked in)" + }, + "channel_id": { + "type": "hash", + "description": "The full channel_id", + "minLength": 64, + "maxLength": 64 + }, + "funding_txid": { + "type": "txid", + "description": "ID of the funding transaction" + }, + "funding_outnum": { + "type": "u32", + "description": "The 0-based output number of the funding transaction which opens the channel" + }, + "initial_feerate": { + "type": "string", + "description": "For inflight opens, the first feerate used to initiate the channel open" + }, + "last_feerate": { + "type": "string", + "description": "For inflight opens, the most recent feerate used on the channel open" + }, + "next_feerate": { + "type": "string", + "description": "For inflight opens, the next feerate we'll use for the channel open" + }, + "next_fee_step": { + "type": "u32", + "description": "For inflight opens, the next feerate step we'll use for the channel open" + }, + "inflight": { + "type": "array", + "description": "Current candidate funding transactions (only for dual-funding)", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "funding_txid", + "funding_outnum", + "feerate", + "total_funding_msat", + "our_funding_msat", + "splice_amount", + "scratch_txid" + ], + "properties": { + "funding_txid": { + "type": "txid", + "description": "ID of the funding transaction" + }, + "funding_outnum": { + "type": "u32", + "description": "The 0-based output number of the funding transaction which opens the channel" + }, + "feerate": { + "type": "string", + "description": "The feerate for this funding transaction in per-1000-weight, with \"kpw\" appended" + }, + "total_funding_msat": { + "type": "msat", + "description": "total amount in the channel" + }, + "our_funding_msat": { + "type": "msat", + "description": "amount we have in the channel" + }, + "splice_amount": { + "type": "integer", + "added": "v23.08", + "description": "The amouont of sats we're splicing in or out" + }, + "scratch_txid": { + "type": "txid", + "description": "The commitment transaction txid we would use if we went onchain now" + } + } + } + }, + "close_to": { + "type": "hex", + "description": "scriptPubkey which we have to close to if we mutual close" + }, + "private": { + "type": "boolean", + "description": "if True, we will not announce this channel" + }, + "opener": { + "type": "string", + "enum": [ + "local", + "remote" + ], + "description": "Who initiated the channel" + }, + "closer": { + "type": "string", + "enum": [ + "local", + "remote" + ], + "description": "Who initiated the channel close" + }, + "features": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "option_static_remotekey", + "option_anchor_outputs", + "option_scid_alias", + "option_zeroconf" + ], + "description": "BOLT #9 features which apply to this channel" + } + }, + "funding": { + "type": "object", + "additionalProperties": false, + "required": [ + "local_funds_msat", + "remote_funds_msat" + ], + "properties": { + "pushed_msat": { + "type": "msat", + "description": "Amount pushed from opener to peer" + }, + "local_funds_msat": { + "type": "msat", + "description": "Amount of channel we funded" + }, + "remote_funds_msat": { + "type": "msat", + "description": "Amount of channel they funded" + }, + "fee_paid_msat": { + "type": "msat", + "description": "Amount we paid peer at open" + }, + "fee_rcvd_msat": { + "type": "msat", + "description": "Amount we were paid by peer at open" + } + } + }, + "to_us_msat": { + "type": "msat", + "description": "how much of channel is owed to us" + }, + "min_to_us_msat": { + "type": "msat", + "description": "least amount owed to us ever" + }, + "max_to_us_msat": { + "type": "msat", + "description": "most amount owed to us ever" + }, + "total_msat": { + "type": "msat", + "description": "total amount in the channel" + }, + "fee_base_msat": { + "type": "msat", + "description": "amount we charge to use the channel" + }, + "fee_proportional_millionths": { + "type": "u32", + "description": "amount we charge to use the channel in parts-per-million" + }, + "dust_limit_msat": { + "type": "msat", + "description": "minimum amount for an output on the channel transactions" + }, + "max_total_htlc_in_msat": { + "type": "msat", + "description": "max amount accept in a single payment" + }, + "their_reserve_msat": { + "type": "msat", + "description": "minimum we insist they keep in channel" + }, + "our_reserve_msat": { + "type": "msat", + "description": "minimum they insist we keep in channel" + }, + "spendable_msat": { + "type": "msat", + "description": "total we could send through channel" + }, + "receivable_msat": { + "type": "msat", + "description": "total peer could send through channel" + }, + "minimum_htlc_in_msat": { + "type": "msat", + "description": "the minimum amount HTLC we accept" + }, + "minimum_htlc_out_msat": { + "type": "msat", + "description": "the minimum amount HTLC we will send" + }, + "maximum_htlc_out_msat": { + "type": "msat", + "description": "the maximum amount HTLC we will send" + }, + "their_to_self_delay": { + "type": "u32", + "description": "the number of blocks before they can take their funds if they unilateral close" + }, + "our_to_self_delay": { + "type": "u32", + "description": "the number of blocks before we can take our funds if we unilateral close" + }, + "max_accepted_htlcs": { + "type": "u32", + "description": "Maximum number of incoming HTLC we will accept at once" + }, + "alias": { + "type": "object", + "required": [], + "properties": { + "local": { + "type": "short_channel_id", + "description": "An alias assigned by this node to this channel, used for outgoing payments" + }, + "remote": { + "type": "short_channel_id", + "description": "An alias assigned by the remote node to this channel, usable in routehints and invoices" + } + } + }, + "state_changes": { + "type": "array", + "description": "Prior state changes", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "timestamp", + "old_state", + "new_state", + "cause", + "message" + ], + "properties": { + "timestamp": { + "type": "string", + "description": "UTC timestamp of form YYYY-mm-ddTHH:MM:SS.%03dZ" + }, + "old_state": { + "type": "string", + "enum": [ + "OPENINGD", + "CHANNELD_AWAITING_LOCKIN", + "CHANNELD_NORMAL", + "CHANNELD_SHUTTING_DOWN", + "CLOSINGD_SIGEXCHANGE", + "CLOSINGD_COMPLETE", + "AWAITING_UNILATERAL", + "FUNDING_SPEND_SEEN", + "ONCHAIN", + "DUALOPEND_OPEN_INIT", + "DUALOPEND_AWAITING_LOCKIN", + "DUALOPEND_OPEN_COMMITTED", + "DUALOPEND_OPEN_COMMIT_READY" + ], + "description": "Previous state" + }, + "new_state": { + "type": "string", + "enum": [ + "OPENINGD", + "CHANNELD_AWAITING_LOCKIN", + "CHANNELD_NORMAL", + "CHANNELD_SHUTTING_DOWN", + "CLOSINGD_SIGEXCHANGE", + "CLOSINGD_COMPLETE", + "AWAITING_UNILATERAL", + "FUNDING_SPEND_SEEN", + "ONCHAIN", + "DUALOPEND_OPEN_INIT", + "DUALOPEND_AWAITING_LOCKIN", + "DUALOPEND_OPEN_COMMITTED", + "DUALOPEND_OPEN_COMMIT_READY" + ], + "description": "New state" + }, + "cause": { + "type": "string", + "enum": [ + "unknown", + "local", + "user", + "remote", + "protocol", + "onchain" + ], + "description": "What caused the change" + }, + "message": { + "type": "string", + "description": "Human-readable explanation" + } + } + } + }, + "status": { + "type": "array", + "items": { + "type": "string", + "description": "Billboard log of significant changes" + } + }, + "in_payments_offered": { + "type": "u64", + "description": "Number of incoming payment attempts" + }, + "in_offered_msat": { + "type": "msat", + "description": "Total amount of incoming payment attempts" + }, + "in_payments_fulfilled": { + "type": "u64", + "description": "Number of successful incoming payment attempts" + }, + "in_fulfilled_msat": { + "type": "msat", + "description": "Total amount of successful incoming payment attempts" + }, + "out_payments_offered": { + "type": "u64", + "description": "Number of outgoing payment attempts" + }, + "out_offered_msat": { + "type": "msat", + "description": "Total amount of outgoing payment attempts" + }, + "out_payments_fulfilled": { + "type": "u64", + "description": "Number of successful outgoing payment attempts" + }, + "out_fulfilled_msat": { + "type": "msat", + "description": "Total amount of successful outgoing payment attempts" + }, + "htlcs": { + "type": "array", + "description": "current HTLCs in this channel", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "direction", + "id", + "amount_msat", + "expiry", + "payment_hash", + "state" + ], + "properties": { + "direction": { + "type": "string", + "enum": [ + "in", + "out" + ], + "description": "Whether it came from peer, or is going to peer" + }, + "id": { + "type": "u64", + "description": "Unique ID for this htlc on this channel in this direction" + }, + "amount_msat": { + "type": "msat", + "description": "Amount send/received for this HTLC" + }, + "expiry": { + "type": "u32", + "description": "Block this HTLC expires at" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the payment_preimage which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "local_trimmed": { + "type": "boolean", + "enum": [ + true + ], + "description": "if this is too small to enforce onchain" + }, + "status": { + "type": "string", + "description": "set if this HTLC is currently waiting on a hook (and shows what plugin)" + } + }, + "allOf": [ + { + "if": { + "properties": { + "direction": { + "enum": [ + "out" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "state" + ], + "properties": { + "direction": {}, + "id": {}, + "amount_msat": {}, + "msatoshi": {}, + "expiry": {}, + "payment_hash": {}, + "local_trimmed": {}, + "status": {}, + "alias": {}, + "state": { + "type": "string", + "enum": [ + "SENT_ADD_HTLC", + "SENT_ADD_COMMIT", + "RCVD_ADD_REVOCATION", + "RCVD_ADD_ACK_COMMIT", + "SENT_ADD_ACK_REVOCATION", + "RCVD_REMOVE_HTLC", + "RCVD_REMOVE_COMMIT", + "SENT_REMOVE_REVOCATION", + "SENT_REMOVE_ACK_COMMIT", + "RCVD_REMOVE_ACK_REVOCATION" + ], + "description": "Status of the HTLC" + } + } + } + }, + { + "if": { + "properties": { + "direction": { + "enum": [ + "in" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "state" + ], + "properties": { + "direction": {}, + "id": {}, + "amount_msat": {}, + "msatoshi": {}, + "expiry": {}, + "payment_hash": {}, + "local_trimmed": {}, + "status": {}, + "state": { + "type": "string", + "enum": [ + "RCVD_ADD_HTLC", + "RCVD_ADD_COMMIT", + "SENT_ADD_REVOCATION", + "SENT_ADD_ACK_COMMIT", + "RCVD_ADD_ACK_REVOCATION", + "SENT_REMOVE_HTLC", + "SENT_REMOVE_COMMIT", + "RCVD_REMOVE_REVOCATION", + "RCVD_REMOVE_ACK_COMMIT", + "SENT_REMOVE_ACK_REVOCATION" + ], + "description": "Status of the HTLC" + } + } + } + } + ] + } + } + }, + "allOf": [ + { + "if": { + "required": [ + "close_to" + ] + }, + "then": { + "additionalProperties": false, + "required": [], + "properties": { + "state": {}, + "scratch_txid": {}, + "feerate": {}, + "owner": {}, + "short_channel_id": {}, + "channel_id": {}, + "funding_txid": {}, + "funding_outnum": {}, + "close_to": {}, + "private": {}, + "alias": {}, + "opener": {}, + "closer": {}, + "features": {}, + "funding": {}, + "to_us_msat": {}, + "min_to_us_msat": {}, + "max_to_us_msat": {}, + "total_msat": {}, + "fee_base_msat": {}, + "fee_proportional_millionths": {}, + "dust_limit_msat": {}, + "max_total_htlc_in_msat": {}, + "their_reserve_msat": {}, + "our_reserve_msat": {}, + "spendable_msat": {}, + "receivable_msat": {}, + "minimum_htlc_in_msat": {}, + "minimum_htlc_out_msat": {}, + "maximum_htlc_out_msat": {}, + "spendable_msatoshi": {}, + "receivable_msatoshi": {}, + "their_to_self_delay": {}, + "our_to_self_delay": {}, + "max_accepted_htlcs": {}, + "msatoshi_to_us": {}, + "msatoshi_to_us_min": {}, + "msatoshi_to_us_max": {}, + "msatoshi_total": {}, + "dust_limit_satoshis": {}, + "max_htlc_value_in_flight_msat": {}, + "our_channel_reserve_satoshis": {}, + "their_channel_reserve_satoshis": {}, + "spendable_satoshis": {}, + "receivable_satoshis": {}, + "htlc_minimum_msat": {}, + "state_changes": {}, + "status": {}, + "in_payments_offered": {}, + "in_offered_msat": {}, + "in_msatoshi_offered": {}, + "in_payments_fulfilled": {}, + "in_fulfilled_msat": {}, + "in_msatoshi_fulfilled": {}, + "out_payments_offered": {}, + "out_offered_msat": {}, + "out_msatoshi_offered": {}, + "out_payments_fulfilled": {}, + "out_fulfilled_msat": {}, + "out_msatoshi_fulfilled": {}, + "htlcs": {}, + "initial_feerate": {}, + "last_feerate": {}, + "next_feerate": {}, + "inflight": {}, + "last_tx_fee_msat": {}, + "direction": {}, + "close_to_addr": { + "type": "string", + "description": "The bitcoin address we will close to" + } + } + } + }, + { + "if": { + "required": [ + "scratch_txid" + ] + }, + "then": { + "additionalProperties": false, + "required": [ + "last_tx_fee_msat" + ], + "properties": { + "state": {}, + "alias": {}, + "scratch_txid": {}, + "feerate": {}, + "owner": {}, + "short_channel_id": {}, + "channel_id": {}, + "funding_txid": {}, + "funding_outnum": {}, + "inflight": {}, + "close_to": {}, + "private": {}, + "opener": {}, + "closer": {}, + "features": {}, + "funding": {}, + "to_us_msat": {}, + "min_to_us_msat": {}, + "max_to_us_msat": {}, + "total_msat": {}, + "fee_base_msat": {}, + "fee_proportional_millionths": {}, + "dust_limit_msat": {}, + "max_total_htlc_in_msat": {}, + "their_reserve_msat": {}, + "our_reserve_msat": {}, + "spendable_msat": {}, + "receivable_msat": {}, + "minimum_htlc_in_msat": {}, + "minimum_htlc_out_msat": {}, + "maximum_htlc_out_msat": {}, + "spendable_msatoshi": {}, + "receivable_msatoshi": {}, + "their_to_self_delay": {}, + "our_to_self_delay": {}, + "max_accepted_htlcs": {}, + "msatoshi_to_us": {}, + "msatoshi_to_us_min": {}, + "msatoshi_to_us_max": {}, + "msatoshi_total": {}, + "dust_limit_satoshis": {}, + "max_htlc_value_in_flight_msat": {}, + "our_channel_reserve_satoshis": {}, + "their_channel_reserve_satoshis": {}, + "spendable_satoshis": {}, + "receivable_satoshis": {}, + "htlc_minimum_msat": {}, + "state_changes": {}, + "status": {}, + "in_payments_offered": {}, + "in_offered_msat": {}, + "in_msatoshi_offered": {}, + "in_payments_fulfilled": {}, + "in_fulfilled_msat": {}, + "in_msatoshi_fulfilled": {}, + "out_payments_offered": {}, + "out_offered_msat": {}, + "out_msatoshi_offered": {}, + "out_payments_fulfilled": {}, + "out_fulfilled_msat": {}, + "out_msatoshi_fulfilled": {}, + "htlcs": {}, + "initial_feerate": {}, + "last_feerate": {}, + "next_feerate": {}, + "close_to_addr": {}, + "direction": {}, + "last_tx_fee_msat": { + "type": "msat", + "description": "fee attached to this the current tx" + } + } + } + }, + { + "if": { + "required": [ + "short_channel_id" + ] + }, + "then": { + "additionalProperties": false, + "required": [ + "direction" + ], + "properties": { + "alias": {}, + "state": {}, + "scratch_txid": {}, + "feerate": {}, + "owner": {}, + "short_channel_id": {}, + "channel_id": {}, + "funding_txid": {}, + "funding_outnum": {}, + "inflight": {}, + "close_to": {}, + "private": {}, + "opener": {}, + "closer": {}, + "features": {}, + "funding": {}, + "to_us_msat": {}, + "min_to_us_msat": {}, + "max_to_us_msat": {}, + "total_msat": {}, + "fee_base_msat": {}, + "fee_proportional_millionths": {}, + "dust_limit_msat": {}, + "max_total_htlc_in_msat": {}, + "their_reserve_msat": {}, + "our_reserve_msat": {}, + "spendable_msat": {}, + "receivable_msat": {}, + "minimum_htlc_in_msat": {}, + "minimum_htlc_out_msat": {}, + "maximum_htlc_out_msat": {}, + "spendable_msatoshi": {}, + "receivable_msatoshi": {}, + "their_to_self_delay": {}, + "our_to_self_delay": {}, + "max_accepted_htlcs": {}, + "msatoshi_to_us": {}, + "msatoshi_to_us_min": {}, + "msatoshi_to_us_max": {}, + "msatoshi_total": {}, + "dust_limit_satoshis": {}, + "max_htlc_value_in_flight_msat": {}, + "our_channel_reserve_satoshis": {}, + "their_channel_reserve_satoshis": {}, + "spendable_satoshis": {}, + "receivable_satoshis": {}, + "htlc_minimum_msat": {}, + "state_changes": {}, + "status": {}, + "in_payments_offered": {}, + "in_offered_msat": {}, + "in_msatoshi_offered": {}, + "in_payments_fulfilled": {}, + "in_fulfilled_msat": {}, + "in_msatoshi_fulfilled": {}, + "out_payments_offered": {}, + "out_offered_msat": {}, + "out_msatoshi_offered": {}, + "out_payments_fulfilled": {}, + "out_fulfilled_msat": {}, + "out_msatoshi_fulfilled": {}, + "htlcs": {}, + "initial_feerate": {}, + "last_feerate": {}, + "next_feerate": {}, + "close_to_addr": {}, + "last_tx_fee_msat": {}, + "direction": { + "type": "u32", + "description": "0 if we're the lesser node_id, 1 if we're the greater" + } + } + } + }, + { + "if": { + "required": [ + "inflight" + ] + }, + "then": { + "additionalProperties": false, + "required": [ + "initial_feerate", + "last_feerate", + "next_feerate" + ], + "properties": { + "state": {}, + "scratch_txid": {}, + "feerate": {}, + "owner": {}, + "alias": {}, + "short_channel_id": {}, + "channel_id": {}, + "funding_txid": {}, + "funding_outnum": {}, + "close_to": {}, + "private": {}, + "opener": {}, + "closer": {}, + "features": {}, + "funding": {}, + "to_us_msat": {}, + "min_to_us_msat": {}, + "max_to_us_msat": {}, + "total_msat": {}, + "fee_base_msat": {}, + "fee_proportional_millionths": {}, + "dust_limit_msat": {}, + "max_total_htlc_in_msat": {}, + "their_reserve_msat": {}, + "our_reserve_msat": {}, + "spendable_msat": {}, + "receivable_msat": {}, + "minimum_htlc_in_msat": {}, + "minimum_htlc_out_msat": {}, + "maximum_htlc_out_msat": {}, + "spendable_msatoshi": {}, + "receivable_msatoshi": {}, + "their_to_self_delay": {}, + "our_to_self_delay": {}, + "max_accepted_htlcs": {}, + "msatoshi_to_us": {}, + "msatoshi_to_us_min": {}, + "msatoshi_to_us_max": {}, + "msatoshi_total": {}, + "dust_limit_satoshis": {}, + "max_htlc_value_in_flight_msat": {}, + "our_channel_reserve_satoshis": {}, + "their_channel_reserve_satoshis": {}, + "spendable_satoshis": {}, + "receivable_satoshis": {}, + "htlc_minimum_msat": {}, + "state_changes": {}, + "status": {}, + "in_payments_offered": {}, + "in_offered_msat": {}, + "in_msatoshi_offered": {}, + "in_payments_fulfilled": {}, + "in_fulfilled_msat": {}, + "in_msatoshi_fulfilled": {}, + "out_payments_offered": {}, + "out_offered_msat": {}, + "out_msatoshi_offered": {}, + "out_payments_fulfilled": {}, + "out_fulfilled_msat": {}, + "out_msatoshi_fulfilled": {}, + "htlcs": {}, + "inflight": {}, + "close_to_addr": {}, + "direction": {}, + "last_tx_fee_msat": {}, + "initial_feerate": { + "type": "string", + "description": "The feerate for the initial funding transaction in per-1000-weight, with \"kpw\" appended" + }, + "last_feerate": { + "type": "string", + "description": "The feerate for the latest funding transaction in per-1000-weight, with \"kpw\" appended" + }, + "next_feerate": { + "type": "string", + "description": "The minimum feerate for the next funding transaction in per-1000-weight, with \"kpw\" appended" + } + } + } + } + ] + } + } + }, + "allOf": [ + { + "if": { + "additionalProperties": true, + "properties": { + "connected": { + "enum": [ + true + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "netaddr", + "features" + ], + "properties": { + "id": {}, + "channels": {}, + "connected": {}, + "num_channels": {}, + "htlcs": {}, + "log": {}, + "netaddr": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "description": "A single entry array", + "items": { + "type": "string", + "description": "address, e.g. 1.2.3.4:1234" + } + }, + "remote_addr": { + "type": "string", + "description": "The public IPv4/6 address the peer sees us from, e.g. 1.2.3.4:1234" + }, + "features": { + "type": "hex", + "description": "bitmap of BOLT #9 features from peer's INIT message" + } + } + } + } + ] + } + } + } + }, + "listsendpays.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": { + "bolt11": { + "type": "string" + }, + "payment_hash": { + "type": "hash" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "complete", + "failed" + ] + }, + "index": { + "type": "string", + "added": "v23.11", + "enum": [ + "created", + "updated" + ], + "description": "" + }, + "start": { + "type": "u64", + "added": "v23.11", + "description": "" + }, + "limit": { + "type": "u32", + "added": "v23.11", + "description": "" + } + } + }, + "listsendpays.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "payments" + ], + "properties": { + "payments": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "id", + "created_index", + "payment_hash", + "status", + "groupid", + "created_at", + "amount_sent_msat" + ], + "properties": { + "created_index": { + "added": "v23.11", + "type": "u64", + "description": "1-based index indicating order this payment was created in" + }, + "id": { + "type": "u64", + "description": "old synonym for created_index" + }, + "groupid": { + "type": "u64", + "description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" + }, + "partid": { + "type": "u64", + "description": "Part number (for multiple parts to a single payment)" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "updated_index": { + "added": "v23.11", + "type": "u64", + "description": "1-based index indicating order this payment was changed (only present if it has changed since creation)" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "failed", + "complete" + ], + "description": "status of the payment" + }, + "amount_msat": { + "type": "msat", + "description": "The amount delivered to destination (if known)" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment if known" + }, + "created_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "amount_sent_msat": { + "type": "msat", + "description": "The amount sent" + }, + "label": { + "type": "string", + "description": "the label, if given to sendpay" + }, + "bolt11": { + "type": "string", + "description": "the bolt11 string (if pay supplied one)" + }, + "description": { + "type": "string", + "description": "the description matching the bolt11 description hash (if pay supplied one)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string (if supplied for pay: **experimental-offers** only)." + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "complete" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "payment_preimage" + ], + "properties": { + "id": {}, + "created_index": {}, + "updated_index": {}, + "partid": {}, + "groupid": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "completed_at": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "bolt11": {}, + "description": {}, + "bolt12": {}, + "payment_preimage": { + "type": "secret", + "description": "the proof of payment: SHA256 of this **payment_hash**" + } + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "failed" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [], + "properties": { + "id": {}, + "created_index": {}, + "updated_index": {}, + "partid": {}, + "groupid": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "completed_at": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "bolt11": {}, + "description": {}, + "bolt12": {}, + "erroronion": { + "type": "hex", + "description": "the onion message returned" + } + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "pending" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [], + "properties": { + "id": {}, + "created_index": {}, + "updated_index": {}, + "partid": {}, + "groupid": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "bolt11": {}, + "description": {}, + "bolt12": {} + } + } + } + ] + } + } + } + }, + "listsqlschemas.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "added": "v23.02", + "properties": { + "table": { + "type": "string" + } + } + }, + "listsqlschemas.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "schemas" + ], + "properties": { + "schemas": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "tablename", + "columns" + ], + "properties": { + "tablename": { + "type": "string", + "description": "the name of the table" + }, + "columns": { + "type": "array", + "description": "the columns, in database order", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "type": "string", + "description": "the name of the column" + }, + "type": { + "type": "string", + "enum": [ + "INTEGER", + "BLOB", + "TEXT", + "REAL" + ], + "description": "the SQL type of the column" + } + } + } + }, + "indices": { + "type": "array", + "description": "Any index we created to speed lookups", + "items": { + "type": "array", + "description": "The columns for this index", + "items": { + "type": "string", + "description": "The column name" + } + } + } + } + } + } + } + }, + "listtransactions.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": {} + }, + "listtransactions.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "transactions" + ], + "properties": { + "transactions": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "hash", + "rawtx", + "blockheight", + "txindex", + "locktime", + "version", + "inputs", + "outputs" + ], + "properties": { + "hash": { + "type": "txid", + "description": "the transaction id" + }, + "rawtx": { + "type": "hex", + "description": "the raw transaction" + }, + "blockheight": { + "type": "u32", + "description": "the block height of this tx" + }, + "txindex": { + "type": "u32", + "description": "the transaction number within the block" + }, + "locktime": { + "type": "u32", + "description": "The nLocktime for this tx" + }, + "version": { + "type": "u32", + "description": "The nVersion for this tx" + }, + "inputs": { + "type": "array", + "description": "Each input, in order", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "txid", + "index", + "sequence" + ], + "properties": { + "txid": { + "type": "txid", + "description": "the transaction id spent" + }, + "index": { + "type": "u32", + "description": "the output spent" + }, + "sequence": { + "type": "u32", + "description": "the nSequence value" + } + } + } + }, + "outputs": { + "type": "array", + "description": "Each output, in order", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "index", + "amount_msat", + "scriptPubKey" + ], + "properties": { + "index": { + "type": "u32", + "description": "the 0-based output number" + }, + "amount_msat": { + "type": "msat", + "description": "the amount of the output" + }, + "scriptPubKey": { + "type": "hex", + "description": "the scriptPubKey" + } + } + } + } + } + } + } + } + }, + "makesecret.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "hex": { + "type": "hex", + "description": "This will be used for deriving the secret" + }, + "string": { + "type": "string", + "description": "This will be used for deriving the secret" + } + } + }, + "makesecret.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "secret" + ], + "properties": { + "secret": { + "type": "secret", + "description": "the pseudorandom key derived from HSM_secret" + } + } + }, + "multifundchannel.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "destinations" + ], + "properties": { + "destinations": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "amount" + ], + "properties": { + "id": { + "type": "string" + }, + "amount": { + "type": "msat_or_all" + }, + "announce": { + "type": "boolean" + }, + "push_msat": { + "type": "msat" + }, + "close_to": { + "type": "string" + }, + "request_amt": { + "type": "msat" + }, + "compact_lease": { + "type": "string" + }, + "mindepth": { + "description": "Number of confirmations required before we consider the channel active", + "type": "u32" + }, + "reserve": { + "type": "msat", + "description": "The amount we want the peer to maintain on its side" + }, + "channel_type": { + "type": "array", + "items": { + "type": "u32" + } + } + } + } + }, + "feerate": { + "type": "feerate" + }, + "minconf": { + "type": "u32" + }, + "utxos": { + "type": "array", + "items": { + "type": "outpoint" + } + }, + "minchannels": { + "type": "u32" + }, + "commitment_feerate": { + "type": "feerate" + } + } + }, + "multifundchannel.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "tx", + "txid", + "channel_ids" + ], + "properties": { + "tx": { + "type": "hex", + "description": "The raw transaction which funded the channel" + }, + "txid": { + "type": "txid", + "description": "The txid of the transaction which funded the channel" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "channel_id", + "channel_type", + "outnum" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "The peer we opened the channel with" + }, + "outnum": { + "type": "u32", + "description": "The 0-based output index showing which output funded the channel" + }, + "channel_id": { + "type": "hex", + "description": "The channel_id of the resulting channel", + "minLength": 64, + "maxLength": 64 + }, + "channel_type": { + "type": "object", + "description": "channel_type as negotiated with peer", + "added": "v24.02", + "additionalProperties": false, + "required": [ + "bits", + "names" + ], + "properties": { + "bits": { + "type": "array", + "description": "Each bit set in this channel_type", + "added": "v24.02", + "items": { + "type": "u32", + "description": "Bit number" + } + }, + "names": { + "type": "array", + "description": "Feature name for each bit set in this channel_type", + "added": "v24.02", + "items": { + "type": "string", + "enum": [ + "static_remotekey/even", + "anchor_outputs/even", + "anchors_zero_fee_htlc_tx/even", + "scid_alias/even", + "zeroconf/even" + ], + "description": "Name of feature bit" + } + } + } + }, + "close_to": { + "type": "hex", + "description": "The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`" + } + } + } + }, + "failed": { + "type": "array", + "description": "any peers we failed to open with (if *minchannels* was specified less than the number of destinations)", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "method", + "error" + ], + "properties": { + "id": { + "type": "pubkey", + "description": "The peer we failed to open the channel with" + }, + "method": { + "type": "string", + "enum": [ + "connect", + "openchannel_init", + "fundchannel_start", + "fundchannel_complete" + ], + "description": "What stage we failed at" + }, + "error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "description": "JSON error code from failing stage" + }, + "message": { + "type": "string", + "description": "Message from stage" + }, + "data": { + "untyped": true, + "description": "Additional error data" + } + } + } + } + } + } + } + }, + "multiwithdraw.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "tx", + "txid" + ], + "properties": { + "tx": { + "type": "hex", + "description": "The raw transaction which was sent" + }, + "txid": { + "type": "txid", + "description": "The txid of the **tx**" + } + } + }, + "newaddr.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": { + "addresstype": { + "type": "string", + "enum": [ + "bech32", + "p2tr", + "all" + ] + } + } + }, + "newaddr.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "p2tr": { + "added": "v23.08", + "type": "string", + "description": "The taproot address" + }, + "bech32": { + "type": "string", + "description": "The bech32 (native segwit) address" + } + } + }, + "notifications.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": {} + }, + "offer.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "offer_id", + "active", + "single_use", + "bolt12", + "used", + "created" + ], + "properties": { + "offer_id": { + "type": "hash", + "description": "the id of this offer (merkle hash of non-signature fields)" + }, + "active": { + "type": "boolean", + "enum": [ + true + ], + "description": "whether this can still be used" + }, + "single_use": { + "type": "boolean", + "description": "whether this expires as soon as it's paid (reflects the *single_use* parameter)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 encoding of the offer" + }, + "used": { + "type": "boolean", + "description": "True if an associated invoice has been paid" + }, + "created": { + "type": "boolean", + "description": "false if the offer already existed" + }, + "label": { + "type": "string", + "description": "the (optional) user-specified label" + } + } + }, + "openchannel_abort.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "channel_canceled", + "reason" + ], + "properties": { + "channel_id": { + "type": "hex", + "description": "the channel id of the aborted channel", + "maxLength": 64, + "minLength": 64 + }, + "channel_canceled": { + "type": "boolean", + "description": "whether this is completely canceled (there may be remaining in-flight transactions)" + }, + "reason": { + "type": "string", + "description": "usually \"Abort requested\", but if it happened to fail at the same time it could be different" + } + } + }, + "openchannel_bump.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "channel_type", + "psbt", + "commitments_secured", + "funding_serial" + ], + "properties": { + "channel_id": { + "type": "hex", + "description": "the channel id of the channel", + "maxLength": 64, + "minLength": 64 + }, + "channel_type": { + "type": "object", + "description": "channel_type as negotiated with peer", + "added": "v24.02", + "additionalProperties": false, + "required": [ + "bits", + "names" + ], + "properties": { + "bits": { + "type": "array", + "description": "Each bit set in this channel_type", + "added": "v24.02", + "items": { + "type": "u32", + "description": "Bit number" + } + }, + "names": { + "type": "array", + "description": "Feature name for each bit set in this channel_type", + "added": "v24.02", + "items": { + "type": "string", + "enum": [ + "static_remotekey/even", + "anchor_outputs/even", + "anchors_zero_fee_htlc_tx/even", + "scid_alias/even", + "zeroconf/even" + ], + "description": "Name of feature bit" + } + } + } + }, + "psbt": { + "type": "string", + "description": "the (incomplete) PSBT of the RBF transaction" + }, + "commitments_secured": { + "type": "boolean", + "enum": [ + false + ], + "description": "whether the *psbt* is complete" + }, + "funding_serial": { + "type": "u64", + "description": "the serial_id of the funding output in the *psbt*" + }, + "requires_confirmed_inputs": { + "type": "boolean", + "description": "Does peer require confirmed inputs in psbt?" + } + } + }, + "openchannel_init.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "amount", + "initialpsbt" + ], + "properties": { + "id": { + "type": "pubkey" + }, + "amount": { + "type": "msat" + }, + "initialpsbt": { + "type": "string" + }, + "commitment_feerate": { + "type": "feerate" + }, + "funding_feerate": { + "type": "feerate" + }, + "announce": { + "type": "boolean" + }, + "close_to": { + "type": "hex" + }, + "request_amt": { + "type": "msat" + }, + "compact_lease": { + "type": "hex" + }, + "channel_type": { + "type": "array", + "description": "Each bit set in this channel_type", + "items": { + "type": "u32", + "description": "Bit number" + } + } + } + }, + "openchannel_init.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "psbt", + "channel_type", + "commitments_secured", + "funding_serial" + ], + "properties": { + "channel_id": { + "type": "hex", + "description": "the channel id of the channel", + "maxLength": 64, + "minLength": 64 + }, + "psbt": { + "type": "string", + "description": "the (incomplete) PSBT of the funding transaction" + }, + "channel_type": { + "type": "object", + "description": "channel_type as negotiated with peer", + "added": "v24.02", + "additionalProperties": false, + "required": [ + "bits", + "names" + ], + "properties": { + "bits": { + "type": "array", + "description": "Each bit set in this channel_type", + "added": "v24.02", + "items": { + "type": "u32", + "description": "Bit number" + } + }, + "names": { + "type": "array", + "description": "Feature name for each bit set in this channel_type", + "added": "v24.02", + "items": { + "type": "string", + "enum": [ + "static_remotekey/even", + "anchor_outputs/even", + "anchors_zero_fee_htlc_tx/even", + "scid_alias/even", + "zeroconf/even" + ], + "description": "Name of feature bit" + } + } + } + }, + "commitments_secured": { + "type": "boolean", + "enum": [ + false + ], + "description": "whether the *psbt* is complete" + }, + "funding_serial": { + "type": "u64", + "description": "the serial_id of the funding output in the *psbt*" + }, + "requires_confirmed_inputs": { + "type": "boolean", + "description": "Does peer require confirmed inputs in psbt?" + } + } + }, + "openchannel_signed.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "tx", + "txid" + ], + "properties": { + "channel_id": { + "type": "hex", + "description": "the channel id of the channel", + "maxLength": 64, + "minLength": 64 + }, + "tx": { + "type": "hex", + "description": "the funding transaction" + }, + "txid": { + "type": "txid", + "description": "The txid of the **tx**" + } + } + }, + "openchannel_update.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "psbt", + "commitments_secured", + "channel_type", + "funding_outnum" + ], + "properties": { + "channel_id": { + "type": "hex", + "description": "the channel id of the channel", + "maxLength": 64, + "minLength": 64 + }, + "channel_type": { + "type": "object", + "description": "channel_type as negotiated with peer", + "added": "v24.02", + "additionalProperties": false, + "required": [ + "bits", + "names" + ], + "properties": { + "bits": { + "type": "array", + "description": "Each bit set in this channel_type", + "added": "v24.02", + "items": { + "type": "u32", + "description": "Bit number" + } + }, + "names": { + "type": "array", + "description": "Feature name for each bit set in this channel_type", + "added": "v24.02", + "items": { + "type": "string", + "enum": [ + "static_remotekey/even", + "anchor_outputs/even", + "anchors_zero_fee_htlc_tx/even", + "scid_alias/even", + "zeroconf/even" + ], + "description": "Name of feature bit" + } + } + } + }, + "psbt": { + "type": "string", + "description": "the PSBT of the funding transaction" + }, + "commitments_secured": { + "type": "boolean", + "description": "whether the *psbt* is complete (if true, sign *psbt* and call `openchannel_signed` to complete the channel open)" + }, + "funding_outnum": { + "type": "u32", + "description": "The index of the funding output in the psbt" + }, + "close_to": { + "type": "hex", + "description": "scriptPubkey which we have to close to if we mutual close" + }, + "requires_confirmed_inputs": { + "type": "boolean", + "description": "Does peer require confirmed inputs in psbt?" + } + } + }, + "parsefeerate.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "perkw": { + "type": "u32", + "description": "Value of *feerate_str* in kilosipa", + "additionalProperties": false + } + } + }, + "pay.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "bolt11" + ], + "properties": { + "bolt11": { + "type": "string" + }, + "amount_msat": { + "type": "msat" + }, + "label": { + "type": "string" + }, + "riskfactor": { + "type": "number" + }, + "maxfeepercent": { + "type": "number" + }, + "retry_for": { + "type": "u16" + }, + "maxdelay": { + "type": "u16" + }, + "exemptfee": { + "type": "msat" + }, + "localinvreqid": { + "type": "hex" + }, + "exclude": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "short_channel_id_dir" + }, + { + "type": "pubkey" + } + ] + } + }, + "maxfee": { + "type": "msat" + }, + "description": { + "type": "string" + } + } + }, + "pay.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "payment_preimage", + "payment_hash", + "created_at", + "parts", + "amount_msat", + "amount_sent_msat", + "status" + ], + "properties": { + "payment_preimage": { + "type": "secret", + "description": "the proof of payment: SHA256 of this **payment_hash**" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "created_at": { + "type": "number", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "parts": { + "type": "u32", + "description": "how many attempts this took" + }, + "amount_msat": { + "type": "msat", + "description": "Amount the recipient received" + }, + "amount_sent_msat": { + "type": "msat", + "description": "Total amount we sent (including fees)" + }, + "warning_partial_completion": { + "type": "string", + "description": "Not all parts of a multi-part payment have completed" + }, + "status": { + "type": "string", + "enum": [ + "complete", + "pending", + "failed" + ], + "description": "status of payment" + } + } + }, + "ping.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "id" + ], + "additionalProperties": false, + "properties": { + "id": { + "type": "pubkey" + }, + "len": { + "type": "u16" + }, + "pongbytes": { + "type": "u16" + } + } + }, + "ping.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "totlen" + ], + "properties": { + "totlen": { + "type": "u16", + "description": "the answer length of the reply message (including header: 0 means no reply expected)" + } + } + }, + "plugin.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "command" + ], + "properties": { + "command": { + "type": "string", + "enum": [ + "start", + "stop", + "rescan", + "startdir", + "list" + ], + "description": "the subcommand this is responding to" + } + }, + "allOf": [ + { + "if": { + "properties": { + "command": { + "type": "string", + "enum": [ + "start", + "startdir", + "rescan", + "list" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "command", + "plugins" + ], + "properties": { + "command": {}, + "plugins": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "active", + "dynamic" + ], + "properties": { + "name": { + "type": "string", + "description": "full pathname of the plugin" + }, + "active": { + "type": "boolean", + "description": "status; plugin completed init and is operational, plugins are configured asynchronously." + }, + "dynamic": { + "type": "boolean", + "description": "plugin can be stopped or started without restarting lightningd" + } + } + } + } + } + } + }, + { + "if": { + "properties": { + "command": { + "type": "string", + "enum": [ + "stop" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "command", + "result" + ], + "properties": { + "command": {}, + "result": { + "type": "string", + "description": "A message saying it successfully stopped" + } + } + } + } + ] + }, + "preapproveinvoice.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "added": "v23.02", + "required": [ + "bolt11" + ], + "properties": { + "bolt11": { + "type": "string", + "added": "v23.02" + } + } + }, + "preapproveinvoice.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "added": "v23.02", + "properties": {} + }, + "preapprovekeysend.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "added": "v23.02", + "required": [ + "destination", + "payment_hash", + "amount_msat" + ], + "properties": { + "destination": { + "type": "pubkey", + "added": "v23.02" + }, + "payment_hash": { + "type": "hex", + "added": "v23.02", + "description": "the hash of the *payment_preimage* which will prove payment", + "maxLength": 64, + "minLength": 64 + }, + "amount_msat": { + "type": "msat", + "added": "v23.02" + } + } + }, + "preapprovekeysend.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": {} + }, + "recoverchannel.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "scb" + ], + "scb": { + "type": "array", + "description": "SCB of the channels in an array", + "items": { + "type": "hexstr" + } + } + }, + "recoverchannel.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "stubs" + ], + "properties": { + "stubs": { + "type": "array", + "items": { + "type": "string", + "description": "Channel IDs of channels successfully inserted." + } + } + } + }, + "renepay.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "added": "v23.08", + "type": "object", + "additionalProperties": false, + "required": [ + "payment_preimage", + "payment_hash", + "created_at", + "parts", + "amount_msat", + "amount_sent_msat", + "status" + ], + "properties": { + "payment_preimage": { + "type": "secret", + "description": "the proof of payment: SHA256 of this **payment_hash**" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "created_at": { + "type": "number", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "parts": { + "type": "u32", + "description": "how many attempts this took" + }, + "amount_msat": { + "type": "msat", + "description": "amount the recipient received" + }, + "amount_sent_msat": { + "type": "msat", + "description": "total amount we sent (including fees)" + }, + "status": { + "type": "string", + "enum": [ + "complete", + "pending", + "failed" + ], + "description": "status of payment" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment" + } + } + }, + "renepaystatus.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "added": "v23.08", + "type": "object", + "additionalProperties": false, + "required": [ + "paystatus" + ], + "properties": { + "paystatus": { + "type": "array", + "description": "a list of payments attempted by renepay", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "bolt11", + "payment_hash", + "created_at", + "groupid", + "amount_msat", + "status", + "notes" + ], + "properties": { + "bolt11": { + "type": "string", + "description": "invoice string BOLT11" + }, + "payment_preimage": { + "type": "secret", + "description": "the proof of payment: SHA256 of this **payment_hash** (for completed payments only)" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "created_at": { + "type": "number", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "groupid": { + "type": "u32", + "description": "the id for this payment attempt" + }, + "parts": { + "type": "u32", + "description": "how many attempts this took" + }, + "amount_msat": { + "type": "msat", + "description": "amount the recipient received" + }, + "amount_sent_msat": { + "type": "msat", + "description": "total amount we sent including fees (for completed payments only)" + }, + "status": { + "type": "string", + "enum": [ + "complete", + "pending", + "failed" + ], + "description": "status of payment" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment" + }, + "notes": { + "type": "array", + "description": "a list of messages for debugging purposes", + "items": { + "type": "string", + "description": "a message generated by renepay" + } + } + } + } + } + } + }, + "reserveinputs.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "reservations" + ], + "properties": { + "reservations": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "txid", + "vout", + "was_reserved", + "reserved", + "reserved_to_block" + ], + "properties": { + "txid": { + "type": "txid", + "description": "the transaction id" + }, + "vout": { + "type": "u32", + "description": "the output number which was reserved" + }, + "was_reserved": { + "type": "boolean", + "description": "whether the input was already reserved" + }, + "reserved": { + "type": "boolean", + "enum": [ + true + ], + "description": "whether the input is now reserved" + }, + "reserved_to_block": { + "type": "u32", + "description": "what blockheight the reservation will expire" + } + } + } + } + } + }, + "sendcustommsg.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "node_id", + "msg" + ], + "added": "v0.10.1", + "additionalProperties": false, + "properties": { + "node_id": { + "type": "pubkey" + }, + "msg": { + "type": "hex" + } + } + }, + "sendcustommsg.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "description": "Information about where message was queued" + } + } + }, + "sendinvoice.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "label", + "description", + "payment_hash", + "status", + "created_index", + "expires_at" + ], + "properties": { + "label": { + "type": "string", + "description": "unique label supplied at invoice creation" + }, + "description": { + "type": "string", + "description": "description used in the invoice" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "status": { + "type": "string", + "enum": [ + "unpaid", + "paid", + "expired" + ], + "description": "Whether it's paid, unpaid or unpayable" + }, + "expires_at": { + "type": "u64", + "description": "UNIX timestamp of when it will become / became unpayable" + }, + "amount_msat": { + "type": "msat", + "description": "the amount required to pay this invoice" + }, + "bolt12": { + "type": "string", + "description": "the BOLT12 string" + }, + "created_index": { + "type": "u64", + "added": "v23.08", + "description": "1-based index indicating order this invoice was created in" + }, + "updated_index": { + "type": "u64", + "added": "v23.08", + "description": "1-based index indicating order this invoice was changed (only present if it has changed since creation)" + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "paid" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "pay_index", + "amount_received_msat", + "paid_at", + "payment_preimage" + ], + "properties": { + "label": {}, + "description": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "bolt12": {}, + "expires_at": {}, + "created_index": {}, + "updated_index": {}, + "pay_index": { + "type": "u64", + "description": "Unique incrementing index for this payment" + }, + "amount_received_msat": { + "type": "msat", + "description": "the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)" + }, + "paid_at": { + "type": "u64", + "description": "UNIX timestamp of when it was paid" + }, + "payment_preimage": { + "type": "secret", + "description": "proof of payment" + } + } + } + } + ] + }, + "sendonion.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "onion", + "first_hop", + "payment_hash" + ], + "properties": { + "onion": { + "type": "hex" + }, + "first_hop": { + "type": "object", + "required": [ + "id", + "amount_msat", + "delay" + ], + "properties": { + "id": { + "type": "pubkey" + }, + "amount_msat": { + "type": "msat" + }, + "delay": { + "type": "u16" + } + } + }, + "payment_hash": { + "type": "hash" + }, + "label": { + "type": "string" + }, + "shared_secrets": { + "type": "array", + "items": { + "type": "secret" + } + }, + "partid": { + "type": "u16" + }, + "bolt11": { + "type": "string" + }, + "amount_msat": { + "type": "msat" + }, + "destination": { + "type": "pubkey" + }, + "localinvreqid": { + "type": "hash" + }, + "groupid": { + "type": "u64" + } + } + }, + "sendonion.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "created_index", + "id", + "payment_hash", + "status", + "created_at", + "amount_sent_msat" + ], + "properties": { + "created_index": { + "added": "v23.11", + "type": "u64", + "description": "1-based index indicating order this payment was created in" + }, + "id": { + "type": "u64", + "description": "old synonym for created_index" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "complete" + ], + "description": "status of the payment (could be complete if already sent previously)" + }, + "amount_msat": { + "type": "msat", + "description": "The amount delivered to destination (if known)" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment if known" + }, + "created_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "amount_sent_msat": { + "type": "msat", + "description": "The amount sent" + }, + "label": { + "type": "string", + "description": "the label, if given to sendpay" + }, + "bolt11": { + "type": "string", + "description": "the bolt11 string (if supplied)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string (if supplied: **experimental-offers** only)." + }, + "partid": { + "type": "u64", + "description": "the partid (if supplied) to sendonion/sendpay" + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "complete" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "payment_preimage" + ], + "properties": { + "created_index": {}, + "id": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "groupid": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "bolt11": {}, + "bolt12": {}, + "partid": {}, + "updated_index": { + "added": "v23.11", + "type": "u64", + "description": "1-based index indicating order this payment was changed" + }, + "payment_preimage": { + "type": "secret", + "description": "the proof of payment: SHA256 of this **payment_hash**" + } + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "pending" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [], + "properties": { + "created_index": {}, + "id": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "groupid": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "bolt11": {}, + "bolt12": {}, + "partid": {}, + "message": { + "type": "string", + "description": "Monitor status with listpays or waitsendpay" + } + } + } + } + ] + }, + "sendonionmessage.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": {} + }, + "sendpay.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "route", + "payment_hash" + ], + "properties": { + "route": { + "type": "array", + "items": { + "type": "object", + "required": [ + "amount_msat", + "id", + "delay", + "channel" + ], + "properties": { + "amount_msat": { + "type": "msat" + }, + "id": { + "type": "pubkey" + }, + "delay": { + "type": "u16" + }, + "channel": { + "type": "short_channel_id" + } + } + } + }, + "payment_hash": { + "type": "hash" + }, + "label": { + "type": "string" + }, + "amount_msat": { + "type": "msat" + }, + "bolt11": { + "type": "string" + }, + "payment_secret": { + "type": "secret" + }, + "partid": { + "type": "u16" + }, + "localinvreqid": { + "type": "hex" + }, + "groupid": { + "type": "u64" + } + } + }, + "sendpay.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "id", + "created_index", + "payment_hash", + "status", + "created_at", + "amount_sent_msat" + ], + "properties": { + "created_index": { + "added": "v23.11", + "type": "u64", + "description": "1-based index indicating order this payment was created in" + }, + "updated_index": { + "added": "v23.11", + "type": "u64", + "description": "1-based index indicating order this payment was changed (only present if it has changed since creation)" + }, + "id": { + "type": "u64", + "description": "old synonym for created_index" + }, + "groupid": { + "type": "u64", + "description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "complete" + ], + "description": "status of the payment (could be complete if already sent previously)" + }, + "amount_msat": { + "type": "msat", + "description": "The amount delivered to destination (if known)" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment if known" + }, + "created_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "completed_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was completed" + }, + "amount_sent_msat": { + "type": "msat", + "description": "The amount sent" + }, + "label": { + "type": "string", + "description": "the *label*, if given to sendpay" + }, + "partid": { + "type": "u64", + "description": "the *partid*, if given to sendpay" + }, + "bolt11": { + "type": "string", + "description": "the bolt11 string (if supplied)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string (if supplied: **experimental-offers** only)." + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "complete" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "payment_preimage" + ], + "properties": { + "id": {}, + "created_index": {}, + "updated_index": {}, + "groupid": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "completed_at": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "partid": {}, + "bolt11": {}, + "bolt12": {}, + "payment_preimage": { + "type": "secret", + "description": "the proof of payment: SHA256 of this **payment_hash**" + } + } + } + }, + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "pending" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "message" + ], + "properties": { + "id": {}, + "created_index": {}, + "updated_index": {}, + "groupid": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "completed_at": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "partid": {}, + "bolt11": {}, + "bolt12": {}, + "message": { + "type": "string", + "description": "Monitor status with listpays or waitsendpay" + } + } + } + } + ] + }, + "sendpsbt.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "psbt" + ], + "properties": { + "psbt": { + "type": "string" + }, + "reserve": { + "type": "boolean" + } + } + }, + "sendpsbt.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "tx", + "txid" + ], + "properties": { + "tx": { + "type": "hex", + "description": "The raw transaction which was sent" + }, + "txid": { + "type": "txid", + "description": "The txid of the **tx**" + } + } + }, + "setchannel.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + }, + "feebase": { + "type": "msat" + }, + "feeppm": { + "type": "u32" + }, + "htlcmin": { + "type": "msat" + }, + "htlcmax": { + "type": "msat" + }, + "enforcedelay": { + "type": "u32" + }, + "ignorefeelimits": { + "added": "v23.08", + "type": "boolean" + } + } + }, + "setchannel.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channels" + ], + "properties": { + "channels": { + "type": "array", + "description": "channel(s) set, and their resulting configuration", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "peer_id", + "channel_id", + "fee_base_msat", + "fee_proportional_millionths", + "minimum_htlc_out_msat", + "maximum_htlc_out_msat", + "ignore_fee_limits" + ], + "properties": { + "peer_id": { + "type": "pubkey", + "description": "The node_id of the peer" + }, + "channel_id": { + "type": "hex", + "description": "The channel_id of the channel", + "minLength": 64, + "maxLength": 64 + }, + "short_channel_id": { + "type": "short_channel_id", + "description": "the short_channel_id (if locked in)" + }, + "fee_base_msat": { + "type": "msat", + "description": "The resulting feebase (this is the BOLT #7 name)" + }, + "fee_proportional_millionths": { + "type": "u32", + "description": "The resulting feeppm (this is the BOLT #7 name)" + }, + "ignore_fee_limits": { + "type": "boolean", + "added": "v23.08", + "description": "If we are now allowing peer to set feerate on commitment transaction without restriction" + }, + "minimum_htlc_out_msat": { + "type": "msat", + "description": "The resulting htlcmin we will advertize (the BOLT #7 name is htlc_minimum_msat)" + }, + "warning_htlcmin_too_low": { + "type": "string", + "description": "The requested htlcmin was too low for this peer, so we set it to the minimum they will allow" + }, + "maximum_htlc_out_msat": { + "type": "msat", + "description": "The resulting htlcmax we will advertize (the BOLT #7 name is htlc_maximum_msat)" + }, + "warning_htlcmax_too_high": { + "type": "string", + "description": "The requested htlcmax was greater than the channel capacity, so we set it to the channel capacity" + } + } + } + } + } + }, + "setchannelfee.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "base", + "ppm", + "channels" + ], + "properties": { + "base": { + "type": "u32", + "description": "The fee_base_msat value" + }, + "ppm": { + "type": "u32", + "description": "The fee_proportional_millionths value" + }, + "channels": { + "type": "array", + "description": "channel(s) whose rate is now set", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "peer_id", + "channel_id" + ], + "properties": { + "peer_id": { + "type": "pubkey", + "description": "The node_id of the peer" + }, + "channel_id": { + "type": "hex", + "description": "The channel_id of the channel", + "minLength": 64, + "maxLength": 64 + }, + "short_channel_id": { + "type": "short_channel_id", + "description": "the short_channel_id (if locked in)" + } + } + } + } + } + }, + "setconfig.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "config" + ], + "added": "v23.08", + "properties": { + "config": { + "type": "string" + }, + "val": {} + } + }, + "setconfig.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "added": "v23.08", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "description": "config settings after completion", + "additionalProperties": false, + "required": [ + "config", + "source", + "dynamic" + ], + "properties": { + "config": { + "type": "string", + "description": "name of the config variable which was set" + }, + "source": { + "type": "string", + "description": "source of configuration setting (`file`:`linenum`)" + }, + "plugin": { + "type": "string", + "description": "the plugin this configuration setting is for" + }, + "dynamic": { + "type": "boolean", + "enum": [ + true + ], + "description": "whether this option is settable via setconfig" + }, + "set": { + "type": "boolean", + "description": "for simple flag options" + }, + "value_str": { + "type": "string", + "description": "for string options" + }, + "value_msat": { + "type": "msat", + "description": "for msat options" + }, + "value_int": { + "type": "integer", + "description": "for integer options" + }, + "value_bool": { + "type": "boolean", + "description": "for boolean options" + } + } + } + } + }, + "showrunes.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "added": "v23.08", + "properties": { + "rune": { + "type": "string", + "description": "optional rune to list" + } + } + }, + "showrunes.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "runes" + ], + "properties": { + "runes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "rune", + "unique_id", + "restrictions", + "restrictions_as_english" + ], + "properties": { + "rune": { + "type": "string", + "description": "Base64 encoded rune" + }, + "unique_id": { + "type": "string", + "description": "Unique id assigned when the rune was generated; this is always a u64 for commando runes" + }, + "restrictions": { + "type": "array", + "description": "The restrictions on what commands this rune can authorize", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "alternatives", + "english" + ], + "properties": { + "alternatives": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "fieldname", + "value", + "condition", + "english" + ], + "properties": { + "fieldname": { + "type": "string", + "description": "The field this restriction applies to; see commando-rune(7)" + }, + "value": { + "type": "string", + "description": "The value accepted for this field" + }, + "condition": { + "type": "string", + "description": "The way to compare fieldname and value" + }, + "english": { + "type": "string", + "description": "English readable description of this alternative" + } + } + } + }, + "english": { + "type": "string", + "description": "English readable summary of alternatives above" + } + } + } + }, + "restrictions_as_english": { + "type": "string", + "description": "English readable description of the restrictions array above" + }, + "stored": { + "type": "boolean", + "enum": [ + false + ], + "description": "This is false if the rune does not appear in our datastore (only possible when `rune` is specified)" + }, + "blacklisted": { + "type": "boolean", + "enum": [ + true + ], + "description": "The rune has been blacklisted; see commando-blacklist(7)" + }, + "last_used": { + "type": "number", + "description": "The last time this rune was successfully used", + "added": "23.11" + }, + "our_rune": { + "type": "boolean", + "enum": [ + false + ], + "description": "This is not a rune for this node (only possible when `rune` is specified)" + } + } + } + } + } + }, + "signinvoice.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "added": "v23.02", + "required": [ + "invstring" + ], + "properties": { + "invstring": { + "type": "string", + "description": "" + } + } + }, + "signinvoice.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "bolt11" + ], + "properties": { + "bolt11": { + "type": "string", + "description": "the bolt11 string" + } + } + }, + "signmessage.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "message" + ], + "additionalProperties": false, + "properties": { + "message": { + "type": "string" + } + } + }, + "signmessage.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "signature", + "recid", + "zbase" + ], + "properties": { + "signature": { + "type": "hex", + "description": "The signature", + "minLength": 128, + "maxLength": 128 + }, + "recid": { + "type": "hex", + "description": "The recovery id (0, 1, 2 or 3)", + "minLength": 2, + "maxLength": 2 + }, + "zbase": { + "type": "string", + "description": "*signature* and *recid* encoded in a style compatible with **lnd**'s [SignMessageRequest](https://api.lightning.community/#grpc-request-signmessagerequest)" + } + } + }, + "signpsbt.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "psbt" + ], + "properties": { + "psbt": { + "type": "string" + }, + "signonly": { + "type": "array", + "items": { + "type": "u32" + } + } + } + }, + "signpsbt.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "signed_psbt" + ], + "properties": { + "signed_psbt": { + "type": "string", + "description": "The fully signed PSBT" + } + } + }, + "splice_init.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "relative_amount" + ], + "added": "v23.08", + "properties": { + "channel_id": { + "type": "string", + "description": "the channel id of the channel to be spliced" + }, + "relative_amount": { + "type": "integer", + "description": "a positive or negative amount of satoshis to add or subtract from the channel" + }, + "initialpsbt": { + "type": "string", + "description": "the (optional) base 64 encoded PSBT to begin with. If not specified, one will be generated automatically" + }, + "feerate_per_kw": { + "type": "u32", + "description": "the miner fee we promise our peer to pay for our side of the splice transaction. It is calculated by `feerate_per_kw` * our_bytes_in_splice_tx / 1000" + }, + "force_feerate": { + "type": "boolean", + "description": "By default splices will fail if the fee provided looks too high. This is to protect against accidentally setting your fee higher than intended. Set `force_feerate` to true to skip this saftey check" + } + } + }, + "splice_init.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "psbt" + ], + "added": "v23.08", + "properties": { + "psbt": { + "type": "string", + "description": "the (incomplete) PSBT of the splice transaction" + } + } + }, + "splice_signed.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "psbt" + ], + "added": "v23.08", + "properties": { + "channel_id": { + "type": "string", + "description": "the channel id of the channel to be spliced" + }, + "psbt": { + "type": "string", + "description": "the final version of the psbt to complete the splice with" + }, + "sign_first": { + "type": "boolean", + "description": "a flag that makes our node offer the final splice signature first (defaults to false). When false, the node will calculate who should sign first based off who is adding inputting the least sats to the splice as per spec" + } + } + }, + "splice_signed.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "tx", + "txid" + ], + "added": "v23.08", + "properties": { + "tx": { + "type": "hex", + "description": "The hex representation of the final transaction that is published" + }, + "txid": { + "type": "txid", + "description": "The txid is of the final transaction" + } + } + }, + "splice_update.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_id", + "psbt" + ], + "added": "v23.08", + "properties": { + "channel_id": { + "type": "string", + "description": "the channel id of the channel to be spliced" + }, + "psbt": { + "type": "string", + "description": "the (optional) base 64 encoded PSBT to begin with. If not specified, one will be generated automatically" + } + } + }, + "splice_update.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "psbt", + "commitments_secured" + ], + "added": "v23.08", + "properties": { + "psbt": { + "type": "string", + "description": "the (incomplete) PSBT of the splice transaction" + }, + "commitments_secured": { + "type": "boolean", + "description": "whether or not the commitments were secured" + } + } + }, + "sql.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "query" + ], + "added": "v23.02", + "properties": { + "query": { + "type": "string" + } + } + }, + "sql.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "rows" + ], + "properties": { + "rows": { + "type": "array", + "items": { + "type": "array" + } + }, + "warning_db_failure": { + "type": "string", + "description": "A message if the database encounters an error partway through" + } + } + }, + "staticbackup.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": {} + }, + "staticbackup.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "scb" + ], + "properties": { + "scb": { + "type": "array", + "items": { + "type": "hex", + "description": "SCB of a channel in TLV format" + } + } + } + }, + "stop.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": {} + }, + "stop.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "string", + "enum": [ + "Shutdown complete" + ] + }, + "txdiscard.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "txid" + ], + "properties": { + "txid": { + "type": "txid" + } + } + }, + "txdiscard.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "unsigned_tx", + "txid" + ], + "properties": { + "unsigned_tx": { + "type": "hex", + "description": "the unsigned transaction" + }, + "txid": { + "type": "txid", + "description": "the transaction id of *unsigned_tx*" + } + } + }, + "txprepare.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "outputs" + ], + "properties": { + "outputs": { + "type": "array", + "items": { + "type": "outputdesc" + } + }, + "feerate": { + "type": "feerate" + }, + "minconf": { + "type": "u32" + }, + "utxos": { + "type": "array", + "items": { + "type": "outpoint" + } + } + } + }, + "txprepare.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "psbt", + "unsigned_tx", + "txid" + ], + "properties": { + "psbt": { + "type": "string", + "description": "the PSBT representing the unsigned transaction" + }, + "unsigned_tx": { + "type": "hex", + "description": "the unsigned transaction" + }, + "txid": { + "type": "txid", + "description": "the transaction id of *unsigned_tx*; you hand this to lightning-txsend(7) or lightning-txdiscard(7), as the inputs of this transaction are reserved." + } + } + }, + "txsend.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "txid" + ], + "properties": { + "txid": { + "type": "txid" + } + } + }, + "txsend.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "psbt", + "tx", + "txid" + ], + "properties": { + "psbt": { + "type": "string", + "description": "the completed PSBT representing the signed transaction" + }, + "tx": { + "type": "hex", + "description": "the fully signed transaction" + }, + "txid": { + "type": "txid", + "description": "the transaction id of *tx*" + } + } + }, + "unreserveinputs.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "reservations" + ], + "properties": { + "reservations": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "required": [ + "txid", + "vout", + "was_reserved", + "reserved" + ], + "properties": { + "txid": { + "type": "txid", + "description": "the transaction id" + }, + "vout": { + "type": "u32", + "description": "the output number which was reserved" + }, + "was_reserved": { + "type": "boolean", + "description": "whether the input was already reserved (usually `true`)" + }, + "reserved": { + "type": "boolean", + "description": "whether the input is now reserved (may still be `true` if it was reserved for a long time)" + } + }, + "allOf": [ + { + "if": { + "additionalProperties": true, + "properties": { + "reserved": { + "enum": [ + true + ] + } + } + }, + "then": { + "required": [ + "reserved_to_block" + ], + "properties": { + "txid": {}, + "vout": {}, + "was_reserved": {}, + "reserved": {}, + "reserved_to_block": { + "type": "u32", + "description": "what blockheight the reservation will expire" + } + } + } + } + ] + } + } + } + }, + "upgradewallet.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": { + "feerate": { + "type": "feerate", + "description": "Feerate for the upgrade transaction", + "added": "v23.02" + }, + "reservedok": { + "type": "boolean", + "description": "Include already reserved funds or not", + "added": "v23.02" + } + } + }, + "upgradewallet.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "upgraded_outs" + ], + "properties": { + "upgraded_outs": { + "type": "u64", + "description": "Count of spent/upgraded UTXOs", + "added": "v23.02" + }, + "psbt": { + "type": "string", + "description": "The PSBT that was finalized and sent", + "added": "v23.02" + }, + "tx": { + "type": "hex", + "description": "The raw transaction which was sent", + "added": "v23.02" + }, + "txid": { + "type": "txid", + "description": "The txid of the **tx**", + "added": "v23.02" + } + } + }, + "utxopsbt.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "satoshi", + "feerate", + "startweight", + "utxos" + ], + "properties": { + "satoshi": { + "type": "msat" + }, + "feerate": { + "type": "feerate" + }, + "startweight": { + "type": "u32" + }, + "utxos": { + "type": "array", + "items": { + "type": "outpoint" + } + }, + "reserve": { + "type": "u32", + "description": "reserve is a number: if non-zero number then reserveinputs is called (successfully, with exclusive true) on the returned PSBT for this number of blocks (default: 72)." + }, + "reservedok": { + "type": "boolean" + }, + "locktime": { + "type": "u32" + }, + "min_witness_weight": { + "type": "u32" + }, + "excess_as_change": { + "type": "boolean" + }, + "opening_anchor_channel": { + "added": "v23.08", + "type": "boolean" + } + } + }, + "utxopsbt.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "psbt", + "feerate_per_kw", + "estimated_final_weight", + "excess_msat" + ], + "properties": { + "psbt": { + "type": "string", + "description": "Unsigned PSBT which fulfills the parameters given" + }, + "feerate_per_kw": { + "type": "u32", + "description": "The feerate used to create the PSBT, in satoshis-per-kiloweight" + }, + "estimated_final_weight": { + "type": "u32", + "description": "The estimated weight of the transaction once fully signed" + }, + "excess_msat": { + "type": "msat", + "description": "The amount above *satoshi* which is available. This could be zero, or dust; it will be zero if *change_outnum* is also returned" + }, + "change_outnum": { + "type": "u32", + "description": "The 0-based output number where change was placed (only if parameter *excess_as_change* was true and there was sufficient funds)" + }, + "reservations": { + "type": "array", + "description": "If *reserve* was true or a non-zero number, just as per lightning-reserveinputs(7)", + "items": { + "type": "object", + "required": [ + "txid", + "vout", + "was_reserved", + "reserved", + "reserved_to_block" + ], + "additionalProperties": false, + "properties": { + "txid": { + "type": "txid", + "description": "The txid of the transaction" + }, + "vout": { + "type": "u32", + "description": "The 0-based output number" + }, + "was_reserved": { + "type": "boolean", + "description": "Whether this output was previously reserved" + }, + "reserved": { + "type": "boolean", + "enum": [ + true + ], + "description": "Whether this output is now reserved" + }, + "reserved_to_block": { + "type": "u32", + "description": "The blockheight the reservation will expire" + } + } + } + } + } + }, + "wait.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "added": "v23.08", + "additionalProperties": false, + "required": [ + "subsystem", + "indexname", + "nextvalue" + ], + "properties": { + "subsystem": { + "type": "string", + "enum": [ + "invoices", + "forwards", + "sendpays" + ] + }, + "indexname": { + "type": "string", + "enum": [ + "created", + "updated", + "deleted" + ] + }, + "nextvalue": { + "type": "u64" + } + } + }, + "wait.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "subsystem" + ], + "properties": { + "subsystem": { + "type": "string", + "enum": [ + "invoices", + "forwards", + "sendpays" + ] + }, + "created": { + "type": "u64", + "description": "1-based index indicating order entry was created" + }, + "updated": { + "type": "u64", + "description": "1-based index indicating order entry was updated" + }, + "deleted": { + "type": "u64", + "description": "1-based index indicating order entry was deleted" + }, + "details": {} + }, + "allOf": [ + { + "if": { + "additionalProperties": true, + "properties": { + "subsystem": { + "type": "string", + "enum": [ + "invoices" + ] + } + } + }, + "then": { + "additionalProperties": false, + "properties": { + "subsystem": {}, + "created": {}, + "updated": {}, + "deleted": {}, + "details": { + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "type": "string", + "enum": [ + "unpaid", + "paid", + "expired" + ], + "description": "Whether it's paid, unpaid or unpayable" + }, + "label": { + "type": "string", + "description": "unique label supplied at invoice creation" + }, + "description": { + "type": "string", + "description": "description used in the invoice" + }, + "bolt11": { + "type": "string", + "description": "the BOLT11 string" + }, + "bolt12": { + "type": "string", + "description": "the BOLT12 string" + } + } + } + } + } + }, + { + "if": { + "additionalProperties": true, + "properties": { + "subsystem": { + "type": "string", + "enum": [ + "forwards" + ] + } + } + }, + "then": { + "additionalProperties": false, + "properties": { + "subsystem": {}, + "created": {}, + "updated": {}, + "deleted": {}, + "details": { + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "type": "string", + "enum": [ + "offered", + "settled", + "failed", + "local_failed" + ], + "description": "still ongoing, completed, failed locally, or failed after forwarding" + }, + "in_channel": { + "type": "short_channel_id", + "description": "unique label supplied at invoice creation" + }, + "in_htlc_id": { + "type": "u64", + "description": "the unique HTLC id the sender gave this (not present if incoming channel was closed before ugprade to v22.11)" + }, + "in_msat": { + "type": "msat", + "description": "the value of the incoming HTLC" + }, + "out_channel": { + "type": "short_channel_id", + "description": "the channel that the HTLC (trying to) forward to" + } + } + } + } + } + }, + { + "if": { + "additionalProperties": true, + "properties": { + "subsystem": { + "type": "string", + "enum": [ + "sendpays" + ] + } + } + }, + "then": { + "additionalProperties": false, + "properties": { + "subsystem": {}, + "created": {}, + "updated": {}, + "deleted": {}, + "details": { + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "type": "string", + "enum": [ + "pending", + "failed", + "complete" + ], + "description": "status of the payment" + }, + "partid": { + "type": "u64", + "description": "Part number (for multiple parts to a single payment)" + }, + "groupid": { + "type": "u64", + "description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + } + } + } + } + } + } + ] + }, + "waitanyinvoice.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "lastpay_index": { + "type": "u64" + }, + "timeout": { + "type": "u64" + } + } + }, + "waitanyinvoice.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "label", + "description", + "payment_hash", + "status", + "created_index", + "expires_at" + ], + "properties": { + "label": { + "type": "string", + "description": "unique label supplied at invoice creation" + }, + "description": { + "type": "string", + "description": "description used in the invoice" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "status": { + "type": "string", + "enum": [ + "paid", + "expired" + ], + "description": "Whether it's paid or expired" + }, + "expires_at": { + "type": "u64", + "description": "UNIX timestamp of when it will become / became unpayable" + }, + "amount_msat": { + "type": "msat", + "description": "the amount required to pay this invoice" + }, + "bolt11": { + "type": "string", + "description": "the BOLT11 string (always present unless *bolt12* is)" + }, + "bolt12": { + "type": "string", + "description": "the BOLT12 string (always present unless *bolt11* is)" + }, + "created_index": { + "type": "u64", + "added": "v23.08", + "description": "1-based index indicating order this invoice was created in" + }, + "updated_index": { + "type": "u64", + "added": "v23.08", + "description": "1-based index indicating order this invoice was changed (only present if it has changed since creation)" + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "paid" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "pay_index", + "amount_received_msat", + "paid_at", + "payment_preimage" + ], + "properties": { + "label": {}, + "description": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "bolt11": {}, + "bolt12": {}, + "expires_at": {}, + "created_index": {}, + "updated_index": {}, + "pay_index": { + "type": "u64", + "description": "Unique incrementing index for this payment" + }, + "amount_received_msat": { + "type": "msat", + "description": "the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)" + }, + "paid_at": { + "type": "u64", + "description": "UNIX timestamp of when it was paid" + }, + "paid_outpoint": { + "type": "object", + "description": "Outpoint this invoice was paid with", + "added": "v23.11", + "additionalProperties": false, + "required": [ + "txid", + "outnum" + ], + "properties": { + "txid": { + "added": "v23.11", + "type": "txid", + "description": "ID of the transaction that paid the invoice" + }, + "outnum": { + "added": "v23.11", + "type": "u32", + "description": "The 0-based output number of the transaction that paid the invoice" + } + } + }, + "payment_preimage": { + "type": "secret", + "description": "proof of payment" + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "label": {}, + "description": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "bolt11": {}, + "bolt12": {}, + "created_index": {}, + "updated_index": {}, + "expires_at": {} + } + } + } + ] + }, + "waitblockheight.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "blockheight" + ], + "properties": { + "blockheight": { + "type": "u32", + "description": "The current block height (>= blockheight parameter)" + }, + "timeout": { + "type": "u32", + "description": "If timeout seconds is reached without the specified blockheight being reached, this command will fail with a code of 2000." + } + } + }, + "waitblockheight.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "blockheight" + ], + "properties": { + "blockheight": { + "type": "u32", + "description": "The current block height (>= *blockheight* parameter)" + } + } + }, + "waitinvoice.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "label" + ], + "properties": { + "label": { + "type": "string" + } + } + }, + "waitinvoice.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "label", + "description", + "payment_hash", + "status", + "created_index", + "expires_at" + ], + "properties": { + "label": { + "type": "string", + "description": "unique label supplied at invoice creation" + }, + "description": { + "type": "string", + "description": "description used in the invoice" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "status": { + "type": "string", + "enum": [ + "paid", + "expired" + ], + "description": "Whether it's paid or expired" + }, + "expires_at": { + "type": "u64", + "description": "UNIX timestamp of when it will become / became unpayable" + }, + "amount_msat": { + "type": "msat", + "description": "the amount required to pay this invoice" + }, + "bolt11": { + "type": "string", + "description": "the BOLT11 string (always present unless *bolt12* is)" + }, + "bolt12": { + "type": "string", + "description": "the BOLT12 string (always present unless *bolt11* is)" + }, + "created_index": { + "type": "u64", + "added": "v23.08", + "description": "1-based index indicating order this invoice was created in" + }, + "updated_index": { + "type": "u64", + "added": "v23.08", + "description": "1-based index indicating order this invoice was changed (only present if it has changed since creation)" + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "paid" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "pay_index", + "amount_received_msat", + "paid_at", + "payment_preimage" + ], + "properties": { + "label": {}, + "description": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "bolt11": {}, + "bolt12": {}, + "expires_at": {}, + "created_index": {}, + "updated_index": {}, + "pay_index": { + "type": "u64", + "description": "Unique incrementing index for this payment" + }, + "amount_received_msat": { + "type": "msat", + "description": "the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)" + }, + "paid_at": { + "type": "u64", + "description": "UNIX timestamp of when it was paid" + }, + "paid_outpoint": { + "type": "object", + "description": "Outpoint this invoice was paid with", + "added": "v23.11", + "additionalProperties": false, + "required": [ + "txid", + "outnum" + ], + "properties": { + "txid": { + "added": "v23.11", + "type": "txid", + "description": "ID of the transaction that paid the invoice" + }, + "outnum": { + "added": "v23.11", + "type": "u32", + "description": "The 0-based output number of the transaction that paid the invoice" + } + } + }, + "payment_preimage": { + "type": "secret", + "description": "proof of payment" + } + } + }, + "else": { + "additionalProperties": false, + "properties": { + "label": {}, + "description": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "bolt11": {}, + "bolt12": {}, + "created_index": {}, + "updated_index": {}, + "expires_at": {} + } + } + } + ] + }, + "waitsendpay.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "payment_hash" + ], + "properties": { + "payment_hash": { + "type": "hash" + }, + "timeout": { + "type": "u32" + }, + "partid": { + "type": "u64" + }, + "groupid": { + "type": "u64" + } + } + }, + "waitsendpay.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "required": [ + "id", + "created_index", + "payment_hash", + "status", + "created_at", + "amount_sent_msat" + ], + "properties": { + "created_index": { + "added": "v23.11", + "type": "u64", + "description": "1-based index indicating order this payment was created in" + }, + "id": { + "type": "u64", + "description": "old synonym for created_index" + }, + "groupid": { + "type": "u64", + "description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" + }, + "payment_hash": { + "type": "hash", + "description": "the hash of the *payment_preimage* which will prove payment" + }, + "status": { + "type": "string", + "enum": [ + "complete" + ], + "description": "status of the payment" + }, + "amount_msat": { + "type": "msat", + "description": "The amount delivered to destination (if known)" + }, + "destination": { + "type": "pubkey", + "description": "the final destination of the payment if known" + }, + "created_at": { + "type": "u64", + "description": "the UNIX timestamp showing when this payment was initiated" + }, + "updated_index": { + "added": "v23.11", + "type": "u64", + "description": "1-based index indicating order this payment was changed (only present if it has changed since creation)" + }, + "completed_at": { + "type": "number", + "description": "the UNIX timestamp showing when this payment was completed" + }, + "amount_sent_msat": { + "type": "msat", + "description": "The amount sent" + }, + "label": { + "type": "string", + "description": "the label, if given to sendpay" + }, + "partid": { + "type": "u64", + "description": "the *partid*, if given to sendpay" + }, + "bolt11": { + "type": "string", + "description": "the bolt11 string (if pay supplied one)" + }, + "bolt12": { + "type": "string", + "description": "the bolt12 string (if supplied for pay: **experimental-offers** only)." + } + }, + "allOf": [ + { + "if": { + "properties": { + "status": { + "type": "string", + "enum": [ + "complete" + ] + } + } + }, + "then": { + "additionalProperties": false, + "required": [ + "payment_preimage" + ], + "properties": { + "id": {}, + "created_index": {}, + "updated_index": {}, + "groupid": {}, + "payment_hash": {}, + "status": {}, + "msatoshi": {}, + "amount_msat": {}, + "destination": {}, + "created_at": {}, + "completed_at": {}, + "msatoshi_sent": {}, + "amount_sent_msat": {}, + "label": {}, + "partid": {}, + "bolt11": {}, + "bolt12": {}, + "payment_preimage": { + "type": "secret", + "description": "the proof of payment: SHA256 of this **payment_hash**" + } + } + } + } + ] + }, + "withdraw.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [ + "destination" + ], + "properties": { + "destination": { + "type": "string" + }, + "satoshi": { + "type": "msat_or_all" + }, + "feerate": { + "type": "feerate" + }, + "minconf": { + "type": "u16" + }, + "utxos": { + "type": "array", + "items": { + "type": "outpoint" + } + } + } + }, + "withdraw.schema.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "psbt", + "tx", + "txid" + ], + "properties": { + "tx": { + "type": "hex", + "description": "the fully signed bitcoin transaction" + }, + "txid": { + "type": "txid", + "description": "the transaction id of *tx*" + }, + "psbt": { + "type": "string", + "description": "the PSBT representing the unsigned transaction" + } + } + } +} \ No newline at end of file diff --git a/contrib/msggen/msggen/utils/__init__.py b/contrib/msggen/msggen/utils/__init__.py index ee5ea046e..34b981b2a 100644 --- a/contrib/msggen/msggen/utils/__init__.py +++ b/contrib/msggen/msggen/utils/__init__.py @@ -1 +1 @@ -from .utils import load_jsonrpc_method, load_jsonrpc_service # noqa +from .utils import load_jsonrpc_method, load_jsonrpc_service, combine_schemas # noqa diff --git a/contrib/msggen/msggen/utils/utils.py b/contrib/msggen/msggen/utils/utils.py index 1b84dc099..f02bd4f90 100644 --- a/contrib/msggen/msggen/utils/utils.py +++ b/contrib/msggen/msggen/utils/utils.py @@ -1,17 +1,48 @@ import json from pathlib import Path - +from importlib import resources from msggen.model import Method, CompositeField, Service +import functools +from collections import OrderedDict -def load_jsonrpc_method(name, schema_dir: Path): +def combine_schemas(schema_dir: Path, dest: Path): + """Enumerate all schema files, and combine it into a single JSON file.""" + bundle = OrderedDict() + files = sorted(list(schema_dir.iterdir())) + + for f in files: + if not f.name.endswith(".json"): + continue + bundle[f.name] = json.load(f.open()) + + with dest.open(mode='w') as f: + json.dump( + bundle, + f, + indent=2, + ) + return bundle + + +@functools.lru_cache(maxsize=1) +def get_schema_bundle(): + """Load the schema bundle from the combined schema file. + + The combined schema is generated by `combine_schemas`. + """ + p = resources.open_text("msggen", "schema.json") + return json.load(p) + + +def load_jsonrpc_method(name): """Load a method based on the file naming conventions for the JSON-RPC. """ - base_path = schema_dir - req_file = base_path / f"{name.lower()}.request.json" - resp_file = base_path / f"{name.lower()}.schema.json" - request = CompositeField.from_js(json.load(open(req_file)), path=name) - response = CompositeField.from_js(json.load(open(resp_file)), path=name) + schema = get_schema_bundle() + req_file = f"{name.lower()}.request.json" + resp_file = f"{name.lower()}.schema.json" + request = CompositeField.from_js(schema[req_file], path=name) + response = CompositeField.from_js(schema[resp_file], path=name) # Normalize the method request and response typename so they no # longer conflict. @@ -25,7 +56,7 @@ def load_jsonrpc_method(name, schema_dir: Path): ) -def load_jsonrpc_service(schema_dir: str): +def load_jsonrpc_service(): method_names = [ "Getinfo", "ListPeers", @@ -116,7 +147,7 @@ def load_jsonrpc_service(schema_dir: str): "StaticBackup", "Bkpr-ListIncome", ] - methods = [load_jsonrpc_method(name, schema_dir=schema_dir) for name in method_names] + methods = [load_jsonrpc_method(name) for name in method_names] service = Service(name="Node", methods=methods) service.includes = ['primitives.proto'] # Make sure we have the primitives included. return service diff --git a/contrib/msggen/poetry.lock b/contrib/msggen/poetry.lock new file mode 100644 index 000000000..eadb6a816 --- /dev/null +++ b/contrib/msggen/poetry.lock @@ -0,0 +1,195 @@ +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. + +[[package]] +name = "atomicwrites" +version = "1.4.1" +description = "Atomic file writes." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, +] + +[[package]] +name = "attrs" +version = "22.2.0" +description = "Classes Without Boilerplate" +optional = false +python-versions = ">=3.6" +files = [ + {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"}, + {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"}, +] + +[package.extras] +cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"] +dev = ["attrs[docs,tests]"] +docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope.interface"] +tests = ["attrs[tests-no-zope]", "zope.interface"] +tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy (>=0.971,<0.990)", "mypy (>=0.971,<0.990)", "pympler", "pympler", "pytest (>=4.3.0)", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-mypy-plugins", "pytest-xdist[psutil]", "pytest-xdist[psutil]"] + +[[package]] +name = "colorama" +version = "0.4.5" +description = "Cross-platform colored terminal text." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, + {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, +] + +[[package]] +name = "importlib-metadata" +version = "4.8.3" +description = "Read metadata from Python packages" +optional = false +python-versions = ">=3.6" +files = [ + {file = "importlib_metadata-4.8.3-py3-none-any.whl", hash = "sha256:65a9576a5b2d58ca44d133c42a241905cc45e34d2c06fd5ba2bafa221e5d7b5e"}, + {file = "importlib_metadata-4.8.3.tar.gz", hash = "sha256:766abffff765960fcc18003801f7044eb6755ffae4521c8e8ce8e83b9c9b0668"}, +] + +[package.dependencies] +typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} +zipp = ">=0.5" + +[package.extras] +docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] +perf = ["ipython"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pep517", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy", "pytest-perf (>=0.9.2)"] + +[[package]] +name = "iniconfig" +version = "1.1.1" +description = "iniconfig: brain-dead simple config-ini parsing" +optional = false +python-versions = "*" +files = [ + {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, + {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, +] + +[[package]] +name = "packaging" +version = "21.3" +description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.6" +files = [ + {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, + {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, +] + +[package.dependencies] +pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" + +[[package]] +name = "pluggy" +version = "1.0.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, +] + +[package.dependencies] +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "py" +version = "1.11.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, +] + +[[package]] +name = "pyparsing" +version = "3.0.7" +description = "Python parsing module" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, + {file = "pyparsing-3.0.7.tar.gz", hash = "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"}, +] + +[package.extras] +diagrams = ["jinja2", "railroad-diagrams"] + +[[package]] +name = "pytest" +version = "6.2.5" +description = "pytest: simple powerful testing with Python" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, + {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, +] + +[package.dependencies] +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} +attrs = ">=19.2.0" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<2.0" +py = ">=1.8.2" +toml = "*" + +[package.extras] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] + +[[package]] +name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] + +[[package]] +name = "typing-extensions" +version = "4.1.1" +description = "Backported and Experimental Type Hints for Python 3.6+" +optional = false +python-versions = ">=3.6" +files = [ + {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, + {file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"}, +] + +[[package]] +name = "zipp" +version = "3.6.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.6" +files = [ + {file = "zipp-3.6.0-py3-none-any.whl", hash = "sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc"}, + {file = "zipp-3.6.0.tar.gz", hash = "sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832"}, +] + +[package.extras] +docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] +testing = ["func-timeout", "jaraco.itertools", "pytest (>=4.6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy"] + +[metadata] +lock-version = "2.0" +python-versions = "^3.6" +content-hash = "c297503666e67dc734e0ffc95b912c7bb491ebd3a6ff0553a31027a13c780a8a" diff --git a/contrib/msggen/pyproject.toml b/contrib/msggen/pyproject.toml index a17c300cb..96564ecf4 100644 --- a/contrib/msggen/pyproject.toml +++ b/contrib/msggen/pyproject.toml @@ -5,6 +5,9 @@ description = "A utility to transform wire messages and JSON-RPC messages to arb authors = ["Christian Decker "] license = "BSD-MIT" +include = ["msggen/schema.json"] + + [tool.poetry.dependencies] python = "^3.6" @@ -16,4 +19,4 @@ requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.poetry.scripts] -msggen = 'msggen.__main__:run' +msggen = 'msggen.__main__:main'