wallet

package
v0.0.0-...-37cad83 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func InitStore

func InitStore(filePath string) (*Store, error)

Initialize a new wallet store by reading the given filePath If the file doesn't exist, create a new file

func Load

func Load(r io.Reader) (*Store, error)

func (*Store) AddWallet

func (ws *Store) AddWallet() (string, error)

func (*Store) GetAllAddresses

func (ws *Store) GetAllAddresses() []string

func (*Store) GetWallet

func (ws *Store) GetWallet(address string) *Wallet

func (*Store) Save

func (ws *Store) Save(w io.Writer) error

type Wallet

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

func MakeWallet

func MakeWallet() (*Wallet, error)

func (*Wallet) Address

func (w *Wallet) Address() ([]byte, error)

func (*Wallet) AddressString

func (w *Wallet) AddressString() (string, error)

Jump to

Keyboard shortcuts

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