Skip to content

Commit

Permalink
plugin: Removing category, description and long_description fro…
Browse files Browse the repository at this point in the history
…m plugin_command struct

Changelog-None.
  • Loading branch information
ShahanaFarooqui authored and rustyrussell committed Jul 31, 2024
1 parent b485a02 commit 2ff3e55
Show file tree
Hide file tree
Showing 19 changed files with 5 additions and 190 deletions.
6 changes: 0 additions & 6 deletions plugins/autoclean.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,15 +793,9 @@ static bool u64_jsonfmt_unless_zero(struct plugin *plugin,

static const struct plugin_command commands[] = { {
"autoclean-status",
"utility",
"Show status of autocleaning",
"Takes optional {subsystem}",
json_autoclean_status,
}, {
"autoclean-once",
"utility",
"Perform a single run of autocleaning on one subsystem",
"Requires {subsystem} and {age}",
json_autoclean_once,
},
};
Expand Down
17 changes: 0 additions & 17 deletions plugins/bcli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1119,39 +1119,22 @@ static const char *init(struct plugin *p, const char *buffer UNUSED,
static const struct plugin_command commands[] = {
{
"getrawblockbyheight",
"bitcoin",
"Get the bitcoin block at a given height",
"",
getrawblockbyheight
},
{
"getchaininfo",
"bitcoin",
"Get the chain id, the header count, the block count,"
" and whether this is IBD.",
"",
getchaininfo
},
{
"estimatefees",
"bitcoin",
"Get the urgent, normal and slow Bitcoin feerates as"
" sat/kVB.",
"",
estimatefees
},
{
"sendrawtransaction",
"bitcoin",
"Send a raw transaction to the Bitcoin network.",
"",
sendrawtransaction
},
{
"getutxout",
"bitcoin",
"Get information about an output, identified by a {txid} an a {vout}",
"",
getutxout
},
};
Expand Down
22 changes: 0 additions & 22 deletions plugins/bkpr/bookkeeper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1752,48 +1752,26 @@ const struct plugin_notification notifs[] = {
static const struct plugin_command commands[] = {
{
"bkpr-listbalances",
"bookkeeping",
"List current account balances",
"List of current accounts and their balances",
json_list_balances
},
{
"bkpr-listaccountevents",
"bookkeeping",
"List all events for an {account}",
"List all events for an {account} (or all accounts, if"
" no account specified) in {format}. Sorted by timestamp",
json_list_account_events
},
{
"bkpr-inspect",
"utilities",
"See the current on-chain graph of an {account}",
"Prints out the on-chain footprint of a given {account}.",
json_inspect
},
{
"bkpr-listincome",
"bookkeeping",
"List all income impacting events",
"List all events for this node that impacted income",
json_list_income
},
{
"bkpr-dumpincomecsv",
"bookkeeping",
"Print out all the income events to a csv file in "
" {csv_format",
"Dump income statment data to {csv_file} in {csv_format}."
" Optionally, {consolidate_fee}s into single entries"
" (default: true)",
json_dump_income
},
{
"bkpr-channelsapy",
"bookkeeping",
"Stats on channel fund usage",
"Print out stats on chanenl fund usage",
json_channel_apy
},
};
Expand Down
8 changes: 0 additions & 8 deletions plugins/chanbackup.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,18 +815,10 @@ static const struct plugin_hook hooks[] = {
static const struct plugin_command commands[] = {
{
"emergencyrecover",
"recovery",
"Populates the DB with stub channels",
"returns stub channel-id's on completion",
json_emergencyrecover,
},
{
"restorefrompeer",
"recovery",
"Checks if i have got a backup from a peer, and if so, will stub "
"those channels in the database and if is successful, will return "
"list of channels that have been successfully stubbed",
"return channel-id's on completion",
json_restorefrompeer,
},
};
Expand Down
12 changes: 0 additions & 12 deletions plugins/commando.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,33 +801,21 @@ static const char *init(struct plugin *p,

static const struct plugin_command commands[] = { {
"commando",
"utility",
"Send a commando message to a direct peer, wait for response",
"Sends {peer_id} {method} with optional {params} and {rune}",
json_commando,
}, {
"commando-rune",
"utility",
"Create or restrict a rune",
"Takes an optional {rune} with optional {restrictions} and returns {rune}",
json_commando_rune,
"v23.08",
"v25.02",
},
{
"commando-listrunes",
"utility",
"List runes we have created earlier",
"Takes an optional {rune} and returns list of {rune}",
json_commando_listrunes,
"v23.08",
"v25.02",
},
{
"commando-blacklist",
"utility",
"Blacklist a rune or range of runes by unique id",
"Takes an optional {start} and an optional {end} and returns {blacklist} array containing {start}, {end}",
json_commando_blacklist,
"v23.08",
"v25.02",
Expand Down
5 changes: 0 additions & 5 deletions plugins/funder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1432,11 +1432,6 @@ json_funderupdate(struct command *cmd,
static const struct plugin_command commands[] = {
{
"funderupdate",
"liquidity",
"Configuration for dual-funding settings.",
"Update current settings. Modifies how node reacts to"
" incoming channel open requests. Responds with list"
" of current configs.",
json_funderupdate
},
};
Expand Down
5 changes: 1 addition & 4 deletions plugins/keysend.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,7 @@ static struct command_result *json_keysend(struct command *cmd, const char *buf,
static const struct plugin_command commands[] = {
{
"keysend",
"payment",
"Send a payment without an invoice to a node",
"Send an unsolicited payment of {amount} to {destination}, by providing the recipient the necessary information to claim the payment",
json_keysend
json_keysend
},
};

Expand Down
4 changes: 0 additions & 4 deletions plugins/libplugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,10 +1088,6 @@ handle_getmanifest(struct command *getmanifest_cmd,
json_add_string(params, "name", p->commands[i].name);
json_add_string(params, "usage",
strmap_get(&p->usagemap, p->commands[i].name));
json_add_string(params, "description", p->commands[i].description);
if (p->commands[i].long_description)
json_add_string(params, "long_description",
p->commands[i].long_description);
json_add_deprecated(params, "deprecated",
p->commands[i].depr_start, p->commands[i].depr_end);
json_object_end(params);
Expand Down
3 changes: 0 additions & 3 deletions plugins/libplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ struct command {
/* Create an array of these, one for each command you support. */
struct plugin_command {
const char *name;
const char *category;
const char *description;
const char *long_description;
struct command_result *(*handle)(struct command *cmd,
const char *buf,
const jsmntok_t *params);
Expand Down
22 changes: 2 additions & 20 deletions plugins/offers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1396,44 +1396,26 @@ static const char *init(struct plugin *p,
static const struct plugin_command commands[] = {
{
"offer",
"payment",
"Create an offer to accept money",
"Create an offer for invoices of {amount} with {description}, optional {issuer}, internal {label}, {quantity_min}, {quantity_max}, {absolute_expiry}, {recurrence}, {recurrence_base}, {recurrence_paywindow}, {recurrence_limit} and {single_use}",
json_offer
json_offer
},
{
"invoicerequest",
"payment",
"Create an invoice_request to send money",
"Create an invoice_request to pay invoices of {amount} with {description}, optional {issuer}, internal {label}, and {absolute_expiry}",
json_invoicerequest
json_invoicerequest
},
{
"decode",
"utility",
"Decode {string} message, returning {type} and information.",
NULL,
json_decode,
},
{
"fetchinvoice",
"payment",
"Request remote node for an invoice for this {offer}, with {amount}, {quanitity}, {recurrence_counter}, {recurrence_start} and {recurrence_label} iff required.",
NULL,
json_fetchinvoice,
},
{
"sendinvoice",
"payment",
"Request remote node for to pay this {invreq}, with {label}, optional {amount_msat}, and {timeout} (default 90 seconds).",
NULL,
json_sendinvoice,
},
{
"dev-rawrequest",
"util",
"Send {invreq} to {nodeid}, wait {timeout} (60 seconds by default)",
NULL,
json_dev_rawrequest,
.dev_only = true,
},
Expand Down
9 changes: 0 additions & 9 deletions plugins/pay.c
Original file line number Diff line number Diff line change
Expand Up @@ -1508,22 +1508,13 @@ static struct command_result *json_pay(struct command *cmd,
static const struct plugin_command commands[] = {
{
"paystatus",
"payment",
"Detail status of attempts to pay {bolt11}, or all",
"Covers both old payments and current ones.",
json_paystatus
}, {
"listpays",
"payment",
"List result of payment {bolt11} or {payment_hash}, or all",
"Covers old payments (failed and succeeded) and current ones.",
json_listpays
},
{
"pay",
"payment",
"Send payment specified by {bolt11}",
"Attempt to pay the {bolt11} invoice.",
json_pay
},
};
Expand Down
6 changes: 0 additions & 6 deletions plugins/renepay/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,16 +382,10 @@ static struct command_result *json_pay(struct command *cmd, const char *buf,
static const struct plugin_command commands[] = {
{
"renepaystatus",
"payment",
"Detail status of attempts to pay {bolt11}, or all",
"Covers both old payments and current ones.",
json_paystatus
},
{
"renepay",
"payment",
"Send payment specified by {invstring}",
"Attempt to pay an invoice.",
json_pay
},
};
Expand Down
6 changes: 0 additions & 6 deletions plugins/spender/fundchannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ json_fundchannel(struct command *cmd,

const struct plugin_command fundchannel_commands[] = { {
"fundchannel",
"channels",
"Fund channel with {id} using {amount} (or 'all'), at optional {feerate}. "
"Only use outputs that have {minconf} confirmations.",
"Initiaties a channel open with node 'id'. Must "
"be connected to the node and have enough funds available at the requested minimum confirmation "
"depth (minconf)",
json_fundchannel
}
};
Expand Down
9 changes: 0 additions & 9 deletions plugins/spender/multifundchannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2018,15 +2018,6 @@ json_multifundchannel(struct command *cmd,
const struct plugin_command multifundchannel_commands[] = {
{
"multifundchannel",
"channels",
"Fund channels to {destinations}, which is an array of "
"objects containing peer {id}, {amount}, and optional "
"{announce} and {push_msat}. "
"A single transaction will be used to fund all the "
"channels. "
"Use {feerate} for the transaction, select outputs that are "
"buried {minconf} blocks deep, or specify a set of {utxos}.",
"Fund multiple channels at once.",
json_multifundchannel
}
};
Expand Down
4 changes: 0 additions & 4 deletions plugins/spender/multiwithdraw.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ json_multiwithdraw(struct command *cmd,
const struct plugin_command multiwithdraw_commands[] = {
{
"multiwithdraw",
"bitcoin",
"Send to multiple {outputs} via a single Bitcoin transaction.",
"Send to multiple {outputs} at optiona {feerate}, spending "
"coins at least {minconf} depth, or the specified {utxos}.",
&json_multiwithdraw,
false
}
Expand Down
10 changes: 2 additions & 8 deletions plugins/sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -1545,17 +1545,11 @@ static const char *init(struct plugin *plugin,
}

static const struct plugin_command commands[] = { {
"sql",
"misc",
"Run {query} and return result",
"This is the greatest plugin command ever!",
json_sql,
"sql",
json_sql,
},
{
"listsqlschemas",
"misc",
"Display schemas for internal sql tables, or just {table}",
"This is the greatest plugin command ever!",
json_listsqlschemas,
},
};
Expand Down
18 changes: 0 additions & 18 deletions plugins/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,36 +728,18 @@ static const char *init(struct plugin *p,
static const struct plugin_command commands[] = {
{
"getroute",
"channels",
"Primitive route command",
"Show route to {id} for {msatoshi}, using {riskfactor} and optional {cltv} (default 9). "
"If specified search from {fromid} otherwise use this node as source. "
"Randomize the route with up to {fuzzpercent} (ignored)). "
"{exclude} an array of short-channel-id/direction (e.g. [ '564334x877x1/0', '564195x1292x0/1' ]) "
"or node-id from consideration. "
"Set the {maxhops} the route can take (default 20).",
json_getroute,
},
{
"listchannels",
"channels",
"List all known channels in the network",
"Show channels for {short_channel_id}, {source} or {destination} "
"(or all known channels, if not specified)",
json_listchannels,
},
{
"listnodes",
"network",
"List all known nodes in the network",
"Show node {id} (or all known nods, if not specified)",
json_listnodes,
},
{
"listincoming",
"network",
"List the channels incoming from our direct peers",
"Used by invoice code to select peers for routehints",
json_listincoming,
},
};
Expand Down
Loading

0 comments on commit 2ff3e55

Please sign in to comment.