client

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: LGPL-3.0 Imports: 29 Imported by: 0

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) FetchNewRoundInfo added in v0.0.6

func (sc *SettlusClient) FetchNewRoundInfo(ctx context.Context) (*oracletypes.RoundInfo, error)

func (*SettlusClient) GetLatestHeight

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

GetLatestHeight tries getting the latest height from the RPC client.

func (*SettlusClient) UpdateSequenceFromError added in v0.2.0

func (sc *SettlusClient) UpdateSequenceFromError(log string) error

UpdateSequenceFromError updates the sequence number from the error log

Jump to

Keyboard shortcuts

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