keystore

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: ISC Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadAllAccount

func ReadAllAccount(dir string) ([]string, error)

Types

type Key

type Key struct {
	Address string  `json:"address"`
	Crypto  *crypto `json:"crypto"`
	P2pId   string  `json:"p2pid"`
}

func GenerateKeyJson

func GenerateKeyJson(net string, dir string, private *secp256k1.PrivateKey, mnemonicStr string, passWd []byte) (*Key, error)

func PrivateToJson

func PrivateToJson(net string, priv *secp256k1.PrivateKey, mnemonicStr string, passWd []byte) (*Key, error)

func ReadAddressJson

func ReadAddressJson(dir, addr string) (*Key, error)

func ReadJson

func ReadJson(jsonFile string) (*Key, error)

type Private

type Private struct {
	Private  string `json:"private"`
	Mnemonic string `json:"mnemonic"`
}

func DecryptPrivate

func DecryptPrivate(passWd []byte, j *Key) (*Private, error)

Jump to

Keyboard shortcuts

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