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.

42 lines (32 loc) 1.15 kB
import { SSVKeysException } from './base'; import { IOperatorData } from '../KeyShares/KeySharesData/IOperatorData'; export class DuplicatedOperatorIdError extends SSVKeysException { public operator: IOperatorData; constructor(operator: IOperatorData, message: string) { super(message); this.operator = operator; } } export class DuplicatedOperatorPublicKeyError extends SSVKeysException { public operator: IOperatorData; constructor(operator: IOperatorData, message: string) { super(message); this.operator = operator; } } export class OperatorsCountsMismatchError extends SSVKeysException { public listOne: any[] | null | undefined; public listTwo: any[] | null | undefined; constructor(propertyListOne: any[] | null | undefined, propertyListTwo: any[] | null | undefined, message: string) { super(message); this.listOne = propertyListOne; this.listTwo = propertyListTwo; } } export class OperatorPublicKeyError extends SSVKeysException { public operator: any; constructor(operator: { rsa: string, base64: string }, message: string) { super(message); this.operator = operator; } }