wallet

package
v0.0.0-...-7d4a125 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashPubKey

func HashPubKey(key []byte) ([]byte, error)

Types

type Addr

type Addr struct {
	// contains filtered or unexported fields
}

func DecodeAddr

func DecodeAddr(addr string) (*Addr, error)

func NewAddr

func NewAddr(version byte, pubKeyHash []byte) *Addr

func (*Addr) PubKeyHash

func (addr *Addr) PubKeyHash() []byte

func (*Addr) String

func (addr *Addr) String() string

type Wallet

type Wallet struct {
	PrvKey *ecdsa.PrivateKey
	PubKey []byte
	Addr   string
}

func NewWallet

func NewWallet() (*Wallet, error)

type Wallets

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

func NewWallets

func NewWallets() (*Wallets, error)

func (*Wallets) CreateWallet

func (ws *Wallets) CreateWallet() (string, error)

func (*Wallets) GetAddrs

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

func (*Wallets) GetWallet

func (ws *Wallets) GetWallet(addr string) *Wallet

func (*Wallets) Load

func (ws *Wallets) Load() error

func (*Wallets) Save

func (ws *Wallets) Save() error

Jump to

Keyboard shortcuts

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