-
Notifications
You must be signed in to change notification settings - Fork 16
/
tendermint.go
25 lines (22 loc) · 967 Bytes
/
tendermint.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package exposed
import (
"github.com/okex/exchain-go-sdk/module/tendermint/types"
gosdktypes "github.com/okex/exchain-go-sdk/types"
ctypes "github.com/okex/exchain/libs/tendermint/rpc/core/types"
)
// Tendermint shows the expected behavior for inner tendermint client
type Tendermint interface {
gosdktypes.Module
TendermintQuery
}
// TendermintQuery shows the expected query behavior for inner tendermint client
type TendermintQuery interface {
QueryBlock(height int64) (*types.Block, error)
QueryBlockResults(height int64) (*types.ResultBlockResults, error)
QueryCommitResult(height int64) (*types.ResultCommit, error)
QueryValidatorsResult(height int64) (*types.ResultValidators, error)
QueryTxResult(hashHexStr string, prove bool) (*types.ResultTx, error)
// QueryTxsByEvents assumes the node to query a truth teller
QueryTxsByEvents(eventsStr string, page, limit int) (*ctypes.ResultTxSearch, error)
QueryStatus() (*ctypes.ResultStatus, error)
}