Skip to content

Commit

Permalink
pyln: Add datastoreusage command
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Neuroth <[email protected]>
  • Loading branch information
nepet authored and rustyrussell committed Oct 26, 2023
1 parent 833b7b4 commit d032a17
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions contrib/pyln-client/pyln/client/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,18 @@ def datastore(self, key, string=None, hex=None, mode=None, generation=None):
}
return self.call("datastore", payload)

def datastoreusage(self, key=None):
"""
Returns the total bytes that are stored for under the given key or the
root of the datastore. All descendants of the given key (or root) are
taken into account.
{key} can be a single string or a sequence of strings.
"""
payload = {
"key": key,
}
return self.call("datastoreusage", payload)

def decodepay(self, bolt11, description=None):
"""
Decode {bolt11}, using {description} if necessary.
Expand Down

0 comments on commit d032a17

Please sign in to comment.