gethkeystore

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Flags added in v0.3.1

func Flags(v *viper.Viper, f *pflag.FlagSet)

func GetKeystorePassword added in v0.3.1

func GetKeystorePassword(v *viper.Viper) string

func GetKeystorePath added in v0.3.1

func GetKeystorePath(v *viper.Viper) string

func KeystorePasswordFlag added in v0.3.1

func KeystorePasswordFlag(v *viper.Viper, f *pflag.FlagSet)

KeystorePasswordFlag register flag for the password used to encrypt keys in keystore

func KeystorePathFlag added in v0.3.1

func KeystorePathFlag(v *viper.Viper, f *pflag.FlagSet)

KeystorePathFlag register flag for the path to the file keystore

Types

type Config

type Config struct {
	Path     string `json:"path"`
	Password string `json:"-"`
}

func ConfigFromViper added in v0.3.1

func ConfigFromViper(v *viper.Viper) *Config

func (*Config) SetDefault

func (cfg *Config) SetDefault() *Config

type KeyStore

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

func New

func New(cfg *Config) *KeyStore

func (*KeyStore) CreateAccount

func (s *KeyStore) CreateAccount(_ context.Context) (*keystore.Account, error)

func (*KeyStore) HasAccount added in v0.3.5

func (s *KeyStore) HasAccount(_ context.Context, addr gethcommon.Address) (bool, error)

func (*KeyStore) Import added in v0.2.2

func (s *KeyStore) Import(_ context.Context, hexkey string) (*keystore.Account, error)

Import a secp256k1 private key in hexadecimal format

func (*KeyStore) SignTx

Jump to

Keyboard shortcuts

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