wallet

package
v0.0.0-...-c9960b4 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: MIT Imports: 8 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 CheckSum

func CheckSum(payload []byte) []byte

func NewKeyPair

func NewKeyPair() (ecdsa.PrivateKey, []byte)

func PublicKeyHash

func PublicKeyHash(publickey []byte) []byte

func SignTx

func SignTx(account *Account, txID []byte) []byte

Types

type Account

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

func NewAccount

func NewAccount() *Account

func (Account) Address

func (w Account) Address() []byte

type Wallet

type Wallet struct {
	Accounts map[string]*Account
}

func InitWallet

func InitWallet() (*Wallet, error)

func (*Wallet) AddAccount

func (w *Wallet) AddAccount() string

func (*Wallet) GetAddr

func (w *Wallet) GetAddr(addr string) *Account

func (*Wallet) GetAllAddr

func (w *Wallet) GetAllAddr() []string

Jump to

Keyboard shortcuts

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