statetracker

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterForSpecUpdatesOrSetStaticSpecsWithToken

func RegisterForSpecUpdatesOrSetStaticSpecsWithToken(ctx context.Context, chainParser chainlib.ChainParser, specPaths []string, rpcEndpoint lavasession.RPCEndpoint, specUpdaterInf SpecUpdaterInf, githubToken string, gitlabToken string) error

RegisterForSpecUpdatesOrSetStaticSpecsWithToken loads specs from multiple sources and aggregates them. Sources are processed in order; later sources override earlier ones for the same chain ID.

It supports:

  • Remote repositories (GitHub/GitLab) - detected automatically by URL pattern
  • Local directories - all JSON files in the directory are loaded
  • Local files - single JSON file or comma-separated list of files

Local files can be specified either as separate flags or comma-separated:

--use-static-spec file1.json --use-static-spec file2.json
--use-static-spec file1.json,file2.json

For remote repositories, the appropriate token (githubToken or gitlabToken) is used for authentication. When specPaths is empty and specUpdaterInf is non-nil, it falls back to blockchain registration.

Types

type SpecUpdaterInf

type SpecUpdaterInf interface {
	RegisterForSpecUpdates(ctx context.Context, specUpdatable updaters.SpecUpdatable, endpoint lavasession.RPCEndpoint) error
}

SpecUpdaterInf is implemented by state-tracker types that can register a SpecUpdatable for live on-chain spec updates. Callers that do not need live updates (e.g. the smart router using static specs) may pass nil.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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