keystore

package
v1.4.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EthKeyStore

type EthKeyStore interface {
	PrivateKey(account common.Address, password string) (*ecdsa.PrivateKey, error)
	SignerFn(chainID uint64, account common.Address, password string) (SignerFn, error)
	PersonalSignFn(account common.Address, password string) (PersonalSignFn, error)
	UnsetKey(account common.Address, password string)
	Accounts() []common.Address
	AddPath(keystorePath string) error
	RemovePath(keystorePath string)
	Paths() []string
}

func New

func New(paths ...string) (EthKeyStore, error)

type KeyCache

type KeyCache interface {
	SetPath(account common.Address, path string) (existing bool)
	UnsetPath(account common.Address)
	PrivateKey(account common.Address, password string) (*ecdsa.PrivateKey, error)
	SetPrivateKey(account common.Address, pk *ecdsa.PrivateKey)
	UnsetKey(account common.Address, password string)
	SignerFn(chainID uint64, account common.Address, password string) (SignerFn, error)
	PersonalSignFn(account common.Address, password string) (PersonalSignFn, error)
}

func NewKeyCache

func NewKeyCache() KeyCache

type PersonalSignFn

type PersonalSignFn func(account common.Address, data []byte) (sig []byte, err error)

func PrivateKeyPersonalSignFn

func PrivateKeyPersonalSignFn(privKey *ecdsa.PrivateKey) (PersonalSignFn, error)

type SignerFn

type SignerFn = bind.SignerFn

type WalletSpec

type WalletSpec struct {
	Address string `json:"address"`
	ID      string `json:"id"`
	Version int    `json:"version"`
	Path    string `json:"-"`
}

func (*WalletSpec) AddressFromHex

func (spec *WalletSpec) AddressFromHex() common.Address

Jump to

Keyboard shortcuts

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