Documentation
¶
Overview ¶
Copyright (C) 2018 go-dappley authors
This file is part of the go-dappley library.
the go-dappley library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
the go-dappley library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the go-dappley library. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2018 go-dappley authors ¶
This file is part of the go-dappley library.
the go-dappley library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
the go-dappley library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the go-dappley library. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Constants
- type AdminRpcService
- func (adminRpcService *AdminRpcService) RpcAddPeer(ctx context.Context, in *rpcpb.AddPeerRequest) (*rpcpb.AddPeerResponse, error)
- func (adminRpcService *AdminRpcService) RpcAddProducer(ctx context.Context, in *rpcpb.AddProducerRequest) (*rpcpb.AddProducerResponse, error)
- func (adminRpcService *AdminRpcService) RpcGetPeerInfo(ctx context.Context, in *rpcpb.GetPeerInfoRequest) (*rpcpb.GetPeerInfoResponse, error)
- func (adminRpcService *AdminRpcService) RpcSend(ctx context.Context, in *rpcpb.SendRequest) (*rpcpb.SendResponse, error)
- func (adminRpcService *AdminRpcService) RpcSendFromMiner(ctx context.Context, in *rpcpb.SendFromMinerRequest) (*rpcpb.SendFromMinerResponse, error)
- func (adminRpcService *AdminRpcService) RpcUnlockWallet(ctx context.Context, in *rpcpb.UnlockWalletRequest) (*rpcpb.UnlockWalletResponse, error)
- type RpcService
- func (rpcService *RpcService) RpcGetBalance(ctx context.Context, in *rpcpb.GetBalanceRequest) (*rpcpb.GetBalanceResponse, error)
- func (rpcService *RpcService) RpcGetBlockByHash(ctx context.Context, in *rpcpb.GetBlockByHashRequest) (*rpcpb.GetBlockByHashResponse, error)
- func (rpcService *RpcService) RpcGetBlockByHeight(ctx context.Context, in *rpcpb.GetBlockByHeightRequest) (*rpcpb.GetBlockByHeightResponse, error)
- func (rpcService *RpcService) RpcGetBlockchainInfo(ctx context.Context, in *rpcpb.GetBlockchainInfoRequest) (*rpcpb.GetBlockchainInfoResponse, error)
- func (rpcService *RpcService) RpcGetBlocks(ctx context.Context, in *rpcpb.GetBlocksRequest) (*rpcpb.GetBlocksResponse, error)
- func (rpcService *RpcService) RpcGetUTXO(ctx context.Context, in *rpcpb.GetUTXORequest) (*rpcpb.GetUTXOResponse, error)
- func (rpcService *RpcService) RpcGetVersion(ctx context.Context, in *rpcpb.GetVersionRequest) (*rpcpb.GetVersionResponse, error)
- func (rpcService *RpcService) RpcSendTransaction(ctx context.Context, in *rpcpb.SendTransactionRequest) (*rpcpb.SendTransactionResponse, error)
- type Server
Constants ¶
const ( // OK success with no error OK uint32 = 0 // ProtoVersionNotSupport client's proto version not support by server ProtoVersionNotSupport uint32 = 1 // InvalidAddress wallet address is invalid InvalidAddress uint32 = 2 // InvalidTransaction transaction is invalid InvalidTransaction uint32 = 3 //BlockNotFound block not found in blockchain BlockNotFound uint32 = 4 // GetBlocksCountOverflow get blocks count over the max num GetBlocksCountOverflow uint32 = 5 )
const ( ProtoVersion = "1.0.0" MaxGetBlocksCount int32 = 500 MinUtxoBlockHeaderCount uint64 = 6 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminRpcService ¶ added in v0.1.1
type AdminRpcService struct {
// contains filtered or unexported fields
}
func (*AdminRpcService) RpcAddPeer ¶ added in v0.1.1
func (adminRpcService *AdminRpcService) RpcAddPeer(ctx context.Context, in *rpcpb.AddPeerRequest) (*rpcpb.AddPeerResponse, error)
func (*AdminRpcService) RpcAddProducer ¶ added in v0.1.2
func (adminRpcService *AdminRpcService) RpcAddProducer(ctx context.Context, in *rpcpb.AddProducerRequest) (*rpcpb.AddProducerResponse, error)
func (*AdminRpcService) RpcGetPeerInfo ¶ added in v0.1.2
func (adminRpcService *AdminRpcService) RpcGetPeerInfo(ctx context.Context, in *rpcpb.GetPeerInfoRequest) (*rpcpb.GetPeerInfoResponse, error)
func (*AdminRpcService) RpcSend ¶ added in v0.1.2
func (adminRpcService *AdminRpcService) RpcSend(ctx context.Context, in *rpcpb.SendRequest) (*rpcpb.SendResponse, error)
func (*AdminRpcService) RpcSendFromMiner ¶ added in v0.1.2
func (adminRpcService *AdminRpcService) RpcSendFromMiner(ctx context.Context, in *rpcpb.SendFromMinerRequest) (*rpcpb.SendFromMinerResponse, error)
func (*AdminRpcService) RpcUnlockWallet ¶ added in v0.1.2
func (adminRpcService *AdminRpcService) RpcUnlockWallet(ctx context.Context, in *rpcpb.UnlockWalletRequest) (*rpcpb.UnlockWalletResponse, error)
unlock the wallet through rpc service
type RpcService ¶ added in v0.1.1
type RpcService struct {
// contains filtered or unexported fields
}
func (*RpcService) RpcGetBalance ¶ added in v0.1.1
func (rpcService *RpcService) RpcGetBalance(ctx context.Context, in *rpcpb.GetBalanceRequest) (*rpcpb.GetBalanceResponse, error)
func (*RpcService) RpcGetBlockByHash ¶ added in v0.1.2
func (rpcService *RpcService) RpcGetBlockByHash(ctx context.Context, in *rpcpb.GetBlockByHashRequest) (*rpcpb.GetBlockByHashResponse, error)
RpcGetBlockByHash Get single block in blockchain by hash
func (*RpcService) RpcGetBlockByHeight ¶ added in v0.1.2
func (rpcService *RpcService) RpcGetBlockByHeight(ctx context.Context, in *rpcpb.GetBlockByHeightRequest) (*rpcpb.GetBlockByHeightResponse, error)
RpcGetBlockByHeight Get single block in blockchain by height
func (*RpcService) RpcGetBlockchainInfo ¶ added in v0.1.1
func (rpcService *RpcService) RpcGetBlockchainInfo(ctx context.Context, in *rpcpb.GetBlockchainInfoRequest) (*rpcpb.GetBlockchainInfoResponse, error)
func (*RpcService) RpcGetBlocks ¶ added in v0.1.2
func (rpcService *RpcService) RpcGetBlocks(ctx context.Context, in *rpcpb.GetBlocksRequest) (*rpcpb.GetBlocksResponse, error)
RpcGetBlocks Get blocks in blockchain from head to tail
func (*RpcService) RpcGetUTXO ¶ added in v0.1.2
func (rpcService *RpcService) RpcGetUTXO(ctx context.Context, in *rpcpb.GetUTXORequest) (*rpcpb.GetUTXOResponse, error)
func (*RpcService) RpcGetVersion ¶ added in v0.1.2
func (rpcService *RpcService) RpcGetVersion(ctx context.Context, in *rpcpb.GetVersionRequest) (*rpcpb.GetVersionResponse, error)
func (*RpcService) RpcSendTransaction ¶ added in v0.1.2
func (rpcService *RpcService) RpcSendTransaction(ctx context.Context, in *rpcpb.SendTransactionRequest) (*rpcpb.SendTransactionResponse, error)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AuthInterceptor ¶ added in v0.1.1
func (s *Server) AuthInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)