GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
LIGHTNING-DELDATASTORE(7) LIGHTNING-DELDATASTORE(7)

lightning-deldatastore -- Command for removing (plugin) data

deldatastore key [generation]

The deldatastore RPC command allows plugins to delete data it has stored in the Core Lightning database.

The command fails if the key isn't present, or if generation is specified and the generation of the data does not exactly match.

key (one of):
  • (array of strings): 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.

  • (string, optional)

  • (string)

generation (u64, optional): 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.

On success, an object is returned, containing:

key (array of strings):
(string, optional): Part of the key added to the datastore.

  • generation (u64, optional): The number of times this has been updated.

  • hex (hex, optional): The hex data which has removed from the datastore.

  • string (string, optional): The data as a string, if it's valid utf-8.

The following error codes may occur:

  • 1200: the key does not exist

  • 1201: the key does exist, but the generation is wrong

  • -32602: invalid parameters

Rusty Russell <rusty@rustcorp.com.au> is mainly responsible.

lightning-listdatastore(7), lightning-datastore(7), lightning-datastoreusage(7)

Main web site: https://github.com/ElementsProject/lightning

Example 1:

Request:

$ lightning-cli deldatastore -k "key"='["test", "name"]'

{

"id": "example:deldatastore#1",
"method": "deldatastore",
"params": {
"key": [
"test",
"name"
]
} }

Response:

{

"key": [
"test",
"name"
],
"generation": 0,
"hex": "736176696e67206461746120746f207468652073746f7265",
"string": "saving data to the store" }

Example 2:

Request:

$ lightning-cli deldatastore -k "key"="otherkey" "generation"=1

{

"id": "example:deldatastore#2",
"method": "deldatastore",
"params": {
"key": "otherkey",
"generation": 1
} }

Response:

{

"key": [
"otherkey"
],
"generation": 1,
"hex": "6f74686572206b65793a207465787420746f20626520617070656e64656420746f20746865206f746865726b6579",
"string": "other key: text to be appended to the otherkey" }
Core Lightning v25.02.2

Search for    or go to Top of page |  Section 7 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.