MCPcopy Create free account
hub / github.com/ElementsProject/lightning / json_add_address_details

Function json_add_address_details

wallet/walletrpc.c:180–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178AUTODATA(json_command, &newaddr_command);
179
180static void json_add_address_details(struct json_stream *response,
181 const u64 keyidx,
182 const char *out_p2wpkh,
183 const char *out_p2tr,
184 enum addrtype addrtype)
185{
186 json_object_start(response, NULL);
187 json_add_u64(response, "keyidx", keyidx);
188 if (!streq(out_p2wpkh, "")) {
189 json_add_string(response, "bech32", out_p2wpkh);
190 }
191 if (!streq(out_p2tr,"")) {
192 json_add_string(response, "p2tr", out_p2tr);
193 }
194 json_object_end(response);
195}
196
197static struct command_result *json_listaddresses(struct command *cmd,
198 const char *buffer,

Callers 1

json_listaddressesFunction · 0.85

Calls 4

json_object_startFunction · 0.85
json_add_u64Function · 0.85
json_object_endFunction · 0.85
json_add_stringFunction · 0.50

Tested by

no test coverage detected