rpc

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountData

type AccountData struct {
	Address       string
	AccountNumber uint64
	Sequence      uint64
}

type RpcClient

type RpcClient interface {
	Broadcast(ctx context.Context, txBytes []byte) (*txtypes.BroadcastTxResponse, error)

	Simulate(ctx context.Context, txBytes []byte) (*txtypes.SimulateResponse, error)

	Account(ctx context.Context, address string) (authtypes.AccountI, error)

	GetBalance(ctx context.Context, address, denom string) (*sdk.Coin, error)
	GetDelegators(ctx context.Context, validatorAddress string) ([]string, error)
	GetDenomMetadata(ctx context.Context, denom string) (*banktypes.Metadata, error)
	GetGrants(ctx context.Context, botAddress string) ([]*authztypes.GrantAuthorization, error)
	GetPendingRewards(ctx context.Context, delegator, validator, stakingDenom string) (sdk.Dec, error)
	GetTxStatus(ctx context.Context, txHash string) (*txtypes.GetTxResponse, error)
}

Handles RPCs with Tendermint nodes

func NewGrpcClient added in v1.0.12

func NewGrpcClient(nodeGrpcUri string, cdc *codec.ProtoCodec, log *log.Logger) (RpcClient, error)

NewRpcClient makes a new RpcClient.

func NewRetryableRpcClient added in v1.0.12

func NewRetryableRpcClient(attempts uint, delay time.Duration, rpcClient RpcClient, logger *log.Logger) (RpcClient, error)

NewRetryableRPCClient returns a new retryableRpcClient

Jump to

Keyboard shortcuts

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