Documentation ¶
Index ¶
- Variables
- func RegisterCoinServer(s *grpc.Server, srv CoinServer)
- type AccountReq
- func (*AccountReq) Descriptor() ([]byte, []int)
- func (m *AccountReq) GetPeerId() []byte
- func (m *AccountReq) Marshal() (dAtA []byte, err error)
- func (m *AccountReq) MarshalTo(dAtA []byte) (int, error)
- func (*AccountReq) ProtoMessage()
- func (m *AccountReq) Reset()
- func (m *AccountReq) Size() (n int)
- func (m *AccountReq) String() string
- func (m *AccountReq) Unmarshal(dAtA []byte) error
- func (m *AccountReq) XXX_DiscardUnknown()
- func (m *AccountReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *AccountReq) XXX_Merge(src proto.Message)
- func (m *AccountReq) XXX_Size() int
- func (m *AccountReq) XXX_Unmarshal(b []byte) error
- type AccountTransactionsReq
- func (*AccountTransactionsReq) Descriptor() ([]byte, []int)
- func (m *AccountTransactionsReq) GetPeerId() []byte
- func (m *AccountTransactionsReq) Marshal() (dAtA []byte, err error)
- func (m *AccountTransactionsReq) MarshalTo(dAtA []byte) (int, error)
- func (*AccountTransactionsReq) ProtoMessage()
- func (m *AccountTransactionsReq) Reset()
- func (m *AccountTransactionsReq) Size() (n int)
- func (m *AccountTransactionsReq) String() string
- func (m *AccountTransactionsReq) Unmarshal(dAtA []byte) error
- func (m *AccountTransactionsReq) XXX_DiscardUnknown()
- func (m *AccountTransactionsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *AccountTransactionsReq) XXX_Merge(src proto.Message)
- func (m *AccountTransactionsReq) XXX_Size() int
- func (m *AccountTransactionsReq) XXX_Unmarshal(b []byte) error
- type BlockchainReq
- func (*BlockchainReq) Descriptor() ([]byte, []int)
- func (m *BlockchainReq) GetBlockNumber() uint64
- func (m *BlockchainReq) GetCount() uint32
- func (m *BlockchainReq) GetHeaderHash() []byte
- func (m *BlockchainReq) Marshal() (dAtA []byte, err error)
- func (m *BlockchainReq) MarshalTo(dAtA []byte) (int, error)
- func (*BlockchainReq) ProtoMessage()
- func (m *BlockchainReq) Reset()
- func (m *BlockchainReq) Size() (n int)
- func (m *BlockchainReq) String() string
- func (m *BlockchainReq) Unmarshal(dAtA []byte) error
- func (m *BlockchainReq) XXX_DiscardUnknown()
- func (m *BlockchainReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *BlockchainReq) XXX_Merge(src proto.Message)
- func (m *BlockchainReq) XXX_Size() int
- func (m *BlockchainReq) XXX_Unmarshal(b []byte) error
- type BlockchainResp
- func (*BlockchainResp) Descriptor() ([]byte, []int)
- func (m *BlockchainResp) GetBlocks() []*pb.Block
- func (m *BlockchainResp) Marshal() (dAtA []byte, err error)
- func (m *BlockchainResp) MarshalTo(dAtA []byte) (int, error)
- func (*BlockchainResp) ProtoMessage()
- func (m *BlockchainResp) Reset()
- func (m *BlockchainResp) Size() (n int)
- func (m *BlockchainResp) String() string
- func (m *BlockchainResp) Unmarshal(dAtA []byte) error
- func (m *BlockchainResp) XXX_DiscardUnknown()
- func (m *BlockchainResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *BlockchainResp) XXX_Merge(src proto.Message)
- func (m *BlockchainResp) XXX_Size() int
- func (m *BlockchainResp) XXX_Unmarshal(b []byte) error
- type CoinClient
- type CoinServer
- type Coin_AccountTransactionsClient
- type Coin_AccountTransactionsServer
- type TransactionPoolReq
- func (*TransactionPoolReq) Descriptor() ([]byte, []int)
- func (m *TransactionPoolReq) GetCount() uint32
- func (m *TransactionPoolReq) Marshal() (dAtA []byte, err error)
- func (m *TransactionPoolReq) MarshalTo(dAtA []byte) (int, error)
- func (*TransactionPoolReq) ProtoMessage()
- func (m *TransactionPoolReq) Reset()
- func (m *TransactionPoolReq) Size() (n int)
- func (m *TransactionPoolReq) String() string
- func (m *TransactionPoolReq) Unmarshal(dAtA []byte) error
- func (m *TransactionPoolReq) XXX_DiscardUnknown()
- func (m *TransactionPoolReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TransactionPoolReq) XXX_Merge(src proto.Message)
- func (m *TransactionPoolReq) XXX_Size() int
- func (m *TransactionPoolReq) XXX_Unmarshal(b []byte) error
- type TransactionPoolResp
- func (*TransactionPoolResp) Descriptor() ([]byte, []int)
- func (m *TransactionPoolResp) GetCount() uint64
- func (m *TransactionPoolResp) GetTxs() []*pb.Transaction
- func (m *TransactionPoolResp) Marshal() (dAtA []byte, err error)
- func (m *TransactionPoolResp) MarshalTo(dAtA []byte) (int, error)
- func (*TransactionPoolResp) ProtoMessage()
- func (m *TransactionPoolResp) Reset()
- func (m *TransactionPoolResp) Size() (n int)
- func (m *TransactionPoolResp) String() string
- func (m *TransactionPoolResp) Unmarshal(dAtA []byte) error
- func (m *TransactionPoolResp) XXX_DiscardUnknown()
- func (m *TransactionPoolResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TransactionPoolResp) XXX_Merge(src proto.Message)
- func (m *TransactionPoolResp) XXX_Size() int
- func (m *TransactionPoolResp) XXX_Unmarshal(b []byte) error
- type TransactionResp
- func (*TransactionResp) Descriptor() ([]byte, []int)
- func (m *TransactionResp) GetTxHash() []byte
- func (m *TransactionResp) Marshal() (dAtA []byte, err error)
- func (m *TransactionResp) MarshalTo(dAtA []byte) (int, error)
- func (*TransactionResp) ProtoMessage()
- func (m *TransactionResp) Reset()
- func (m *TransactionResp) Size() (n int)
- func (m *TransactionResp) String() string
- func (m *TransactionResp) Unmarshal(dAtA []byte) error
- func (m *TransactionResp) XXX_DiscardUnknown()
- func (m *TransactionResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TransactionResp) XXX_Merge(src proto.Message)
- func (m *TransactionResp) XXX_Size() int
- func (m *TransactionResp) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthCoin = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCoin = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterCoinServer ¶
func RegisterCoinServer(s *grpc.Server, srv CoinServer)
Types ¶
type AccountReq ¶
type AccountReq struct { PeerId []byte `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request to get an account.
func (*AccountReq) Descriptor ¶
func (*AccountReq) Descriptor() ([]byte, []int)
func (*AccountReq) GetPeerId ¶
func (m *AccountReq) GetPeerId() []byte
func (*AccountReq) Marshal ¶
func (m *AccountReq) Marshal() (dAtA []byte, err error)
func (*AccountReq) ProtoMessage ¶
func (*AccountReq) ProtoMessage()
func (*AccountReq) Reset ¶
func (m *AccountReq) Reset()
func (*AccountReq) Size ¶
func (m *AccountReq) Size() (n int)
func (*AccountReq) String ¶
func (m *AccountReq) String() string
func (*AccountReq) Unmarshal ¶
func (m *AccountReq) Unmarshal(dAtA []byte) error
func (*AccountReq) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *AccountReq) XXX_DiscardUnknown()
func (*AccountReq) XXX_Marshal ¶ added in v0.2.0
func (m *AccountReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AccountReq) XXX_Merge ¶ added in v0.2.0
func (dst *AccountReq) XXX_Merge(src proto.Message)
func (*AccountReq) XXX_Size ¶ added in v0.2.0
func (m *AccountReq) XXX_Size() int
func (*AccountReq) XXX_Unmarshal ¶ added in v0.2.0
func (m *AccountReq) XXX_Unmarshal(b []byte) error
type AccountTransactionsReq ¶
type AccountTransactionsReq struct { PeerId []byte `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request to get an account transaction history.
func (*AccountTransactionsReq) Descriptor ¶
func (*AccountTransactionsReq) Descriptor() ([]byte, []int)
func (*AccountTransactionsReq) GetPeerId ¶
func (m *AccountTransactionsReq) GetPeerId() []byte
func (*AccountTransactionsReq) Marshal ¶
func (m *AccountTransactionsReq) Marshal() (dAtA []byte, err error)
func (*AccountTransactionsReq) MarshalTo ¶
func (m *AccountTransactionsReq) MarshalTo(dAtA []byte) (int, error)
func (*AccountTransactionsReq) ProtoMessage ¶
func (*AccountTransactionsReq) ProtoMessage()
func (*AccountTransactionsReq) Reset ¶
func (m *AccountTransactionsReq) Reset()
func (*AccountTransactionsReq) Size ¶
func (m *AccountTransactionsReq) Size() (n int)
func (*AccountTransactionsReq) String ¶
func (m *AccountTransactionsReq) String() string
func (*AccountTransactionsReq) Unmarshal ¶
func (m *AccountTransactionsReq) Unmarshal(dAtA []byte) error
func (*AccountTransactionsReq) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *AccountTransactionsReq) XXX_DiscardUnknown()
func (*AccountTransactionsReq) XXX_Marshal ¶ added in v0.2.0
func (m *AccountTransactionsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AccountTransactionsReq) XXX_Merge ¶ added in v0.2.0
func (dst *AccountTransactionsReq) XXX_Merge(src proto.Message)
func (*AccountTransactionsReq) XXX_Size ¶ added in v0.2.0
func (m *AccountTransactionsReq) XXX_Size() int
func (*AccountTransactionsReq) XXX_Unmarshal ¶ added in v0.2.0
func (m *AccountTransactionsReq) XXX_Unmarshal(b []byte) error
type BlockchainReq ¶
type BlockchainReq struct { BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` HeaderHash []byte `protobuf:"bytes,2,opt,name=header_hash,json=headerHash,proto3" json:"header_hash,omitempty"` Count uint32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request to get part of the blockchain.
func (*BlockchainReq) Descriptor ¶
func (*BlockchainReq) Descriptor() ([]byte, []int)
func (*BlockchainReq) GetBlockNumber ¶
func (m *BlockchainReq) GetBlockNumber() uint64
func (*BlockchainReq) GetCount ¶
func (m *BlockchainReq) GetCount() uint32
func (*BlockchainReq) GetHeaderHash ¶
func (m *BlockchainReq) GetHeaderHash() []byte
func (*BlockchainReq) Marshal ¶
func (m *BlockchainReq) Marshal() (dAtA []byte, err error)
func (*BlockchainReq) ProtoMessage ¶
func (*BlockchainReq) ProtoMessage()
func (*BlockchainReq) Reset ¶
func (m *BlockchainReq) Reset()
func (*BlockchainReq) Size ¶
func (m *BlockchainReq) Size() (n int)
func (*BlockchainReq) String ¶
func (m *BlockchainReq) String() string
func (*BlockchainReq) Unmarshal ¶
func (m *BlockchainReq) Unmarshal(dAtA []byte) error
func (*BlockchainReq) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *BlockchainReq) XXX_DiscardUnknown()
func (*BlockchainReq) XXX_Marshal ¶ added in v0.2.0
func (m *BlockchainReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockchainReq) XXX_Merge ¶ added in v0.2.0
func (dst *BlockchainReq) XXX_Merge(src proto.Message)
func (*BlockchainReq) XXX_Size ¶ added in v0.2.0
func (m *BlockchainReq) XXX_Size() int
func (*BlockchainReq) XXX_Unmarshal ¶ added in v0.2.0
func (m *BlockchainReq) XXX_Unmarshal(b []byte) error
type BlockchainResp ¶
type BlockchainResp struct { Blocks []*pb.Block `protobuf:"bytes,1,rep,name=blocks" json:"blocks,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response to a request for blockchain blocks.
func (*BlockchainResp) Descriptor ¶
func (*BlockchainResp) Descriptor() ([]byte, []int)
func (*BlockchainResp) GetBlocks ¶
func (m *BlockchainResp) GetBlocks() []*pb.Block
func (*BlockchainResp) Marshal ¶
func (m *BlockchainResp) Marshal() (dAtA []byte, err error)
func (*BlockchainResp) ProtoMessage ¶
func (*BlockchainResp) ProtoMessage()
func (*BlockchainResp) Reset ¶
func (m *BlockchainResp) Reset()
func (*BlockchainResp) Size ¶
func (m *BlockchainResp) Size() (n int)
func (*BlockchainResp) String ¶
func (m *BlockchainResp) String() string
func (*BlockchainResp) Unmarshal ¶
func (m *BlockchainResp) Unmarshal(dAtA []byte) error
func (*BlockchainResp) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *BlockchainResp) XXX_DiscardUnknown()
func (*BlockchainResp) XXX_Marshal ¶ added in v0.2.0
func (m *BlockchainResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockchainResp) XXX_Merge ¶ added in v0.2.0
func (dst *BlockchainResp) XXX_Merge(src proto.Message)
func (*BlockchainResp) XXX_Size ¶ added in v0.2.0
func (m *BlockchainResp) XXX_Size() int
func (*BlockchainResp) XXX_Unmarshal ¶ added in v0.2.0
func (m *BlockchainResp) XXX_Unmarshal(b []byte) error
type CoinClient ¶
type CoinClient interface { // Get an account. GetAccount(ctx context.Context, in *AccountReq, opts ...grpc.CallOption) (*pb.Account, error) // Send a coin transaction to the consensus engine. SendTransaction(ctx context.Context, in *pb.Transaction, opts ...grpc.CallOption) (*TransactionResp, error) // Get all the past transactions of an account. AccountTransactions(ctx context.Context, in *AccountTransactionsReq, opts ...grpc.CallOption) (Coin_AccountTransactionsClient, error) // View transaction pool. TransactionPool(ctx context.Context, in *TransactionPoolReq, opts ...grpc.CallOption) (*TransactionPoolResp, error) // Get blocks from the blockchain. Blockchain(ctx context.Context, in *BlockchainReq, opts ...grpc.CallOption) (*BlockchainResp, error) }
func NewCoinClient ¶
func NewCoinClient(cc *grpc.ClientConn) CoinClient
type CoinServer ¶
type CoinServer interface { // Get an account. GetAccount(context.Context, *AccountReq) (*pb.Account, error) // Send a coin transaction to the consensus engine. SendTransaction(context.Context, *pb.Transaction) (*TransactionResp, error) // Get all the past transactions of an account. AccountTransactions(*AccountTransactionsReq, Coin_AccountTransactionsServer) error // View transaction pool. TransactionPool(context.Context, *TransactionPoolReq) (*TransactionPoolResp, error) // Get blocks from the blockchain. Blockchain(context.Context, *BlockchainReq) (*BlockchainResp, error) }
type Coin_AccountTransactionsClient ¶
type Coin_AccountTransactionsClient interface { Recv() (*pb.Transaction, error) grpc.ClientStream }
type Coin_AccountTransactionsServer ¶
type Coin_AccountTransactionsServer interface { Send(*pb.Transaction) error grpc.ServerStream }
type TransactionPoolReq ¶
type TransactionPoolReq struct { Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request to view the transaction pool.
func (*TransactionPoolReq) Descriptor ¶
func (*TransactionPoolReq) Descriptor() ([]byte, []int)
func (*TransactionPoolReq) GetCount ¶
func (m *TransactionPoolReq) GetCount() uint32
func (*TransactionPoolReq) Marshal ¶
func (m *TransactionPoolReq) Marshal() (dAtA []byte, err error)
func (*TransactionPoolReq) MarshalTo ¶
func (m *TransactionPoolReq) MarshalTo(dAtA []byte) (int, error)
func (*TransactionPoolReq) ProtoMessage ¶
func (*TransactionPoolReq) ProtoMessage()
func (*TransactionPoolReq) Reset ¶
func (m *TransactionPoolReq) Reset()
func (*TransactionPoolReq) Size ¶
func (m *TransactionPoolReq) Size() (n int)
func (*TransactionPoolReq) String ¶
func (m *TransactionPoolReq) String() string
func (*TransactionPoolReq) Unmarshal ¶
func (m *TransactionPoolReq) Unmarshal(dAtA []byte) error
func (*TransactionPoolReq) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *TransactionPoolReq) XXX_DiscardUnknown()
func (*TransactionPoolReq) XXX_Marshal ¶ added in v0.2.0
func (m *TransactionPoolReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TransactionPoolReq) XXX_Merge ¶ added in v0.2.0
func (dst *TransactionPoolReq) XXX_Merge(src proto.Message)
func (*TransactionPoolReq) XXX_Size ¶ added in v0.2.0
func (m *TransactionPoolReq) XXX_Size() int
func (*TransactionPoolReq) XXX_Unmarshal ¶ added in v0.2.0
func (m *TransactionPoolReq) XXX_Unmarshal(b []byte) error
type TransactionPoolResp ¶
type TransactionPoolResp struct { Count uint64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` Txs []*pb.Transaction `protobuf:"bytes,2,rep,name=txs" json:"txs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response to a request to view the transaction pool.
func (*TransactionPoolResp) Descriptor ¶
func (*TransactionPoolResp) Descriptor() ([]byte, []int)
func (*TransactionPoolResp) GetCount ¶
func (m *TransactionPoolResp) GetCount() uint64
func (*TransactionPoolResp) GetTxs ¶
func (m *TransactionPoolResp) GetTxs() []*pb.Transaction
func (*TransactionPoolResp) Marshal ¶
func (m *TransactionPoolResp) Marshal() (dAtA []byte, err error)
func (*TransactionPoolResp) MarshalTo ¶
func (m *TransactionPoolResp) MarshalTo(dAtA []byte) (int, error)
func (*TransactionPoolResp) ProtoMessage ¶
func (*TransactionPoolResp) ProtoMessage()
func (*TransactionPoolResp) Reset ¶
func (m *TransactionPoolResp) Reset()
func (*TransactionPoolResp) Size ¶
func (m *TransactionPoolResp) Size() (n int)
func (*TransactionPoolResp) String ¶
func (m *TransactionPoolResp) String() string
func (*TransactionPoolResp) Unmarshal ¶
func (m *TransactionPoolResp) Unmarshal(dAtA []byte) error
func (*TransactionPoolResp) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *TransactionPoolResp) XXX_DiscardUnknown()
func (*TransactionPoolResp) XXX_Marshal ¶ added in v0.2.0
func (m *TransactionPoolResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TransactionPoolResp) XXX_Merge ¶ added in v0.2.0
func (dst *TransactionPoolResp) XXX_Merge(src proto.Message)
func (*TransactionPoolResp) XXX_Size ¶ added in v0.2.0
func (m *TransactionPoolResp) XXX_Size() int
func (*TransactionPoolResp) XXX_Unmarshal ¶ added in v0.2.0
func (m *TransactionPoolResp) XXX_Unmarshal(b []byte) error
type TransactionResp ¶
type TransactionResp struct { TxHash []byte `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response to a request to do a coin transaction.
func (*TransactionResp) Descriptor ¶
func (*TransactionResp) Descriptor() ([]byte, []int)
func (*TransactionResp) GetTxHash ¶
func (m *TransactionResp) GetTxHash() []byte
func (*TransactionResp) Marshal ¶
func (m *TransactionResp) Marshal() (dAtA []byte, err error)
func (*TransactionResp) ProtoMessage ¶
func (*TransactionResp) ProtoMessage()
func (*TransactionResp) Reset ¶
func (m *TransactionResp) Reset()
func (*TransactionResp) Size ¶
func (m *TransactionResp) Size() (n int)
func (*TransactionResp) String ¶
func (m *TransactionResp) String() string
func (*TransactionResp) Unmarshal ¶
func (m *TransactionResp) Unmarshal(dAtA []byte) error
func (*TransactionResp) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *TransactionResp) XXX_DiscardUnknown()
func (*TransactionResp) XXX_Marshal ¶ added in v0.2.0
func (m *TransactionResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TransactionResp) XXX_Merge ¶ added in v0.2.0
func (dst *TransactionResp) XXX_Merge(src proto.Message)
func (*TransactionResp) XXX_Size ¶ added in v0.2.0
func (m *TransactionResp) XXX_Size() int
func (*TransactionResp) XXX_Unmarshal ¶ added in v0.2.0
func (m *TransactionResp) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.