api

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerAPI

type BrokerAPI interface {
	HandleTransaction(tx *types.Transaction) error
	GetTransaction(*types.Hash) (*types.Transaction, error)
	GetTransactionMeta(*types.Hash) (*types.TransactionMeta, error)
	GetReceipt(*types.Hash) (*types.Receipt, error)
	GetViewStateLedger() ledger.StateLedger
	GetEvm(mes *vm.Message, vmConfig *vm.Config) (*vm.EVM, error)
	GetSystemContract(addr *ethcommon.Address) (common.SystemContract, bool)
	ConsensusReady() error

	ChainConfig() *params.ChainConfig
	StateAtTransaction(block *types.Block, txIndex int, reexec uint64) (*vm.Message, vm.BlockContext, *ledger.StateLedger, error)

	GetBlockWithoutTx(mode string, key string) (*types.Block, error)
	GetBlockTxHashList(height uint64) ([]*types.Hash, error)
	GetBlockTxList(height uint64) ([]*types.Transaction, error)
}

type ChainAPI

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

type CoreAPI

type CoreAPI interface {
	Broker() BrokerAPI
	Chain() ChainAPI
	Feed() FeedAPI
	Gas() GasAPI
	TxPool() TxPoolAPI
}

type FeedAPI

type FeedAPI interface {
	SubscribeLogsEvent(chan<- []*types.EvmLog) event.Subscription
	SubscribeNewTxEvent(chan<- []*types.Transaction) event.Subscription
	SubscribeNewBlockEvent(chan<- events.ExecutedEvent) event.Subscription
	BloomStatus() (uint64, uint64)
}

type GasAPI

type GasAPI interface {
	GetGasPrice() (uint64, error)
	GetCurrentGasPrice(blockHeight uint64) (uint64, error)
}

type NetworkAPI

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

type TxPoolAPI

type TxPoolAPI interface {
	GetPendingTxCountByAccount(account string) uint64
	GetTotalPendingTxCount() uint64
	GetTransaction(hash *types.Hash) *types.Transaction
	GetAccountMeta(account string, full bool) any
	GetMeta(full bool) any
}

Directories

Path Synopsis
Package mock_api is a generated GoMock package.
Package mock_api is a generated GoMock package.

Jump to

Keyboard shortcuts

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