diff --git a/contrib/msggen/msggen/schema.json b/contrib/msggen/msggen/schema.json index 6b065ba3b..a4974fa32 100644 --- a/contrib/msggen/msggen/schema.json +++ b/contrib/msggen/msggen/schema.json @@ -17273,6 +17273,134 @@ } ] }, + "lightning-listaddresses.json": { + "$schema": "../rpc-schema-draft.json", + "type": "object", + "added": "v24.11", + "rpc": "listaddresses", + "title": "Command to list all addresses issued by the node to date", + "description": [ + "The **listaddresses** RPC command provides a detailed list of all Bitcoin addresses that have been generated and issued by the Core Lightning node up to the current date." + ], + "categories": [ + "readonly" + ], + "request": { + "required": [], + "additionalProperties": false, + "properties": { + "address": { + "type": "string", + "description": [ + "A Bitcoin accepted type, including a bech32, address for lookup in the list of addresses issued to date." + ] + }, + "start": { + "type": "u64", + "description": [ + "Starting key index for listing addresses or searching for a particular address." + ], + "default": 1 + }, + "limit": { + "type": "u32", + "description": [ + "The maximum number of addresses to return or search for." + ], + "default": "Total number of addresses issued" + } + } + }, + "response": { + "required": [ + "addresses" + ], + "additionalProperties": false, + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "keyidx" + ], + "properties": { + "keyidx": { + "type": "u64", + "description": [ + "The key index of the address issued." + ] + }, + "bech32": { + "type": "string", + "description": [ + "The bech32 (native segwit) address." + ] + }, + "p2tr": { + "type": "string", + "description": [ + "The taproot address." + ] + } + } + } + } + } + }, + "author": [ + "Shahana Farooqui <> is mainly responsible." + ], + "see_also": [ + "lightning-newaddr(7)", + "lightning-withdraw(7)" + ], + "resources": [ + "Main web site: " + ], + "examples": [ + { + "request": { + "id": "example:listaddresses#1", + "method": "listaddresses", + "params": [ + "bcrt1phtprcvhz842sxe8qw0yryvc0g6n6dw2puweklcpnfye273kjpfhs0d6d2e" + ] + }, + "response": { + "addresses": [ + { + "keyidx": 13, + "p2tr": "bcrt1phtprcvhz842sxe8qw0yryvc0g6n6dw2puweklcpnfye273kjpfhs0d6d2e" + } + ] + } + }, + { + "request": { + "id": "example:listaddresses#2", + "method": "listaddresses", + "params": { + "start": 6, + "limit": 2 + } + }, + "response": { + "addresses": [ + { + "keyidx": 6, + "bech32": "bcrt1qkpw662yvzdy5ttdg8nw4eh4el0uc7m2ythw0h3" + }, + { + "keyidx": 7, + "p2tr": "bcrt1pn45xgkyj54usdu98plm4zgcp4c5jvvfxmyexwcm5kc3gyfsrjmasd6ctsf" + } + ] + } + } + ] + }, "lightning-listchannels.json": { "$schema": "../rpc-schema-draft.json", "type": "object", diff --git a/doc/Makefile b/doc/Makefile index 1f00086bc..b53fdedc7 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -74,6 +74,7 @@ GENERATE_MARKDOWN := doc/lightning-addgossip.7 \ doc/lightning-invoice.7 \ doc/lightning-invoicerequest.7 \ doc/lightning-keysend.7 \ + doc/lightning-listaddresses.7 \ doc/lightning-listchannels.7 \ doc/lightning-listclosedchannels.7 \ doc/lightning-listconfigs.7 \ diff --git a/doc/index.rst b/doc/index.rst index 004e4157b..f64b6d161 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -84,6 +84,7 @@ Core Lightning Documentation lightning-invoice lightning-invoicerequest lightning-keysend + lightning-listaddresses lightning-listchannels lightning-listclosedchannels lightning-listconfigs diff --git a/doc/schemas/lightning-listaddresses.json b/doc/schemas/lightning-listaddresses.json new file mode 100644 index 000000000..1f5a485ec --- /dev/null +++ b/doc/schemas/lightning-listaddresses.json @@ -0,0 +1,128 @@ +{ + "$schema": "../rpc-schema-draft.json", + "type": "object", + "added": "v24.11", + "rpc": "listaddresses", + "title": "Command to list all addresses issued by the node to date", + "description": [ + "The **listaddresses** RPC command provides a detailed list of all Bitcoin addresses that have been generated and issued by the Core Lightning node up to the current date." + ], + "categories": [ + "readonly" + ], + "request": { + "required": [], + "additionalProperties": false, + "properties": { + "address": { + "type": "string", + "description": [ + "A Bitcoin accepted type, including a bech32, address for lookup in the list of addresses issued to date." + ] + }, + "start": { + "type": "u64", + "description": [ + "Starting key index for listing addresses or searching for a particular address." + ], + "default": 1 + }, + "limit": { + "type": "u32", + "description": [ + "The maximum number of addresses to return or search for." + ], + "default": "Total number of addresses issued" + } + } + }, + "response": { + "required": [ + "addresses" + ], + "additionalProperties": false, + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "keyidx" + ], + "properties": { + "keyidx": { + "type": "u64", + "description": [ + "The key index of the address issued." + ] + }, + "bech32": { + "type": "string", + "description": [ + "The bech32 (native segwit) address." + ] + }, + "p2tr": { + "type": "string", + "description": [ + "The taproot address." + ] + } + } + } + } + } + }, + "author": [ + "Shahana Farooqui <> is mainly responsible." + ], + "see_also": [ + "lightning-newaddr(7)", + "lightning-withdraw(7)" + ], + "resources": [ + "Main web site: " + ], + "examples": [ + { + "request": { + "id": "example:listaddresses#1", + "method": "listaddresses", + "params": [ + "bcrt1phtprcvhz842sxe8qw0yryvc0g6n6dw2puweklcpnfye273kjpfhs0d6d2e" + ] + }, + "response": { + "addresses": [ + { + "keyidx": 13, + "p2tr": "bcrt1phtprcvhz842sxe8qw0yryvc0g6n6dw2puweklcpnfye273kjpfhs0d6d2e" + } + ] + } + }, + { + "request": { + "id": "example:listaddresses#2", + "method": "listaddresses", + "params": { + "start": 6, + "limit": 2 + } + }, + "response": { + "addresses": [ + { + "keyidx": 6, + "bech32": "bcrt1qkpw662yvzdy5ttdg8nw4eh4el0uc7m2ythw0h3" + }, + { + "keyidx": 7, + "p2tr": "bcrt1pn45xgkyj54usdu98plm4zgcp4c5jvvfxmyexwcm5kc3gyfsrjmasd6ctsf" + } + ] + } + } + ] +}