ssv-keys
Version:
CLI Tool for splitting a validator key into a predefined threshold of shares via Shamir-Secret-Sharing (SSS), and encrypt them with a set of operator keys.
12 lines (8 loc) • 323 B
text/typescript
export class OperatorIdsValidator {
public operatorsCount = 3;
setOperatorsCount(amount: number): void {
this.operatorsCount = amount;
}
}
export const isOperatorsLengthValid = (length: number) => !(length < 4 || length > 13 || length % 3 != 1);
export const operatorIdsValidator = new OperatorIdsValidator();