keystore

package
v0.0.0-...-0c64813 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StandardScryptN = 1 << 18
	StandardScryptP = 1
	LightScryptN    = 1 << 12
	LightScryptP    = 6
)

const variables

Functions

func WriteLightScryptKeyStore

func WriteLightScryptKeyStore(key *Key, password string) ([]byte, error)

WriteLightScryptKeyStore write keystore with Scrypt format

func WriteScryptKeyStore

func WriteScryptKeyStore(key *Key, password string) ([]byte, error)

WriteScryptKeyStore write keystore with Scrypt format

Types

type Key

type Key struct {
	ID         uuid.UUID         // Key ID
	Address    string            // address
	PrivateKey *ecdsa.PrivateKey // btc private key
}

Key wallet wallet key

func KeyFromPrivateKey

func KeyFromPrivateKey(privateKeyBytes []byte) (*Key, error)

KeyFromPrivateKey wallet key from private key bytes

func NewKey

func NewKey() (*Key, error)

NewKey create new key

func ReadKeyStore

func ReadKeyStore(data []byte, password string) (*Key, error)

ReadKeyStore read key from keystore

func (*Key) ToBytes

func (key *Key) ToBytes() []byte

ToBytes get key's bytes array

Jump to

Keyboard shortcuts

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