Documentation ¶
Index ¶
- func GetVotesFromResp(body []byte) blockchain.Votes
- func InitEKTClient()
- type Client
- func (client Client) BroadcastBlock(block blockchain.Block)
- func (client Client) GetAccountNonce(address string) int64
- func (client Client) GetBlockByHeight(height int64) *blockchain.Block
- func (client Client) GetGenesisAccounts() []types.Account
- func (client Client) GetHeaderByHash(hash []byte) *blockchain.Header
- func (client Client) GetHeaderByHeight(height int64) *blockchain.Header
- func (client Client) GetLastBlock() *blockchain.Header
- func (client Client) GetReceipt(txHash string) *userevent.ReceiptDetail
- func (client Client) GetSuggestionFee() int64
- func (client Client) GetValueByHash(hash []byte) []byte
- func (client Client) GetVotesByBlockHash(hash string) blockchain.Votes
- func (client Client) SendTransaction(tx userevent.Transaction) error
- func (client Client) SendVote(vote blockchain.PeerBlockVote)
- func (client Client) SendVoteResult(votes blockchain.Votes)
- type IClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetVotesFromResp ¶
func GetVotesFromResp(body []byte) blockchain.Votes
func InitEKTClient ¶
func InitEKTClient()
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) BroadcastBlock ¶
func (client Client) BroadcastBlock(block blockchain.Block)
func (Client) GetAccountNonce ¶
func (Client) GetBlockByHeight ¶
func (client Client) GetBlockByHeight(height int64) *blockchain.Block
func (Client) GetGenesisAccounts ¶
func (Client) GetHeaderByHash ¶
func (client Client) GetHeaderByHash(hash []byte) *blockchain.Header
func (Client) GetHeaderByHeight ¶
func (client Client) GetHeaderByHeight(height int64) *blockchain.Header
func (Client) GetLastBlock ¶
func (client Client) GetLastBlock() *blockchain.Header
func (Client) GetReceipt ¶
func (client Client) GetReceipt(txHash string) *userevent.ReceiptDetail
func (Client) GetSuggestionFee ¶
func (Client) GetValueByHash ¶
func (Client) GetVotesByBlockHash ¶
func (client Client) GetVotesByBlockHash(hash string) blockchain.Votes
func (Client) SendTransaction ¶
func (client Client) SendTransaction(tx userevent.Transaction) error
func (Client) SendVote ¶
func (client Client) SendVote(vote blockchain.PeerBlockVote)
func (Client) SendVoteResult ¶
func (client Client) SendVoteResult(votes blockchain.Votes)
type IClient ¶
type IClient interface { // block GetHeaderByHeight(height int64) *blockchain.Header GetBlockByHeight(height int64) *blockchain.Block GetLastBlock() *blockchain.Header GetHeaderByHash(hash []byte) *blockchain.Header // vote GetVotesByBlockHash(hash string) blockchain.Votes // delegate BroadcastBlock(block blockchain.Block) SendVote(vote blockchain.PeerBlockVote) SendVoteResult(votes blockchain.Votes) // transaction GetSuggestionFee() int64 SendTransaction(tx userevent.Transaction) error GetReceipt(txHash string) *userevent.ReceiptDetail // account GetAccountNonce(address string) int64 GetGenesisAccounts() []types.Account GetValueByHash(hash []byte) []byte }
Click to show internal directories.
Click to hide internal directories.