cosmos

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Codec

type Codec struct {
	InterfaceRegistry types.InterfaceRegistry
	Marshaler         codec.Codec
	TxConfig          client.TxConfig
	Amino             *codec.LegacyAmino
}

type CosmosProvider

type CosmosProvider struct {
	Cdc       Codec
	RPCClient rpcclient.Client
}

func NewProvider

func NewProvider(rpcURL string) (*CosmosProvider, error)

NewProvider validates the CosmosProviderConfig, instantiates a ChainClient and then instantiates a CosmosProvider

func (*CosmosProvider) GetBlockAtHeight

func (cc *CosmosProvider) GetBlockAtHeight(ctx context.Context, height int64) (*coretypes.ResultBlock, error)

GetBlockAtHeight queries the block at a given height

func (*CosmosProvider) Invoke

func (cc *CosmosProvider) Invoke(ctx context.Context, method string, req, reply interface{}, opts ...grpc.CallOption) (err error)

Invoke implements the grpc ClientConn.Invoke method

func (*CosmosProvider) NewStream

NewStream implements the grpc ClientConn.NewStream method

func (*CosmosProvider) QueryABCI

QueryABCI performs an ABCI query and returns the appropriate response and error sdk error code.

func (*CosmosProvider) QueryLatestHeight

func (cc *CosmosProvider) QueryLatestHeight(ctx context.Context) (int64, error)

QueryLatestHeight queries the latest height from the RPC client

func (*CosmosProvider) QueryUsedNonce

func (cc *CosmosProvider) QueryUsedNonce(ctx context.Context, sourceDomain types.Domain, nonce uint64) (bool, error)

Jump to

Keyboard shortcuts

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