Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
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.