generaterandommnemonic

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

README

generate_random_mnemonic Task

Description

The generate_random_mnemonic task is designed to create a random mnemonic phrase. This task is particularly useful in scenarios where generating new wallets or accounts is necessary for testing purposes. A mnemonic phrase, often used in cryptocurrency wallets, is a set of words that can be translated into a binary seed, which in turn can be used to generate wallet addresses.

Configuration Parameters

  • mnemonicResultVar: The name of the variable where the generated mnemonic will be stored. This allows the mnemonic to be used in subsequent tasks, enabling the dynamic creation of wallets or accounts based on the mnemonic.

Defaults

Default settings for the generate_random_mnemonic task:

- name: generate_random_mnemonic
  config:
    mnemonicResultVar: ""

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "generate_random_mnemonic"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Generate random 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 {
	MnemonicResultVar string `yaml:"mnemonicResultVar" json:"mnemonicResultVar"`
}

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) Description

func (t *Task) Description() string

func (*Task) Execute

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

func (*Task) LoadConfig

func (t *Task) LoadConfig() error

func (*Task) Logger

func (t *Task) Logger() logrus.FieldLogger

func (*Task) Name

func (t *Task) Name() string

func (*Task) Timeout

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

func (*Task) Title

func (t *Task) Title() string

Jump to

Keyboard shortcuts

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