client

package
v2.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2018 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyABCIResponse = errors.New("empty ABCI response")
	ErrEmptyRPCResponse  = errors.New("empty RPC response")
)

Error variables defines empty response from ABCI and RPC.

Functions

This section is empty.

Types

type API

type API interface {
	AccountAPI
	PayloadAPI
}

API is the high level interface for Anychaindb client applications.

func NewAPI

func NewAPI(endpoint, mode string, key *crypto.Key, accountID string) API

NewAPI constructs a new API instances based on an http transport.

type AccountAPI

type AccountAPI interface {
	CreateAccount() (id, pub, priv string, err error)
	GetAccount(id string) (*state.Account, error)
	SearchAccounts(query []byte) ([]state.Account, error)
}

AccountAPI describes all account related functions.

type PayloadAPI

type PayloadAPI interface {
	AddPayload(senderAccountID string, publicData interface{}, privateData []byte) (ID string, err error)
	GetPayload(ID, receiverID, privKey string) (*state.Payload, error)
	SearchPayloads(query []byte, receiverID, privKey string) ([]state.Payload, error)
}

PayloadAPI interface provides all transaction data related methods.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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