tendermint/rpc/core/types/responses.go

102 lines
2.5 KiB
Go
Raw Normal View History

package core_types
import (
2015-04-01 17:30:16 -07:00
"github.com/tendermint/tendermint/account"
sm "github.com/tendermint/tendermint/state"
"github.com/tendermint/tendermint/types"
)
type ResponseGenPrivAccount struct {
2015-05-01 17:26:49 -07:00
PrivAccount *account.PrivAccount `json:"priv_account"`
}
type ResponseGetAccount struct {
2015-05-01 17:26:49 -07:00
Account *account.Account `json:"account"`
}
type ResponseGetStorage struct {
2015-05-01 17:26:49 -07:00
Key []byte `json:"key"`
Value []byte `json:"value"`
}
type ResponseCall struct {
2015-05-01 17:26:49 -07:00
Return []byte `json:"return"`
GasUsed uint64 `json:"gas_used"`
// TODO ...
}
type ResponseListAccounts struct {
2015-05-01 17:26:49 -07:00
BlockHeight uint `json:"block_height"`
Accounts []*account.Account `json:"accounts"`
}
2015-03-31 14:08:21 -07:00
type StorageItem struct {
2015-05-01 17:26:49 -07:00
Key []byte `json:"key"`
Value []byte `json:"value"`
2015-03-31 14:08:21 -07:00
}
type ResponseDumpStorage struct {
2015-05-01 17:26:49 -07:00
StorageRoot []byte `json:"storage_root"`
StorageItems []StorageItem `json:"storage_items"`
2015-03-31 14:08:21 -07:00
}
type ResponseBlockchainInfo struct {
2015-05-01 17:26:49 -07:00
LastHeight uint `json:"last_height"`
BlockMetas []*types.BlockMeta `json:"block_metas"`
}
type ResponseGetBlock struct {
2015-05-01 17:26:49 -07:00
BlockMeta *types.BlockMeta `json:"block_meta"`
Block *types.Block `json:"block"`
}
type ResponseBroadcastTx struct {
2015-05-01 17:26:49 -07:00
Receipt Receipt `json:"receipt"`
}
2015-04-25 13:26:36 -07:00
type ResponseListUnconfirmedTxs struct {
2015-05-01 17:26:49 -07:00
Txs []types.Tx `json:"txs"`
2015-04-25 13:26:36 -07:00
}
type Receipt struct {
2015-05-01 17:26:49 -07:00
TxHash []byte `json:"tx_hash"`
CreatesContract uint8 `json:"creates_contract"`
ContractAddr []byte `json:"contract_addr"`
}
type ResponseStatus struct {
2015-05-01 17:26:49 -07:00
GenesisHash []byte `json:"genesis_hash"`
Network string `json:"network"`
LatestBlockHash []byte `json:"lastest_block_hash"`
LatestBlockHeight uint `json:"lastest_block_height"`
LatestBlockTime int64 `json:"latest_bloick_time"` // nano
}
type ResponseNetInfo struct {
2015-05-01 17:26:49 -07:00
Moniker string `json:"moniker"`
Network string `json:"network"`
Listening bool `json:"listening"`
Listeners []string `json:"listeners"`
Peers []Peer `json:"peers"`
2015-04-17 18:22:44 -07:00
}
type Peer struct {
2015-05-01 17:26:49 -07:00
types.NodeInfo `json:"net_info"`
IsOutbound bool `json:"is_outbound"`
}
type ResponseSignTx struct {
2015-05-01 17:26:49 -07:00
Tx types.Tx `json:"tx"`
}
type ResponseListValidators struct {
2015-05-01 17:26:49 -07:00
BlockHeight uint `json:"block_height"`
BondedValidators []*sm.Validator `json:"bonded_validators"`
UnbondingValidators []*sm.Validator `json:"unbonding_validators"`
}
type ResponseDumpConsensusState struct {
2015-05-01 17:26:49 -07:00
RoundState string `json:"round_state"`
PeerRoundStates []string `json:"peer_round_states"`
}