wallet

package
v0.0.0-...-8ce86af Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base58Decode

func Base58Decode(input []byte) []byte

func Base58Encode

func Base58Encode(input []byte) []byte

func HashPubKey

func HashPubKey(pubKey []byte) []byte

func ValidateAddress

func ValidateAddress(address string) bool

Types

type Wallet

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

func NewWallet

func NewWallet() *Wallet

func (Wallet) GetAddress

func (w Wallet) GetAddress() []byte

func (*Wallet) GobDecode

func (w *Wallet) GobDecode(data []byte) error

func (*Wallet) GobEncode

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

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

func (*Wallets) GetAddresses

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

func (Wallets) GetWallet

func (ws Wallets) GetWallet(address string) Wallet

func (*Wallets) LoadFromFile

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

func (Wallets) SaveToFile

func (ws Wallets) SaveToFile(nodeID string)

Jump to

Keyboard shortcuts

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