cosmos

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CosmosIndexer

type CosmosIndexer struct {
	AnconSyncContext *sdk.AnconSyncContext
	Client           *rpcclient.WSClient
	LastLinkNode     datamodel.Node
	LastLink         datamodel.Link
}

func New

func New(ctx context.Context, tmRPCAddr, tmEndpoint string) *CosmosIndexer

func (*CosmosIndexer) Subscribe

func (i *CosmosIndexer) Subscribe(ctx context.Context, subscriptionType SubscriptionType)

func (*CosmosIndexer) TipEvent

func (i *CosmosIndexer) TipEvent(c *gin.Context)

@BasePath /v0 DagJsonWrite godoc @Summary Stores JSON as dag-json @Schemes @Description Writes a dag-json block which syncs with IPFS. Returns a CID. @Tags dag-json @Accept json @Produce json @Success 201 {string} cid @Router /v0/tip [post]

type SubscriptionType

type SubscriptionType string
const (
	Tx                  SubscriptionType = "tm.event='Tx'"
	ValidatorSetUpdates SubscriptionType = "tm.event='ValidatorSetUpdates'"
	NewBlock            SubscriptionType = "tm.event='NewBlock'"
	BankModule          SubscriptionType = "message.module='bank'"
)

Jump to

Keyboard shortcuts

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