Add server

This commit is contained in:
2026-08-18 17:24:40 +02:00
parent cba9af34a0
commit 591d121204
11 changed files with 560 additions and 8 deletions
+8 -2
View File
@@ -1,4 +1,5 @@
import {
getHTTPUrl,
getServerList,
getWSUrl,
KnownServer,
@@ -9,6 +10,8 @@ import * as ed from "@noble/ed25519";
import { sha512 } from "@noble/hashes/sha2.js";
import { base58 } from "@scure/base";
import axios from "axios";
ed.hashes.sha512 = sha512;
/**
@@ -52,9 +55,12 @@ export default class Enclave {
return;
}
const metaResponse = await axios.get(
getHTTPUrl(hostname, isSecure, "/meta"),
);
this.serverList[hostname] = {
name: "",
description: "",
meta: metaResponse.data as any,
isSecure,
publicKey: base58.encode(this.server.serverPublicKey),
};