rpc

package
v3.3.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: LGPL-3.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIService added in v1.1.0

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

APIService implements all rpc APIs.

func NewAPIService added in v1.1.0

func NewAPIService(tp txpool.TxPool, chainBase *chainbase.ChainBase, config *common.Config, p2pService p2p.Service, quitCh chan struct{}) *APIService

NewAPIService returns a new APIService instance.

func (*APIService) ExecTransaction added in v1.1.0

func (as *APIService) ExecTransaction(ctx context.Context, req *rpcpb.TransactionRequest) (*rpcpb.TxReceipt, error)

ExecTransaction executes a transaction by the node and returns the receipt.

func (*APIService) GetAccount added in v1.1.0

func (as *APIService) GetAccount(ctx context.Context, req *rpcpb.GetAccountRequest) (*rpcpb.Account, error)

GetAccount returns account information corresponding to the given account name.

func (*APIService) GetBatchContractStorage

GetBatchContractStorage returns contract storage corresponding to the given keys and fields.

func (*APIService) GetBlockByHash added in v1.1.0

func (as *APIService) GetBlockByHash(ctx context.Context, req *rpcpb.GetBlockByHashRequest) (*rpcpb.BlockResponse, error)

GetBlockByHash returns block corresponding to the given hash.

func (*APIService) GetBlockByNumber added in v1.1.0

func (as *APIService) GetBlockByNumber(ctx context.Context, req *rpcpb.GetBlockByNumberRequest) (*rpcpb.BlockResponse, error)

GetBlockByNumber returns block corresponding to the given number.

func (*APIService) GetCandidateBonus

func (as *APIService) GetCandidateBonus(ctx context.Context, req *rpcpb.GetAccountRequest) (*rpcpb.CandidateBonus, error)

GetCandidateBonus returns the bonus a candidate can claim.

func (*APIService) GetChainInfo added in v1.1.0

GetChainInfo returns the chain info.

func (*APIService) GetContract added in v1.1.0

func (as *APIService) GetContract(ctx context.Context, req *rpcpb.GetContractRequest) (*rpcpb.Contract, error)

GetContract returns contract information corresponding to the given contract ID.

func (*APIService) GetContractStorage added in v1.1.0

GetContractStorage returns contract storage corresponding to the given key and field.

func (*APIService) GetContractStorageFields

GetContractStorageFields returns contract storage corresponding to the given fields.

func (*APIService) GetContractVote

func (as *APIService) GetContractVote(ctx context.Context, req *rpcpb.GetContractRequest) (*rpcpb.ContractVote, error)

GetContractVote returns contract vote information by contract ID.

func (*APIService) GetGasRatio added in v1.1.0

func (as *APIService) GetGasRatio(ctx context.Context, req *rpcpb.EmptyRequest) (*rpcpb.GasRatioResponse, error)

GetGasRatio returns gas ratio information in head block

func (*APIService) GetNodeInfo added in v1.1.0

GetNodeInfo returns information abount node.

func (*APIService) GetProducerVoteInfo

GetProducerVoteInfo returns producers's vote info

func (*APIService) GetRAMInfo added in v1.1.0

GetRAMInfo returns the chain info.

func (*APIService) GetToken721Balance

GetToken721Balance returns balance of account of an specific token721 token.

func (*APIService) GetToken721Metadata

GetToken721Metadata returns metadata of an specific token721 token.

func (*APIService) GetToken721Owner

GetToken721Owner returns owner of an specific token721 token.

func (*APIService) GetTokenBalance added in v1.1.0

GetTokenBalance returns contract information corresponding to the given contract ID.

func (*APIService) GetTokenInfo

func (as *APIService) GetTokenInfo(ctx context.Context, req *rpcpb.GetTokenInfoRequest) (*rpcpb.TokenInfo, error)

GetTokenInfo returns the information of a given token.

func (*APIService) GetTxByHash added in v1.1.0

GetTxByHash returns the transaction corresponding to the given hash.

func (*APIService) GetTxReceiptByTxHash added in v1.1.0

func (as *APIService) GetTxReceiptByTxHash(ctx context.Context, req *rpcpb.TxHashRequest) (*rpcpb.TxReceipt, error)

GetTxReceiptByTxHash returns transaction receipts corresponding to the given tx hash.

func (*APIService) GetVoterBonus

func (as *APIService) GetVoterBonus(ctx context.Context, req *rpcpb.GetAccountRequest) (*rpcpb.VoterBonus, error)

GetVoterBonus returns the bonus a voter can claim.

func (*APIService) SendTransaction added in v1.1.0

SendTransaction sends a transaction to iserver.

func (*APIService) Subscribe added in v1.1.0

Subscribe used for event.

type Server added in v1.1.0

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

Server is the rpc server including grpc server and json gateway server.

func New added in v1.1.0

func New(tp txpool.TxPool, chainBase *chainbase.ChainBase, config *common.Config, p2pService p2p.Service) *Server

New returns a new rpc server instance.

func (*Server) Start added in v1.1.0

func (s *Server) Start() error

Start starts the rpc server.

func (*Server) Stop added in v1.1.0

func (s *Server) Stop()

Stop stops the rpc server.

Directories

Path Synopsis
Package main is a generated GoMock package.
Package main is a generated GoMock package.
Package rpcpb is a reverse proxy.
Package rpcpb is a reverse proxy.

Jump to

Keyboard shortcuts

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