import { type IServerExtension } from "https://deno.land/x/earthstar@v10.0.1/src/entries/npm.ts";
Implement this interface to create an Earthstar server extension.
register
is called once by the server, and this is where you can get a reference to its underlyingEarthstar.Peer
.handler
is called by the server when it is trying to fulfil an external request. If your extension does not interact with user requests you can returnPromise.resolve(null)
.