api

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: GPL-3.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 AccountAPI

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

type AuditAPI added in v1.16.0

type AuditAPI interface {
	HandleAuditNodeSubscription(dataCh chan<- *pb.AuditTxInfo, auditNodeID string, blockStart uint64) error
	SubscribeAuditEvent(chan<- *pb.AuditTxInfo) event.Subscription
}

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
	GetPendingTransactions(max int) []pb.Transaction
	GetPoolTransaction(hash *types.Hash) pb.Transaction
	GetStateLedger() ledger.StateLedger

	// AddPier
	AddPier(pierID string) (chan *pb.InterchainTxWrappers, error)

	// RemovePier
	RemovePier(pierID string)

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

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

	// OrderReady
	OrderReady() error

	FetchSignsFromOtherPeers(req *pb.GetSignsRequest) map[string][]byte
	FetchTssInfoFromOtherPeers() []*pb.TssInfo
	GetSign(req *pb.GetSignsRequest, signers []string) (string, []byte, []string, error)
	GetBlockHeaders(start uint64, end uint64) ([]*pb.BlockHeader, error)
	GetQuorum() uint64
	GetTssPubkey() (string, *ecdsa.PublicKey, error)
	GetTssInfo() (*pb.TssInfo, error)
	GetPrivKey() *repo.Key
}

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
	Audit() AuditAPI
}

type FeedAPI

type FeedAPI interface {
	SubscribeLogsEvent(chan<- []*pb.EvmLog) event.Subscription
	SubscribeNewTxEvent(chan<- pb.Transactions) event.Subscription
	SubscribeNewBlockEvent(chan<- events.ExecutedEvent) event.Subscription
	SubscribeTssSignRes(ch chan<- *pb.Message) event.Subscription
	BloomStatus() (uint64, uint64)
}

type NetworkAPI

type NetworkAPI interface {
	PeerInfo() ([]byte, error)
	PierManager() peermgr.PierManager
	OtherPeers() map[uint64]*peer.AddrInfo
}

Jump to

Keyboard shortcuts

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