sdk

package
v0.7.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 9 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
}

Member model object

func NewMember

func NewMember(ref string, key 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(urls []string, rootMemberKeysPath string) (*SDK, error)

NewSDK creates insSDK object

func (*SDK) CreateMember

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

CreateMember api request creates member with new random keys

func (*SDK) GetBalance

func (sdk *SDK) GetBalance(m *Member) (uint64, error)

GetBalance returns current balance of the given member.

func (*SDK) Transfer

func (sdk *SDK) Transfer(amount uint, 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