createSeedcord
Builds the HTTP-interactions engine, a (request, ctx?) => Promise<Response>(request, ctx?) => Promise<Response> handler.
The handler verifies the Ed25519 signature over the raw request bytes, rejects stale or replayed requests, answers a PING with an in-body PONG, and acks every other interaction with an empty 202. The engine dispatches a matched interaction through the manifest before the 202 goes out. Gates run first and the sender posts any refusal over the REST callback. execute()execute() continues past the 202 under ctx.waitUntilctx.waitUntil when the caller passes one (the edge entry), and an engine-held in-flight set tracks it otherwise (node paths). It reads only the method, headers, and body. Mount it at any path.
Reads DISCORD_PUBLIC_KEYDISCORD_PUBLIC_KEY and DISCORD_BOT_TOKENDISCORD_BOT_TOKEN from the environment through envapt and throws a SeedcordErrorSeedcordError when either is missing or malformed.
createSeedcord(
config: Config,
manifest: RouteManifest
): (
request: Request,
ctx?: EngineContext
) => Promise<Response>createSeedcord(
config: Config,
manifest: RouteManifest
): (
request: Request,
ctx?: EngineContext
) => Promise<Response>config
manifest
manifest: RouteManifestmanifest: RouteManifest