evx-sdk
Version:
The Evx SDK is a developer toolkit designed to simplify interaction with the Evx decentralized liquidity protocol. It provides an abstraction layer over the smart contracts, allowing developers to easily build applications, integrate liquidity pools, fetc
61 lines (60 loc) • 2.1 kB
TypeScript
import { ChainName, ChainId, ChainMetadata } from '@interfaces';
/**
* @title Get Chain ID Function
* @notice Returns the chain ID for a given chain name
* @param chainName The name of the chain
* @returns The chain ID
* @throws Error if chain is not found
*/
export declare function getChainId(chainName: ChainName): ChainId;
/**
* @title Get Chain Name by ID Function
* @notice Returns the chain name for a given chain ID
* @param chainId The chain ID
* @returns The chain name
* @throws Error if chain ID is not found
*/
export declare function getChainNameById(chainId: ChainId): ChainName;
/**
* @title Validate Chain ID Function
* @notice Checks if a chain ID is valid
* @param chainId The chain ID to validate
* @returns True if the chain ID is valid, false otherwise
*/
export declare function isValidChainId(chainId: number): boolean;
/**
* @title Validate Chain Name Function
* @notice Checks if a chain name is valid
* @param chainName The chain name to validate
* @returns True if the chain name is valid, false otherwise
*/
export declare function isValidChainName(chainName: string): chainName is ChainName;
/**
* @title Get All Chain IDs Function
* @notice Returns an array of all supported chain IDs
* @returns Array of chain IDs
*/
export declare function getAllChainIds(): ChainId[];
/**
* @title Get All Chain Names Function
* @notice Returns an array of all supported chain names
* @returns Array of chain names
*/
export declare function getAllChainNames(): ChainName[];
/**
* @title Get Chain Metadata Function
* @notice Returns the metadata for a given chain name
* @param chainName The name of the chain
* @returns The chain metadata
* @throws Error if chain is not found
*/
export declare function getChainMetadata(chainName: ChainName): ChainMetadata;
/**
* @title Get All Chains Metadata Function
* @notice Returns an array of all supported chain names and their metadata
* @returns Array of chain names and their metadata
*/
export declare function getAllChainsMetadata(): Array<{
name: ChainName;
metadata: ChainMetadata;
}>;