Documentation
¶
Index ¶
- type Block
- type BlockHeader
- type BlockID
- type BlockMeta
- type Error
- type GetBlockResponse
- type GetBlockchainResponse
- type GetTxSearchResponse
- type LogEvents
- type LogEventsAttributes
- type LogFormat
- type ResponseDeliverTx
- type ResultBlock
- type ResultBlockchain
- type ResultTxSearch
- type TxResponse
- type TxTag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockHeader ¶
type BlockHeader struct {
Height string `json:"height"`
ChainID string `json:"chain_id"`
Time string `json:"time"`
NumTxs string `json:"num_txs"`
}
BlockHeader structures
type BlockMeta ¶
type BlockMeta struct {
BlockID BlockID `json:"block_id"`
Header BlockHeader `json:"header"`
}
BlockMeta is block metadata
type Error ¶
type Error struct {
Code int `json:"code"`
Message string `json:"message"`
Data string `json:"data"`
}
Error is api error
type GetBlockResponse ¶
type GetBlockResponse struct {
// ID string `json:"id"`
RPC string `json:"jsonrpc"`
Result ResultBlock `json:"result"`
Error Error `json:"error"`
}
GetBlockResponse cosmos response from block
type GetBlockchainResponse ¶
type GetBlockchainResponse struct {
//ID string `json:"id"`
RPC string `json:"jsonrpc"`
Result ResultBlockchain `json:"result"`
Error Error `json:"error"`
}
GetBlockchainResponse cosmos response from blockchain
type GetTxSearchResponse ¶
type GetTxSearchResponse struct {
// ID string `json:"id"`
RPC string `json:"jsonrpc"`
Result ResultTxSearch `json:"result"`
Error Error `json:"error"`
}
GetTxSearchResponse cosmos response for search
type LogEvents ¶
type LogEvents struct {
Type string `json:"type"`
//Attributes []string `json:"attributes"`
Attributes []*LogEventsAttributes `json:"attributes"`
}
LogEvents format of events from logs cosmos
type LogEventsAttributes ¶
type LogEventsAttributes struct {
Module string
Action string
Amount []string
Sender []string
Validator map[string][]string
Withdraw map[string][]string
Recipient []string
CompletionTime string
Commission []string
Others map[string][]string
}
LogEventsAttributes enhanced format of event attributes
func (*LogEventsAttributes) UnmarshalJSON ¶
func (lea *LogEventsAttributes) UnmarshalJSON(b []byte) error
UnmarshalJSON LogEvents into a different format, to be able to parse it later more easily thats fulfillment of json.Unmarshaler inferface
type LogFormat ¶
type LogFormat struct {
MsgIndex float64 `json:"msg_index"`
Success bool `json:"success"`
Log string `json:"log"`
Events []LogEvents `json:"events"`
}
LogFormat format of logs from cosmos
type ResponseDeliverTx ¶
type ResponseDeliverTx struct {
Log string `json:"log"`
GasWanted string `json:"gasWanted"`
GasUsed string `json:"gasUsed"`
Tags []TxTag `json:"tags"`
}
ResponseDeliverTx result
type ResultBlock ¶
ResultBlock is result of fetching block
type ResultBlockchain ¶
type ResultBlockchain struct {
LastHeight string `json:"last_height"`
BlockMetas []BlockMeta `json:"block_metas"`
}
ResultBlockchain is result of fetching block
type ResultTxSearch ¶
type ResultTxSearch struct {
Txs []TxResponse `json:"txs"`
TotalCount string `json:"total_count"`
}
ResultTxSearch of searching for txs
type TxResponse ¶
type TxResponse struct {
Hash string `json:"hash"`
Height string `json:"height"`
Index float64 `json:"index"`
TxResult ResponseDeliverTx `json:"tx_result"`
// TxData is base64 encoded transaction data
TxData string `json:"tx"`
All int64
}
TxResponse is result of querying for a tx