api

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: GPL-3.0 Imports: 6 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
	HandleView(tx *pb.Transaction) (*pb.Receipt, 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(start uint64, end uint64) ([]*pb.Block, error)
	GetPendingNonceByAccount(account string) uint64

	// AddPier
	AddPier(pid string, isUnion bool) (chan *pb.InterchainTxWrappers, error)

	// RemovePier
	RemovePier(pid string, isUnion bool)

	GetBlockHeader(begin, end uint64, ch chan<- *pb.BlockHeader) error

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

	// OrderReady
	OrderReady() error

	// DelVPNode delete a vp node by given id.
	DelVPNode(delID uint64) error

	FetchSignsFromOtherPeers(content string, typ pb.GetMultiSignsRequest_Type) map[string][]byte
	GetSign(content string, typ pb.GetMultiSignsRequest_Type) (string, []byte, error)
	GetBlockHeaders(start uint64, end uint64) ([]*pb.BlockHeader, error)
}

type ChainAPI

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

type CoreAPI

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

type FeedAPI

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

type NetworkAPI

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

Jump to

Keyboard shortcuts

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