Class Config
Represents a chia config yaml file and its contents. Used to find the uri and ssl certs needed to connect
public sealed class Config
- Inheritance
-
Config
- Inherited Members
- Extension Methods
Properties
ChiaRootPath
Full path to the chia root
public string ChiaRootPath { get; }
Property Value
- string
- Represents a chia config yaml file and its contents. Used to find the uri and ssl certs needed to connect
Contents
The contents of the config yaml
public dynamic Contents { get; init; }
Property Value
- dynamic
- Represents a chia config yaml file and its contents. Used to find the uri and ssl certs needed to connect
DefaultRootPath
The OS specific default location of the chia root folder (respects CHIA_ROOT)
public static string DefaultRootPath { get; }
Property Value
- string
- Represents a chia config yaml file and its contents. Used to find the uri and ssl certs needed to connect
Methods
GetEndpoint(string)
Creates an EndpointInfo from the named service section
public EndpointInfo GetEndpoint(string serviceName)
Parameters
serviceName
stringThe section name in the config file. Use 'daemon' for the root config that include 'self_hostname'; i.e. the local daemon
Returns
- EndpointInfo
An EndpointInfo that can be used to connect to the given service's RPC interface
GetGenesisChallenge(string)
Get the chain genesis challenge
public string? GetGenesisChallenge(string network = "mainnet")
Parameters
network
stringNetwork name. Defaults to mainnet
Returns
- string
The genesis challenge or null
Open()
Opens the Config from DefaultRootPath plus config
and config.yaml
.
public static Config Open()
Returns
Open(string)
Opens a chia config yaml file
public static Config Open(string fullPath)
Parameters
fullPath
stringThe full filesystem path to the config file