wallet

package
v0.0.0-...-b6f7943 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package wallet manages simple wallet functionality That is -- creation of private & public keypairs, as well as addresses

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashPubKey

func HashPubKey(pubKey []byte) []byte

Types

type Wallet

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

func NewWallet

func NewWallet() *Wallet

func (Wallet) GetAddress

func (w Wallet) GetAddress() common.Address

type Wallets

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

func NewWallets

func NewWallets(nodeID string) (*Wallets, error)

func (*Wallets) CreateWallet

func (ws *Wallets) CreateWallet() string

CreateWallet adds a Wallet to Wallets

func (*Wallets) GetAddresses

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

GetAddresses returns an array of addresses stored in the wallet file

func (*Wallets) LoadFromFile

func (ws *Wallets) LoadFromFile(nodeID string) error

Loads wallets from a file

func (Wallets) SaveToFile

func (ws Wallets) SaveToFile(nodeID string)

Saves wallets to a file

Jump to

Keyboard shortcuts

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