wallet

package
v0.0.0-...-a72a3d3 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wallet

type Wallet struct {
	PublicKey ed25519.PublicKey
	Head      blocks.Block
	Work      *types.Work
	PoWchan   chan types.Work
	// contains filtered or unexported fields
}

func New

func New(private string) (w Wallet)

func (*Wallet) Address

func (w *Wallet) Address() types.Account

func (*Wallet) Change

func (w *Wallet) Change(representative types.Account) (*blocks.ChangeBlock, error)

func (*Wallet) GeneratePoWAsync

func (w *Wallet) GeneratePoWAsync() error

Triggers a goroutine to generate the next proof of work.

func (*Wallet) GeneratePowSync

func (w *Wallet) GeneratePowSync() error

func (*Wallet) GetBalance

func (w *Wallet) GetBalance() uint128.Uint128

func (*Wallet) HasPoW

func (w *Wallet) HasPoW() bool

Returns true if the wallet has prepared proof of work,

func (*Wallet) Open

func (w *Wallet) Open(source types.BlockHash, representative types.Account) (*blocks.OpenBlock, error)

func (*Wallet) Receive

func (w *Wallet) Receive(source types.BlockHash) (*blocks.ReceiveBlock, error)

func (*Wallet) Send

func (w *Wallet) Send(destination types.Account, amount uint128.Uint128) (*blocks.SendBlock, error)

func (*Wallet) WaitPoW

func (w *Wallet) WaitPoW()

func (*Wallet) WaitingForPoW

func (w *Wallet) WaitingForPoW() bool

Jump to

Keyboard shortcuts

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