client

package
v0.0.4-fix Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: LGPL-3.0 Imports: 28 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	MaxConnections   = 10
	TxRetryCount     = 3
	TxRetryDelay     = time.Millisecond * 500
	HeightRetryCount = 3
	HeightRetryDelay = time.Millisecond * 50
)

Variables

View Source
var (
	HTTPProtocols = regexp.MustCompile("https?://")
)

Functions

func CreateGrpcConnection

func CreateGrpcConnection(isInsecure bool, grpcAddress string) (*grpc.ClientConn, error)

CreateGrpcConnection creates a new gRPC client connection from the given configuration

Types

type SettlusClient

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

func NewSettlusClient

func NewSettlusClient(config *config.Config, ctx context.Context, s signer.Signer, logger cometlog.Logger) (*SettlusClient, error)

NewSettlusClient creates a new SettlusClient instance

func (*SettlusClient) BuildAndSendTxWithRetry

func (sc *SettlusClient) BuildAndSendTxWithRetry(ctx context.Context, msg sdk.Msg) error

BuildAndSendTxWithRetry builds and sends a transaction to the Settlus node

func (*SettlusClient) Close

func (sc *SettlusClient) Close()

Close closes the SettlusClient

func (*SettlusClient) GetLatestHeight

func (sc *SettlusClient) GetLatestHeight(ctx context.Context) (int64, error)

GetLatestHeight tries getting the latest height from the RPC client.

Jump to

Keyboard shortcuts

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