blob: 148d255e72f2d122c9783f7a586fbdb5268dabe0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import Urbit from "urbit-api";
export const URL = import.meta.env.PROD ? "" : "http://localhost:8081";
export async function start(): Promise<Urbit> {
const airlock = new Urbit(URL, "");
const res = await fetch(URL + "/~/host");
const ship = await res.text();
airlock.ship = ship.slice(1);
airlock.our = ship;
airlock.desk = "nostrill";
await airlock.poke({ app: "hood", mark: "helm-hi", json: "opening airlock" });
await airlock.eventSource();
return airlock;
}
|