wallet

package
v0.0.0-...-b414c1e Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChecksumLength = 4
)

Variables

This section is empty.

Functions

func ValidateAddress

func ValidateAddress(address string) bool

Types

type Wallet

type Wallet struct {
	PrivateKey []byte `json:"private_key"`
	PublicKey  []byte `json:"public_key"`
	// contains filtered or unexported fields
}

func NewWallet

func NewWallet() *Wallet

func (*Wallet) Address

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

func (*Wallet) GetPrivateKey

func (w *Wallet) GetPrivateKey() *ecdsa.PrivateKey

type Wallets

type Wallets struct {
	Wallets map[string]*Wallet `json:"wallets"`
}

func NewWallets

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

func (*Wallets) AddWallet

func (ws *Wallets) AddWallet() string

func (*Wallets) GetAllAddresses

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

func (*Wallets) GetWallet

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

func (*Wallets) LoadFile

func (ws *Wallets) LoadFile(nodeId string) error

func (*Wallets) SaveFile

func (ws *Wallets) SaveFile(nodeId string)

Jump to

Keyboard shortcuts

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