MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / readLocal

Method readLocal

warp/warp.ts:63–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61 if (!result.success || !result.output) return null;
62
63 try {
64 const data = JSON.parse(result.output);
65 if (data.private_key && data.v6) {
66 return { privateKey: data.private_key, address6: data.v6 };
67 }
68 } catch {}
69 return null;
70 }
71
72 private static async register(): Promise<{ privateKey: string; address6: string }> {
73 try {
74 const response = await axios.get("https://warp.cloudflare.now.cc/?run=register", { timeout: 8000 });
75 const dataStr = typeof response.data === "string" ? response.data : JSON.stringify(response.data);
76
77 const pkMatch = dataStr.match(/"private_key"\s*:\s*"([A-Za-z0-9+/=]{20,})"/);

Callers 1

getOrCreateMethod · 0.95

Calls 1

runSudoMethod · 0.80

Tested by

no test coverage detected