tendermint/rpc/core/types/responses.go

99 lines
1.7 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 {
PrivAccount *account.PrivAccount
}
type ResponseGetAccount struct {
Account *account.Account
}
type ResponseGetStorage struct {
Key []byte
Value []byte
}
type ResponseCall struct {
Return []byte
GasUsed uint64
// TODO ...
}
type ResponseListAccounts struct {
BlockHeight uint
Accounts []*account.Account
}
2015-03-31 14:08:21 -07:00
type StorageItem struct {
Key []byte
Value []byte
}
type ResponseDumpStorage struct {
StorageRoot []byte
StorageItems []StorageItem
}
type ResponseBlockchainInfo struct {
LastHeight uint
BlockMetas []*types.BlockMeta
}
type ResponseGetBlock struct {
BlockMeta *types.BlockMeta
Block *types.Block
}
// curl -H 'content-type: text/plain;' http://127.0.0.1:8888/submit_tx?tx=...
type ResponseBroadcastTx struct {
Receipt Receipt
}
type Receipt struct {
TxHash []byte
CreatesContract uint8
ContractAddr []byte
}
type ResponseStatus struct {
GenesisHash []byte
Network string
LatestBlockHash []byte
LatestBlockHeight uint
LatestBlockTime int64 // nano
}
type ResponseNetInfo struct {
Moniker string
Network string
Listening bool
Listeners []string
2015-04-17 18:22:44 -07:00
Peers []Peer
}
type Peer struct {
types.NodeInfo
2015-04-17 18:22:44 -07:00
IsOutbound bool
}
type ResponseSignTx struct {
Tx types.Tx
}
type ResponseListValidators struct {
BlockHeight uint
BondedValidators []*sm.Validator
UnbondingValidators []*sm.Validator
}
type ResponseDumpConsensusState struct {
RoundState string
PeerRoundStates []string
}