networks

package
v1.15.6 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(key string) *registry.Network

Find is a shortcut for getRegistryNetworks().Find(key).

func GetBytesEncoding

func GetBytesEncoding(network *registry.Network) registry.BytesEncoding

Returns the bytes encoding for a given network Returns the raw BytesEncoding type, Hex if not found.

Types

type NetworkRegistry

type NetworkRegistry map[string]*registry.Network

NetworkRegistry is a thin wrapper around a [map[string]*registry.Network] to add some helper methods.

func GetFirehoseRegistry

func GetFirehoseRegistry() NetworkRegistry

GetFirehoseRegistry returns only networks with Firehose endpoints.

func GetSubstreamsRegistry

func GetSubstreamsRegistry() NetworkRegistry

GetSubstreamsRegistry returns only networks with Substreams endpoints.

func (NetworkRegistry) Find

func (r NetworkRegistry) Find(key string) *registry.Network

Find returns the network by ID or, if not found, by alias (sorted by network ID), FullName, and ShortName.

func (NetworkRegistry) FindByGenesisBlock

func (r NetworkRegistry) FindByGenesisBlock(blockNum uint64, blockID string) *registry.Network

FindByGenesisBlock returns the *registry.Network whose genesis block matches the given blockNum and blockID (hash).

func (NetworkRegistry) FindBySubstreamsEndpoint

func (r NetworkRegistry) FindBySubstreamsEndpoint(endpoint string) *registry.Network

FindBySubstreamsEndpoint returns the *registry.Network whose Substreams endpoint matches the given endpoint.

Jump to

Keyboard shortcuts

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