cpc

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2018 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package cpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAccountReaderHandler

func RegisterAccountReaderHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAccountReaderHandler registers the http handlers for service AccountReader to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAccountReaderHandlerClient

func RegisterAccountReaderHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccountReaderClient) error

RegisterAccountReaderHandlerClient registers the http handlers for service AccountReader to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AccountReaderClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AccountReaderClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AccountReaderClient" to call the correct interceptors.

func RegisterAccountReaderHandlerFromEndpoint

func RegisterAccountReaderHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAccountReaderHandlerFromEndpoint is same as RegisterAccountReaderHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAccountReaderServer

func RegisterAccountReaderServer(s *grpc.Server, srv AccountReaderServer)

func RegisterChainReaderHandler

func RegisterChainReaderHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterChainReaderHandler registers the http handlers for service ChainReader to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterChainReaderHandlerClient

func RegisterChainReaderHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChainReaderClient) error

RegisterChainReaderHandlerClient registers the http handlers for service ChainReader to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ChainReaderClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ChainReaderClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ChainReaderClient" to call the correct interceptors.

func RegisterChainReaderHandlerFromEndpoint

func RegisterChainReaderHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterChainReaderHandlerFromEndpoint is same as RegisterChainReaderHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterChainReaderServer

func RegisterChainReaderServer(s *grpc.Server, srv ChainReaderServer)

func RegisterChainStateReaderHandler

func RegisterChainStateReaderHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterChainStateReaderHandler registers the http handlers for service ChainStateReader to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterChainStateReaderHandlerClient

func RegisterChainStateReaderHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChainStateReaderClient) error

RegisterChainStateReaderHandlerClient registers the http handlers for service ChainStateReader to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ChainStateReaderClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ChainStateReaderClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ChainStateReaderClient" to call the correct interceptors.

func RegisterChainStateReaderHandlerFromEndpoint

func RegisterChainStateReaderHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterChainStateReaderHandlerFromEndpoint is same as RegisterChainStateReaderHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterChainStateReaderServer

func RegisterChainStateReaderServer(s *grpc.Server, srv ChainStateReaderServer)

func RegisterCoinbaseHandler

func RegisterCoinbaseHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterCoinbaseHandler registers the http handlers for service Coinbase to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterCoinbaseHandlerClient

func RegisterCoinbaseHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CoinbaseClient) error

RegisterCoinbaseHandlerClient registers the http handlers for service Coinbase to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CoinbaseClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CoinbaseClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CoinbaseClient" to call the correct interceptors.

func RegisterCoinbaseHandlerFromEndpoint

func RegisterCoinbaseHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterCoinbaseHandlerFromEndpoint is same as RegisterCoinbaseHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterCoinbaseServer

func RegisterCoinbaseServer(s *grpc.Server, srv CoinbaseServer)

func RegisterMinerReaderHandler

func RegisterMinerReaderHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMinerReaderHandler registers the http handlers for service MinerReader to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMinerReaderHandlerClient

func RegisterMinerReaderHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MinerReaderClient) error

RegisterMinerReaderHandlerClient registers the http handlers for service MinerReader to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MinerReaderClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MinerReaderClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MinerReaderClient" to call the correct interceptors.

func RegisterMinerReaderHandlerFromEndpoint

func RegisterMinerReaderHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMinerReaderHandlerFromEndpoint is same as RegisterMinerReaderHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMinerReaderServer

func RegisterMinerReaderServer(s *grpc.Server, srv MinerReaderServer)

func RegisterTransactionPoolReaderHandler

func RegisterTransactionPoolReaderHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterTransactionPoolReaderHandler registers the http handlers for service TransactionPoolReader to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterTransactionPoolReaderHandlerClient

func RegisterTransactionPoolReaderHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TransactionPoolReaderClient) error

RegisterTransactionPoolReaderHandlerClient registers the http handlers for service TransactionPoolReader to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TransactionPoolReaderClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TransactionPoolReaderClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TransactionPoolReaderClient" to call the correct interceptors.

func RegisterTransactionPoolReaderHandlerFromEndpoint

func RegisterTransactionPoolReaderHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterTransactionPoolReaderHandlerFromEndpoint is same as RegisterTransactionPoolReaderHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterTransactionPoolReaderServer

func RegisterTransactionPoolReaderServer(s *grpc.Server, srv TransactionPoolReaderServer)

Types

type AccountReaderClient

type AccountReaderClient interface {
	// Accounts returns the collection of accounts this node manages
	Accounts(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.Addresses, error)
}

AccountReaderClient is the client API for AccountReader service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAccountReaderClient

func NewAccountReaderClient(cc *grpc.ClientConn) AccountReaderClient

type AccountReaderServer

type AccountReaderServer interface {
	// Accounts returns the collection of accounts this node manages
	Accounts(context.Context, *empty.Empty) (*common.Addresses, error)
}

AccountReaderServer is the server API for AccountReader service.

type ChainReaderClient

type ChainReaderClient interface {
	// GetBlockCount returns the block number of the chain head.
	GetBlockCount(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.BlockNumber, error)
	// GetBalance returns the amount of wei for the given address in the state of the
	// given block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta
	// block numbers are also allowed.
	GetBalance(ctx context.Context, in *ChainReaderRequest, opts ...grpc.CallOption) (*common.Balance, error)
	// GetBlockByNumber returns the requested block. When blockNr is -1 the chain head is returned. When fullTx is true all
	// transactions in the block are returned in full detail, otherwise only the transaction hash is returned.
	GetBlockByNumber(ctx context.Context, in *ChainReaderRequest, opts ...grpc.CallOption) (*common.Block, error)
	// GetBlockByHash returns the requested block. When fullTx is true all transactions in the block are returned in full
	// detail, otherwise only the transaction hash is returned.
	GetBlockByHash(ctx context.Context, in *ChainReaderRequest, opts ...grpc.CallOption) (*common.Block, error)
	// GetCode returns the code stored at the given address in the state for the given block number.
	GetCode(ctx context.Context, in *ChainReaderRequest, opts ...grpc.CallOption) (*common.Code, error)
}

ChainReaderClient is the client API for ChainReader service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewChainReaderClient

func NewChainReaderClient(cc *grpc.ClientConn) ChainReaderClient

type ChainReaderRequest

type ChainReaderRequest struct {
	Address              string   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	BlockHash            string   `protobuf:"bytes,2,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
	BlockNumber          int64    `protobuf:"varint,3,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"`
	IsFull               bool     `protobuf:"varint,4,opt,name=isFull,proto3" json:"isFull,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ChainReaderRequest ChainReader request arguments

func (*ChainReaderRequest) Descriptor

func (*ChainReaderRequest) Descriptor() ([]byte, []int)

func (*ChainReaderRequest) GetAddress

func (m *ChainReaderRequest) GetAddress() string

func (*ChainReaderRequest) GetBlockHash

func (m *ChainReaderRequest) GetBlockHash() string

func (*ChainReaderRequest) GetBlockNumber

func (m *ChainReaderRequest) GetBlockNumber() int64

func (*ChainReaderRequest) GetIsFull

func (m *ChainReaderRequest) GetIsFull() bool

func (*ChainReaderRequest) ProtoMessage

func (*ChainReaderRequest) ProtoMessage()

func (*ChainReaderRequest) Reset

func (m *ChainReaderRequest) Reset()

func (*ChainReaderRequest) String

func (m *ChainReaderRequest) String() string

func (*ChainReaderRequest) XXX_DiscardUnknown

func (m *ChainReaderRequest) XXX_DiscardUnknown()

func (*ChainReaderRequest) XXX_Marshal

func (m *ChainReaderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChainReaderRequest) XXX_Merge

func (m *ChainReaderRequest) XXX_Merge(src proto.Message)

func (*ChainReaderRequest) XXX_Size

func (m *ChainReaderRequest) XXX_Size() int

func (*ChainReaderRequest) XXX_Unmarshal

func (m *ChainReaderRequest) XXX_Unmarshal(b []byte) error

type ChainReaderServer

type ChainReaderServer interface {
	// GetBlockCount returns the block number of the chain head.
	GetBlockCount(context.Context, *empty.Empty) (*common.BlockNumber, error)
	// GetBalance returns the amount of wei for the given address in the state of the
	// given block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta
	// block numbers are also allowed.
	GetBalance(context.Context, *ChainReaderRequest) (*common.Balance, error)
	// GetBlockByNumber returns the requested block. When blockNr is -1 the chain head is returned. When fullTx is true all
	// transactions in the block are returned in full detail, otherwise only the transaction hash is returned.
	GetBlockByNumber(context.Context, *ChainReaderRequest) (*common.Block, error)
	// GetBlockByHash returns the requested block. When fullTx is true all transactions in the block are returned in full
	// detail, otherwise only the transaction hash is returned.
	GetBlockByHash(context.Context, *ChainReaderRequest) (*common.Block, error)
	// GetCode returns the code stored at the given address in the state for the given block number.
	GetCode(context.Context, *ChainReaderRequest) (*common.Code, error)
}

ChainReaderServer is the server API for ChainReader service.

type ChainStateReaderClient

type ChainStateReaderClient interface {
	// GasPrice returns a suggestion for a gas price.
	GasPrice(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.GasPrice, error)
	// ProtocolVersion returns the current cpchain protocol version this node supports
	ProtocolVersion(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*wrappers.UInt32Value, error)
	// Syncing returns false in case the node is currently not syncing with the network. It can be up to date or has not
	// yet received the latest block headers from its pears. In case it is synchronizing:
	// - startingBlock: block number this node started to synchronise from
	// - currentBlock:  block number this node is currently importing
	// - highestBlock:  block number of the highest block header this node has received from peers
	// - pulledStates:  number of state entries processed until now
	// - knownStates:   number of known state entries that still need to be pulled
	Syncing(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.SyncingInfo, error)
}

ChainStateReaderClient is the client API for ChainStateReader service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewChainStateReaderClient

func NewChainStateReaderClient(cc *grpc.ClientConn) ChainStateReaderClient

type ChainStateReaderServer

type ChainStateReaderServer interface {
	// GasPrice returns a suggestion for a gas price.
	GasPrice(context.Context, *empty.Empty) (*common.GasPrice, error)
	// ProtocolVersion returns the current cpchain protocol version this node supports
	ProtocolVersion(context.Context, *empty.Empty) (*wrappers.UInt32Value, error)
	// Syncing returns false in case the node is currently not syncing with the network. It can be up to date or has not
	// yet received the latest block headers from its pears. In case it is synchronizing:
	// - startingBlock: block number this node started to synchronise from
	// - currentBlock:  block number this node is currently importing
	// - highestBlock:  block number of the highest block header this node has received from peers
	// - pulledStates:  number of state entries processed until now
	// - knownStates:   number of known state entries that still need to be pulled
	Syncing(context.Context, *empty.Empty) (*common.SyncingInfo, error)
}

ChainStateReaderServer is the server API for ChainStateReader service.

type CoinbaseClient

type CoinbaseClient interface {
	// Coinbase is the address that mining rewards will be send to
	Coinbase(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.Address, error)
}

CoinbaseClient is the client API for Coinbase service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewCoinbaseClient

func NewCoinbaseClient(cc *grpc.ClientConn) CoinbaseClient

type CoinbaseServer

type CoinbaseServer interface {
	// Coinbase is the address that mining rewards will be send to
	Coinbase(context.Context, *empty.Empty) (*common.Address, error)
}

CoinbaseServer is the server API for Coinbase service.

type MinerReaderClient

type MinerReaderClient interface {
	// Mining returns an indication if this node is currently mining.
	Mining(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.IsOk, error)
}

MinerReaderClient is the client API for MinerReader service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMinerReaderClient

func NewMinerReaderClient(cc *grpc.ClientConn) MinerReaderClient

type MinerReaderServer

type MinerReaderServer interface {
	// Mining returns an indication if this node is currently mining.
	Mining(context.Context, *empty.Empty) (*common.IsOk, error)
}

MinerReaderServer is the server API for MinerReader service.

type RawTransaction

type RawTransaction struct {
	RawTransaction       []byte   `protobuf:"bytes,1,opt,name=rawTransaction,proto3" json:"rawTransaction,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

RawTransaction transaction bytes

func (*RawTransaction) Descriptor

func (*RawTransaction) Descriptor() ([]byte, []int)

func (*RawTransaction) GetRawTransaction

func (m *RawTransaction) GetRawTransaction() []byte

func (*RawTransaction) ProtoMessage

func (*RawTransaction) ProtoMessage()

func (*RawTransaction) Reset

func (m *RawTransaction) Reset()

func (*RawTransaction) String

func (m *RawTransaction) String() string

func (*RawTransaction) XXX_DiscardUnknown

func (m *RawTransaction) XXX_DiscardUnknown()

func (*RawTransaction) XXX_Marshal

func (m *RawTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RawTransaction) XXX_Merge

func (m *RawTransaction) XXX_Merge(src proto.Message)

func (*RawTransaction) XXX_Size

func (m *RawTransaction) XXX_Size() int

func (*RawTransaction) XXX_Unmarshal

func (m *RawTransaction) XXX_Unmarshal(b []byte) error

type TransactionCount

type TransactionCount struct {
	TransactionCount     uint64   `protobuf:"varint,1,opt,name=transactionCount,proto3" json:"transactionCount,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TransactionCount transaction count

func (*TransactionCount) Descriptor

func (*TransactionCount) Descriptor() ([]byte, []int)

func (*TransactionCount) GetTransactionCount

func (m *TransactionCount) GetTransactionCount() uint64

func (*TransactionCount) ProtoMessage

func (*TransactionCount) ProtoMessage()

func (*TransactionCount) Reset

func (m *TransactionCount) Reset()

func (*TransactionCount) String

func (m *TransactionCount) String() string

func (*TransactionCount) XXX_DiscardUnknown

func (m *TransactionCount) XXX_DiscardUnknown()

func (*TransactionCount) XXX_Marshal

func (m *TransactionCount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TransactionCount) XXX_Merge

func (m *TransactionCount) XXX_Merge(src proto.Message)

func (*TransactionCount) XXX_Size

func (m *TransactionCount) XXX_Size() int

func (*TransactionCount) XXX_Unmarshal

func (m *TransactionCount) XXX_Unmarshal(b []byte) error

type TransactionHash

type TransactionHash struct {
	TransactionHash      string   `protobuf:"bytes,1,opt,name=transactionHash,proto3" json:"transactionHash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TransactionHash transaction hash

func (*TransactionHash) Descriptor

func (*TransactionHash) Descriptor() ([]byte, []int)

func (*TransactionHash) GetTransactionHash

func (m *TransactionHash) GetTransactionHash() string

func (*TransactionHash) ProtoMessage

func (*TransactionHash) ProtoMessage()

func (*TransactionHash) Reset

func (m *TransactionHash) Reset()

func (*TransactionHash) String

func (m *TransactionHash) String() string

func (*TransactionHash) XXX_DiscardUnknown

func (m *TransactionHash) XXX_DiscardUnknown()

func (*TransactionHash) XXX_Marshal

func (m *TransactionHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TransactionHash) XXX_Merge

func (m *TransactionHash) XXX_Merge(src proto.Message)

func (*TransactionHash) XXX_Size

func (m *TransactionHash) XXX_Size() int

func (*TransactionHash) XXX_Unmarshal

func (m *TransactionHash) XXX_Unmarshal(b []byte) error

type TransactionPoolReaderClient

type TransactionPoolReaderClient interface {
	// GetBlockTransactionCountByNumber returns the number of transactions in the block with the given block number.
	GetTransactionCountByBlockNumber(ctx context.Context, in *common.BlockNumber, opts ...grpc.CallOption) (*TransactionCount, error)
	// GetBlockTransactionCountByHash returns the number of transactions in the block with the given hash.
	GetTransactionCountByBlockHash(ctx context.Context, in *common.BlockHash, opts ...grpc.CallOption) (*TransactionCount, error)
	// GetTransactionByBlockNumberAndIndex returns the transaction for the given block number and index.
	GetTransactionByBlockNumberAndIndex(ctx context.Context, in *TransactionPoolReaderRequest, opts ...grpc.CallOption) (*common.RpcTransaction, error)
	// GetTransactionByBlockHashAndIndex returns the transaction for the given block hash and index.
	GetTransactionByBlockHashAndIndex(ctx context.Context, in *TransactionPoolReaderRequest, opts ...grpc.CallOption) (*common.RpcTransaction, error)
	// GetTransactionByHash returns the transaction for the given hash
	GetRawTransactionByBlockNumberAndIndex(ctx context.Context, in *TransactionPoolReaderRequest, opts ...grpc.CallOption) (*RawTransaction, error)
	// GetRawTransactionByBlockHashAndIndex returns the bytes of the transaction for the given block hash and index.
	GetTransactionByHash(ctx context.Context, in *TransactionHash, opts ...grpc.CallOption) (*common.RpcTransaction, error)
	// GetTransactionReceipt returns the transaction receipt for the given transaction hash.
	GetTransactionReceipt(ctx context.Context, in *TransactionHash, opts ...grpc.CallOption) (*common.Receipt, error)
	// GetTransactionCount returns the number of transactions the given address has sent for the given block number
	GetTransactionCount(ctx context.Context, in *TransactionPoolReaderRequest, opts ...grpc.CallOption) (*TransactionCount, error)
}

TransactionPoolReaderClient is the client API for TransactionPoolReader service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewTransactionPoolReaderClient

func NewTransactionPoolReaderClient(cc *grpc.ClientConn) TransactionPoolReaderClient

type TransactionPoolReaderRequest

type TransactionPoolReaderRequest struct {
	BlockNumber          uint64   `protobuf:"varint,1,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"`
	Index                uint64   `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	BlockHash            string   `protobuf:"bytes,3,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
	Address              string   `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TransactionPoolReaderRequest request parameters

func (*TransactionPoolReaderRequest) Descriptor

func (*TransactionPoolReaderRequest) Descriptor() ([]byte, []int)

func (*TransactionPoolReaderRequest) GetAddress

func (m *TransactionPoolReaderRequest) GetAddress() string

func (*TransactionPoolReaderRequest) GetBlockHash

func (m *TransactionPoolReaderRequest) GetBlockHash() string

func (*TransactionPoolReaderRequest) GetBlockNumber

func (m *TransactionPoolReaderRequest) GetBlockNumber() uint64

func (*TransactionPoolReaderRequest) GetIndex

func (m *TransactionPoolReaderRequest) GetIndex() uint64

func (*TransactionPoolReaderRequest) ProtoMessage

func (*TransactionPoolReaderRequest) ProtoMessage()

func (*TransactionPoolReaderRequest) Reset

func (m *TransactionPoolReaderRequest) Reset()

func (*TransactionPoolReaderRequest) String

func (*TransactionPoolReaderRequest) XXX_DiscardUnknown

func (m *TransactionPoolReaderRequest) XXX_DiscardUnknown()

func (*TransactionPoolReaderRequest) XXX_Marshal

func (m *TransactionPoolReaderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TransactionPoolReaderRequest) XXX_Merge

func (m *TransactionPoolReaderRequest) XXX_Merge(src proto.Message)

func (*TransactionPoolReaderRequest) XXX_Size

func (m *TransactionPoolReaderRequest) XXX_Size() int

func (*TransactionPoolReaderRequest) XXX_Unmarshal

func (m *TransactionPoolReaderRequest) XXX_Unmarshal(b []byte) error

type TransactionPoolReaderServer

type TransactionPoolReaderServer interface {
	// GetBlockTransactionCountByNumber returns the number of transactions in the block with the given block number.
	GetTransactionCountByBlockNumber(context.Context, *common.BlockNumber) (*TransactionCount, error)
	// GetBlockTransactionCountByHash returns the number of transactions in the block with the given hash.
	GetTransactionCountByBlockHash(context.Context, *common.BlockHash) (*TransactionCount, error)
	// GetTransactionByBlockNumberAndIndex returns the transaction for the given block number and index.
	GetTransactionByBlockNumberAndIndex(context.Context, *TransactionPoolReaderRequest) (*common.RpcTransaction, error)
	// GetTransactionByBlockHashAndIndex returns the transaction for the given block hash and index.
	GetTransactionByBlockHashAndIndex(context.Context, *TransactionPoolReaderRequest) (*common.RpcTransaction, error)
	// GetTransactionByHash returns the transaction for the given hash
	GetRawTransactionByBlockNumberAndIndex(context.Context, *TransactionPoolReaderRequest) (*RawTransaction, error)
	// GetRawTransactionByBlockHashAndIndex returns the bytes of the transaction for the given block hash and index.
	GetTransactionByHash(context.Context, *TransactionHash) (*common.RpcTransaction, error)
	// GetTransactionReceipt returns the transaction receipt for the given transaction hash.
	GetTransactionReceipt(context.Context, *TransactionHash) (*common.Receipt, error)
	// GetTransactionCount returns the number of transactions the given address has sent for the given block number
	GetTransactionCount(context.Context, *TransactionPoolReaderRequest) (*TransactionCount, error)
}

TransactionPoolReaderServer is the server API for TransactionPoolReader service.

Jump to

Keyboard shortcuts

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