"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.XrpNodeStatus = void 0;
const StatusBase_1 = require("../StatusBase");
class XrpNodeStatus extends StatusBase_1.NodeStatusBase {
    get version() {
        return this.data.result.state.build_version;
    }
    /**
     * @docs https://xrpl.org/rippled-server-states.html
     */
    get state() {
        return this.data.result.state.server_state;
    }
    get isHealthy() {
        return ["connected", "syncing", "tracking", "full", "validating", "proposing"].includes(this.state);
    }
    get isSynced() {
        return ["full", "validating", "proposing"].includes(this.state);
    }
}
exports.XrpNodeStatus = XrpNodeStatus;
//# sourceMappingURL=XrpStatus.js.map