import { Result } from "."; /** * Specifies chain information for all endpoints a Nibiru node exposes such as the * gRPC server, Tendermint RPC endpoint, and REST server. * * @see https://docs.cosmos.network/master/core/grpc_rest.html * @export * @interface Chain * @typedef {Chain} */ export interface Chain { /** endptTm: endpoint for the Tendermint RPC server. Usually on port 26657. */ endptTm: string; /** endptRest: endpoint for the REST server. Also, the LCD endpoint. */ endptRest: string; /** endptGrpc: endpoint for the gRPC gateway. Usually on port 9090. */ endptGrpc: string; /** endptHm: endpoint for the heart monitor. */ endptHm: string; /** endptWs: endpoint for the web socket. */ endptWs: string; /** chainId: identifier for the chain */ chainId: string; /** chainName: the name of the chain to display to the user */ chainName: string; /** feeDenom: the denomination of the fee to be paid for transactions. */ feeDenom: string; } /** ChainIdParts: An object mapping to the standard strucutre of Nibiru Chain * identifier. Generally, the CometBFT RPC, gRPC, and REST endpoints can be * deduced from `ChainIdParts`. * @example * let chain: ChainIdParts = { * shortName: "cataclysm", number: 1, mainnet: true, * } * chain = { prefix: "nibiru", shortName: "testnet", number: 1 } * */ export interface ChainIdParts { prefix?: string; shortName: string; number: number; mainnet?: boolean; } /** CustomChain is a convenience class for intializing the endpoints of a chain * based on its chain ID. * * @example * ```ts * export const chain = new CustomChain({ * prefix: "nibiru", * shortName: "testnet", * number: 1, * }) * ``` */ export declare class CustomChain implements Chain { readonly chainId: string; readonly chainName: string; readonly endptTm: string; readonly endptRest: string; readonly endptGrpc: string; readonly endptHm: string; readonly endptWs: string; readonly feeDenom = "unibi"; private readonly chainIdParts; constructor(chainIdParts: ChainIdParts); static fromChainId(chainId: string): Chain; private initChainId; } /** Localnet: "Chain" configuration for a local Nibiru network. A local * environment is no different from a real one, except that it has a single * validator running on your host machine. Localnet is primarily used as a * controllable, isolated development environment for testing purposes. */ export declare const Localnet: Chain; /** Testnet: "Chain" configuration for a Nibiru testnet. These are public * networks that are upgraded in advance of Nibiru's mainnet network as a * beta-testing environments. * * For an updated list of active networks, see: * * - Nibiru Networks | Nibiru Docs (Recommended) * - NibiruChain/Networks (GitHub) * * By default, the "Testnet" function returns the permanent testnet if no * arguments are passed. * */ export declare const Testnet: (chainNumber?: number) => CustomChain; /** @deprecated Incentivized testnet is no longer active. This variable exists * for backwards compatibility, but "Testnet" should be used instead. * * @see Testnet - Permanent Nibiru public test network. */ export declare const IncentivizedTestnet: (chainNumber?: number) => CustomChain; /** Devnet: "Chain" configuration for a Nibiru "devnet". These networks * are more ephemeral than "Testnet" and used internally by the core Nibiru * dev team to live-test new features before official public release. * */ export declare const Devnet: (chainNumber: number) => CustomChain; /** Mainnet: "Chain" configuration for the Nibiru "mainnet". * ❗ Mainnet uses real funds. For more info, see * Nibiru Netwokrs. * */ export declare const Mainnet: (chainNumber?: number) => CustomChain; export declare const queryChainIdWithRest: (chain: Chain) => Promise>; /** isRestEndptLive: Makes a request using the chain's REST endpoint to see if * the network and endpoint are active. */ export declare const isRestEndptLive: (chain: Chain) => Promise; /** * Converts a Chain object to its constituent parts. * @param chain a Chain object * @returns a ChainIdParts object */ export declare const chainToParts: (chain: Chain) => ChainIdParts; //# sourceMappingURL=chain.d.ts.map