mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
plugin: Removing category
, description
and long_description
from plugin_command struct
Changelog-None.
This commit is contained in:
parent
b485a026f7
commit
2ff3e55f08
@ -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,
|
||||
},
|
||||
};
|
||||
|
@ -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
|
||||
},
|
||||
};
|
||||
|
@ -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
|
||||
},
|
||||
};
|
||||
|
@ -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,
|
||||
},
|
||||
};
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
},
|
||||
};
|
||||
|
@ -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
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
},
|
||||
|
@ -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
|
||||
},
|
||||
};
|
||||
|
@ -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
|
||||
},
|
||||
};
|
||||
|
@ -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
|
||||
}
|
||||
};
|
||||
|
@ -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
|
||||
}
|
||||
};
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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,
|
||||
},
|
||||
};
|
||||
|
@ -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,
|
||||
},
|
||||
};
|
||||
|
@ -633,37 +633,22 @@ static struct command_result *json_upgradewallet(struct command *cmd,
|
||||
static const struct plugin_command commands[] = {
|
||||
{
|
||||
"txprepare",
|
||||
"bitcoin",
|
||||
"Create a transaction, with option to spend in future (either txsend and txdiscard)",
|
||||
"Create an unsigned transaction paying {outputs} with optional {feerate}, {minconf} and {utxos}",
|
||||
json_txprepare
|
||||
},
|
||||
{
|
||||
"txdiscard",
|
||||
"bitcoin",
|
||||
"Discard a transaction created by txprepare",
|
||||
"Discard a transcation by {txid}",
|
||||
json_txdiscard
|
||||
},
|
||||
{
|
||||
"txsend",
|
||||
"bitcoin",
|
||||
"Send a transaction created by txprepare",
|
||||
"Send a transacation by {txid}",
|
||||
json_txsend
|
||||
},
|
||||
{
|
||||
"withdraw",
|
||||
"bitcoin",
|
||||
"Send funds to {destination} address",
|
||||
"Send to {destination} {satoshi} (or 'all') at optional {feerate} using utxos from {minconf} or {utxos}.",
|
||||
json_withdraw
|
||||
},
|
||||
{
|
||||
"upgradewallet",
|
||||
"bitcoin",
|
||||
"Spend p2sh wrapped outputs into a native segwit output",
|
||||
"Send all p2sh-wrapped outputs to a bech32 native segwit address",
|
||||
json_upgradewallet
|
||||
},
|
||||
};
|
||||
|
@ -233,34 +233,20 @@ static const char *init(struct plugin *p,
|
||||
|
||||
static const struct plugin_command commands[] = { {
|
||||
"helloworld",
|
||||
"utils",
|
||||
"Say hello to the world.",
|
||||
"Returns 'hello world' by default, 'hello {name}' if the name"
|
||||
" option was set, and 'hello {name}' if the name parameter "
|
||||
"was passed (takes over the option)",
|
||||
json_helloworld,
|
||||
},
|
||||
{
|
||||
"testrpc",
|
||||
"utils",
|
||||
"Makes a simple getinfo call, to test rpc socket.",
|
||||
"",
|
||||
json_testrpc,
|
||||
},
|
||||
{
|
||||
"testrpc-deprecated",
|
||||
"utils",
|
||||
"Makes a simple getinfo call, to test rpc socket.",
|
||||
"",
|
||||
json_testrpc,
|
||||
"v0.9.1",
|
||||
CLN_NEXT_VERSION,
|
||||
},
|
||||
{
|
||||
"checkthis",
|
||||
"utils",
|
||||
"Passes arg to listdatastore",
|
||||
"",
|
||||
json_checkthis,
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user