wallet

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 6 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 {
	foundation.BaseContract
	Balance uint
}

Wallet - basic wallet contract

func New

func New(balance uint) (*Wallet, error)

New creates new allowance

func (*Wallet) Accept

func (w *Wallet) Accept(aRef *core.RecordRef) error

Accept transforms allowance to balance

func (*Wallet) GetBalance added in v0.6.3

func (w *Wallet) GetBalance() (uint, error)

GetBalance gets total balance

func (*Wallet) Transfer

func (w *Wallet) Transfer(amount uint, to *core.RecordRef) error

Transfer transfers money to given wallet

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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