rlngenerate

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = cli.Command{
	Name:  "generate-rln-credentials",
	Usage: "Generate credentials for usage with RLN",
	Action: func(cCtx *cli.Context) error {
		if options.ETHPrivateKey == nil {
			err := errors.New("a private key must be specified")
			logger.Error("validating option flags", zap.Error(err))
			return cli.Exit(err, 1)
		}

		err := execute(context.Background())
		if err != nil {
			logger.Error("registering RLN credentials", zap.Error(err))
			return cli.Exit(err, 1)
		}

		return nil
	},
	Flags: flags,
}

Command generates a key file used to generate the node's peerID, encrypted with an optional password

Functions

This section is empty.

Types

type Options

type Options struct {
	CredentialsPath           string
	CredentialsPassword       string
	ETHPrivateKey             *ecdsa.PrivateKey
	ETHClientAddress          string
	MembershipContractAddress common.Address
	ETHGasLimit               uint64
	ETHNonce                  string
	ETHGasPrice               string
	ETHGasFeeCap              string
	ETHGasTipCap              string
}

Options are settings used to create RLN credentials.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL