Documentation ¶
Index ¶
- type ApiBackend
- func (b *ApiBackend) AccountManager() *accounts.Manager
- func (b *ApiBackend) BalanceRecordByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.BlockBalanceRecords, error)
- func (b *ApiBackend) Block(heightPtr *uint64) (*rtypes.ResultBlock, error)
- func (b *ApiBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error)
- func (b *ApiBackend) BloomStatus() (uint64, uint64)
- func (b *ApiBackend) Coinbase() common.Address
- func (b *ApiBackend) ConsensusState() (*rtypes.ResultConsensusState, error)
- func (b *ApiBackend) DumpConsensusState() (*rtypes.ResultDumpConsensusState, error)
- func (b *ApiBackend) EVMAllowed() bool
- func (b *ApiBackend) EventBus() *types.EventBus
- func (b *ApiBackend) GetBlock(ctx context.Context, blockHash common.Hash) (*types.Block, error)
- func (b *ApiBackend) GetBlockBalanceRecords(height uint64) *types.BlockBalanceRecords
- func (b *ApiBackend) GetBlockTokenOutputSeq(ctx context.Context, blockHeight uint64) map[string]int64
- func (b *ApiBackend) GetMaxOutputIndex(ctx context.Context, token common.Address) int64
- func (b *ApiBackend) GetOutput(ctx context.Context, token common.Address, index uint64) (*types.UTXOOutputData, error)
- func (b *ApiBackend) GetPoolNonce(ctx context.Context, addr common.Address) (uint64, error)
- func (b *ApiBackend) GetPoolTransaction(txHash common.Hash) *types.Transaction
- func (b *ApiBackend) GetPoolTx(txHash common.Hash) types.Tx
- func (b *ApiBackend) GetReceipts(ctx context.Context, blockNr uint64) types.Receipts
- func (b *ApiBackend) GetSeeds() []rtypes.Node
- func (b *ApiBackend) GetTransactionReceipt(hash common.Hash) (*types.Receipt, common.Hash, uint64, uint64)
- func (b *ApiBackend) GetTx(hash common.Hash) (types.Tx, *types.TxEntry)
- func (b *ApiBackend) GetTxsResult(ctx context.Context, blockNr uint64) (*types.TxsResult, error)
- func (b *ApiBackend) GetUTXOGas() uint64
- func (b *ApiBackend) GetVM(ctx context.Context, msg types.Message, state *state.StateDB, ...) (vm.VmInterface, func() error, error)
- func (b *ApiBackend) HeaderByHeight(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error)
- func (b *ApiBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error)
- func (b *ApiBackend) Height() uint64
- func (b *ApiBackend) NetInfo() (*rtypes.ResultNetInfo, error)
- func (b *ApiBackend) PrometheusMetrics() string
- func (b *ApiBackend) ProtocolVersion() string
- func (b *ApiBackend) SendTx(ctx context.Context, signedTx types.Tx) error
- func (b *ApiBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession)
- func (b *ApiBackend) StartTheWorld() bool
- func (b *ApiBackend) StateAndHeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*state.StateDB, *types.Header, error)
- func (b *ApiBackend) Stats() (int, int, int)
- func (b *ApiBackend) Status() (*rtypes.ResultStatus, error)
- func (b *ApiBackend) StopTheWorld() bool
- func (b *ApiBackend) SuggestPrice(ctx context.Context) (*big.Int, error)
- func (b *ApiBackend) Validators(heightPtr *uint64) (*rtypes.ResultValidators, error)
- type App
- type BalanceRecordStore
- type BlockStore
- type BloomService
- type Consensus
- type Context
- func (c *Context) GetCoinBase() common.Address
- func (c *Context) GetConsensusReactor() *cs.ConsensusReactor
- func (c *Context) GetMempool() Mempool
- func (c *Context) SetAccountManager(am *accounts.Manager)
- func (c *Context) SetApp(app App)
- func (c *Context) SetBalanceRecordStore(brs BalanceRecordStore)
- func (c *Context) SetBlockstore(bs BlockStore)
- func (c *Context) SetConsensus(cs Consensus)
- func (c *Context) SetConsensusReactor(conR *cs.ConsensusReactor)
- func (c *Context) SetEventBus(eb *types.EventBus)
- func (c *Context) SetLogger(logger log.Logger)
- func (c *Context) SetMempool(mem Mempool)
- func (c *Context) SetPubKey(pk crypto.PubKey)
- func (c *Context) SetStateDB(db dbm.DB)
- func (c *Context) SetSwitch(sw *p2p.Switch)
- func (c *Context) SetTrieDB(db dbm.DB, isTrie bool)
- func (c *Context) SetTxService(txSrv *txmgr.Service)
- func (c *Context) SetUTXO(utxo UtxoStore)
- type Mempool
- type MockMempool
- type PubsubApi
- func (ps *PubsubApi) BalanceRecordsSubscribe(ctx context.Context) (*rpc.Subscription, error)
- func (ps *PubsubApi) BlockSubscribe(ctx context.Context) (*rpc.Subscription, error)
- func (ps *PubsubApi) BroadcastTxSync(txBytes []byte, txType string) (bool, error)
- func (ps *PubsubApi) GetBalance(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (*big.Int, error)
- func (ps *PubsubApi) GetBlock(blockNr rpc.BlockNumber) (*rtypes.WholeBlock, error)
- func (ps *PubsubApi) GetLogs(ctx context.Context, crit filters.FilterCriteria) ([]*types.Log, error)
- func (ps *PubsubApi) GetTransaction(hash common.Hash) *rtypes.RPCTx
- func (ps *PubsubApi) GetTransactionCount(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (uint64, error)
- func (ps *PubsubApi) LogsSubscribe(ctx context.Context, crit filters.FilterCriteria) (*rpc.Subscription, error)
- func (ps *PubsubApi) ReceiptsSubscribe(ctx context.Context) (*rpc.Subscription, error)
- func (ps *PubsubApi) Validators(ctx context.Context, number rpc.BlockNumber) (*rtypes.ResultValidators, error)
- type Service
- type UtxoStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiBackend ¶
type ApiBackend struct {
// contains filtered or unexported fields
}
func NewApiBackend ¶
func NewApiBackend(s *Service) *ApiBackend
func (*ApiBackend) AccountManager ¶
func (b *ApiBackend) AccountManager() *accounts.Manager
func (*ApiBackend) BalanceRecordByNumber ¶
func (b *ApiBackend) BalanceRecordByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.BlockBalanceRecords, error)
func (*ApiBackend) Block ¶
func (b *ApiBackend) Block(heightPtr *uint64) (*rtypes.ResultBlock, error)
func (*ApiBackend) BlockByNumber ¶
func (b *ApiBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error)
func (*ApiBackend) Coinbase ¶
func (b *ApiBackend) Coinbase() common.Address
func (*ApiBackend) ConsensusState ¶
func (b *ApiBackend) ConsensusState() (*rtypes.ResultConsensusState, error)
func (*ApiBackend) DumpConsensusState ¶
func (b *ApiBackend) DumpConsensusState() (*rtypes.ResultDumpConsensusState, error)
func (*ApiBackend) EventBus ¶
func (b *ApiBackend) EventBus() *types.EventBus
func (*ApiBackend) GetBlockBalanceRecords ¶
func (b *ApiBackend) GetBlockBalanceRecords(height uint64) *types.BlockBalanceRecords
func (*ApiBackend) GetBlockTokenOutputSeq ¶
func (*ApiBackend) GetMaxOutputIndex ¶
GetMaxOutputIndex get max UTXO output index by token
func (*ApiBackend) GetOutput ¶
func (b *ApiBackend) GetOutput(ctx context.Context, token common.Address, index uint64) (*types.UTXOOutputData, error)
GetOutput get UTXO output
func (*ApiBackend) GetPoolNonce ¶
func (*ApiBackend) GetPoolTransaction ¶
func (b *ApiBackend) GetPoolTransaction(txHash common.Hash) *types.Transaction
func (*ApiBackend) GetReceipts ¶
func (*ApiBackend) GetSeeds ¶ added in v0.1.1
func (b *ApiBackend) GetSeeds() []rtypes.Node
func (*ApiBackend) GetTransactionReceipt ¶
func (*ApiBackend) GetTxsResult ¶
func (*ApiBackend) GetUTXOGas ¶
func (b *ApiBackend) GetUTXOGas() uint64
func (*ApiBackend) HeaderByHeight ¶
func (b *ApiBackend) HeaderByHeight(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error)
func (*ApiBackend) HeaderByNumber ¶
func (b *ApiBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error)
func (*ApiBackend) Height ¶
func (b *ApiBackend) Height() uint64
func (*ApiBackend) NetInfo ¶
func (b *ApiBackend) NetInfo() (*rtypes.ResultNetInfo, error)
func (*ApiBackend) PrometheusMetrics ¶
func (b *ApiBackend) PrometheusMetrics() string
func (*ApiBackend) ProtocolVersion ¶
func (b *ApiBackend) ProtocolVersion() string
General Ethereum API
func (*ApiBackend) ServiceFilter ¶
func (b *ApiBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession)
func (*ApiBackend) StartTheWorld ¶
func (b *ApiBackend) StartTheWorld() bool
func (*ApiBackend) StateAndHeaderByNumber ¶
func (b *ApiBackend) StateAndHeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*state.StateDB, *types.Header, error)
func (*ApiBackend) Status ¶
func (b *ApiBackend) Status() (*rtypes.ResultStatus, error)
func (*ApiBackend) SuggestPrice ¶
func (*ApiBackend) Validators ¶
func (b *ApiBackend) Validators(heightPtr *uint64) (*rtypes.ResultValidators, error)
type BalanceRecordStore ¶
type BalanceRecordStore interface { Save(blockHeight uint64, bbr *types.BlockBalanceRecords) Get(blockHeight uint64) *types.BlockBalanceRecords }
type BlockStore ¶
type BlockStore interface { Height() uint64 LoadBlockMeta(height uint64) *types.BlockMeta LoadTxsResult(height uint64) (*types.TxsResult, error) LoadBlock(height uint64) *types.Block GetDB() dbm.DB //GetTx(hash common.Hash) (types.Tx, common.Hash, uint64, uint64) GetTx(hash common.Hash) (types.Tx, *types.TxEntry) GetTransactionReceipt(hash common.Hash) (*types.Receipt, common.Hash, uint64, uint64) GetHeader(height uint64) *types.Header LoadBlockByHash(hash common.Hash) *types.Block LoadBlockMetaByHash(hash common.Hash) *types.BlockMeta GetReceipts(height uint64) *types.Receipts }
type BloomService ¶
type BloomService struct {
// contains filtered or unexported fields
}
func NewBloomService ¶
func NewBloomService(basic *Service) *BloomService
func (*BloomService) Start ¶
func (bs *BloomService) Start() error
func (*BloomService) Stop ¶
func (bs *BloomService) Stop() error
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext() *Context
func (*Context) GetCoinBase ¶
func (*Context) GetConsensusReactor ¶
func (c *Context) GetConsensusReactor() *cs.ConsensusReactor
func (*Context) GetMempool ¶
func (*Context) SetAccountManager ¶
func (*Context) SetBalanceRecordStore ¶
func (c *Context) SetBalanceRecordStore(brs BalanceRecordStore)
func (*Context) SetBlockstore ¶
func (c *Context) SetBlockstore(bs BlockStore)
func (*Context) SetConsensus ¶
func (*Context) SetConsensusReactor ¶
func (c *Context) SetConsensusReactor(conR *cs.ConsensusReactor)
func (*Context) SetEventBus ¶
func (*Context) SetMempool ¶
func (*Context) SetStateDB ¶
func (*Context) SetTxService ¶
type MockMempool ¶
MockMempool is an autogenerated mock type for the Mempool type
type PubsubApi ¶
type PubsubApi struct {
// contains filtered or unexported fields
}
func (*PubsubApi) BalanceRecordsSubscribe ¶
func (*PubsubApi) BlockSubscribe ¶
BlockSubscribe subscribe new block notifi.
func (*PubsubApi) BroadcastTxSync ¶
BroadcastTxSync to broadcast a tx with txType
func (*PubsubApi) GetBalance ¶
func (ps *PubsubApi) GetBalance(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (*big.Int, error)
GetBalance the same as rpc api
func (*PubsubApi) GetBlock ¶
func (ps *PubsubApi) GetBlock(blockNr rpc.BlockNumber) (*rtypes.WholeBlock, error)
GetBlock query block
func (*PubsubApi) GetLogs ¶
func (ps *PubsubApi) GetLogs(ctx context.Context, crit filters.FilterCriteria) ([]*types.Log, error)
GetLogs by filter
func (*PubsubApi) GetTransaction ¶
GetTransaction by hash and type.
func (*PubsubApi) GetTransactionCount ¶
func (ps *PubsubApi) GetTransactionCount(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (uint64, error)
GetTransactionCount the same as rpc api
func (*PubsubApi) LogsSubscribe ¶
func (ps *PubsubApi) LogsSubscribe(ctx context.Context, crit filters.FilterCriteria) (*rpc.Subscription, error)
LogsSubscribe subscribe new log notifi.
func (*PubsubApi) ReceiptsSubscribe ¶
func (*PubsubApi) Validators ¶
func (ps *PubsubApi) Validators(ctx context.Context, number rpc.BlockNumber) (*rtypes.ResultValidators, error)
Click to show internal directories.
Click to hide internal directories.