@nosana/kit
Version:
Nosana KIT
54 lines (53 loc) • 1.69 kB
TypeScript
import { ApiConfig } from '@nosana/api';
import type { IPFSConfig } from '@nosana/ipfs';
import type { Address, TransactionSigner } from '@solana/kit';
import type { Wallet } from '../types.js';
import type { LogLevel } from '../logger/Logger.js';
export declare const SolanaClusterMoniker: {
readonly DEVNET: "devnet";
readonly LOCALNET: "localnet";
readonly MAINNET: "mainnet";
readonly TESTNET: "testnet";
readonly MAINNET_BETA: "mainnet-beta";
readonly LOCALHOST: "localhost";
};
export type SolanaClusterMoniker = (typeof SolanaClusterMoniker)[keyof typeof SolanaClusterMoniker];
export declare const SolanaCommitment: {
readonly PROCESSED: "processed";
readonly CONFIRMED: "confirmed";
readonly FINALIZED: "finalized";
};
export type SolanaCommitment = (typeof SolanaCommitment)[keyof typeof SolanaCommitment];
export interface SolanaConfig {
cluster: SolanaClusterMoniker;
rpcEndpoint: string;
wsEndpoint?: string;
commitment?: SolanaCommitment;
feePayer?: TransactionSigner;
}
export interface ProgramConfig {
nosTokenAddress: Address;
jobsAddress: Address;
rewardsAddress: Address;
stakeAddress: Address;
poolsAddress: Address;
merkleDistributorAddress: Address;
}
export interface APIConfig extends ApiConfig {
apiKey?: string;
}
export interface ClientConfig {
solana: SolanaConfig;
wallet?: Wallet;
logLevel: LogLevel;
ipfs: IPFSConfig;
programs: ProgramConfig;
api?: APIConfig;
}
export interface PartialClientConfig {
solana?: Partial<SolanaConfig>;
wallet?: Wallet;
ipfs?: Partial<IPFSConfig>;
logLevel?: LogLevel;
api?: Partial<APIConfig>;
}