mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-12 10:30:29 +01:00
rpc: Removing description
from json_command struct
This commit is contained in:
parent
89c182e2be
commit
b485a026f7
42 changed files with 126 additions and 320 deletions
|
@ -179,11 +179,9 @@ static void human_help(char *buffer, const jsmntok_t *result)
|
|||
unsigned int i;
|
||||
/* `curr` is used as a temporary token */
|
||||
const jsmntok_t *curr;
|
||||
const char *prev_cat;
|
||||
/* Contains all commands objects, which have the following structure :
|
||||
* {
|
||||
* "command": "The command name and usage",
|
||||
* "description": "The command's description"
|
||||
* "command": "The command name and usage"
|
||||
* }
|
||||
*/
|
||||
const jsmntok_t * help_array = json_get_member(buffer, result, "help");
|
||||
|
@ -196,22 +194,11 @@ static void human_help(char *buffer, const jsmntok_t *result)
|
|||
|
||||
asort(help, tal_count(help), compare_help, buffer);
|
||||
|
||||
prev_cat = "";
|
||||
for (i = 0; i < tal_count(help); i++) {
|
||||
const jsmntok_t *category, *command, *desc;
|
||||
|
||||
category = json_get_member(buffer, help[i], "category");
|
||||
if (category && !json_tok_streq(buffer, category, prev_cat)) {
|
||||
prev_cat = json_strdup(help, buffer, category);
|
||||
printf("=== %s ===\n\n", prev_cat);
|
||||
}
|
||||
|
||||
const jsmntok_t *command;
|
||||
command = json_get_member(buffer, help[i], "command");
|
||||
desc = json_get_member(buffer, help[i], "description");
|
||||
printf("%.*s\n",
|
||||
printf("%.*s\n\n",
|
||||
command->end - command->start, buffer + command->start);
|
||||
printf(" %.*s\n\n",
|
||||
desc->end - desc->start, buffer + desc->start);
|
||||
}
|
||||
tal_free(help);
|
||||
|
||||
|
|
1
cln-grpc/proto/node.proto
generated
1
cln-grpc/proto/node.proto
generated
|
@ -3307,7 +3307,6 @@ message HelpResponse {
|
|||
|
||||
message HelpHelp {
|
||||
string command = 1;
|
||||
string description = 3;
|
||||
}
|
||||
|
||||
message PreapprovekeysendRequest {
|
||||
|
|
1
cln-grpc/src/convert.rs
generated
1
cln-grpc/src/convert.rs
generated
|
@ -3554,7 +3554,6 @@ impl From<responses::HelpHelp> for pb::HelpHelp {
|
|||
fn from(c: responses::HelpHelp) -> Self {
|
||||
Self {
|
||||
command: c.command, // Rule #2 for type string
|
||||
description: c.description, // Rule #2 for type string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
1
cln-rpc/src/model.rs
generated
1
cln-rpc/src/model.rs
generated
|
@ -9742,7 +9742,6 @@ pub mod responses {
|
|||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct HelpHelp {
|
||||
pub command: String,
|
||||
pub description: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
|
|
|
@ -12567,8 +12567,7 @@
|
|||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"command",
|
||||
"description"
|
||||
"command"
|
||||
],
|
||||
"properties": {
|
||||
"command": {
|
||||
|
@ -12576,12 +12575,6 @@
|
|||
"description": [
|
||||
"The command."
|
||||
]
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": [
|
||||
"A one-line description of the purpose of this command."
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12621,8 +12614,7 @@
|
|||
"response": {
|
||||
"help": [
|
||||
{
|
||||
"command": "pay bolt11 [amount_msat] [label] [riskfactor] [maxfeepercent] [retry_for] [maxdelay] [exemptfee] [localinvreqid] [exclude] [maxfee] [description] [dev_use_shadow]",
|
||||
"description": "Send payment specified by {bolt11}"
|
||||
"command": "pay bolt11 [amount_msat] [label] [riskfactor] [maxfeepercent] [retry_for] [maxdelay] [exemptfee] [localinvreqid] [exclude] [maxfee] [description] [dev_use_shadow]"
|
||||
}
|
||||
],
|
||||
"format-hint": "simple"
|
||||
|
@ -12639,8 +12631,7 @@
|
|||
"response": {
|
||||
"help": [
|
||||
{
|
||||
"command": "dev subcommand=crash|rhash|slowcmd",
|
||||
"description": "Developer command test multiplexer"
|
||||
"command": "dev subcommand=crash|rhash|slowcmd"
|
||||
}
|
||||
],
|
||||
"format-hint": "simple"
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2618,7 +2618,6 @@ def stop2py(m):
|
|||
def help_help2py(m):
|
||||
return remove_default({
|
||||
"command": m.command, # PrimitiveField in generate_composite
|
||||
"description": m.description, # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -31,8 +31,7 @@
|
|||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"command",
|
||||
"description"
|
||||
"command"
|
||||
],
|
||||
"properties": {
|
||||
"command": {
|
||||
|
@ -40,12 +39,6 @@
|
|||
"description": [
|
||||
"The command."
|
||||
]
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": [
|
||||
"A one-line description of the purpose of this command."
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -85,8 +78,7 @@
|
|||
"response": {
|
||||
"help": [
|
||||
{
|
||||
"command": "pay bolt11 [amount_msat] [label] [riskfactor] [maxfeepercent] [retry_for] [maxdelay] [exemptfee] [localinvreqid] [exclude] [maxfee] [description] [dev_use_shadow]",
|
||||
"description": "Send payment specified by {bolt11}"
|
||||
"command": "pay bolt11 [amount_msat] [label] [riskfactor] [maxfeepercent] [retry_for] [maxdelay] [exemptfee] [localinvreqid] [exclude] [maxfee] [description] [dev_use_shadow]"
|
||||
}
|
||||
],
|
||||
"format-hint": "simple"
|
||||
|
@ -103,8 +95,7 @@
|
|||
"response": {
|
||||
"help": [
|
||||
{
|
||||
"command": "dev subcommand=crash|rhash|slowcmd",
|
||||
"description": "Developer command test multiplexer"
|
||||
"command": "dev subcommand=crash|rhash|slowcmd"
|
||||
}
|
||||
],
|
||||
"format-hint": "simple"
|
||||
|
|
|
@ -756,7 +756,6 @@ static struct command_result *json_feerates(struct command *cmd,
|
|||
static const struct json_command feerates_command = {
|
||||
"feerates",
|
||||
json_feerates,
|
||||
"Return feerate estimates, either satoshi-per-kw ({style} perkw) or satoshi-per-kb ({style} perkb)."
|
||||
};
|
||||
AUTODATA(json_command, &feerates_command);
|
||||
|
||||
|
@ -782,7 +781,6 @@ static struct command_result *json_parse_feerate(struct command *cmd,
|
|||
static const struct json_command parse_feerate_command = {
|
||||
"parsefeerate",
|
||||
json_parse_feerate,
|
||||
"Return current feerate in perkw + perkb for given feerate string."
|
||||
};
|
||||
AUTODATA(json_command, &parse_feerate_command);
|
||||
|
||||
|
|
|
@ -2199,27 +2199,18 @@ static struct command_result *json_splice_signed(struct command *cmd,
|
|||
static const struct json_command splice_init_command = {
|
||||
"splice_init",
|
||||
json_splice_init,
|
||||
"Init a channel splice to {channel_id} for {relative_amount} satoshis with {initialpsbt}. "
|
||||
"Returns updated {psbt} with (partial) contributions from peer"
|
||||
};
|
||||
AUTODATA(json_command, &splice_init_command);
|
||||
|
||||
static const struct json_command splice_update_command = {
|
||||
"splice_update",
|
||||
json_splice_update,
|
||||
"Update {channel_id} currently active negotiated splice with {psbt}. "
|
||||
""
|
||||
"Returns updated {psbt} with (partial) contributions from peer. "
|
||||
"If {commitments_secured} is true, next call may be to splicechannel_finalize, "
|
||||
"otherwise keep calling splice_update passing back in the returned PSBT until "
|
||||
"{commitments_secured} is true."
|
||||
};
|
||||
AUTODATA(json_command, &splice_update_command);
|
||||
|
||||
static const struct json_command splice_signed_command = {
|
||||
"splice_signed",
|
||||
json_splice_signed,
|
||||
"Send our {signed_psbt}'s tx sigs for {channel_id}."
|
||||
};
|
||||
AUTODATA(json_command, &splice_signed_command);
|
||||
|
||||
|
@ -2272,7 +2263,6 @@ static struct command_result *json_dev_feerate(struct command *cmd,
|
|||
static const struct json_command dev_feerate_command = {
|
||||
"dev-feerate",
|
||||
json_dev_feerate,
|
||||
"Set feerate for {id} to {feerate}",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_feerate_command);
|
||||
|
@ -2328,7 +2318,6 @@ static struct command_result *json_dev_quiesce(struct command *cmd,
|
|||
static const struct json_command dev_quiesce_command = {
|
||||
"dev-quiesce",
|
||||
json_dev_quiesce,
|
||||
"Initiate quiscence protocol with peer",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_quiesce_command);
|
||||
|
|
|
@ -118,6 +118,5 @@ static struct command_result *json_listclosedchannels(struct command *cmd,
|
|||
static const struct json_command listclosedchannels_command = {
|
||||
"listclosedchannels",
|
||||
json_listclosedchannels,
|
||||
"Show historical (dead) channels."
|
||||
};
|
||||
AUTODATA(json_command, &listclosedchannels_command);
|
||||
|
|
|
@ -897,9 +897,5 @@ discard_unopened: {
|
|||
static const struct json_command close_command = {
|
||||
"close",
|
||||
json_close,
|
||||
"Close the channel with {id} "
|
||||
"(either peer ID, channel ID, or short channel ID). "
|
||||
"Force a unilateral close after {unilateraltimeout} seconds (default 48h). "
|
||||
"If {destination} address is provided, will be used as output address."
|
||||
};
|
||||
AUTODATA(json_command, &close_command);
|
||||
|
|
|
@ -328,7 +328,6 @@ modern:
|
|||
static const struct json_command listconfigs_command = {
|
||||
"listconfigs",
|
||||
json_listconfigs,
|
||||
"List all configuration options, or with [config], just that one.",
|
||||
};
|
||||
AUTODATA(json_command, &listconfigs_command);
|
||||
|
||||
|
@ -635,6 +634,5 @@ static struct command_result *json_setconfig(struct command *cmd,
|
|||
static const struct json_command setconfig_command = {
|
||||
"setconfig",
|
||||
json_setconfig,
|
||||
"Set a dynamically-adjustable config."
|
||||
};
|
||||
AUTODATA(json_command, &setconfig_command);
|
||||
|
|
|
@ -254,8 +254,6 @@ static struct command_result *json_connect(struct command *cmd,
|
|||
static const struct json_command connect_command = {
|
||||
"connect",
|
||||
json_connect,
|
||||
"Connect to {id} at {host} (which can end in ':port' if not default). "
|
||||
"{id} can also be of the form id@host"
|
||||
};
|
||||
AUTODATA(json_command, &connect_command);
|
||||
|
||||
|
@ -915,7 +913,6 @@ static struct command_result *json_sendcustommsg(struct command *cmd,
|
|||
static const struct json_command sendcustommsg_command = {
|
||||
"sendcustommsg",
|
||||
json_sendcustommsg,
|
||||
"Send a custom message to the peer with the given {node_id}",
|
||||
};
|
||||
|
||||
AUTODATA(json_command, &sendcustommsg_command);
|
||||
|
@ -937,7 +934,6 @@ static struct command_result *json_dev_suppress_gossip(struct command *cmd,
|
|||
static const struct json_command dev_suppress_gossip = {
|
||||
"dev-suppress-gossip",
|
||||
json_dev_suppress_gossip,
|
||||
"Stop this node from sending any more gossip.",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_suppress_gossip);
|
||||
|
@ -959,7 +955,6 @@ static struct command_result *json_dev_report_fds(struct command *cmd,
|
|||
static const struct json_command dev_report_fds = {
|
||||
"dev-report-fds",
|
||||
json_dev_report_fds,
|
||||
"Ask connectd to report status of all its open files.",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_report_fds);
|
||||
|
@ -981,7 +976,6 @@ static struct command_result *json_dev_connectd_exhaust_fds(struct command *cmd,
|
|||
static const struct json_command dev_connectd_exhaust_fds = {
|
||||
"dev-connectd-exhaust-fds",
|
||||
json_dev_connectd_exhaust_fds,
|
||||
"Make connectd run out of file descriptors",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_connectd_exhaust_fds);
|
||||
|
|
|
@ -346,27 +346,23 @@ static struct command_result *json_datastoreusage(struct command *cmd,
|
|||
static const struct json_command datastore_command = {
|
||||
"datastore",
|
||||
json_datastore,
|
||||
"Add a {key} and {hex}/{string} data to the data store",
|
||||
};
|
||||
AUTODATA(json_command, &datastore_command);
|
||||
|
||||
static const struct json_command deldatastore_command = {
|
||||
"deldatastore",
|
||||
json_deldatastore,
|
||||
"Remove a {key} from the data store",
|
||||
};
|
||||
AUTODATA(json_command, &deldatastore_command);
|
||||
|
||||
static const struct json_command listdatastore_command = {
|
||||
"listdatastore",
|
||||
json_listdatastore,
|
||||
"List the datastore, optionally only {key}",
|
||||
};
|
||||
AUTODATA(json_command, &listdatastore_command);
|
||||
|
||||
static const struct json_command datastoreusage_command = {
|
||||
"datastoreusage",
|
||||
json_datastoreusage,
|
||||
"List the datastore usage, starting from an optional {key}",
|
||||
};
|
||||
AUTODATA(json_command, &datastoreusage_command);
|
||||
|
|
|
@ -3893,8 +3893,6 @@ static struct command_result *json_queryrates(struct command *cmd,
|
|||
static const struct json_command queryrates_command = {
|
||||
"dev-queryrates",
|
||||
json_queryrates,
|
||||
"Ask a peer what their contribution and liquidity rates are"
|
||||
" for the given {amount} and {requested_amt}",
|
||||
.dev_only = true,
|
||||
};
|
||||
|
||||
|
@ -3903,34 +3901,26 @@ AUTODATA(json_command, &queryrates_command);
|
|||
static const struct json_command openchannel_init_command = {
|
||||
"openchannel_init",
|
||||
json_openchannel_init,
|
||||
"Init an open channel to {id} with {initialpsbt} for {amount} satoshis. "
|
||||
"Returns updated {psbt} with (partial) contributions from peer"
|
||||
};
|
||||
|
||||
static const struct json_command openchannel_update_command = {
|
||||
"openchannel_update",
|
||||
json_openchannel_update,
|
||||
"Update {channel_id} with {psbt}. "
|
||||
"Returns updated {psbt} with (partial) contributions from peer. "
|
||||
"If {commitments_secured} is true, next call should be to openchannel_signed"
|
||||
};
|
||||
|
||||
static const struct json_command openchannel_signed_command = {
|
||||
"openchannel_signed",
|
||||
json_openchannel_signed,
|
||||
"Send our {signed_psbt}'s tx sigs for {channel_id}."
|
||||
};
|
||||
|
||||
static const struct json_command openchannel_bump_command = {
|
||||
"openchannel_bump",
|
||||
json_openchannel_bump,
|
||||
"Attempt to bump the fee on {channel_id}'s funding transaction."
|
||||
};
|
||||
|
||||
static const struct json_command openchannel_abort_command = {
|
||||
"openchannel_abort",
|
||||
json_openchannel_abort,
|
||||
"Abort {channel_id}'s open. Usable while `commitment_signed=false`."
|
||||
};
|
||||
|
||||
AUTODATA(json_command, &openchannel_init_command);
|
||||
|
|
|
@ -237,7 +237,6 @@ static struct command_result *json_listforwards(struct command *cmd,
|
|||
static const struct json_command listforwards_command = {
|
||||
"listforwards",
|
||||
json_listforwards,
|
||||
"List all forwarded payments and their information optionally filtering by [status], [in_channel] and [out_channel]"
|
||||
};
|
||||
AUTODATA(json_command, &listforwards_command);
|
||||
|
||||
|
@ -301,6 +300,5 @@ static struct command_result *json_delforward(struct command *cmd,
|
|||
static const struct json_command delforward_command = {
|
||||
"delforward",
|
||||
json_delforward,
|
||||
"Delete a forwarded payment by [in_channel], [in_htlc_id] and [status]"
|
||||
};
|
||||
AUTODATA(json_command, &delforward_command);
|
||||
|
|
|
@ -371,9 +371,6 @@ static struct command_result *json_setleaserates(struct command *cmd,
|
|||
static const struct json_command setleaserates_command = {
|
||||
"setleaserates",
|
||||
json_setleaserates,
|
||||
"Called by plugin to set the node's present channel lease rates."
|
||||
" Not to be set without having a plugin which can handle"
|
||||
" `openchannel2` hooks.",
|
||||
};
|
||||
|
||||
AUTODATA(json_command, &setleaserates_command);
|
||||
|
@ -422,7 +419,6 @@ static struct command_result *json_addgossip(struct command *cmd,
|
|||
static const struct json_command addgossip_command = {
|
||||
"addgossip",
|
||||
json_addgossip,
|
||||
"Inject gossip {message} into gossipd"
|
||||
};
|
||||
AUTODATA(json_command, &addgossip_command);
|
||||
|
||||
|
@ -450,7 +446,6 @@ json_dev_set_max_scids_encode_size(struct command *cmd,
|
|||
static const struct json_command dev_set_max_scids_encode_size = {
|
||||
"dev-set-max-scids-encode-size",
|
||||
json_dev_set_max_scids_encode_size,
|
||||
"Set {max} bytes of short_channel_ids per reply_channel_range",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_set_max_scids_encode_size);
|
||||
|
@ -477,7 +472,6 @@ static struct command_result *json_dev_gossip_set_time(struct command *cmd,
|
|||
static const struct json_command dev_gossip_set_time = {
|
||||
"dev-gossip-set-time",
|
||||
json_dev_gossip_set_time,
|
||||
"Ask gossipd to update the current time.",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_gossip_set_time);
|
||||
|
|
|
@ -288,6 +288,5 @@ static struct command_result *json_makesecret(struct command *cmd,
|
|||
static const struct json_command makesecret_command = {
|
||||
"makesecret",
|
||||
&json_makesecret,
|
||||
"Get a pseudorandom secret key, using some {hex} data."
|
||||
};
|
||||
AUTODATA(json_command, &makesecret_command);
|
||||
|
|
|
@ -1247,11 +1247,6 @@ static struct command_result *json_invoice(struct command *cmd,
|
|||
static const struct json_command invoice_command = {
|
||||
"invoice",
|
||||
json_invoice,
|
||||
"Create an invoice for {msatoshi} with {label} "
|
||||
"and {description} with optional {expiry} seconds "
|
||||
"(default 1 week), optional {fallbacks} address list"
|
||||
"(default empty list) and optional {preimage} "
|
||||
"(default autogenerated)"
|
||||
};
|
||||
AUTODATA(json_command, &invoice_command);
|
||||
|
||||
|
@ -1380,8 +1375,6 @@ static struct command_result *json_listinvoices(struct command *cmd,
|
|||
static const struct json_command listinvoices_command = {
|
||||
"listinvoices",
|
||||
json_listinvoices,
|
||||
"Show invoice matching {label}, {invstring}, {payment_hash} or {offerid} (or all, if "
|
||||
"no query parameter specified)"
|
||||
};
|
||||
AUTODATA(json_command, &listinvoices_command);
|
||||
|
||||
|
@ -1467,7 +1460,6 @@ static struct command_result *json_delinvoice(struct command *cmd,
|
|||
static const struct json_command delinvoice_command = {
|
||||
"delinvoice",
|
||||
json_delinvoice,
|
||||
"Delete unpaid invoice {label} with {status}",
|
||||
};
|
||||
AUTODATA(json_command, &delinvoice_command);
|
||||
|
||||
|
@ -1515,8 +1507,6 @@ static struct command_result *json_waitanyinvoice(struct command *cmd,
|
|||
static const struct json_command waitanyinvoice_command = {
|
||||
"waitanyinvoice",
|
||||
json_waitanyinvoice,
|
||||
"Wait for the next invoice to be paid, after {lastpay_index} (if supplied). "
|
||||
"If {timeout} seconds is reached while waiting, fail with an error."
|
||||
};
|
||||
AUTODATA(json_command, &waitanyinvoice_command);
|
||||
|
||||
|
@ -1564,7 +1554,6 @@ static struct command_result *json_waitinvoice(struct command *cmd,
|
|||
static const struct json_command waitinvoice_command = {
|
||||
"waitinvoice",
|
||||
json_waitinvoice,
|
||||
"Wait for an incoming payment matching the invoice with {label}, or if the invoice expires"
|
||||
};
|
||||
AUTODATA(json_command, &waitinvoice_command);
|
||||
|
||||
|
@ -1602,7 +1591,6 @@ static struct command_result *json_decodepay(struct command *cmd,
|
|||
static const struct json_command decodepay_command = {
|
||||
"decodepay",
|
||||
json_decodepay,
|
||||
"Decode {bolt11}, using {description} if necessary"
|
||||
};
|
||||
AUTODATA(json_command, &decodepay_command);
|
||||
|
||||
|
@ -1853,7 +1841,6 @@ static struct command_result *json_createinvoice(struct command *cmd,
|
|||
static const struct json_command createinvoice_command = {
|
||||
"createinvoice",
|
||||
json_createinvoice,
|
||||
"Lowlevel command to sign and create invoice {invstring}, resolved with {preimage}, using unique {label}."
|
||||
};
|
||||
|
||||
AUTODATA(json_command, &createinvoice_command);
|
||||
|
@ -1911,7 +1898,6 @@ static struct command_result *json_preapproveinvoice(struct command *cmd,
|
|||
static const struct json_command preapproveinvoice_command = {
|
||||
"preapproveinvoice",
|
||||
json_preapproveinvoice,
|
||||
"Ask the HSM to preapprove an invoice."
|
||||
};
|
||||
AUTODATA(json_command, &preapproveinvoice_command);
|
||||
|
||||
|
@ -1970,7 +1956,6 @@ static struct command_result *json_preapprovekeysend(struct command *cmd,
|
|||
static const struct json_command preapprovekeysend_command = {
|
||||
"preapprovekeysend",
|
||||
json_preapprovekeysend,
|
||||
"Ask the HSM to preapprove a keysend payment."
|
||||
};
|
||||
AUTODATA(json_command, &preapprovekeysend_command);
|
||||
|
||||
|
@ -2025,7 +2010,6 @@ static struct command_result *json_signinvoice(struct command *cmd,
|
|||
static const struct json_command signinvoice_command = {
|
||||
"signinvoice",
|
||||
json_signinvoice,
|
||||
"Lowlevel command to sign invoice {invstring}."
|
||||
};
|
||||
|
||||
AUTODATA(json_command, &signinvoice_command);
|
||||
|
|
|
@ -187,7 +187,6 @@ static struct command_result *json_help(struct command *cmd,
|
|||
static const struct json_command help_command = {
|
||||
"help",
|
||||
json_help,
|
||||
"List available commands, or give verbose help on one {command}.",
|
||||
};
|
||||
AUTODATA(json_command, &help_command);
|
||||
|
||||
|
@ -248,7 +247,6 @@ static struct command_result *json_stop(struct command *cmd,
|
|||
static const struct json_command stop_command = {
|
||||
"stop",
|
||||
json_stop,
|
||||
"Shut down the lightningd process"
|
||||
};
|
||||
AUTODATA(json_command, &stop_command);
|
||||
|
||||
|
@ -354,7 +352,6 @@ static struct command_result *json_recover(struct command *cmd,
|
|||
static const struct json_command recover_command = {
|
||||
"recover",
|
||||
json_recover,
|
||||
"Restart an unused lightning node with --recover"
|
||||
};
|
||||
AUTODATA(json_command, &recover_command);
|
||||
|
||||
|
@ -430,7 +427,6 @@ static struct command_result *json_dev(struct command *cmd UNUSED,
|
|||
static const struct json_command dev_command = {
|
||||
"dev",
|
||||
json_dev,
|
||||
"Developer command test multiplexer",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_command);
|
||||
|
@ -466,7 +462,6 @@ static void json_add_help_command(struct command *cmd,
|
|||
json_command->name));
|
||||
json_object_start(response, NULL);
|
||||
json_add_string(response, "command", usage);
|
||||
json_add_string(response, "description", json_command->description);
|
||||
json_object_end(response);
|
||||
}
|
||||
|
||||
|
@ -1693,7 +1688,6 @@ static struct command_result *json_check(struct command *cmd,
|
|||
static const struct json_command check_command = {
|
||||
"check",
|
||||
json_check,
|
||||
"Don't run {command_to_check}, just verify parameters.",
|
||||
};
|
||||
AUTODATA(json_command, &check_command);
|
||||
|
||||
|
@ -1718,7 +1712,6 @@ static struct command_result *json_notifications(struct command *cmd,
|
|||
static const struct json_command notifications_command = {
|
||||
"notifications",
|
||||
json_notifications,
|
||||
"{enable} notifications",
|
||||
};
|
||||
AUTODATA(json_command, ¬ifications_command);
|
||||
|
||||
|
@ -1743,7 +1736,6 @@ static struct command_result *json_batching(struct command *cmd,
|
|||
static const struct json_command batching_command = {
|
||||
"batching",
|
||||
json_batching,
|
||||
"Database transaction batching {enable}",
|
||||
};
|
||||
AUTODATA(json_command, &batching_command);
|
||||
|
||||
|
@ -1768,6 +1760,5 @@ static struct command_result *json_deprecations(struct command *cmd,
|
|||
static const struct json_command deprecations_command = {
|
||||
"deprecations",
|
||||
json_deprecations,
|
||||
"Set/unset deprecated APIs on this JSON connection (for developer testing)",
|
||||
};
|
||||
AUTODATA(json_command, &deprecations_command);
|
||||
|
|
|
@ -59,7 +59,6 @@ struct json_command {
|
|||
const char *buffer,
|
||||
const jsmntok_t *obj,
|
||||
const jsmntok_t *params);
|
||||
const char *description;
|
||||
bool dev_only;
|
||||
const char *depr_start, *depr_end;
|
||||
/* Special hook if we want raw access for check command */
|
||||
|
|
|
@ -1173,6 +1173,5 @@ static struct command_result *json_getlog(struct command *cmd,
|
|||
static const struct json_command getlog_command = {
|
||||
"getlog",
|
||||
json_getlog,
|
||||
"Show logs, with optional log {level} (info|unusual|debug|io)"
|
||||
};
|
||||
AUTODATA(json_command, &getlog_command);
|
||||
|
|
|
@ -82,7 +82,6 @@ static struct command_result *json_memdump(struct command *cmd,
|
|||
static const struct json_command dev_memdump_command = {
|
||||
"dev-memdump",
|
||||
json_memdump,
|
||||
"Show memory objects currently in use",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_memdump_command);
|
||||
|
@ -267,7 +266,6 @@ static struct command_result *json_memleak(struct command *cmd,
|
|||
static const struct json_command dev_memleak_command = {
|
||||
"dev-memleak",
|
||||
json_memleak,
|
||||
"Show unreferenced memory objects",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_memleak_command);
|
||||
|
|
|
@ -123,7 +123,6 @@ static struct command_result *json_createoffer(struct command *cmd,
|
|||
static const struct json_command createoffer_command = {
|
||||
"createoffer",
|
||||
json_createoffer,
|
||||
"Create and sign an offer {bolt12} with and optional {label}."
|
||||
};
|
||||
AUTODATA(json_command, &createoffer_command);
|
||||
|
||||
|
@ -183,8 +182,6 @@ static struct command_result *json_listoffers(struct command *cmd,
|
|||
static const struct json_command listoffers_command = {
|
||||
"listoffers",
|
||||
json_listoffers,
|
||||
"If {offer_id} is set, show that."
|
||||
" Otherwise, if {showdisabled} is true, list all, otherwise just non-disabled ones."
|
||||
};
|
||||
AUTODATA(json_command, &listoffers_command);
|
||||
|
||||
|
@ -226,7 +223,6 @@ static struct command_result *json_disableoffer(struct command *cmd,
|
|||
static const struct json_command disableoffer_command = {
|
||||
"disableoffer",
|
||||
json_disableoffer,
|
||||
"Disable offer {offer_id}",
|
||||
};
|
||||
AUTODATA(json_command, &disableoffer_command);
|
||||
|
||||
|
@ -493,7 +489,6 @@ static struct command_result *json_createinvoicerequest(struct command *cmd,
|
|||
static const struct json_command createinvreq_command = {
|
||||
"createinvoicerequest",
|
||||
json_createinvoicerequest,
|
||||
"Create and sign an invoice_request {bolt12}, with {recurrence_label} if recurring, filling in payer_info and payer_key."
|
||||
};
|
||||
AUTODATA(json_command, &createinvreq_command);
|
||||
|
||||
|
@ -529,7 +524,6 @@ static struct command_result *json_payersign(struct command *cmd,
|
|||
static const struct json_command payersign_command = {
|
||||
"payersign",
|
||||
json_payersign,
|
||||
"Sign {messagename} {fieldname} {merkle} (a 32-byte hex string) using public {tweak}",
|
||||
};
|
||||
AUTODATA(json_command, &payersign_command);
|
||||
|
||||
|
@ -590,8 +584,6 @@ static struct command_result *json_listinvoicerequests(struct command *cmd,
|
|||
static const struct json_command listinvoicerequests_command = {
|
||||
"listinvoicerequests",
|
||||
json_listinvoicerequests,
|
||||
"If {invreq_id} is set, show that."
|
||||
" Otherwise, if {showdisabled} is true, list all, otherwise just non-disabled ones."
|
||||
};
|
||||
AUTODATA(json_command, &listinvoicerequests_command);
|
||||
|
||||
|
@ -634,7 +626,6 @@ static struct command_result *json_disableinvoicerequest(struct command *cmd,
|
|||
static const struct json_command disableinvoicerequest_command = {
|
||||
"disableinvoicerequest",
|
||||
json_disableinvoicerequest,
|
||||
"Disable invoice_request {invreq_id}",
|
||||
};
|
||||
AUTODATA(json_command, &disableinvoicerequest_command);
|
||||
|
||||
|
|
|
@ -258,7 +258,6 @@ static struct command_result *json_injectonionmessage(struct command *cmd,
|
|||
static const struct json_command injectonionmessage_command = {
|
||||
"injectonionmessage",
|
||||
json_injectonionmessage,
|
||||
"Unwrap using {blinding}, encoded over {hops} (id, tlv)"
|
||||
};
|
||||
AUTODATA(json_command, &injectonionmessage_command);
|
||||
|
||||
|
@ -314,6 +313,5 @@ static struct command_result *json_decryptencrypteddata(struct command *cmd,
|
|||
static const struct json_command decryptencrypteddata_command = {
|
||||
"decryptencrypteddata",
|
||||
json_decryptencrypteddata,
|
||||
"Decrypt {encrypted_data} using {blinding}, return decryption and next blinding"
|
||||
};
|
||||
AUTODATA(json_command, &decryptencrypteddata_command);
|
||||
|
|
|
@ -1665,31 +1665,23 @@ static struct command_result *json_recoverchannel(struct command *cmd,
|
|||
static const struct json_command fundchannel_start_command = {
|
||||
"fundchannel_start",
|
||||
json_fundchannel_start,
|
||||
"Start fund channel with {id} using {amount} satoshis. "
|
||||
"Returns a bech32 address to use as an output for a funding transaction."
|
||||
};
|
||||
AUTODATA(json_command, &fundchannel_start_command);
|
||||
|
||||
static const struct json_command fundchannel_cancel_command = {
|
||||
"fundchannel_cancel",
|
||||
json_fundchannel_cancel,
|
||||
"Cancel inflight channel establishment with peer {id}."
|
||||
};
|
||||
AUTODATA(json_command, &fundchannel_cancel_command);
|
||||
|
||||
static const struct json_command fundchannel_complete_command = {
|
||||
"fundchannel_complete",
|
||||
json_fundchannel_complete,
|
||||
"Complete channel establishment with peer {id} for funding transaction"
|
||||
"with {psbt}. Returns true on success, false otherwise."
|
||||
};
|
||||
AUTODATA(json_command, &fundchannel_complete_command);
|
||||
|
||||
static const struct json_command json_commitchan_command = {
|
||||
"recoverchannel",
|
||||
json_recoverchannel,
|
||||
"Populate the DB with a channel and peer"
|
||||
"Used for recovering the channel using DLP."
|
||||
"This needs param in the form of an array [scb1,scb2,...]"
|
||||
};
|
||||
AUTODATA(json_command, &json_commitchan_command);
|
||||
|
|
|
@ -1342,7 +1342,6 @@ static struct command_result *json_sendonion(struct command *cmd,
|
|||
static const struct json_command sendonion_command = {
|
||||
"sendonion",
|
||||
json_sendonion,
|
||||
"Send a payment with a pre-computed onion."
|
||||
};
|
||||
AUTODATA(json_command, &sendonion_command);
|
||||
|
||||
|
@ -1598,7 +1597,6 @@ static struct command_result *json_sendpay(struct command *cmd,
|
|||
static const struct json_command sendpay_command = {
|
||||
"sendpay",
|
||||
json_sendpay,
|
||||
"Send along {route} in return for preimage of {payment_hash}"
|
||||
};
|
||||
AUTODATA(json_command, &sendpay_command);
|
||||
|
||||
|
@ -1643,8 +1641,6 @@ static struct command_result *json_waitsendpay(struct command *cmd,
|
|||
static const struct json_command waitsendpay_command = {
|
||||
"waitsendpay",
|
||||
json_waitsendpay,
|
||||
"Wait for payment attempt on {payment_hash} to succeed or fail, "
|
||||
"but only up to {timeout} seconds."
|
||||
};
|
||||
AUTODATA(json_command, &waitsendpay_command);
|
||||
|
||||
|
@ -1805,7 +1801,6 @@ static struct command_result *json_listsendpays(struct command *cmd,
|
|||
static const struct json_command listsendpays_command = {
|
||||
"listsendpays",
|
||||
json_listsendpays,
|
||||
"Show sendpay, old and current, optionally limiting to {bolt11} or {payment_hash}."
|
||||
};
|
||||
AUTODATA(json_command, &listsendpays_command);
|
||||
|
||||
|
@ -1908,7 +1903,6 @@ static struct command_result *json_delpay(struct command *cmd,
|
|||
static const struct json_command delpay_command = {
|
||||
"delpay",
|
||||
json_delpay,
|
||||
"Delete payment with {payment_hash} and {status}",
|
||||
};
|
||||
AUTODATA(json_command, &delpay_command);
|
||||
|
||||
|
@ -1974,6 +1968,5 @@ static struct command_result *json_createonion(struct command *cmd,
|
|||
static const struct json_command createonion_command = {
|
||||
"createonion",
|
||||
json_createonion,
|
||||
"Create an onion going through the provided nodes, each with its own payload"
|
||||
};
|
||||
AUTODATA(json_command, &createonion_command);
|
||||
|
|
|
@ -2305,7 +2305,6 @@ static struct command_result *json_listpeers(struct command *cmd,
|
|||
static const struct json_command listpeers_command = {
|
||||
"listpeers",
|
||||
json_listpeers,
|
||||
"Show current peers, if {level} is set, include logs for {id}"
|
||||
};
|
||||
/* Comment added to satisfice AUTODATA */
|
||||
AUTODATA(json_command, &listpeers_command);
|
||||
|
@ -2358,7 +2357,6 @@ static struct command_result *json_staticbackup(struct command *cmd,
|
|||
static const struct json_command staticbackup_command = {
|
||||
"staticbackup",
|
||||
json_staticbackup,
|
||||
"Returns SCB of all the channels currently present in the DB"
|
||||
};
|
||||
/* Comment added to satisfice AUTODATA */
|
||||
AUTODATA(json_command, &staticbackup_command);
|
||||
|
@ -2418,7 +2416,6 @@ static struct command_result *json_listpeerchannels(struct command *cmd,
|
|||
static const struct json_command listpeerchannels_command = {
|
||||
"listpeerchannels",
|
||||
json_listpeerchannels,
|
||||
"Show channels with direct peers."
|
||||
};
|
||||
AUTODATA(json_command, &listpeerchannels_command);
|
||||
|
||||
|
@ -2658,7 +2655,6 @@ static struct command_result *json_disconnect(struct command *cmd,
|
|||
static const struct json_command disconnect_command = {
|
||||
"disconnect",
|
||||
json_disconnect,
|
||||
"Disconnect from {id} that has previously been connected to using connect; with {force} set, even if it has a current channel"
|
||||
};
|
||||
AUTODATA(json_command, &disconnect_command);
|
||||
|
||||
|
@ -2796,7 +2792,6 @@ static struct command_result *json_getinfo(struct command *cmd,
|
|||
static const struct json_command getinfo_command = {
|
||||
"getinfo",
|
||||
json_getinfo,
|
||||
"Show information about this node"
|
||||
};
|
||||
AUTODATA(json_command, &getinfo_command);
|
||||
|
||||
|
@ -2900,8 +2895,6 @@ static struct command_result *json_waitblockheight(struct command *cmd,
|
|||
static const struct json_command waitblockheight_command = {
|
||||
"waitblockheight",
|
||||
&json_waitblockheight,
|
||||
"Wait for the blockchain to reach {blockheight}, up to "
|
||||
"{timeout} seconds."
|
||||
};
|
||||
AUTODATA(json_command, &waitblockheight_command);
|
||||
|
||||
|
@ -3167,11 +3160,6 @@ static struct command_result *json_setchannel(struct command *cmd,
|
|||
static const struct json_command setchannel_command = {
|
||||
"setchannel",
|
||||
json_setchannel,
|
||||
"Sets fees and/or htlc_max for channel with {id} "
|
||||
"(either peer ID, channel ID, short channel ID or 'all'). "
|
||||
"If {feebase}, {feeppm} or {htlcmax} is missing, it is unchanged."
|
||||
"{base} can also be defined in other units, for example '1sat'. "
|
||||
"If {id} is 'all', the fees will be applied for all channels. "
|
||||
};
|
||||
AUTODATA(json_command, &setchannel_command);
|
||||
|
||||
|
@ -3246,7 +3234,6 @@ static struct command_result *json_sign_last_tx(struct command *cmd,
|
|||
static const struct json_command dev_sign_last_tx = {
|
||||
"dev-sign-last-tx",
|
||||
json_sign_last_tx,
|
||||
"Sign and show the last commitment transaction with peer {id}",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_sign_last_tx);
|
||||
|
@ -3272,7 +3259,6 @@ static struct command_result *json_dev_fail(struct command *cmd,
|
|||
static const struct json_command dev_fail_command = {
|
||||
"dev-fail",
|
||||
json_dev_fail,
|
||||
"Fail with peer {id}",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_fail_command);
|
||||
|
@ -3320,7 +3306,6 @@ static struct command_result *json_dev_reenable_commit(struct command *cmd,
|
|||
static const struct json_command dev_reenable_commit = {
|
||||
"dev-reenable-commit",
|
||||
json_dev_reenable_commit,
|
||||
"Re-enable the commit timer on peer {id}",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_reenable_commit);
|
||||
|
@ -3434,7 +3419,6 @@ static struct command_result *json_dev_forget_channel(struct command *cmd,
|
|||
static const struct json_command dev_forget_channel_command = {
|
||||
"dev-forget-channel",
|
||||
json_dev_forget_channel,
|
||||
"Forget the channel with peer {id}, ignore UTXO check with {force}='true'.",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_forget_channel_command);
|
||||
|
|
|
@ -2924,7 +2924,6 @@ static struct command_result *json_dev_ignore_htlcs(struct command *cmd,
|
|||
static const struct json_command dev_ignore_htlcs = {
|
||||
"dev-ignore-htlcs",
|
||||
json_dev_ignore_htlcs,
|
||||
"Set ignoring incoming HTLCs for peer {id} to {ignore}",
|
||||
.dev_only = true,
|
||||
};
|
||||
|
||||
|
@ -3005,6 +3004,5 @@ static struct command_result *json_listhtlcs(struct command *cmd,
|
|||
static const struct json_command listhtlcs_command = {
|
||||
"listhtlcs",
|
||||
json_listhtlcs,
|
||||
"List all known HTLCS (optionally, just for [id] (scid or channel id))"
|
||||
};
|
||||
AUTODATA(json_command, &listhtlcs_command);
|
||||
|
|
|
@ -92,6 +92,5 @@ static struct command_result *json_ping(struct command *cmd,
|
|||
static const struct json_command ping_command = {
|
||||
"ping",
|
||||
json_ping,
|
||||
"Send peer {id} a ping of length {len} (default 128) asking for {pongbytes} (default 128)"
|
||||
};
|
||||
AUTODATA(json_command, &ping_command);
|
||||
|
|
|
@ -1389,12 +1389,11 @@ static const char *plugin_rpcmethod_add(struct plugin *plugin,
|
|||
const char *buffer,
|
||||
const jsmntok_t *meth)
|
||||
{
|
||||
const jsmntok_t *nametok, *desctok, *usagetok, *deprtok;
|
||||
const jsmntok_t *nametok, *usagetok, *deprtok;
|
||||
struct json_command *cmd;
|
||||
const char *usage, *err;
|
||||
|
||||
nametok = json_get_member(buffer, meth, "name");
|
||||
desctok = json_get_member(buffer, meth, "description");
|
||||
usagetok = json_get_member(buffer, meth, "usage");
|
||||
deprtok = json_get_member(buffer, meth, "deprecated");
|
||||
|
||||
|
@ -1404,13 +1403,6 @@ static const char *plugin_rpcmethod_add(struct plugin *plugin,
|
|||
meth->end - meth->start, buffer + meth->start);
|
||||
}
|
||||
|
||||
if (!desctok || desctok->type != JSMN_STRING) {
|
||||
return tal_fmt(plugin,
|
||||
"rpcmethod does not have a string "
|
||||
"\"description\": %.*s",
|
||||
meth->end - meth->start, buffer + meth->start);
|
||||
}
|
||||
|
||||
if (usagetok && usagetok->type != JSMN_STRING) {
|
||||
return tal_fmt(plugin,
|
||||
"\"usage\" is not a string: %.*s",
|
||||
|
@ -1419,7 +1411,6 @@ static const char *plugin_rpcmethod_add(struct plugin *plugin,
|
|||
|
||||
cmd = notleak(tal(plugin, struct json_command));
|
||||
cmd->name = json_strdup(cmd, buffer, nametok);
|
||||
cmd->description = json_strdup(cmd, buffer, desctok);
|
||||
if (usagetok)
|
||||
usage = json_strdup(tmpctx, buffer, usagetok);
|
||||
else
|
||||
|
|
|
@ -309,6 +309,5 @@ static struct command_result *json_plugin_control(struct command *cmd,
|
|||
static const struct json_command plugin_control_command = {
|
||||
"plugin",
|
||||
json_plugin_control,
|
||||
"Control plugins (start, stop, startdir, rescan, list)",
|
||||
};
|
||||
AUTODATA(json_command, &plugin_control_command);
|
||||
|
|
|
@ -408,7 +408,6 @@ static struct command_result *json_showrunes(struct command *cmd,
|
|||
static const struct json_command showrunes_command = {
|
||||
"showrunes",
|
||||
json_showrunes,
|
||||
"Show the list of runes or decode an optional {rune}."
|
||||
};
|
||||
AUTODATA(json_command, &showrunes_command);
|
||||
|
||||
|
@ -587,14 +586,12 @@ static struct command_result *json_createrune(struct command *cmd,
|
|||
static const struct json_command creatrune_command = {
|
||||
"createrune",
|
||||
json_createrune,
|
||||
"Create or restrict an optional {rune} with optional {restrictions} and returns {rune}"
|
||||
};
|
||||
AUTODATA(json_command, &creatrune_command);
|
||||
|
||||
static const struct json_command invokerune_command = {
|
||||
"invokerune",
|
||||
json_createrune,
|
||||
"Invoke or restrict an optional {rune} with optional {restrictions} and returns {rune}"
|
||||
};
|
||||
AUTODATA(json_command, &invokerune_command);
|
||||
|
||||
|
@ -698,14 +695,12 @@ static struct command_result *json_blacklistrune(struct command *cmd,
|
|||
static const struct json_command blacklistrune_command = {
|
||||
"blacklistrune",
|
||||
json_blacklistrune,
|
||||
"Blacklist a rune or range of runes by taking an optional {start} and an optional {end} and returns {blacklist} array containing {start}, {end}"
|
||||
};
|
||||
AUTODATA(json_command, &blacklistrune_command);
|
||||
|
||||
static const struct json_command destroyrune_command = {
|
||||
"destroyrune",
|
||||
json_blacklistrune,
|
||||
"Destroy a rune or range of runes by taking an optional {start} and an optional {end} and returns {blacklist} array containing {start}, {end}"
|
||||
};
|
||||
AUTODATA(json_command, &destroyrune_command);
|
||||
|
||||
|
@ -994,6 +989,5 @@ static struct command_result *json_checkrune(struct command *cmd,
|
|||
static const struct json_command checkrune_command = {
|
||||
"checkrune",
|
||||
json_checkrune,
|
||||
"Checks rune for validity with required {rune} and optional {nodeid}, {method}, {params} and returns {valid: true} or error message"
|
||||
};
|
||||
AUTODATA(json_command, &checkrune_command);
|
||||
|
|
|
@ -112,7 +112,6 @@ static struct command_result *json_signmessage(struct command *cmd,
|
|||
static const struct json_command json_signmessage_cmd = {
|
||||
"signmessage",
|
||||
json_signmessage,
|
||||
"Create a digital signature of {message}",
|
||||
};
|
||||
AUTODATA(json_command, &json_signmessage_cmd);
|
||||
|
||||
|
@ -242,6 +241,5 @@ static struct command_result *json_checkmessage(struct command *cmd,
|
|||
static const struct json_command json_checkmessage_cmd = {
|
||||
"checkmessage",
|
||||
json_checkmessage,
|
||||
"Verify a digital signature {zbase} of {message} signed with {pubkey}",
|
||||
};
|
||||
AUTODATA(json_command, &json_checkmessage_cmd);
|
||||
|
|
|
@ -214,6 +214,5 @@ static struct command_result *json_wait(struct command *cmd,
|
|||
static const struct json_command wait_command = {
|
||||
"wait",
|
||||
json_wait,
|
||||
"Wait for {subsystem} {indexname} to reach or exceed {value})"
|
||||
};
|
||||
AUTODATA(json_command, &wait_command);
|
||||
|
|
|
@ -104,10 +104,8 @@ def verify_rune(plugin, rune, rpc_method, rpc_params):
|
|||
def process_help_response(help_response):
|
||||
# Use json5.loads due to single quotes in response
|
||||
processed_res = json5.loads(str(help_response))["help"]
|
||||
line = "\n---------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n"
|
||||
processed_html_res = ""
|
||||
line = "\n\n---------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n"
|
||||
processed_html_res = "\n"
|
||||
for row in processed_res:
|
||||
processed_html_res += f"Command: {row['command']}\n"
|
||||
processed_html_res += f"Description: {row['description']}\n"
|
||||
processed_html_res += line
|
||||
processed_html_res += row['command'] + line
|
||||
return processed_html_res
|
||||
|
|
|
@ -48,8 +48,7 @@ def test_plugin_start(node_factory):
|
|||
assert l1.rpc.help("testmethod") == {
|
||||
'help': [
|
||||
{
|
||||
'command': 'testmethod ',
|
||||
'description': 'This is a test'
|
||||
'command': 'testmethod '
|
||||
}
|
||||
],
|
||||
'format-hint': 'simple'
|
||||
|
|
|
@ -149,7 +149,7 @@ def test_clnrest_list_methods(node_factory):
|
|||
http_session = http_session_with_retry()
|
||||
response = http_session.get(base_url + '/v1/list-methods', verify=ca_cert)
|
||||
assert response.status_code == 200
|
||||
assert response.text.find('Command: getinfo') > 0
|
||||
assert response.text.find('getinfo') > 0
|
||||
|
||||
|
||||
def test_clnrest_unknown_method(node_factory):
|
||||
|
|
|
@ -974,7 +974,7 @@ def test_cli(node_factory):
|
|||
.format(l1.daemon.lightning_dir),
|
||||
'help']).decode('utf-8')
|
||||
# Test some known output.
|
||||
assert 'help [command]\n List available commands, or give verbose help on one {command}' in out
|
||||
assert 'addgossip message\n\naddpsbtoutput' in out
|
||||
|
||||
# Check JSON id is as expected
|
||||
l1.daemon.wait_for_log(r'jsonrpc#[0-9]*: "cli:help#[0-9]*"\[IN\]')
|
||||
|
@ -988,7 +988,6 @@ def test_cli(node_factory):
|
|||
'help']).decode('utf-8')
|
||||
j, _ = json.JSONDecoder().raw_decode(out)
|
||||
assert j['help'][0]['command'] is not None
|
||||
assert j['help'][0]['description'] is not None
|
||||
|
||||
# Test keyword input (autodetect)
|
||||
out = subprocess.check_output(['cli/lightning-cli',
|
||||
|
@ -1179,7 +1178,7 @@ def test_cli_commando(node_factory):
|
|||
.format(l1.daemon.lightning_dir),
|
||||
'help']).decode('utf-8')
|
||||
# Test some known output.
|
||||
assert 'help [command]\n List available commands, or give verbose help on one {command}' in out
|
||||
assert 'addgossip message\n\naddpsbtoutput' in out
|
||||
|
||||
# Check JSON id is as expected
|
||||
l1.daemon.wait_for_log(r'jsonrpc#[0-9]*: "cli:help#[0-9]*"\[IN\]')
|
||||
|
@ -1286,7 +1285,7 @@ def test_daemon_option(node_factory):
|
|||
'--lightning-dir={}'
|
||||
.format(l1.daemon.lightning_dir),
|
||||
'help']).decode('utf-8')
|
||||
assert 'help [command]\n List available commands, or give verbose help on one {command}' in out
|
||||
assert 'addgossip message\n\naddpsbtoutput' in out
|
||||
|
||||
subprocess.run(['cli/lightning-cli',
|
||||
'--network={}'.format(TEST_NETWORK),
|
||||
|
|
|
@ -137,7 +137,6 @@ static struct command_result *json_reserveinputs(struct command *cmd,
|
|||
static const struct json_command reserveinputs_command = {
|
||||
"reserveinputs",
|
||||
json_reserveinputs,
|
||||
"Reserve utxos (or increase their reservation)",
|
||||
false
|
||||
};
|
||||
AUTODATA(json_command, &reserveinputs_command);
|
||||
|
@ -220,7 +219,6 @@ static struct command_result *json_unreserveinputs(struct command *cmd,
|
|||
static const struct json_command unreserveinputs_command = {
|
||||
"unreserveinputs",
|
||||
json_unreserveinputs,
|
||||
"Unreserve utxos (or at least, reduce their reservation)",
|
||||
false
|
||||
};
|
||||
AUTODATA(json_command, &unreserveinputs_command);
|
||||
|
@ -641,7 +639,6 @@ static struct command_result *json_fundpsbt(struct command *cmd,
|
|||
static const struct json_command fundpsbt_command = {
|
||||
"fundpsbt",
|
||||
json_fundpsbt,
|
||||
"Create PSBT using enough utxos to allow an output of {satoshi} at {feerate}",
|
||||
false
|
||||
};
|
||||
AUTODATA(json_command, &fundpsbt_command);
|
||||
|
@ -734,7 +731,6 @@ static struct command_result *json_addpsbtoutput(struct command *cmd,
|
|||
static const struct json_command addpsbtoutput_command = {
|
||||
"addpsbtoutput",
|
||||
json_addpsbtoutput,
|
||||
"Create a PSBT (or modify existing {initialpsbt}) with an output receiving {satoshi} amount.",
|
||||
false
|
||||
};
|
||||
AUTODATA(json_command, &addpsbtoutput_command);
|
||||
|
@ -911,7 +907,6 @@ static struct command_result *json_utxopsbt(struct command *cmd,
|
|||
static const struct json_command utxopsbt_command = {
|
||||
"utxopsbt",
|
||||
json_utxopsbt,
|
||||
"Create PSBT using these utxos",
|
||||
false
|
||||
};
|
||||
AUTODATA(json_command, &utxopsbt_command);
|
||||
|
|
|
@ -174,7 +174,6 @@ static struct command_result *json_newaddr(struct command *cmd,
|
|||
static const struct json_command newaddr_command = {
|
||||
"newaddr",
|
||||
json_newaddr,
|
||||
"Get a new {bech32} (or all) address to fund a channel",
|
||||
};
|
||||
AUTODATA(json_command, &newaddr_command);
|
||||
|
||||
|
@ -244,7 +243,6 @@ static struct command_result *json_listaddrs(struct command *cmd,
|
|||
static const struct json_command listaddrs_command = {
|
||||
"dev-listaddrs",
|
||||
json_listaddrs,
|
||||
"Show addresses list up to derivation {index} (default is the last bip32 index)",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &listaddrs_command);
|
||||
|
@ -389,7 +387,6 @@ static struct command_result *json_listfunds(struct command *cmd,
|
|||
static const struct json_command listfunds_command = {
|
||||
"listfunds",
|
||||
json_listfunds,
|
||||
"Show available funds from the internal wallet",
|
||||
};
|
||||
AUTODATA(json_command, &listfunds_command);
|
||||
|
||||
|
@ -462,7 +459,6 @@ static struct command_result *json_dev_rescan_outputs(struct command *cmd,
|
|||
static const struct json_command dev_rescan_output_command = {
|
||||
"dev-rescan-outputs",
|
||||
json_dev_rescan_outputs,
|
||||
"Synchronize the state of our funds with bitcoind",
|
||||
.dev_only = true,
|
||||
};
|
||||
AUTODATA(json_command, &dev_rescan_output_command);
|
||||
|
@ -562,7 +558,6 @@ static struct command_result *json_listtransactions(struct command *cmd,
|
|||
static const struct json_command listtransactions_command = {
|
||||
"listtransactions",
|
||||
json_listtransactions,
|
||||
"List transactions that we stored in the wallet",
|
||||
};
|
||||
AUTODATA(json_command, &listtransactions_command);
|
||||
|
||||
|
@ -782,7 +777,6 @@ static struct command_result *json_signpsbt(struct command *cmd,
|
|||
static const struct json_command signpsbt_command = {
|
||||
"signpsbt",
|
||||
json_signpsbt,
|
||||
"Sign this wallet's inputs on a provided PSBT.",
|
||||
false
|
||||
};
|
||||
|
||||
|
@ -819,7 +813,6 @@ static struct command_result *json_setpsbtversion(struct command *cmd,
|
|||
static const struct json_command setpsbtversion_command = {
|
||||
"setpsbtversion",
|
||||
json_setpsbtversion,
|
||||
"Convert a given PSBT to the {version} requested (v0 or v2)",
|
||||
false
|
||||
};
|
||||
|
||||
|
@ -980,7 +973,6 @@ static struct command_result *json_sendpsbt(struct command *cmd,
|
|||
static const struct json_command sendpsbt_command = {
|
||||
"sendpsbt",
|
||||
json_sendpsbt,
|
||||
"Finalize, extract and send a PSBT.",
|
||||
false
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue