.TH "LIGHTNING-DATASTORE" "7" "" "" "lightning-datastore" .SH NAME lightning-datastore - Command for storing (plugin) data .SH SYNOPSIS \fBdatastore\fR \fIkey\fR [\fIstring\fR|\fIhex\fR] .SH DESCRIPTION The \fBdatastore\fR RPC command allows plugins to store data in the c-lightning database, for later retrieval\. There can only be one entry for each \fIkey\fR, so prefixing with the plugin name (e\.g\. \fBsummary.\fR) is recommended\. .SH RETURN VALUE On success, an object is returned, containing: .RS .IP \[bu] \fBkey\fR (string): The key which has been added to the datastore .IP \[bu] \fBhex\fR (hex): The hex data which has been added to the datastore .IP \[bu] \fBstring\fR (string, optional): The data as a string, if it's valid utf-8 .RE The main cause of failure is an already-existing entry\. The following error codes may occur: .RS .IP \[bu] -32602: invalid parameters, including already-existing key\. .RE .SH AUTHOR Rusty Russell \fI is mainly responsible\. .SH SEE ALSO \fBlightning-listdatastore\fR(7), \fBlightning-deldatastore\fR(7) .SH RESOURCES Main web site: \fIhttps://github.com/ElementsProject/lightning\fR \" SHA256STAMP:e0ea91fb846859bc22af6e4beacd5fb726d6c4ffefea5cc4e3a1250b81665317