api: Add wallet lock/unlock commands and getcoinseed.

This commit is contained in:
tecnovert
2022-11-12 01:51:30 +02:00
parent 020a65db8a
commit fc31615a97
21 changed files with 412 additions and 121 deletions

View File

@@ -33,6 +33,14 @@ class InactiveCoin(Exception):
return str(self.coinid)
class LockedCoinError(Exception):
def __init__(self, coinid):
self.coinid = coinid
def __str__(self):
return 'Coin must be unlocked: ' + str(self.coinid)
def ensure(v, err_string):
if not v:
raise ValueError(err_string)