Documentation ¶
Index ¶
- Variables
- func BindBaseFlags(cmd *cobra.Command) error
- func BindInitFlags(cmd *cobra.Command) error
- func BindInitiatorBaseFlags(cmd *cobra.Command) error
- func BindOperatorFlags(cmd *cobra.Command) error
- func BindReshareFlags(cmd *cobra.Command) error
- func GenerateRSAKeyPair(passwordFilePath, privKeyPath string, logger *zap.Logger) (*rsa.PrivateKey, []byte, error)
- func LoadInitiatorRSAPrivKey(generate bool) (*rsa.PrivateKey, error)
- func LoadOperators(logger *zap.Logger) (initiator.Operators, error)
- func OpenPrivateKey(passwordFilePath, privKeyPath string) (*rsa.PrivateKey, error)
- func ReadOperatorsInfoFile(operatorsInfoPath string, logger *zap.Logger) (initiator.Operators, error)
- func SetBaseFlags(cmd *cobra.Command)
- func SetGlobalLogger(cmd *cobra.Command, name string) (*zap.Logger, error)
- func SetHealthCheckFlags(cmd *cobra.Command)
- func SetInitFlags(cmd *cobra.Command)
- func SetOperatorFlags(cmd *cobra.Command)
- func SetReshareFlags(cmd *cobra.Command)
- func SetViperConfig(cmd *cobra.Command) error
- func StingSliceToUintArray(flagdata []string) ([]uint64, error)
- func WriteCeremonySigs(ceremonySigs *initiator.CeremonySigs, dir string) error
- func WriteDepositResult(depositData *initiator.DepositDataJson, dir string) error
- func WriteInitResults(depositDataArr []*initiator.DepositDataJson, ...)
- func WriteKeysharesResult(keyShares *initiator.KeyShares, dir string) error
Constants ¶
This section is empty.
Variables ¶
var ( ConfigPath string OutputPath string LogLevel string LogFormat string LogLevelFormat string LogFilePath string )
global base flags
var ( OperatorsInfo string OperatorsInfoPath string OperatorIDs []string GenerateInitiatorKeyIfNotExisting bool WithdrawAddress common.Address Network string OwnerAddress common.Address Nonce uint64 Validators uint64 )
init flags
var ( NewOperatorIDs []string CeremonySigsFilePath string )
reshare flags
var ( PrivKey string PrivKeyPassword string Port uint64 OperatorID uint64 )
operator flags
Functions ¶
func BindBaseFlags ¶
BindFlags binds flags to yaml config parameters
func BindInitFlags ¶
BindInitFlags binds flags to yaml config parameters for the initial DKG
func BindInitiatorBaseFlags ¶
BindInitiatorBaseFlags binds flags to yaml config parameters
func BindOperatorFlags ¶
BindOperatorFlags binds flags to yaml config parameters for the resharing ceremony of DKG
func BindReshareFlags ¶
BindReshareFlags binds flags to yaml config parameters for the resharing ceremony of DKG
func GenerateRSAKeyPair ¶
func GenerateRSAKeyPair(passwordFilePath, privKeyPath string, logger *zap.Logger) (*rsa.PrivateKey, []byte, error)
GenerateRSAKeyPair generates a RSA key pair. Password either supplied as path or generated at random.
func LoadInitiatorRSAPrivKey ¶ added in v1.1.0
func LoadInitiatorRSAPrivKey(generate bool) (*rsa.PrivateKey, error)
LoadInitiatorRSAPrivKey loads RSA private key from path or generates a new key pair
func LoadOperators ¶
LoadOperators loads operators data from raw json or file path
func OpenPrivateKey ¶
func OpenPrivateKey(passwordFilePath, privKeyPath string) (*rsa.PrivateKey, error)
OpenPrivateKey reads an RSA key from file. If passwordFilePath is provided, treats privKeyPath as encrypted
func ReadOperatorsInfoFile ¶
func ReadOperatorsInfoFile(operatorsInfoPath string, logger *zap.Logger) (initiator.Operators, error)
ReadOperatorsInfoFile reads operators data from path
func SetBaseFlags ¶
func SetGlobalLogger ¶
SetGlobalLogger creates a logger
func SetHealthCheckFlags ¶ added in v1.1.0
func SetInitFlags ¶
func SetOperatorFlags ¶
func SetReshareFlags ¶
func SetViperConfig ¶
SetViperConfig reads a yaml config file if provided
func StingSliceToUintArray ¶
StingSliceToUintArray converts the string slice to uint64 slice
func WriteCeremonySigs ¶ added in v1.2.0
func WriteCeremonySigs(ceremonySigs *initiator.CeremonySigs, dir string) error
func WriteDepositResult ¶ added in v1.1.0
func WriteDepositResult(depositData *initiator.DepositDataJson, dir string) error
func WriteInitResults ¶ added in v1.1.0
func WriteInitResults(depositDataArr []*initiator.DepositDataJson, keySharesArr []*initiator.KeyShares, nonces []uint64, ceremonySigsArr []*initiator.CeremonySigs, logger *zap.Logger)
Types ¶
This section is empty.