Documentation ¶
Overview ¶
Package rpcpb is a generated protocol buffer package.
It is generated from these files:
rpc.proto
It has these top-level messages:
GetAccountRequest Account Data GetBlockRequest Block GetBlocksRequest Blocks NonParamRequest GetCandidateRequest Candidate Candidates Dynasty MedState Transactions GetTransactionRequest Transaction TransactionReceipt SendTransactionRequest TransactionHash SubscribeRequest SubscribeResponse Health
Package rpcpb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- func RegisterApiServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterApiServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ApiServiceClient) error
- func RegisterApiServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterApiServiceServer(s *grpc.Server, srv ApiServiceServer)
- type Account
- func (*Account) Descriptor() ([]byte, []int)
- func (m *Account) GetAddress() string
- func (m *Account) GetAlias() string
- func (m *Account) GetBalance() string
- func (m *Account) GetCandidateId() string
- func (m *Account) GetNonce() uint64
- func (m *Account) GetPoints() string
- func (m *Account) GetStaking() string
- func (m *Account) GetUnstaking() string
- func (m *Account) GetVoted() []string
- func (*Account) ProtoMessage()
- func (m *Account) Reset()
- func (m *Account) String() string
- type ApiServiceClient
- type ApiServiceServer
- type ApiService_SubscribeClient
- type ApiService_SubscribeServer
- type Block
- func (*Block) Descriptor() ([]byte, []int)
- func (m *Block) GetAccsRoot() string
- func (m *Block) GetChainId() uint32
- func (m *Block) GetCoinbase() string
- func (m *Block) GetCpuPrice() string
- func (m *Block) GetCpuUsage() uint64
- func (m *Block) GetDposRoot() string
- func (m *Block) GetHash() string
- func (m *Block) GetHeight() uint64
- func (m *Block) GetNetPrice() string
- func (m *Block) GetNetUsage() uint64
- func (m *Block) GetParentHash() string
- func (m *Block) GetReward() string
- func (m *Block) GetSign() string
- func (m *Block) GetSupply() string
- func (m *Block) GetTimestamp() int64
- func (m *Block) GetTransactions() []*Transaction
- func (m *Block) GetTxHashes() []string
- func (m *Block) GetTxsRoot() string
- func (*Block) ProtoMessage()
- func (m *Block) Reset()
- func (m *Block) String() string
- type Blocks
- type Candidate
- func (*Candidate) Descriptor() ([]byte, []int)
- func (m *Candidate) GetAddress() string
- func (m *Candidate) GetCandidateId() string
- func (m *Candidate) GetCollateral() string
- func (m *Candidate) GetUrl() string
- func (m *Candidate) GetVotePower() string
- func (*Candidate) ProtoMessage()
- func (m *Candidate) Reset()
- func (m *Candidate) String() string
- type Candidates
- type Data
- type Dynasty
- type GetAccountRequest
- func (*GetAccountRequest) Descriptor() ([]byte, []int)
- func (m *GetAccountRequest) GetAddress() string
- func (m *GetAccountRequest) GetAlias() string
- func (m *GetAccountRequest) GetHeight() uint64
- func (m *GetAccountRequest) GetType() string
- func (*GetAccountRequest) ProtoMessage()
- func (m *GetAccountRequest) Reset()
- func (m *GetAccountRequest) String() string
- type GetBlockRequest
- type GetBlocksRequest
- type GetCandidateRequest
- type GetTransactionRequest
- type Health
- type MedState
- func (*MedState) Descriptor() ([]byte, []int)
- func (m *MedState) GetChainId() uint32
- func (m *MedState) GetHeight() uint64
- func (m *MedState) GetLib() string
- func (m *MedState) GetNetworkId() string
- func (m *MedState) GetTail() string
- func (*MedState) ProtoMessage()
- func (m *MedState) Reset()
- func (m *MedState) String() string
- type NonParamRequest
- type SendTransactionRequest
- func (*SendTransactionRequest) Descriptor() ([]byte, []int)
- func (m *SendTransactionRequest) GetChainId() uint32
- func (m *SendTransactionRequest) GetHash() string
- func (m *SendTransactionRequest) GetNonce() uint64
- func (m *SendTransactionRequest) GetPayerSign() string
- func (m *SendTransactionRequest) GetPayload() string
- func (m *SendTransactionRequest) GetSign() string
- func (m *SendTransactionRequest) GetTo() string
- func (m *SendTransactionRequest) GetTxType() string
- func (m *SendTransactionRequest) GetValue() string
- func (*SendTransactionRequest) ProtoMessage()
- func (m *SendTransactionRequest) Reset()
- func (m *SendTransactionRequest) String() string
- type SubscribeRequest
- type SubscribeResponse
- func (*SubscribeResponse) Descriptor() ([]byte, []int)
- func (m *SubscribeResponse) GetHash() string
- func (m *SubscribeResponse) GetTopic() string
- func (m *SubscribeResponse) GetType() string
- func (*SubscribeResponse) ProtoMessage()
- func (m *SubscribeResponse) Reset()
- func (m *SubscribeResponse) String() string
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)
- func (m *Transaction) GetChainId() uint32
- func (m *Transaction) GetFrom() string
- func (m *Transaction) GetHash() string
- func (m *Transaction) GetNonce() uint64
- func (m *Transaction) GetOnChain() bool
- func (m *Transaction) GetPayerSign() string
- func (m *Transaction) GetPayload() string
- func (m *Transaction) GetReceipt() *TransactionReceipt
- func (m *Transaction) GetSign() string
- func (m *Transaction) GetTo() string
- func (m *Transaction) GetTxType() string
- func (m *Transaction) GetValue() string
- func (*Transaction) ProtoMessage()
- func (m *Transaction) Reset()
- func (m *Transaction) String() string
- type TransactionHash
- type TransactionReceipt
- func (*TransactionReceipt) Descriptor() ([]byte, []int)
- func (m *TransactionReceipt) GetCpuUsage() uint64
- func (m *TransactionReceipt) GetError() string
- func (m *TransactionReceipt) GetExecuted() bool
- func (m *TransactionReceipt) GetHeight() uint64
- func (m *TransactionReceipt) GetNetUsage() uint64
- func (m *TransactionReceipt) GetPoints() string
- func (m *TransactionReceipt) GetTimestamp() int64
- func (*TransactionReceipt) ProtoMessage()
- func (m *TransactionReceipt) Reset()
- func (m *TransactionReceipt) String() string
- type Transactions
Constants ¶
const (
Swagger = swagger
)
exporter
Variables ¶
This section is empty.
Functions ¶
func RegisterApiServiceHandler ¶
func RegisterApiServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterApiServiceHandler registers the http handlers for service ApiService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterApiServiceHandlerClient ¶
func RegisterApiServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ApiServiceClient) error
RegisterApiServiceHandler registers the http handlers for service ApiService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ApiServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ApiServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ApiServiceClient" to call the correct interceptors.
func RegisterApiServiceHandlerFromEndpoint ¶
func RegisterApiServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterApiServiceHandlerFromEndpoint is same as RegisterApiServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterApiServiceServer ¶
func RegisterApiServiceServer(s *grpc.Server, srv ApiServiceServer)
Types ¶
type Account ¶
type Account struct { // Hex string of the account address. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // Current balance in unit of 1/(10^12) MED. Balance string `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` // Current transaction count. Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` // Current staking in unit of 1/(10^12) MED. Staking string `protobuf:"bytes,4,opt,name=staking,proto3" json:"staking,omitempty"` // Voted address. Voted []string `protobuf:"bytes,5,rep,name=voted" json:"voted,omitempty"` Points string `protobuf:"bytes,6,opt,name=points,proto3" json:"points,omitempty"` Unstaking string `protobuf:"bytes,7,opt,name=unstaking,proto3" json:"unstaking,omitempty"` Alias string `protobuf:"bytes,8,opt,name=alias,proto3" json:"alias,omitempty"` CandidateId string `protobuf:"bytes,9,opt,name=candidate_id,json=candidateId,proto3" json:"candidate_id,omitempty"` }
func (*Account) Descriptor ¶
func (*Account) GetAddress ¶
func (*Account) GetBalance ¶
func (*Account) GetCandidateId ¶
func (*Account) GetStaking ¶
func (*Account) GetUnstaking ¶
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
type ApiServiceClient ¶
type ApiServiceClient interface { GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*Account, error) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*Block, error) GetBlocks(ctx context.Context, in *GetBlocksRequest, opts ...grpc.CallOption) (*Blocks, error) GetCandidate(ctx context.Context, in *GetCandidateRequest, opts ...grpc.CallOption) (*Candidate, error) GetCandidates(ctx context.Context, in *NonParamRequest, opts ...grpc.CallOption) (*Candidates, error) GetDynasty(ctx context.Context, in *NonParamRequest, opts ...grpc.CallOption) (*Dynasty, error) GetMedState(ctx context.Context, in *NonParamRequest, opts ...grpc.CallOption) (*MedState, error) GetPendingTransactions(ctx context.Context, in *NonParamRequest, opts ...grpc.CallOption) (*Transactions, error) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*Transaction, error) GetTransactionReceipt(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*TransactionReceipt, error) SendTransaction(ctx context.Context, in *SendTransactionRequest, opts ...grpc.CallOption) (*TransactionHash, error) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (ApiService_SubscribeClient, error) HealthCheck(ctx context.Context, in *NonParamRequest, opts ...grpc.CallOption) (*Health, error) }
func NewApiServiceClient ¶
func NewApiServiceClient(cc *grpc.ClientConn) ApiServiceClient
type ApiServiceServer ¶
type ApiServiceServer interface { GetAccount(context.Context, *GetAccountRequest) (*Account, error) GetBlock(context.Context, *GetBlockRequest) (*Block, error) GetBlocks(context.Context, *GetBlocksRequest) (*Blocks, error) GetCandidate(context.Context, *GetCandidateRequest) (*Candidate, error) GetCandidates(context.Context, *NonParamRequest) (*Candidates, error) GetDynasty(context.Context, *NonParamRequest) (*Dynasty, error) GetMedState(context.Context, *NonParamRequest) (*MedState, error) GetPendingTransactions(context.Context, *NonParamRequest) (*Transactions, error) GetTransaction(context.Context, *GetTransactionRequest) (*Transaction, error) GetTransactionReceipt(context.Context, *GetTransactionRequest) (*TransactionReceipt, error) SendTransaction(context.Context, *SendTransactionRequest) (*TransactionHash, error) Subscribe(*SubscribeRequest, ApiService_SubscribeServer) error HealthCheck(context.Context, *NonParamRequest) (*Health, error) }
type ApiService_SubscribeClient ¶
type ApiService_SubscribeClient interface { Recv() (*SubscribeResponse, error) grpc.ClientStream }
type ApiService_SubscribeServer ¶
type ApiService_SubscribeServer interface { Send(*SubscribeResponse) error grpc.ServerStream }
type Block ¶
type Block struct { // Block height Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` // Block hash Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // Block parent hash ParentHash string `protobuf:"bytes,3,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` // Block coinbase address Coinbase string `protobuf:"bytes,4,opt,name=coinbase,proto3" json:"coinbase,omitempty"` // Block reward Reward string `protobuf:"bytes,5,opt,name=reward,proto3" json:"reward,omitempty"` // Block supply Supply string `protobuf:"bytes,6,opt,name=supply,proto3" json:"supply,omitempty"` // Block timestamp Timestamp int64 `protobuf:"varint,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Block chain id ChainId uint32 `protobuf:"varint,8,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Block signature Sign string `protobuf:"bytes,11,opt,name=sign,proto3" json:"sign,omitempty"` // Block cpu price CpuPrice string `protobuf:"bytes,12,opt,name=cpu_price,json=cpuPrice,proto3" json:"cpu_price,omitempty"` // Block cpu bandwidth usage CpuUsage uint64 `protobuf:"varint,13,opt,name=cpu_usage,json=cpuUsage,proto3" json:"cpu_usage,omitempty"` // Block net price NetPrice string `protobuf:"bytes,14,opt,name=net_price,json=netPrice,proto3" json:"net_price,omitempty"` // Block net bandwidth usage NetUsage uint64 `protobuf:"varint,15,opt,name=net_usage,json=netUsage,proto3" json:"net_usage,omitempty"` // Root hash of accounts trie AccsRoot string `protobuf:"bytes,20,opt,name=accs_root,json=accsRoot,proto3" json:"accs_root,omitempty"` // Root hash of txs trie TxsRoot string `protobuf:"bytes,21,opt,name=txs_root,json=txsRoot,proto3" json:"txs_root,omitempty"` // Root hash of dpos state trie DposRoot string `protobuf:"bytes,22,opt,name=dpos_root,json=dposRoot,proto3" json:"dpos_root,omitempty"` // Transactions in block Transactions []*Transaction `protobuf:"bytes,30,rep,name=transactions" json:"transactions,omitempty"` TxHashes []string `protobuf:"bytes,31,rep,name=tx_hashes,json=txHashes" json:"tx_hashes,omitempty"` }
func (*Block) Descriptor ¶
func (*Block) GetAccsRoot ¶
func (*Block) GetChainId ¶
func (*Block) GetCoinbase ¶
func (*Block) GetCpuPrice ¶
func (*Block) GetCpuUsage ¶
func (*Block) GetDposRoot ¶
func (*Block) GetNetPrice ¶
func (*Block) GetNetUsage ¶
func (*Block) GetParentHash ¶
func (*Block) GetTimestamp ¶
func (*Block) GetTransactions ¶
func (m *Block) GetTransactions() []*Transaction
func (*Block) GetTxHashes ¶
func (*Block) GetTxsRoot ¶
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
type Blocks ¶
type Blocks struct {
Blocks []*Block `protobuf:"bytes,1,rep,name=blocks" json:"blocks,omitempty"`
}
func (*Blocks) Descriptor ¶
func (*Blocks) ProtoMessage ¶
func (*Blocks) ProtoMessage()
type Candidate ¶
type Candidate struct { CandidateId string `protobuf:"bytes,1,opt,name=candidate_id,json=candidateId,proto3" json:"candidate_id,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` Collateral string `protobuf:"bytes,4,opt,name=collateral,proto3" json:"collateral,omitempty"` VotePower string `protobuf:"bytes,5,opt,name=vote_power,json=votePower,proto3" json:"vote_power,omitempty"` }
func (*Candidate) Descriptor ¶
func (*Candidate) GetAddress ¶
func (*Candidate) GetCandidateId ¶
func (*Candidate) GetCollateral ¶
func (*Candidate) GetVotePower ¶
func (*Candidate) ProtoMessage ¶
func (*Candidate) ProtoMessage()
type Candidates ¶
type Candidates struct {
Candidates []*Candidate `protobuf:"bytes,1,rep,name=candidates" json:"candidates,omitempty"`
}
func (*Candidates) Descriptor ¶
func (*Candidates) Descriptor() ([]byte, []int)
func (*Candidates) GetCandidates ¶
func (m *Candidates) GetCandidates() []*Candidate
func (*Candidates) ProtoMessage ¶
func (*Candidates) ProtoMessage()
func (*Candidates) Reset ¶
func (m *Candidates) Reset()
func (*Candidates) String ¶
func (m *Candidates) String() string
type Data ¶
type Data struct {
Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"`
}
func (*Data) Descriptor ¶
func (*Data) ProtoMessage ¶
func (*Data) ProtoMessage()
type Dynasty ¶
type Dynasty struct {
Addresses []string `protobuf:"bytes,1,rep,name=addresses" json:"addresses,omitempty"`
}
func (*Dynasty) Descriptor ¶
func (*Dynasty) GetAddresses ¶
func (*Dynasty) ProtoMessage ¶
func (*Dynasty) ProtoMessage()
type GetAccountRequest ¶
type GetAccountRequest struct { // Send only one between address and alias // Hex string of the account addresss. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // String of the account alias. Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` // Send only one between type and height // Block type "genesis", "confirmed", or "tail". Type string `protobuf:"bytes,10,opt,name=type,proto3" json:"type,omitempty"` // Block account state with height Height uint64 `protobuf:"varint,11,opt,name=height,proto3" json:"height,omitempty"` }
func (*GetAccountRequest) Descriptor ¶
func (*GetAccountRequest) Descriptor() ([]byte, []int)
func (*GetAccountRequest) GetAddress ¶
func (m *GetAccountRequest) GetAddress() string
func (*GetAccountRequest) GetAlias ¶
func (m *GetAccountRequest) GetAlias() string
func (*GetAccountRequest) GetHeight ¶
func (m *GetAccountRequest) GetHeight() uint64
func (*GetAccountRequest) GetType ¶
func (m *GetAccountRequest) GetType() string
func (*GetAccountRequest) ProtoMessage ¶
func (*GetAccountRequest) ProtoMessage()
func (*GetAccountRequest) Reset ¶
func (m *GetAccountRequest) Reset()
func (*GetAccountRequest) String ¶
func (m *GetAccountRequest) String() string
type GetBlockRequest ¶
type GetBlockRequest struct { // Send only one among hash, type and height // Block hash Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // Block type "genesis", "confirmed", or "tail". Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // Block height Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` }
func (*GetBlockRequest) Descriptor ¶
func (*GetBlockRequest) Descriptor() ([]byte, []int)
func (*GetBlockRequest) GetHash ¶
func (m *GetBlockRequest) GetHash() string
func (*GetBlockRequest) GetHeight ¶
func (m *GetBlockRequest) GetHeight() uint64
func (*GetBlockRequest) GetType ¶
func (m *GetBlockRequest) GetType() string
func (*GetBlockRequest) ProtoMessage ¶
func (*GetBlockRequest) ProtoMessage()
func (*GetBlockRequest) Reset ¶
func (m *GetBlockRequest) Reset()
func (*GetBlockRequest) String ¶
func (m *GetBlockRequest) String() string
type GetBlocksRequest ¶
type GetBlocksRequest struct { From uint64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` To uint64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` }
func (*GetBlocksRequest) Descriptor ¶
func (*GetBlocksRequest) Descriptor() ([]byte, []int)
func (*GetBlocksRequest) GetFrom ¶
func (m *GetBlocksRequest) GetFrom() uint64
func (*GetBlocksRequest) GetTo ¶
func (m *GetBlocksRequest) GetTo() uint64
func (*GetBlocksRequest) ProtoMessage ¶
func (*GetBlocksRequest) ProtoMessage()
func (*GetBlocksRequest) Reset ¶
func (m *GetBlocksRequest) Reset()
func (*GetBlocksRequest) String ¶
func (m *GetBlocksRequest) String() string
type GetCandidateRequest ¶
type GetCandidateRequest struct {
CandidateId string `protobuf:"bytes,1,opt,name=candidate_id,json=candidateId,proto3" json:"candidate_id,omitempty"`
}
func (*GetCandidateRequest) Descriptor ¶
func (*GetCandidateRequest) Descriptor() ([]byte, []int)
func (*GetCandidateRequest) GetCandidateId ¶
func (m *GetCandidateRequest) GetCandidateId() string
func (*GetCandidateRequest) ProtoMessage ¶
func (*GetCandidateRequest) ProtoMessage()
func (*GetCandidateRequest) Reset ¶
func (m *GetCandidateRequest) Reset()
func (*GetCandidateRequest) String ¶
func (m *GetCandidateRequest) String() string
type GetTransactionRequest ¶
type GetTransactionRequest struct { // Transaction hash Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` }
func (*GetTransactionRequest) Descriptor ¶
func (*GetTransactionRequest) Descriptor() ([]byte, []int)
func (*GetTransactionRequest) GetHash ¶
func (m *GetTransactionRequest) GetHash() string
func (*GetTransactionRequest) ProtoMessage ¶
func (*GetTransactionRequest) ProtoMessage()
func (*GetTransactionRequest) Reset ¶
func (m *GetTransactionRequest) Reset()
func (*GetTransactionRequest) String ¶
func (m *GetTransactionRequest) String() string
type Health ¶
type Health struct {
Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
}
func (*Health) Descriptor ¶
func (*Health) ProtoMessage ¶
func (*Health) ProtoMessage()
type MedState ¶
type MedState struct { // Block chain id ChainId uint32 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Current tail block hash Tail string `protobuf:"bytes,2,opt,name=tail,proto3" json:"tail,omitempty"` // Current tail block height Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` // Current LIB hash Lib string `protobuf:"bytes,4,opt,name=lib,proto3" json:"lib,omitempty"` // Network Peer ID NetworkId string `protobuf:"bytes,10,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` }
func (*MedState) Descriptor ¶
func (*MedState) GetChainId ¶
func (*MedState) GetNetworkId ¶
func (*MedState) ProtoMessage ¶
func (*MedState) ProtoMessage()
type NonParamRequest ¶
type NonParamRequest struct { }
func (*NonParamRequest) Descriptor ¶
func (*NonParamRequest) Descriptor() ([]byte, []int)
func (*NonParamRequest) ProtoMessage ¶
func (*NonParamRequest) ProtoMessage()
func (*NonParamRequest) Reset ¶
func (m *NonParamRequest) Reset()
func (*NonParamRequest) String ¶
func (m *NonParamRequest) String() string
type SendTransactionRequest ¶
type SendTransactionRequest struct { // Transaction hash Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // Hex string of the sender account address. To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` // Amount of value sending with this transaction. Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // Transaction type. TxType string `protobuf:"bytes,4,opt,name=tx_type,json=txType,proto3" json:"tx_type,omitempty"` // Transaction nonce. Nonce uint64 `protobuf:"varint,5,opt,name=nonce,proto3" json:"nonce,omitempty"` // Transaction chain ID. ChainId uint32 `protobuf:"varint,6,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Transaction payload Payload string `protobuf:"bytes,20,opt,name=payload,proto3" json:"payload,omitempty"` // Transaction sign. Sign string `protobuf:"bytes,31,opt,name=sign,proto3" json:"sign,omitempty"` // Transaction payer's sign. PayerSign string `protobuf:"bytes,32,opt,name=payer_sign,json=payerSign,proto3" json:"payer_sign,omitempty"` }
func (*SendTransactionRequest) Descriptor ¶
func (*SendTransactionRequest) Descriptor() ([]byte, []int)
func (*SendTransactionRequest) GetChainId ¶
func (m *SendTransactionRequest) GetChainId() uint32
func (*SendTransactionRequest) GetHash ¶
func (m *SendTransactionRequest) GetHash() string
func (*SendTransactionRequest) GetNonce ¶
func (m *SendTransactionRequest) GetNonce() uint64
func (*SendTransactionRequest) GetPayerSign ¶
func (m *SendTransactionRequest) GetPayerSign() string
func (*SendTransactionRequest) GetPayload ¶
func (m *SendTransactionRequest) GetPayload() string
func (*SendTransactionRequest) GetSign ¶
func (m *SendTransactionRequest) GetSign() string
func (*SendTransactionRequest) GetTo ¶
func (m *SendTransactionRequest) GetTo() string
func (*SendTransactionRequest) GetTxType ¶
func (m *SendTransactionRequest) GetTxType() string
func (*SendTransactionRequest) GetValue ¶
func (m *SendTransactionRequest) GetValue() string
func (*SendTransactionRequest) ProtoMessage ¶
func (*SendTransactionRequest) ProtoMessage()
func (*SendTransactionRequest) Reset ¶
func (m *SendTransactionRequest) Reset()
func (*SendTransactionRequest) String ¶
func (m *SendTransactionRequest) String() string
type SubscribeRequest ¶
type SubscribeRequest struct {
Topics []string `protobuf:"bytes,1,rep,name=topics" json:"topics,omitempty"`
}
func (*SubscribeRequest) Descriptor ¶
func (*SubscribeRequest) Descriptor() ([]byte, []int)
func (*SubscribeRequest) GetTopics ¶
func (m *SubscribeRequest) GetTopics() []string
func (*SubscribeRequest) ProtoMessage ¶
func (*SubscribeRequest) ProtoMessage()
func (*SubscribeRequest) Reset ¶
func (m *SubscribeRequest) Reset()
func (*SubscribeRequest) String ¶
func (m *SubscribeRequest) String() string
type SubscribeResponse ¶
type SubscribeResponse struct { Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` }
func (*SubscribeResponse) Descriptor ¶
func (*SubscribeResponse) Descriptor() ([]byte, []int)
func (*SubscribeResponse) GetHash ¶
func (m *SubscribeResponse) GetHash() string
func (*SubscribeResponse) GetTopic ¶
func (m *SubscribeResponse) GetTopic() string
func (*SubscribeResponse) GetType ¶
func (m *SubscribeResponse) GetType() string
func (*SubscribeResponse) ProtoMessage ¶
func (*SubscribeResponse) ProtoMessage()
func (*SubscribeResponse) Reset ¶
func (m *SubscribeResponse) Reset()
func (*SubscribeResponse) String ¶
func (m *SubscribeResponse) String() string
type Transaction ¶
type Transaction struct { // Transaction hash Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // Hex string of the sender account address. From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` // Hex string of the receiver account address. To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` // Amount of value sending with this transaction. Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` // Transaction type. TxType string `protobuf:"bytes,5,opt,name=tx_type,json=txType,proto3" json:"tx_type,omitempty"` // Transaction nonce. Nonce uint64 `protobuf:"varint,6,opt,name=nonce,proto3" json:"nonce,omitempty"` // Transaction chain ID. ChainId uint32 `protobuf:"varint,7,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Transaction payload. Payload string `protobuf:"bytes,20,opt,name=payload,proto3" json:"payload,omitempty"` // Transaction sign. Sign string `protobuf:"bytes,31,opt,name=sign,proto3" json:"sign,omitempty"` // Transaction payer's sign. PayerSign string `protobuf:"bytes,32,opt,name=payer_sign,json=payerSign,proto3" json:"payer_sign,omitempty"` // If transaction is included in the block, it returns true. otherwise, false. OnChain bool `protobuf:"varint,33,opt,name=on_chain,json=onChain,proto3" json:"on_chain,omitempty"` // Transaction receipt Receipt *TransactionReceipt `protobuf:"bytes,40,opt,name=receipt" json:"receipt,omitempty"` }
func (*Transaction) Descriptor ¶
func (*Transaction) Descriptor() ([]byte, []int)
func (*Transaction) GetChainId ¶
func (m *Transaction) GetChainId() uint32
func (*Transaction) GetFrom ¶
func (m *Transaction) GetFrom() string
func (*Transaction) GetHash ¶
func (m *Transaction) GetHash() string
func (*Transaction) GetNonce ¶
func (m *Transaction) GetNonce() uint64
func (*Transaction) GetOnChain ¶
func (m *Transaction) GetOnChain() bool
func (*Transaction) GetPayerSign ¶
func (m *Transaction) GetPayerSign() string
func (*Transaction) GetPayload ¶
func (m *Transaction) GetPayload() string
func (*Transaction) GetReceipt ¶
func (m *Transaction) GetReceipt() *TransactionReceipt
func (*Transaction) GetSign ¶
func (m *Transaction) GetSign() string
func (*Transaction) GetTo ¶
func (m *Transaction) GetTo() string
func (*Transaction) GetTxType ¶
func (m *Transaction) GetTxType() string
func (*Transaction) GetValue ¶
func (m *Transaction) GetValue() string
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) Reset ¶
func (m *Transaction) Reset()
func (*Transaction) String ¶
func (m *Transaction) String() string
type TransactionHash ¶
type TransactionHash struct { // Hex string of transaction hash. Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` }
func (*TransactionHash) Descriptor ¶
func (*TransactionHash) Descriptor() ([]byte, []int)
func (*TransactionHash) GetHash ¶
func (m *TransactionHash) GetHash() string
func (*TransactionHash) ProtoMessage ¶
func (*TransactionHash) ProtoMessage()
func (*TransactionHash) Reset ¶
func (m *TransactionHash) Reset()
func (*TransactionHash) String ¶
func (m *TransactionHash) String() string
type TransactionReceipt ¶
type TransactionReceipt struct { Executed bool `protobuf:"varint,1,opt,name=executed,proto3" json:"executed,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` CpuUsage uint64 `protobuf:"varint,11,opt,name=cpu_usage,json=cpuUsage,proto3" json:"cpu_usage,omitempty"` NetUsage uint64 `protobuf:"varint,12,opt,name=net_usage,json=netUsage,proto3" json:"net_usage,omitempty"` Points string `protobuf:"bytes,13,opt,name=points,proto3" json:"points,omitempty"` Error string `protobuf:"bytes,21,opt,name=error,proto3" json:"error,omitempty"` }
func (*TransactionReceipt) Descriptor ¶
func (*TransactionReceipt) Descriptor() ([]byte, []int)
func (*TransactionReceipt) GetCpuUsage ¶
func (m *TransactionReceipt) GetCpuUsage() uint64
func (*TransactionReceipt) GetError ¶
func (m *TransactionReceipt) GetError() string
func (*TransactionReceipt) GetExecuted ¶
func (m *TransactionReceipt) GetExecuted() bool
func (*TransactionReceipt) GetHeight ¶
func (m *TransactionReceipt) GetHeight() uint64
func (*TransactionReceipt) GetNetUsage ¶
func (m *TransactionReceipt) GetNetUsage() uint64
func (*TransactionReceipt) GetPoints ¶
func (m *TransactionReceipt) GetPoints() string
func (*TransactionReceipt) GetTimestamp ¶
func (m *TransactionReceipt) GetTimestamp() int64
func (*TransactionReceipt) ProtoMessage ¶
func (*TransactionReceipt) ProtoMessage()
func (*TransactionReceipt) Reset ¶
func (m *TransactionReceipt) Reset()
func (*TransactionReceipt) String ¶
func (m *TransactionReceipt) String() string
type Transactions ¶
type Transactions struct {
Transactions []*Transaction `protobuf:"bytes,1,rep,name=transactions" json:"transactions,omitempty"`
}
func (*Transactions) Descriptor ¶
func (*Transactions) Descriptor() ([]byte, []int)
func (*Transactions) GetTransactions ¶
func (m *Transactions) GetTransactions() []*Transaction
func (*Transactions) ProtoMessage ¶
func (*Transactions) ProtoMessage()
func (*Transactions) Reset ¶
func (m *Transactions) Reset()
func (*Transactions) String ¶
func (m *Transactions) String() string