UNPKG

blockchain-api

Version:

API utilities for interacting with the Exatechl2 blockchain

46 lines (43 loc) 808 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setRpcUrl = setRpcUrl; exports.getRpcUrl = getRpcUrl; exports.setExplorerApiUrl = setExplorerApiUrl; exports.getExplorerApiUrl = getExplorerApiUrl; let RPC_URL = 'https://rpc-l2.exatech.ai'; let EXPLORER_API_URL = 'http://127.0.0.1:3002/api'; /** * @param url */ function setRpcUrl(url) { RPC_URL = url; } /** * @returns */ function getRpcUrl() { return RPC_URL; } /** * * @param url */ function setExplorerApiUrl(url) { EXPLORER_API_URL = url; } /** * * @returns */ function getExplorerApiUrl() { return EXPLORER_API_URL; } if (typeof window !== 'undefined') { EXPLORER_API_URL = '/api'; } exports.default = { getRpcUrl, setRpcUrl, getExplorerApiUrl, setExplorerApiUrl };