keystore

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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