let RPC_URL = 'https://rpc-l2.exatech.ai'; 
let EXPLORER_API_URL = 'http://127.0.0.1:3002/api';

/**
 
 * @param url 
 */
export function setRpcUrl(url: string): void {
  RPC_URL = url;
}

/**
 
 * @returns
 */
export function getRpcUrl(): string {
  return RPC_URL;
}

/**
 * 
 * @param url 
 */
export function setExplorerApiUrl(url: string): void {
  EXPLORER_API_URL = url;
}

/**
 * 
 * @returns 
 */
export function getExplorerApiUrl(): string {
  return EXPLORER_API_URL;
}

if (typeof window !== 'undefined') {
  EXPLORER_API_URL = '/api';
}

export default {
  getRpcUrl,
  setRpcUrl,
  getExplorerApiUrl,
  setExplorerApiUrl
}; 