* @private
()
| 118 | * @private |
| 119 | */ |
| 120 | async function getConfig(): Promise<any> { |
| 121 | // Path to Solana CLI config file |
| 122 | const CONFIG_FILE_PATH = path.resolve( |
| 123 | os.homedir(), |
| 124 | ".config", |
| 125 | "solana", |
| 126 | "cli", |
| 127 | "config.yml" |
| 128 | ); |
| 129 | |
| 130 | console.log("\nlocal system client config location: ", CONFIG_FILE_PATH); |
| 131 | |
| 132 | const configYml = await fs.readFile(CONFIG_FILE_PATH, { encoding: "utf8" }); |
| 133 | return yaml.parse(configYml); |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * Load and parse the Solana CLI config file to determine which RPC url to use |