// SPDX-License-Identifier: Apache-2.0
import { Security } from "../security/Security";
import { CastRateStatus, RateStatus } from "./RateStatus";
import { InvalidRateStatus } from "./error/InvalidRateStatus";
export class Bond extends Security {
    static checkRateStatus(value) {
        const errorList = [];
        const length = Object.keys(RateStatus).length;
        if (typeof value !== "number") {
            value = CastRateStatus.toNumber(value);
        }
        if (value >= length)
            errorList.push(new InvalidRateStatus(value));
        return errorList;
    }
}
