Skip to content

sgns::ChainRpcProviderConfig

Platform-agnostic configuration passed to ChainRpcEndpointProvider. More...

#include <ChainRpcEndpointProvider.hpp>

Public Attributes

Name
std::filesystem::path chains_json_path
Filesystem path to the chainid.network chains.json file.
std::unordered_map< std::string, std::vector< WeightedRpcEndpoint > > direct_endpoints
Per-chain direct (API-key) endpoints supplied by the app layer.

Detailed Description

struct sgns::ChainRpcProviderConfig;

Platform-agnostic configuration passed to ChainRpcEndpointProvider.

On desktop, the app layer loads this from a local JSON config file. On mobile, the app layer constructs it from secure storage or settings. No environment variables or git-tracked secrets are consumed here.

Public Attributes Documentation

variable chains_json_path

std::filesystem::path chains_json_path;

Filesystem path to the chainid.network chains.json file.

This is the aggregated ChainList dataset that provides verified public RPC endpoint URLs for every EVM chain. The file is typically bundled with the application or downloaded at first launch.

variable direct_endpoints

std::unordered_map< std::string, std::vector< WeightedRpcEndpoint > > direct_endpoints;

Per-chain direct (API-key) endpoints supplied by the app layer.

Keyed by the numeric chain ID as a string (e.g. "1" for Ethereum). Each entry carries a URL and a consensus weight (typically 50%). API keys must be embedded in the URL (e.g. https://mainnet.infura.io/v3/{key}).

These values come from secure storage on mobile or a local-only config file on desktop — never from environment variables or tracked files.


Updated on 2026-06-05 at 17:22:18 -0700