Skip to content

Commit 117dd74

Browse files
ShahanaFarooquirustyrussell
authored andcommitted
doc: Add schema for listaddresses
1 parent fd27cda commit 117dd74

File tree

4 files changed

+258
-0
lines changed

4 files changed

+258
-0
lines changed

contrib/msggen/msggen/schema.json

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17273,6 +17273,134 @@
1727317273
}
1727417274
]
1727517275
},
17276+
"lightning-listaddresses.json": {
17277+
"$schema": "../rpc-schema-draft.json",
17278+
"type": "object",
17279+
"added": "v24.11",
17280+
"rpc": "listaddresses",
17281+
"title": "Command to list all addresses issued by the node to date",
17282+
"description": [
17283+
"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."
17284+
],
17285+
"categories": [
17286+
"readonly"
17287+
],
17288+
"request": {
17289+
"required": [],
17290+
"additionalProperties": false,
17291+
"properties": {
17292+
"address": {
17293+
"type": "string",
17294+
"description": [
17295+
"A Bitcoin accepted type, including a bech32, address for lookup in the list of addresses issued to date."
17296+
]
17297+
},
17298+
"start": {
17299+
"type": "u64",
17300+
"description": [
17301+
"Starting key index for listing addresses or searching for a particular address."
17302+
],
17303+
"default": 1
17304+
},
17305+
"limit": {
17306+
"type": "u32",
17307+
"description": [
17308+
"The maximum number of addresses to return or search for."
17309+
],
17310+
"default": "Total number of addresses issued"
17311+
}
17312+
}
17313+
},
17314+
"response": {
17315+
"required": [
17316+
"addresses"
17317+
],
17318+
"additionalProperties": false,
17319+
"properties": {
17320+
"addresses": {
17321+
"type": "array",
17322+
"items": {
17323+
"type": "object",
17324+
"additionalProperties": false,
17325+
"required": [
17326+
"keyidx"
17327+
],
17328+
"properties": {
17329+
"keyidx": {
17330+
"type": "u64",
17331+
"description": [
17332+
"The key index of the address issued."
17333+
]
17334+
},
17335+
"bech32": {
17336+
"type": "string",
17337+
"description": [
17338+
"The bech32 (native segwit) address."
17339+
]
17340+
},
17341+
"p2tr": {
17342+
"type": "string",
17343+
"description": [
17344+
"The taproot address."
17345+
]
17346+
}
17347+
}
17348+
}
17349+
}
17350+
}
17351+
},
17352+
"author": [
17353+
"Shahana Farooqui <<[email protected]>> is mainly responsible."
17354+
],
17355+
"see_also": [
17356+
"lightning-newaddr(7)",
17357+
"lightning-withdraw(7)"
17358+
],
17359+
"resources": [
17360+
"Main web site: <https://github.com/ElementsProject/lightning>"
17361+
],
17362+
"examples": [
17363+
{
17364+
"request": {
17365+
"id": "example:listaddresses#1",
17366+
"method": "listaddresses",
17367+
"params": [
17368+
"bcrt1phtprcvhz842sxe8qw0yryvc0g6n6dw2puweklcpnfye273kjpfhs0d6d2e"
17369+
]
17370+
},
17371+
"response": {
17372+
"addresses": [
17373+
{
17374+
"keyidx": 13,
17375+
"p2tr": "bcrt1phtprcvhz842sxe8qw0yryvc0g6n6dw2puweklcpnfye273kjpfhs0d6d2e"
17376+
}
17377+
]
17378+
}
17379+
},
17380+
{
17381+
"request": {
17382+
"id": "example:listaddresses#2",
17383+
"method": "listaddresses",
17384+
"params": {
17385+
"start": 6,
17386+
"limit": 2
17387+
}
17388+
},
17389+
"response": {
17390+
"addresses": [
17391+
{
17392+
"keyidx": 6,
17393+
"bech32": "bcrt1qkpw662yvzdy5ttdg8nw4eh4el0uc7m2ythw0h3"
17394+
},
17395+
{
17396+
"keyidx": 7,
17397+
"p2tr": "bcrt1pn45xgkyj54usdu98plm4zgcp4c5jvvfxmyexwcm5kc3gyfsrjmasd6ctsf"
17398+
}
17399+
]
17400+
}
17401+
}
17402+
]
17403+
},
1727617404
"lightning-listchannels.json": {
1727717405
"$schema": "../rpc-schema-draft.json",
1727817406
"type": "object",

doc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ GENERATE_MARKDOWN := doc/lightning-addgossip.7 \
7474
doc/lightning-invoice.7 \
7575
doc/lightning-invoicerequest.7 \
7676
doc/lightning-keysend.7 \
77+
doc/lightning-listaddresses.7 \
7778
doc/lightning-listchannels.7 \
7879
doc/lightning-listclosedchannels.7 \
7980
doc/lightning-listconfigs.7 \

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Core Lightning Documentation
8484
lightning-invoice <lightning-invoice.7.md>
8585
lightning-invoicerequest <lightning-invoicerequest.7.md>
8686
lightning-keysend <lightning-keysend.7.md>
87+
lightning-listaddresses <lightning-listaddresses.7.md>
8788
lightning-listchannels <lightning-listchannels.7.md>
8889
lightning-listclosedchannels <lightning-listclosedchannels.7.md>
8990
lightning-listconfigs <lightning-listconfigs.7.md>
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
{
2+
"$schema": "../rpc-schema-draft.json",
3+
"type": "object",
4+
"added": "v24.11",
5+
"rpc": "listaddresses",
6+
"title": "Command to list all addresses issued by the node to date",
7+
"description": [
8+
"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."
9+
],
10+
"categories": [
11+
"readonly"
12+
],
13+
"request": {
14+
"required": [],
15+
"additionalProperties": false,
16+
"properties": {
17+
"address": {
18+
"type": "string",
19+
"description": [
20+
"A Bitcoin accepted type, including a bech32, address for lookup in the list of addresses issued to date."
21+
]
22+
},
23+
"start": {
24+
"type": "u64",
25+
"description": [
26+
"Starting key index for listing addresses or searching for a particular address."
27+
],
28+
"default": 1
29+
},
30+
"limit": {
31+
"type": "u32",
32+
"description": [
33+
"The maximum number of addresses to return or search for."
34+
],
35+
"default": "Total number of addresses issued"
36+
}
37+
}
38+
},
39+
"response": {
40+
"required": [
41+
"addresses"
42+
],
43+
"additionalProperties": false,
44+
"properties": {
45+
"addresses": {
46+
"type": "array",
47+
"items": {
48+
"type": "object",
49+
"additionalProperties": false,
50+
"required": [
51+
"keyidx"
52+
],
53+
"properties": {
54+
"keyidx": {
55+
"type": "u64",
56+
"description": [
57+
"The key index of the address issued."
58+
]
59+
},
60+
"bech32": {
61+
"type": "string",
62+
"description": [
63+
"The bech32 (native segwit) address."
64+
]
65+
},
66+
"p2tr": {
67+
"type": "string",
68+
"description": [
69+
"The taproot address."
70+
]
71+
}
72+
}
73+
}
74+
}
75+
}
76+
},
77+
"author": [
78+
"Shahana Farooqui <<[email protected]>> is mainly responsible."
79+
],
80+
"see_also": [
81+
"lightning-newaddr(7)",
82+
"lightning-withdraw(7)"
83+
],
84+
"resources": [
85+
"Main web site: <https://github.com/ElementsProject/lightning>"
86+
],
87+
"examples": [
88+
{
89+
"request": {
90+
"id": "example:listaddresses#1",
91+
"method": "listaddresses",
92+
"params": [
93+
"bcrt1phtprcvhz842sxe8qw0yryvc0g6n6dw2puweklcpnfye273kjpfhs0d6d2e"
94+
]
95+
},
96+
"response": {
97+
"addresses": [
98+
{
99+
"keyidx": 13,
100+
"p2tr": "bcrt1phtprcvhz842sxe8qw0yryvc0g6n6dw2puweklcpnfye273kjpfhs0d6d2e"
101+
}
102+
]
103+
}
104+
},
105+
{
106+
"request": {
107+
"id": "example:listaddresses#2",
108+
"method": "listaddresses",
109+
"params": {
110+
"start": 6,
111+
"limit": 2
112+
}
113+
},
114+
"response": {
115+
"addresses": [
116+
{
117+
"keyidx": 6,
118+
"bech32": "bcrt1qkpw662yvzdy5ttdg8nw4eh4el0uc7m2ythw0h3"
119+
},
120+
{
121+
"keyidx": 7,
122+
"p2tr": "bcrt1pn45xgkyj54usdu98plm4zgcp4c5jvvfxmyexwcm5kc3gyfsrjmasd6ctsf"
123+
}
124+
]
125+
}
126+
}
127+
]
128+
}

0 commit comments

Comments
 (0)