allowance

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allowance

type Allowance struct {
	foundation.BaseContract
	To         core.RecordRef
	Amount     uint
	ExpireTime int64
}

func New

func New(to *core.RecordRef, amount uint, expire int64) (*Allowance, error)

New check is caller wallet and makes new allowance

func (*Allowance) GetBalanceForOwner

func (a *Allowance) GetBalanceForOwner() (uint, error)

GetBalanceForOwner returns balance

func (*Allowance) GetExpiredBalance added in v0.6.3

func (a *Allowance) GetExpiredBalance() (uint, error)

GetExpiredBalance gets balance from expired allowance and delete allowance

func (*Allowance) TakeAmount

func (a *Allowance) TakeAmount() (uint, error)

TakeAmount allows take amount and delete allowance

Jump to

Keyboard shortcuts

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