codexGlobals.js
1 import axios from "axios"; 2 3 export class CodexGlobals { 4 getPublicIp = async () => { 5 const result = (await axios.get(`https://ip.codex.storage`)).data; 6 return result.replaceAll("\n", ""); 7 }; 8 9 getTestnetSPRs = async () => { 10 const result = (await axios.get(`https://spr.codex.storage/testnet`)).data; 11 return result.split("\n").filter((line) => line.length > 0); 12 }; 13 14 getEthProvider = () => { 15 return "https://rpc.testnet.codex.storage"; 16 }; 17 }