service

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAPIs

func GetAPIs(eth *eth.Ethereum) ([]rpc.API, error)

Types

type RPCServer

type RPCServer struct {
	// contains filtered or unexported fields
}

func StartWSServer

func StartWSServer(network string, endPoint string, wsOrigins []string, apis []rpc.API) (*RPCServer, error)

network: tcp endPoint: 127.0.0.1:8010 namespace: ethermint

func (*RPCServer) Info

func (s *RPCServer) Info() string

func (*RPCServer) Stop

func (s *RPCServer) Stop()

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(eth *eth.Ethereum) (*Service, error)

func (*Service) BlockSubscribe

func (s *Service) BlockSubscribe(ctx context.Context) (*rpc.Subscription, error)

BlockSubscribe subscribe new block notifi.

func (*Service) GetBalance

func (s *Service) GetBalance(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (*big.Int, error)

func (*Service) GetBlock

func (s *Service) GetBlock(num *big.Int) (*types.LKBlock, error)

GetBlock query block

func (*Service) GetBlockNum

func (s *Service) GetBlockNum() (*big.Int, error)

GetBlockNum query current block num

func (*Service) GetBlockNumUint64

func (s *Service) GetBlockNumUint64() (uint64, error)

GetBlockNumUint64 query current block num

func (*Service) GetLogs

func (s *Service) GetLogs(ctx context.Context, crit filters.FilterCriteria) ([]*etypes.Log, error)

func (*Service) GetTransaction

func (s *Service) GetTransaction(req *types.TxRecordReq) (*types.LKTransaction, error)

GetTransaction query transaction

func (*Service) GetTransactionCount

func (s *Service) GetTransactionCount(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (uint64, error)

func (*Service) GetTransactionReceipt

func (s *Service) GetTransactionReceipt(hash common.Hash) (map[string]interface{}, error)

GetTransactionReceipt returns the transaction receipt for the given transaction hash.

func (*Service) GetWrappedTransaction

func (s *Service) GetWrappedTransaction(req *types.TxRecordReq) (*types.WrappedLKTransaction, error)

func (*Service) LogsSubscribe

func (s *Service) LogsSubscribe(ctx context.Context, crit filters.FilterCriteria) (*rpc.Subscription, error)

BlockSubscribe subscribe new block notifi.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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