wallet

package
v0.9.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const XNS = "XNS"

Variables

This section is empty.

Functions

func INSCONSTRUCTOR_New

func INSCONSTRUCTOR_New(data []byte) ([]byte, []byte, error)

func INSMETHOD_Accept

func INSMETHOD_Accept(object []byte, data []byte) ([]byte, []byte, error)

func INSMETHOD_GetAccount

func INSMETHOD_GetAccount(object []byte, data []byte) ([]byte, []byte, error)

func INSMETHOD_GetBalance

func INSMETHOD_GetBalance(object []byte, data []byte) ([]byte, []byte, error)

func INSMETHOD_GetCode

func INSMETHOD_GetCode(object []byte, data []byte) ([]byte, []byte, error)

func INSMETHOD_GetPrototype

func INSMETHOD_GetPrototype(object []byte, data []byte) ([]byte, []byte, error)

func INSMETHOD_Transfer

func INSMETHOD_Transfer(object []byte, data []byte) ([]byte, []byte, error)

func INS_META_INFO

func INS_META_INFO() []map[string]string

func Initialize

func Initialize() XXX_insolar.ContractWrapper

Types

type Wallet

type Wallet struct {
	foundation.BaseContract
	Accounts foundation.StableMap
}

Wallet - basic wallet contract.

func New

func New(accountReference insolar.Reference) (*Wallet, error)

New creates new wallet.

func (*Wallet) Accept

func (w *Wallet) Accept(amountStr string, assetName string) error

Accept accepts transfer.

func (*Wallet) GetAccount

func (w *Wallet) GetAccount(assetName string) (*insolar.Reference, error)

func (*Wallet) GetBalance

func (w *Wallet) GetBalance(assetName string) (string, error)

GetBalance gets balance by asset name.

func (*Wallet) Transfer

func (w *Wallet) Transfer(rootDomainRef insolar.Reference, assetName string, amountStr string, toMember *insolar.Reference) (interface{}, error)

Transfer transfers money to given wallet.

Jump to

Keyboard shortcuts

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