polybftsecrets

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountDirFlag    = "data-dir"
	AccountConfigFlag = "config"
	PrivateKeyFlag    = "private-key"
	ChainIDFlag       = "chain-id"

	AccountDirFlagDesc    = "the directory for the Polygon Edge data if the local FS is used"
	AccountConfigFlagDesc = "the path to the SecretsManager config file, if omitted, the local FS secrets manager is used"
	PrivateKeyFlagDesc    = "hex-encoded private key of the account which executes command"
	ChainIDFlagDesc       = "ID of child chain"
)

common flags for all polybft commands

Variables

View Source
var (
	ErrInvalidNum                     = fmt.Errorf("num flag value should be between 1 and %d", maxInitNum)
	ErrInvalidParams                  = errors.New("no config file or data directory passed in")
	ErrUnsupportedType                = errors.New("unsupported secrets manager")
	ErrSecureLocalStoreNotImplemented = errors.New(
		"use a secrets backend, or supply an --insecure flag " +
			"to store the private keys locally on the filesystem, " +
			"avoid doing so in production")
)

common errors for all polybft commands

Functions

func GetCommand

func GetCommand() *cobra.Command

func GetSecretsManager

func GetSecretsManager(dataPath, configPath string, insecureLocalStore bool) (secrets.SecretsManager, error)

GetSecretsManager function resolves secrets manager instance based on provided data or config paths. insecureLocalStore defines if utilization of local secrets manager is allowed.

Types

type Results

type Results []command.CommandResult

func (Results) GetOutput

func (r Results) GetOutput() string

type SecretsInitResult

type SecretsInitResult struct {
	Address       types.Address `json:"address"`
	BLSPubkey     string        `json:"bls_pubkey"`
	NodeID        string        `json:"node_id"`
	PrivateKey    string        `json:"private_key"`
	BLSPrivateKey string        `json:"bls_private_key"`
	Insecure      bool          `json:"insecure"`
	Generated     string        `json:"generated"`
}

func (*SecretsInitResult) GetOutput

func (r *SecretsInitResult) GetOutput() string

Jump to

Keyboard shortcuts

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