@ethersphere/swarm-cli
Version:
CLI tool for Bee
32 lines (31 loc) • 1.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Status = void 0;
const text_1 = require("../../utils/text");
const root_command_1 = require("../root-command");
class Status extends root_command_1.RootCommand {
constructor() {
super(...arguments);
Object.defineProperty(this, "name", {
enumerable: true,
configurable: true,
writable: true,
value: 'status'
});
Object.defineProperty(this, "description", {
enumerable: true,
configurable: true,
writable: true,
value: `Prints staked and withdrawable stake`
});
}
async run() {
super.init();
const stake = await this.bee.getStake();
const surplusStake = await this.bee.getWithdrawableStake();
this.console.log((0, text_1.createKeyValue)('Staked xBZZ', stake.toDecimalString()));
this.console.log((0, text_1.createKeyValue)('Withdrawable staked xBZZ', surplusStake.toDecimalString()));
this.console.quiet(stake.toDecimalString());
}
}
exports.Status = Status;