flow

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetBlock(ctx context.Context, params structs.HeightHash) (block structs.Block, er error)
	SearchTx(ctx context.Context, r structs.HeightHash, block structs.Block, perPage uint64) (txs []structs.Transaction, err error)

	GetRewardBalances(ctx context.Context, params []structs.HeightAccount) (resp map[uint64]structs.GetRewardResponse, err error)
}

type CosmosFlow

type CosmosFlow struct {
	// contains filtered or unexported fields
}

func NewCosmosFlow

func NewCosmosFlow(client Client, storeClient store.StoreCaller, logger *zap.Logger) *CosmosFlow

func (*CosmosFlow) BlockAndTx

func (f *CosmosFlow) BlockAndTx(ctx context.Context, height uint64) (block structs.BlockWithMeta, err error)

func (*CosmosFlow) GetData

func (f *CosmosFlow) GetData(ctx context.Context, hr structs.ExpandedHeightRange) (kind string, payload []byte, err error)

func (*CosmosFlow) GetRewardBalances

func (f *CosmosFlow) GetRewardBalances(ctx context.Context, ha []structs.HeightAccount) (rewardSummary map[uint64]structs.GetRewardResponse, err error)

GetReward gets reward

func (*CosmosFlow) GetTransactions

func (ic *CosmosFlow) GetTransactions(ctx context.Context, hr structs.ExpandedHeightRange) (structs.Heights, error)

GetTransactions gets new transactions and blocks from cosmos for given range

func (*CosmosFlow) LatestMark

func (f *CosmosFlow) LatestMark(ctx context.Context, ldReq structs.LatestDataRequest) (ldResp structs.LatestDataResponse, err error)

Jump to

Keyboard shortcuts

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