Documentation
¶
Index ¶
- type ResultBroadcastTx
- type Service
- func (s *Service) Address(ctx context.Context, req *pb.AddressRequest) (*pb.AddressResponse, error)
- func (s *Service) Addresses(ctx context.Context, req *pb.AddressesRequest) (*pb.AddressesResponse, error)
- func (s *Service) Block(ctx context.Context, req *pb.BlockRequest) (*pb.BlockResponse, error)
- func (s *Service) Candidate(ctx context.Context, req *pb.CandidateRequest) (*pb.CandidateResponse, error)
- func (s *Service) Candidates(ctx context.Context, req *pb.CandidatesRequest) (*pb.CandidatesResponse, error)
- func (s *Service) CoinInfo(ctx context.Context, req *pb.CoinInfoRequest) (*pb.CoinInfoResponse, error)
- func (s *Service) CoinInfoById(ctx context.Context, req *pb.CoinIdRequest) (*pb.CoinInfoResponse, error)
- func (s *Service) EstimateCoinBuy(ctx context.Context, req *pb.EstimateCoinBuyRequest) (*pb.EstimateCoinBuyResponse, error)
- func (s *Service) EstimateCoinSell(ctx context.Context, req *pb.EstimateCoinSellRequest) (*pb.EstimateCoinSellResponse, error)
- func (s *Service) EstimateCoinSellAll(ctx context.Context, req *pb.EstimateCoinSellAllRequest) (*pb.EstimateCoinSellAllResponse, error)
- func (s *Service) EstimateTxCommission(ctx context.Context, req *pb.EstimateTxCommissionRequest) (*pb.EstimateTxCommissionResponse, error)
- func (s *Service) Events(ctx context.Context, req *pb.EventsRequest) (*pb.EventsResponse, error)
- func (s *Service) Frozen(ctx context.Context, req *pb.FrozenRequest) (*pb.FrozenResponse, error)
- func (s *Service) Genesis(ctx context.Context, _ *empty.Empty) (*pb.GenesisResponse, error)
- func (s *Service) Halts(_ context.Context, req *pb.HaltsRequest) (*pb.HaltsResponse, error)
- func (s *Service) MaxGasPrice(ctx context.Context, req *pb.MaxGasPriceRequest) (*pb.MaxGasPriceResponse, error)
- func (s *Service) MinGasPrice(context.Context, *empty.Empty) (*pb.MinGasPriceResponse, error)
- func (s *Service) MissedBlocks(ctx context.Context, req *pb.MissedBlocksRequest) (*pb.MissedBlocksResponse, error)
- func (s *Service) NetInfo(ctx context.Context, _ *empty.Empty) (*pb.NetInfoResponse, error)
- func (s *Service) SendTransaction(ctx context.Context, req *pb.SendTransactionRequest) (*pb.SendTransactionResponse, error)
- func (s *Service) Status(context.Context, *empty.Empty) (*pb.StatusResponse, error)
- func (s *Service) Subscribe(request *pb.SubscribeRequest, stream pb.ApiService_SubscribeServer) error
- func (s *Service) TestBlock(context.Context, *empty.Empty) (*pb.BlockResponse, error)
- func (s *Service) TimeoutDuration() time.Duration
- func (s *Service) Transaction(ctx context.Context, req *pb.TransactionRequest) (*pb.TransactionResponse, error)
- func (s *Service) Transactions(ctx context.Context, req *pb.TransactionsRequest) (*pb.TransactionsResponse, error)
- func (s *Service) UnconfirmedTxs(ctx context.Context, req *pb.UnconfirmedTxsRequest) (*pb.UnconfirmedTxsResponse, error)
- func (s *Service) Validators(ctx context.Context, req *pb.ValidatorsRequest) (*pb.ValidatorsResponse, error)
- func (s *Service) Version() string
- func (s *Service) WaitList(ctx context.Context, req *pb.WaitListRequest) (*pb.WaitListResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResultBroadcastTx ¶
type Service ¶
type Service struct { api_pb.UnimplementedApiServiceServer // contains filtered or unexported fields }
Service is gRPC implementation ApiServiceServer
func NewService ¶
func NewService(cdc *amino.Codec, blockchain *minter.Blockchain, client *rpc.Local, node *tmNode.Node, minterCfg *config.Config, version string) *Service
NewService create gRPC server implementation
func (*Service) Address ¶
func (s *Service) Address(ctx context.Context, req *pb.AddressRequest) (*pb.AddressResponse, error)
Address returns coins list, balance and transaction count of an address.
func (*Service) Addresses ¶
func (s *Service) Addresses(ctx context.Context, req *pb.AddressesRequest) (*pb.AddressesResponse, error)
Addresses returns list of addresses.
func (*Service) Block ¶
func (s *Service) Block(ctx context.Context, req *pb.BlockRequest) (*pb.BlockResponse, error)
Block returns block data at given height.
func (*Service) Candidate ¶
func (s *Service) Candidate(ctx context.Context, req *pb.CandidateRequest) (*pb.CandidateResponse, error)
Candidate returns candidate’s info by provided public_key. It will respond with 404 code if candidate is not found.
func (*Service) Candidates ¶
func (s *Service) Candidates(ctx context.Context, req *pb.CandidatesRequest) (*pb.CandidatesResponse, error)
Candidates returns list of candidates.
func (*Service) CoinInfo ¶
func (s *Service) CoinInfo(ctx context.Context, req *pb.CoinInfoRequest) (*pb.CoinInfoResponse, error)
CoinInfo returns information about coin symbol.
func (*Service) CoinInfoById ¶ added in v1.2.0
func (s *Service) CoinInfoById(ctx context.Context, req *pb.CoinIdRequest) (*pb.CoinInfoResponse, error)
CoinInfoById returns information about coin ID.
func (*Service) EstimateCoinBuy ¶
func (s *Service) EstimateCoinBuy(ctx context.Context, req *pb.EstimateCoinBuyRequest) (*pb.EstimateCoinBuyResponse, error)
EstimateCoinBuy return estimate of buy coin transaction.
func (*Service) EstimateCoinSell ¶
func (s *Service) EstimateCoinSell(ctx context.Context, req *pb.EstimateCoinSellRequest) (*pb.EstimateCoinSellResponse, error)
EstimateCoinSell return estimate of sell coin transaction.
func (*Service) EstimateCoinSellAll ¶
func (s *Service) EstimateCoinSellAll(ctx context.Context, req *pb.EstimateCoinSellAllRequest) (*pb.EstimateCoinSellAllResponse, error)
EstimateCoinSellAll return estimate of sell all coin transaction.
func (*Service) EstimateTxCommission ¶
func (s *Service) EstimateTxCommission(ctx context.Context, req *pb.EstimateTxCommissionRequest) (*pb.EstimateTxCommissionResponse, error)
EstimateTxCommission return estimate of transaction.
func (*Service) Events ¶
func (s *Service) Events(ctx context.Context, req *pb.EventsRequest) (*pb.EventsResponse, error)
Events returns events at given height.
func (*Service) Frozen ¶ added in v1.2.0
func (s *Service) Frozen(ctx context.Context, req *pb.FrozenRequest) (*pb.FrozenResponse, error)
Frozen returns frozen balance.
func (*Service) Halts ¶ added in v1.2.0
func (s *Service) Halts(_ context.Context, req *pb.HaltsRequest) (*pb.HaltsResponse, error)
Halts returns votes
func (*Service) MaxGasPrice ¶ added in v1.2.0
func (s *Service) MaxGasPrice(ctx context.Context, req *pb.MaxGasPriceRequest) (*pb.MaxGasPriceResponse, error)
MaxGas returns current max gas.
func (*Service) MinGasPrice ¶
MinGasPrice returns current min gas price.
func (*Service) MissedBlocks ¶
func (s *Service) MissedBlocks(ctx context.Context, req *pb.MissedBlocksRequest) (*pb.MissedBlocksResponse, error)
MissedBlocks returns missed blocks by validator public key.
func (*Service) SendTransaction ¶ added in v1.2.0
func (s *Service) SendTransaction(ctx context.Context, req *pb.SendTransactionRequest) (*pb.SendTransactionResponse, error)
SendTransaction returns the result of sending signed tx. To ensure that transaction was successfully committed to the blockchain, you need to find the transaction by the hash and ensure that the status code equals to 0.
func (*Service) Subscribe ¶
func (s *Service) Subscribe(request *pb.SubscribeRequest, stream pb.ApiService_SubscribeServer) error
Subscribe returns a subscription for events by query.
func (*Service) TimeoutDuration ¶ added in v1.2.0
TimeoutDuration returns timeout gRPC request
func (*Service) Transaction ¶
func (s *Service) Transaction(ctx context.Context, req *pb.TransactionRequest) (*pb.TransactionResponse, error)
Transaction returns transaction info.
func (*Service) Transactions ¶
func (s *Service) Transactions(ctx context.Context, req *pb.TransactionsRequest) (*pb.TransactionsResponse, error)
Transactions return transactions by query.
func (*Service) UnconfirmedTxs ¶
func (s *Service) UnconfirmedTxs(ctx context.Context, req *pb.UnconfirmedTxsRequest) (*pb.UnconfirmedTxsResponse, error)
UnconfirmedTxs returns unconfirmed transactions.
func (*Service) Validators ¶
func (s *Service) Validators(ctx context.Context, req *pb.ValidatorsRequest) (*pb.ValidatorsResponse, error)
Validators returns list of active validators.
func (*Service) WaitList ¶ added in v1.2.0
func (s *Service) WaitList(ctx context.Context, req *pb.WaitListRequest) (*pb.WaitListResponse, error)
WaitList returns the list of address stakes in waitlist.
Source Files
¶
- address.go
- addresses.go
- block.go
- candidate.go
- candidates.go
- coin_info.go
- data_encoder.go
- estimate_coin_buy.go
- estimate_coin_sell.go
- estimate_coin_sell_all.go
- estimate_tx_commission.go
- events.go
- frozen.go
- gas.go
- genesis.go
- halts.go
- missed_blocks.go
- net_info.go
- send_transaction.go
- service.go
- status.go
- test_block.go
- transaction.go
- transactions.go
- unconfirmed_txs.go
- validators.go
- waitlist.go
- ws.go