member

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0, Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const (
	XNS = "XNS"
	// 10 ^ 14
	ACCOUNT_START_VALUE = "0"
)
View Source
const PanicIsLogicalError = false

Variables

View Source
var INSATTR_Call_API = true

Functions

func INSCONSTRUCTOR_New

func INSCONSTRUCTOR_New(ref insolar.Reference, data []byte) (state []byte, result []byte, err error)

func INSMETHOD_Accept

func INSMETHOD_Accept(object []byte, data []byte) (newState []byte, result []byte, err error)

func INSMETHOD_Call

func INSMETHOD_Call(object []byte, data []byte) (newState []byte, result []byte, err error)

func INSMETHOD_GetAccount

func INSMETHOD_GetAccount(object []byte, data []byte) (newState []byte, result []byte, err error)

func INSMETHOD_GetCode

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

func INSMETHOD_GetMigrationAddress

func INSMETHOD_GetMigrationAddress(object []byte, data []byte) (newState []byte, result []byte, err error)

func INSMETHOD_GetPrototype

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

func INSMETHOD_GetWallet

func INSMETHOD_GetWallet(object []byte, data []byte) (newState []byte, result []byte, err error)

func INS_META_INFO

func INS_META_INFO() []map[string]string

func Initialize

func Initialize() insolar.ContractWrapper

Types

type CreateResponse

type CreateResponse struct {
	Reference string `json:"reference"`
}

Create member methods.

type GetBalanceResponse

type GetBalanceResponse struct {
	Balance  string        `json:"balance"`
	Deposits []interface{} `json:"deposits"`
}

type GetResponse

type GetResponse struct {
	Reference        string `json:"reference"`
	MigrationAddress string `json:"migrationAddress,omitempty"`
}

type Member

type Member struct {
	foundation.BaseContract
	PublicKey        string
	MigrationAddress string
	Wallet           insolar.Reference
}

Member - basic member contract.

func New

func New(key string, migrationAddress string, walletRef insolar.Reference) (*Member, error)

New creates new member.

func (*Member) Accept

func (m *Member) Accept(arg appfoundation.SagaAcceptInfo) error

Accept accepts transfer to balance. FromMember and Request not used, but needed by observer, do not remove

func (*Member) Call

func (m *Member) Call(signedRequest []byte) (interface{}, error)

Call returns response on request. Method for authorized calls. ins:immutable

func (*Member) GetAccount

func (m *Member) GetAccount(assetName string) (*insolar.Reference, error)

GetAccount gets account. ins:immutable

func (*Member) GetMigrationAddress

func (m *Member) GetMigrationAddress() (string, error)

ins:immutable

func (*Member) GetWallet

func (m *Member) GetWallet() (*insolar.Reference, error)

GetWallet gets wallet. ins:immutable

type MigrationCreateResponse

type MigrationCreateResponse struct {
	Reference        string `json:"reference"`
	MigrationAddress string `json:"migrationAddress"`
}

type Params

type Params struct {
	Seed       string      `json:"seed"`
	CallSite   string      `json:"callSite"`
	CallParams interface{} `json:"callParams,omitempty"`
	Reference  string      `json:"reference"`
	PublicKey  string      `json:"publicKey"`
	LogLevel   string      `json:"logLevel,omitempty"`
	Test       string      `json:"test,omitempty"`
}

type Request

type Request struct {
	JSONRPC string `json:"jsonrpc"`
	ID      uint64 `json:"id"`
	Method  string `json:"method"`
	Params  Params `json:"params"`
}

type TransferResponse

type TransferResponse struct {
	Fee string `json:"fee"`
}

Jump to

Keyboard shortcuts

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