2023-09-12 14:02:16 +00:00
|
|
|
import { NostrSystem, SystemInterface } from "..";
|
2023-09-06 18:39:15 +00:00
|
|
|
|
|
|
|
const Relay = "wss://relay.snort.social/";
|
|
|
|
|
|
|
|
const system = new NostrSystem({}) as SystemInterface;
|
|
|
|
|
|
|
|
async function test() {
|
2023-09-12 14:02:16 +00:00
|
|
|
await system.ConnectToRelay(Relay, { read: true, write: true });
|
|
|
|
setTimeout(() => {
|
|
|
|
system.DisconnectRelay(Relay);
|
|
|
|
}, 1000);
|
2023-09-06 18:39:15 +00:00
|
|
|
}
|
|
|
|
|
2023-09-12 14:02:16 +00:00
|
|
|
test().catch(console.error);
|