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.
40 lines (32 loc) • 878 B
text/typescript
import { SSVKeysException } from "@ssv-labs/ssv-sdk";
import { Namespace } from "argparse";
export class BaseAction {
protected args: Namespace = {};
setArgs(args: Namespace): BaseAction {
this.args = args;
return this;
}
async execute(): Promise<any> {
throw new SSVKeysException('Should implement "execute"');
}
static get options(): any {
throw new SSVKeysException('Should implement static "options"');
}
get options(): any {
return BaseAction.options;
}
/**
* Pre-execution method which can be run before execution logic.
*/
preExecute(): void {
return;
}
/**
* Pre-options reading method which can be run before the logic where options read happened.
* Should also return options which can be changed.
* @param options
*/
async preOptions(options: any): Promise<any> {
return options;
}
}