getpubkeysfrommnemonic

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

README

get_pubkeys_from_mnemonic Task

Description

The get_pubkeys_from_mnemonic task generates public keys from a given mnemonic phrase. This task is essential for setting up and verifying validator identities in scenarios involving multiple validators derived from a single mnemonic, commonly used in Ethereum staking operations.

Configuration Parameters

  • mnemonic: The mnemonic phrase used to generate the public keys. This should be a BIP-39 compliant seed phrase that is used to derive Ethereum validator keys.

  • startIndex: The starting index from which to begin deriving public keys. This allows users to specify a segment of the key sequence for generation, rather than starting from the beginning.

  • count: The number of public keys to generate from the specified startIndex.

Outputs

  • pubkeys: A list of validator public keys derived from the mnemonic. Each key corresponds to a validator index starting from the startIndex and continuing for count keys. This output is crucial for tasks that involve setting up validators, validating identities, or performing any operation that requires public key data.

Defaults

Default settings for the get_pubkeys_from_mnemonic task:

- name: get_pubkeys_from_mnemonic
  config:
    mnemonic: ""
    startIndex: 0
    count: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "get_pubkeys_from_mnemonic"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Get public keys from mnemonic",
		Config:      DefaultConfig(),
		NewTask:     NewTask,
	}
)

Functions

func NewTask

func NewTask(ctx *types.TaskContext, options *types.TaskOptions) (types.Task, error)

Types

type Config

type Config struct {
	Mnemonic   string `yaml:"mnemonic" json:"mnemonic"`
	StartIndex int    `yaml:"startIndex" json:"startIndex"`
	Count      int    `yaml:"count" json:"count"`
}

func DefaultConfig

func DefaultConfig() Config

func (*Config) Validate

func (c *Config) Validate() error

type Task

type Task struct {
	// contains filtered or unexported fields
}

func (*Task) Config

func (t *Task) Config() interface{}

func (*Task) Execute

func (t *Task) Execute(_ context.Context) error

func (*Task) LoadConfig

func (t *Task) LoadConfig() error

func (*Task) Timeout

func (t *Task) Timeout() time.Duration

Jump to

Keyboard shortcuts

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