Documentation
¶
Index ¶
- func GRPCUnMarshalBlock(b *pb.Block, inclTx bool, fullTx bool) (*types.Block, error)
- func GRPCUnMarshalHeader(b *pb.Block) *types.Header
- type Client
- func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*pb.Block, error)
- func (c *Client) BlockByNumber(ctx context.Context, number *big.Int) (*pb.Block, error)
- func (c *Client) Close()
- func (c *Client) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
- func (c *Client) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
- func (c *Client) TransactionCount(ctx context.Context, blockHash common.Hash) (uint, error)
- type Config
- type GApi
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GRPCUnMarshalBlock ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func DialContext ¶
DialContext returns a Clients with given rul
func (*Client) BlockByHash ¶
func (*Client) BlockByNumber ¶
BlockByNumber returns a block from the current canonical chain. If number is nil, the latest known block is returned.
Note that loading full blocks requires two requests. Use HeaderByNumber if you don't need all transactions or uncle headers.
func (*Client) HeaderByHash ¶
HeaderByHash returns the block header with the given hash.
func (*Client) HeaderByNumber ¶
HeaderByNumber returns a block header from the current canonical chain. If number is nil, the latest known header is returned.
type Config ¶
type Config struct { Modules []string `toml:",omitempty"` DataDir string `toml:",omitempt"` Host string `toml:",omitempty"` Port int `toml:",omitempty"` JsonRpcHost string `toml:",omitempty"` JsonRpcPort int `toml:",omitempty"` IpcPath string `toml:",omitempty"` }
Config grpc configuration
func (*Config) IpcAddress ¶
IpcAddress returns the ipc server address
func (*Config) JsonHttpAddress ¶
JsonHttpAddress returns the restfull json http server address
type GApi ¶
type GApi interface { IsPublic() bool Namespace() string RegisterServer(*grpc.Server) RegisterJsonRpc(context.Context, *runtime.ServeMux, string, []grpc.DialOption) }
GApi Named Register is better
Directories
¶
Path | Synopsis |
---|---|
v1
|
|
admin
Package admin is a reverse proxy.
|
Package admin is a reverse proxy. |
cpc
Package cpc is a reverse proxy.
|
Package cpc is a reverse proxy. |
debug
Package debug is a reverse proxy.
|
Package debug is a reverse proxy. |
miner
Package miner is a reverse proxy.
|
Package miner is a reverse proxy. |
personal
Package personal is a reverse proxy.
|
Package personal is a reverse proxy. |
txpool
Package txpool is a reverse proxy.
|
Package txpool is a reverse proxy. |
Click to show internal directories.
Click to hide internal directories.