rpc

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resolve

func Resolve(chainID string, flagValue string, cfg config.Config) (string, error)

Resolve returns the RPC endpoint URL for a given chain ID.

The platform does not hand out RPC endpoints: /api/chains omits the seeded defaults because some of them embed provider API keys. The caller supplies the endpoint.

Resolution order:

  1. flagValue (from --rpc-url flag)
  2. KH_RPC_URL env var
  3. Config file rpc.<chainID>
  4. Error if nothing found

Types

type ChainInfo

type ChainInfo struct {
	ChainID   int    `json:"chainId"`
	Name      string `json:"name"`
	Type      string `json:"chainType"`
	IsEnabled bool   `json:"isEnabled"`
}

ChainInfo holds a single chain as returned by /api/chains.

Jump to

Keyboard shortcuts

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