@soceanfi/solana-cli-config
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Solana CLI Config

Typescript bindings for Solana CLI config (originally in rust).

No browser, intended for use in node.js based solana CLI applications.

Example Usage

import { Connection, Keypair } from "@solana/web3.js";
import { SolanaCliConfig } from "@soceanfi/solana-cli-config"

// Load the solana CLI config file from the default path ($HOME/.config/solana/cli/config.yml)
const config = SolanaCliConfig.load();

// Load the keypair from the file path specified in the config file
const keypair: Keypair = config.loadKeypair();

// Create a `Connection` object from the config
const connection: Connection = config.createConnection();

Package Sidebar

Install

npm i @soceanfi/solana-cli-config

Homepage

socean.fi/

Weekly Downloads

2

Version

0.2.0

License

MIT

Unpacked Size

21.2 kB

Total Files

18

Last publish

Collaborators

  • 0xf812
  • sloaf
  • socean