accounts

package
v0.0.0-...-404ccd1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StoreAccounts

func StoreAccounts(path string, store *Store) error

func StringAddress

func StringAddress(addr address.Address) string

Types

type Account

type Account struct {
	Name    string
	PrivKey ed25519.PrivateKey // the pub & private key
	PubKey  ed25519.PublicKey  // only the pub key part
}

func (*Account) Address

func (a *Account) Address() address.Address

type AccountInfo

type AccountInfo struct {
	Nonce   string
	Balance string
}

type AccountKeys

type AccountKeys struct {
	PubKey  string `json:"pubkey"`
	PrivKey string `json:"privkey"`
}

type Store

type Store map[string]AccountKeys

func LoadAccounts

func LoadAccounts(path string) (*Store, error)

func (Store) CreateAccount

func (s Store) CreateAccount(alias string) *Account

func (Store) GetAccount

func (s Store) GetAccount(name string) (*Account, error)

func (Store) ListAccounts

func (s Store) ListAccounts() []string

Jump to

Keyboard shortcuts

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