sdk

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Member

type Member struct {
	Reference  string
	PrivateKey string
	PublicKey  string
}

Member model object

func NewMember

func NewMember(ref string, privateKey string, publicKey string) *Member

NewMember creates new Member

type SDK

type SDK struct {
	// contains filtered or unexported fields
}

SDK is used to send messages to API

func NewSDK

func NewSDK(adminUrls []string, publicUrls []string, memberKeysDirPath string) (*SDK, error)

NewSDK creates insSDK object

func (*SDK) AddMigrationAddresses added in v0.9.0

func (sdk *SDK) AddMigrationAddresses(migrationAddresses []string) (string, error)

addMigrationAddresses method add burn addresses

func (*SDK) CreateMember

func (sdk *SDK) CreateMember() (*Member, string, error)

CreateMember api request creates member with new random keys

func (*SDK) DoRequest added in v0.9.0

func (sdk *SDK) DoRequest(urls *ringBuffer, user *requester.UserConfigJSON, method string, params map[string]interface{}) (*requester.ContractResult, error)

func (*SDK) GetBalance

func (sdk *SDK) GetBalance(m *Member) (*big.Int, error)

GetBalance returns current balance of the given member.

func (*SDK) GetFeeMember added in v0.9.2

func (sdk *SDK) GetFeeMember() *Member

func (*SDK) SetLogLevel added in v0.9.0

func (sdk *SDK) SetLogLevel(logLevel string) error

func (*SDK) Transfer

func (sdk *SDK) Transfer(amount string, from *Member, to *Member) (string, error)

Transfer method send money from one member to another

Jump to

Keyboard shortcuts

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