UNPKG

@kadena/kadena-cli

Version:

Kadena CLI tool to interact with the Kadena blockchain (manage keys, transactions, etc.)

45 lines 1.64 kB
import { join } from 'path'; /** * @const networkDefaults * Provides the default network configurations for the mainnet, testnet, and custom created networks. */ export const networkDefaults = { mainnet: { network: 'mainnet', networkId: 'mainnet01', networkHost: 'https://api.chainweb.com', networkExplorerUrl: 'https://explorer.chainweb.com/mainnet/tx/', }, testnet: { network: 'testnet', networkId: 'testnet04', networkHost: 'https://api.testnet.chainweb.com', networkExplorerUrl: 'https://explorer.chainweb.com/testnet/tx/', }, devnet: { network: 'devnet', networkId: 'development', networkHost: 'http://localhost:8080', networkExplorerUrl: 'http://localhost:8080/explorer/development/tx/', }, other: { network: '', networkId: '', networkHost: '', networkExplorerUrl: '', }, }; export const standardNetworks = ['mainnet', 'testnet']; export const defaultNetwork = 'testnet'; export const getNetworkFiles = (kadenaDir) => { const networkPath = join(kadenaDir, 'networks'); return Object.keys(networkDefaults).reduce((files, key) => { if (key !== 'other') { files[key] = join(networkPath, `${key}.yaml`); } return files; }, {}); }; export const NETWORK_CONFIG_NOT_FOUND_MESSAGE = 'No network configuration found for a network name'; export const NO_NETWORKS_FOUND_ERROR_MESSAGE = 'No networks found. To add one, use: `kadena network add`. To add default networks, use: `kadena config init`.'; //# sourceMappingURL=networks.js.map