|
NAMElightning-datastore - Command for storing (plugin) dataSYNOPSISdatastore key [string] [hex] [mode] [generation]DESCRIPTIONThe datastore RPC command allows plugins to store data in the c-lightning database, for later retrieval.key is an array of values (though a single value is treated as a one-element array), to form a heirarchy. Using the first element of the key as the plugin name (e.g. [ "summary" ]) is recommended. A key can either have children or a value, never both: parents are created and removed automatically. mode is one of "must-create" (default, fails it it already exists), "must-replace" (fails it it doesn't already exist), "create-or-replace" (never fails), "must-append" (must already exist, append this to what's already there) or "create-or-append" (append if anything is there, otherwise create). generation, if specified, means that the update will fail if the previously-existing data is not exactly that generation. This allows for simple atomicity. This is only legal with mode "must-replace" or "must-append". RETURN VALUEOn success, an object is returned, containing:
The following error codes may occur:
AUTHORRusty Russell <rusty@rustcorp.com.au> is mainly responsible.SEE ALSOlightning-listdatastore(7), lightning-deldatastore(7)RESOURCESMain web site: https://github.com/ElementsProject/lightning Visit the GSP FreeBSD Man Page Interface. |