add coinsupply rpc call

This commit is contained in:
Denio
2019-12-05 21:42:38 +01:00
parent ac5a03f07b
commit f53f73a0c0
4 changed files with 68 additions and 1 deletions

View File

@@ -603,6 +603,24 @@ impl LightClient {
}
}
pub fn do_coinsupply(&self) -> String {
match get_coinsupply(self.get_server_uri(), self.config.no_cert_verification) {
Ok(i) => {
let o = object!{
"result" => i.result,
"coin" => i.coin,
"height" => i.height,
"supply" => i.supply,
"zfunds" => i.zfunds,
"total" => i.total,
};
o.pretty(2)
},
Err(e) => e
}
}
pub fn do_seed_phrase(&self) -> Result<JsonValue, &str> {
if !self.wallet.read().unwrap().is_unlocked_for_spending() {
error!("Wallet is locked");