api

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountAPI

type AccountAPI interface {
	GetAccount(addr types.Address) *ledger.Account
}

type BrokerAPI

type BrokerAPI interface {
	HandleTransaction(tx *pb.Transaction) error
	GetTransaction(types.Hash) (*pb.Transaction, error)
	GetTransactionMeta(types.Hash) (*pb.TransactionMeta, error)
	GetReceipt(types.Hash) (*pb.Receipt, error)
	GetBlock(mode string, key string) (*pb.Block, error)
	GetBlocks(offset uint64, length uint64) ([]*pb.Block, error)

	// AddPier
	AddPier(pid string) (chan *pb.MerkleWrapper, error)

	// RemovePier
	RemovePier(pid string)

	GetMerkleWrapper(pid string, begin, end uint64, ch chan<- *pb.MerkleWrapper) error

	// OrderReady
	OrderReady() bool
}

type ChainAPI

type ChainAPI interface {
	Status() string
	Meta() (*pb.ChainMeta, error)
}

type CoreAPI

type CoreAPI interface {
	Broker() BrokerAPI
	Network() NetworkAPI
	Chain() ChainAPI
	Feed() FeedAPI
	Account() AccountAPI
}

type FeedAPI

type FeedAPI interface {
	SubscribeNewBlockEvent(chan<- events.NewBlockEvent) event.Subscription
}

type NetworkAPI

type NetworkAPI interface {
	PeerInfo() ([]byte, error)
}

Jump to

Keyboard shortcuts

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