connect

package
v0.1.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	Network   netconf.Network
	XProvider xchain.Provider
	CProvider cchain.Provider
	// contains filtered or unexported fields
}

Connector provider a simple abstraction to connect to the Omni network.

func New

func New(ctx context.Context, netID netconf.ID, endpoints xchain.RPCEndpoints) (Connector, error)

New returns a populated Connector for the given network. By default, it supports connecting to the omni evm and consensus chains since they have well known RPCs. To connect to other supported rollups, the RPC endpoints must be manually provided.

func (Connector) Backend

func (c Connector) Backend(chainID uint64) (*ethbackend.Backend, error)

Backend returns an ethbackend for the given chainID.

Jump to

Keyboard shortcuts

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