types

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchInfo

type FetchInfo struct {
	InclusiveFromHeight int64
	ExclusiveToHeight   int64
	HasMore             bool
	FetchItemCnt        int64
	FetchItemRange      []int64
}

func NewBlockFetchInfo

func NewBlockFetchInfo(inclusiveFromHeight int64, exclusiveToHeight int64, hasMore bool) FetchInfo

func NewFetchInfo

func NewFetchInfo(latestBlockHeight, fromHeight, fetchSize int64) FetchInfo

type HasMoreResponseWrapper

type HasMoreResponseWrapper struct {
	Items   []*ResultBlockWithTxResponses `json:"items"`
	HasMore bool                          `json:"has_more"`
}

type ResultBlock

type ResultBlock struct {
	BlockSize int             `json:"block_size"`
	BlockID   tmtypes.BlockID `json:"block_id"`
	Block     *tmtypes.Block  `json:"block"`
}

type ResultBlockWithTxResponses

type ResultBlockWithTxResponses struct {
	ResultBlock *ResultBlock `json:"result_block"`
	TxResponses []TxResponse `json:"tx_responses"`
}

type SearchGenesisAccountResult

type SearchGenesisAccountResult struct {
	TotalCount int                      `json:"total_count"`
	Count      int                      `json:"count"`
	PageNumber int                      `json:"page_number"`
	PageTotal  int                      `json:"page_total"`
	Limit      int                      `json:"limit"`
	Accounts   exported.GenesisAccounts `json:"accounts"`
}

func NewSearchGenesisAccountResult

func NewSearchGenesisAccountResult(totalCount, count, page, limit int, accounts exported.GenesisAccounts) SearchGenesisAccountResult

type SearchTxsResult

type SearchTxsResult struct {
	TotalCount int          `json:"total_count"` // Count of all txs
	Count      int          `json:"count"`       // Count of txs in current page
	PageNumber int          `json:"page_number"` // Index of current page, start from 1
	PageTotal  int          `json:"page_total"`  // Count of total pages
	Limit      int          `json:"limit"`       // Max count txs per page
	Txs        []TxResponse `json:"txs"`         // List of txs in current page
}

SearchTxsResult defines a structure for querying txs pageable

func NewSearchTxsResult

func NewSearchTxsResult(totalCount, count, page, limit int, txs []TxResponse) SearchTxsResult

type TxResponse

type TxResponse struct {
	Height    int64               `json:"height"`
	TxHash    string              `json:"txhash"`
	Codespace string              `json:"codespace,omitempty"`
	Code      uint32              `json:"code,omitempty"`
	Index     uint32              `json:"index"` // additional field
	Data      string              `json:"data,omitempty"`
	RawLog    string              `json:"raw_log,omitempty"`
	Logs      sdk.ABCIMessageLogs `json:"logs,omitempty"`
	Info      string              `json:"info,omitempty"`
	GasWanted int64               `json:"gas_wanted,omitempty"`
	GasUsed   int64               `json:"gas_used,omitempty"`
	Tx        sdk.Tx              `json:"tx,omitempty"`
	Timestamp string              `json:"timestamp,omitempty"`
}

func NewResponseResultTx

func NewResponseResultTx(res *ctypes.ResultTx, tx sdk.Tx, timestamp string) TxResponse

NewResponseResultTx returns a TxResponse given a ResultTx from tendermint

func (TxResponse) Empty

func (r TxResponse) Empty() bool

Empty returns true if the response is empty

func (TxResponse) String

func (r TxResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL