cmd

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: MIT Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EthereumCommand cli.Command

EthereumCommand contains the definition of the ethereum command-line subcommand and its own subcommands.

View Source
var EthereumSigningCommand = cli.Command{
	Name:  "ethereum",
	Usage: "Ethereum signatures calculation",
	Subcommands: []cli.Command{
		{
			Name:        "sign",
			Usage:       "Sign a message using the operator's key",
			Description: ethereumSignDescription,
			Action:      EthereumSign,
			ArgsUsage:   "[message]",
			Flags: []cli.Flag{
				cli.StringFlag{
					Name: "eth-key-file,k",
					Usage: "Path to the ethereum key file. " +
						"If not provided read the path from a config file.",
				},
				cli.StringFlag{
					Name:  "output-file,o",
					Usage: "Output file for the signature",
				},
			},
		},
		{
			Name:        "verify",
			Usage:       "Verifies a signature",
			Description: ethereumVerifyDescription,
			Action:      EthereumVerify,
			ArgsUsage:   "[ethereum-signature]",
			Flags: []cli.Flag{
				cli.StringFlag{
					Name:  "input-file,i",
					Usage: "Input file with the signature",
				},
			},
		},
	},
}

EthereumSigningCommand contains the definition of the `signing ethereum` command-line subcommand and its own subcommands.

View Source
var SigningCommand cli.Command

SigningCommand contains the definition of the `signing` command-line subcommand and its own subcommands.

View Source
var StartCommand cli.Command

StartCommand contains the definition of the start command-line subcommand.

Functions

func DecryptKeyShare added in v1.3.0

func DecryptKeyShare(c *cli.Context) error

DecryptKeyShare decrypt key shares for given keep using provided operator config.

func EthereumSign added in v1.5.0

func EthereumSign(c *cli.Context) error

EthereumSign signs a string using operator's ethereum key.

func EthereumVerify added in v1.5.0

func EthereumVerify(c *cli.Context) error

EthereumVerify verifies if a signature was calculated by a signer with the given ethereum address.

func SignDigest added in v1.3.0

func SignDigest(c *cli.Context) error

SignDigest signs a given digest using key shares from the provided directory.

func Start

func Start(c *cli.Context) error

Start starts a client.

Types

type EthereumSignature added in v1.5.0

type EthereumSignature struct {
	Address   common.Address `json:"address"`
	Message   string         `json:"msg"`
	Signature string         `json:"sig"`
	Version   string         `json:"version"`
}

EthereumSignature is a common Ethereum signature format.

Jump to

Keyboard shortcuts

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