keystore

package
v0.0.0-...-a5eb945 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2018 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPrefix = "Config: Keystore: %s"

Functions

func RandomBitcoinKeyString

func RandomBitcoinKeyString(chain string) (string, error)

func RandomEthereumKeyString

func RandomEthereumKeyString() (string, error)

Types

type Key

type Key interface {
	GetKey() (*ecdsa.PrivateKey, error)
	GetKeyString() string
	GetAddress() ([]byte, error)
	PriorityCode() uint32
	Chain() string
}

func NewKey

func NewKey(privKey string, priCode uint32, network string) (Key, error)

type Keystore

type Keystore interface {
	GetKey(uint32, uint32) (Key, error)
	AppendKey(uint32, uint32, Key)
}

func Load

func Load(path string) (Keystore, error)

func NewKeystore

func NewKeystore(priorityCodes []uint32, chains []string, path string) (Keystore, error)

Jump to

Keyboard shortcuts

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