UNPKG

ssv-keys

Version:

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.

17 lines (13 loc) 369 B
export class OperatorIdsValidator { public operatorsCount = 3; setOperatorsCount(amount: number): void { this.operatorsCount = amount; } } export const isOperatorsLengthValid = (length: number) => { if (length < 4 || length > 13 || length % 3 != 1) { return false; } return true; } export const operatorIdsValidator = new OperatorIdsValidator();