Categorygithub.com/Decentr-net/ariadne
modulepackage
1.2.0
Repository: https://github.com/decentr-net/ariadne.git
Documentation: pkg.go.dev

# README

Ariadne

img img img

Ariadne is a library for fetching blocks from cosmos based blockchain node. The library is helpful at off-chain services building.

Install

go get -u github.com/Decentr-net/ariadne

Usage

Short example:

f, err := ariadne.New(nodeAddr, cdc, time.Minute)
if err != nil { panic(err) }

_ = f.FetchBlocks(context.Background(), 1, func (b Block) error {
    fmt.Sprintf("%+v\n", b)
    return nil
})

You have to look at detailed example here

Contributing

Feel free to create issues and send pull requests!

License

This project is under Apache-2.0 License

# Packages

No description provided by the author
Package mock is a generated GoMock package.

# Functions

New returns new instance of fetcher.
WithErrHandler sets function to process errors.
WithRetryInterval sets pause duration after error.
WithRetryLastBlockInterval sets how long should fetcher wait if fetcher got ErrTooHighBlockRequested.
WithSkipError disable retries of block handling with handleFunc.

# Variables

ErrTooHighBlockRequested returned when blockchain's height is less than requested.

# Structs

Block presents transactions and height.
FetchBlocksOptions is config for FetchBlocks method.

# Interfaces

Fetcher interface for fetching.

# Type aliases

FetchBlocksOption is used to tune FetchBlocks method.