@opendatalabs/vana-sdk
Version:
A TypeScript library for interacting with Vana Network smart contracts.
46 lines (45 loc) • 1.29 kB
TypeScript
/**
* Chain configuration definitions for Vana networks
*
* These provide default configurations for known Vana chains.
* Applications can use these as-is or override specific values.
*/
import type { Chain } from "viem";
export type VanaChainConfig = Chain;
/**
* Vana Mainnet configuration
*/
export declare const vanaMainnet: VanaChainConfig;
/**
* Moksha Testnet configuration
*/
export declare const moksha: VanaChainConfig;
/**
* Retrieves the chain configuration for a given chain ID.
*
* @param chainId - The numeric chain ID to look up
* @returns The chain configuration if found, undefined otherwise
* @example
* ```typescript
* const config = getChainConfig(1480);
* if (config) {
* console.log('Chain name:', config.name);
* }
* ```
*/
export declare function getChainConfig(chainId: number): VanaChainConfig | undefined;
export declare const mokshaTestnet: VanaChainConfig;
/**
* Retrieves all available Vana chain configurations.
*
* @returns Array of all supported Vana chain configurations
* @example
* ```typescript
* const chains = getAllChains();
* console.log('Supported chains:');
* chains.forEach(chain => {
* console.log(`- ${chain.name} (ID: ${chain.id})`);
* });
* ```
*/
export declare function getAllChains(): VanaChainConfig[];