2015-04-07 11:44:25 -07:00
|
|
|
package core_types
|
2015-03-27 02:25:41 -07:00
|
|
|
|
|
|
|
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"
|
2015-03-27 02:25:41 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
type ResponseGenPrivAccount struct {
|
2015-05-01 17:26:49 -07:00
|
|
|
PrivAccount *account.PrivAccount `json:"priv_account"`
|
2015-03-27 02:25:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type ResponseGetAccount struct {
|
2015-05-01 17:26:49 -07:00
|
|
|
Account *account.Account `json:"account"`
|
2015-03-27 02:25:41 -07:00
|
|
|
}
|
|
|
|
|
2015-03-31 04:53:34 -07:00
|
|
|
type ResponseGetStorage struct {
|
2015-05-01 17:26:49 -07:00
|
|
|
Key []byte `json:"key"`
|
|
|
|
Value []byte `json:"value"`
|
2015-03-31 04:53:34 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type ResponseCall struct {
|
2015-05-01 17:26:49 -07:00
|
|
|
Return []byte `json:"return"`
|
|
|
|
GasUsed uint64 `json:"gas_used"`
|
2015-03-31 04:53:34 -07:00
|
|
|
// TODO ...
|
|
|
|
}
|
|
|
|
|
2015-03-27 02:25:41 -07:00
|
|
|
type ResponseListAccounts struct {
|
2015-05-01 17:26:49 -07:00
|
|
|
BlockHeight uint `json:"block_height"`
|
|
|
|
Accounts []*account.Account `json:"accounts"`
|
2015-03-27 02:25:41 -07:00
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2015-03-27 02:25:41 -07:00
|
|
|
type ResponseBlockchainInfo struct {
|
2015-05-01 17:26:49 -07:00
|
|
|
LastHeight uint `json:"last_height"`
|
|
|
|
BlockMetas []*types.BlockMeta `json:"block_metas"`
|
2015-03-27 02:25:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type ResponseGetBlock struct {
|
2015-05-01 17:26:49 -07:00
|
|
|
BlockMeta *types.BlockMeta `json:"block_meta"`
|
|
|
|
Block *types.Block `json:"block"`
|
2015-03-27 02:25:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type ResponseBroadcastTx struct {
|
2015-05-01 17:26:49 -07:00
|
|
|
Receipt Receipt `json:"receipt"`
|
2015-03-27 02:25:41 -07:00
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2015-04-07 11:44:25 -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"`
|
2015-04-07 11:44:25 -07:00
|
|
|
}
|
|
|
|
|
2015-03-27 02:25:41 -07:00
|
|
|
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
|
2015-03-27 02:25:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
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"`
|
2015-03-27 02:25:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type ResponseSignTx struct {
|
2015-05-01 17:26:49 -07:00
|
|
|
Tx types.Tx `json:"tx"`
|
2015-03-27 02:25:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
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"`
|
2015-03-27 02:25:41 -07:00
|
|
|
}
|
2015-04-20 20:39:42 -07:00
|
|
|
|
|
|
|
type ResponseDumpConsensusState struct {
|
2015-05-01 17:26:49 -07:00
|
|
|
RoundState string `json:"round_state"`
|
|
|
|
PeerRoundStates []string `json:"peer_round_states"`
|
2015-04-20 20:39:42 -07:00
|
|
|
}
|