wallet

package
v0.0.0-...-f9e178d Latest Latest
Warning

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

Go to latest
Published: May 8, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WALLLET_VERSION      = byte(0x00)
	ADDRESS_CHECKSUM_LEN = 4
)

Variables

This section is empty.

Functions

func HashPubKey

func HashPubKey(pubKey []byte) []byte

func ValidateAddress

func ValidateAddress(address string) bool

Types

type Wallet

type Wallet struct {
	PrivateKey []byte
	PublicKey  []byte
}

func NewWallet

func NewWallet() *Wallet

func (Wallet) GetAddress

func (w Wallet) GetAddress() []byte

type Wallets

type Wallets struct {
	Wallets map[string]*Wallet
}

func NewWallets

func NewWallets(cfg config.Config) (*Wallets, error)

func (*Wallets) CreateWallet

func (ws *Wallets) CreateWallet() string

func (*Wallets) GetAddresses

func (ws *Wallets) GetAddresses() []string

func (Wallets) GetWallet

func (ws Wallets) GetWallet(address string) (Wallet, error)

func (*Wallets) LoadFromFile

func (ws *Wallets) LoadFromFile(cfg config.Config) error

func (Wallets) SaveToFile

func (ws Wallets) SaveToFile(cfg config.Config)

Jump to

Keyboard shortcuts

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