gill
Version:
a modern javascript/typescript client library for interacting with the Solana blockchain
34 lines • 1.68 kB
TypeScript
import { type KeyPairSigner } from "@solana/kit";
/**
* Load a `CryptoKeyPair` from a filesystem wallet json file
* (i.e. those generated by the `solana-keygen` command)
*
* @param filePath - file path to a json keypair file, default={@link DEFAULT_CLI_KEYPAIR_PATH}
*/
export declare function loadKeypairFromFile(filePath?: string): Promise<CryptoKeyPair>;
/**
* Load a `KeyPairSigner` from a filesystem wallet json file
* (i.e. those generated by the `solana-keygen` command)
*
* @param filePath - file path to a json keypair file, default={@link DEFAULT_CLI_KEYPAIR_PATH}
*/
export declare function loadKeypairSignerFromFile(filePath?: string): Promise<KeyPairSigner>;
/**
* Load a `CryptoKeyPair` from an environment variable
* (i.e. those generated by the `solana-keygen` command)
*
* Note: for base58 encoded keypairs in environment variables use {@link loadKeypairFromEnvironmentBase58}
*
* @param variableName - environment variable name accessible via `process.env[variableName]`
*/
export declare function loadKeypairFromEnvironment<TName extends keyof NodeJS.ProcessEnv | string>(variableName: TName): Promise<CryptoKeyPair>;
/**
* Load a `KeyPairSigner` from a environment variable
* (i.e. those generated by the `solana-keygen` command)
*
* Note: for base58 encoded keypairs in environment variables use {@link loadKeypairSignerFromEnvironmentBase58}
*
* @param variableName - environment variable name accessible via `process.env[variableName]`
*/
export declare function loadKeypairSignerFromEnvironment<TName extends keyof NodeJS.ProcessEnv | string>(variableName: TName): Promise<KeyPairSigner>;
//# sourceMappingURL=load-keypair.d.ts.map