From f3c33d5954e85dd16ca7b4955758cbb51c1254c5 Mon Sep 17 00:00:00 2001 From: Denis Carriere Date: Mon, 2 Oct 2023 19:17:06 -0400 Subject: [PATCH] Add typeName & chain --- index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 98d6fb4..702dd90 100644 --- a/index.ts +++ b/index.ts @@ -29,8 +29,9 @@ export async function action(options: WebhookRunOptions) { }); // Stream Blocks - emitter.on("anyMessage", async (data, cursor, clock) => { + emitter.on("output", async (data, cursor, clock) => { if (!clock.timestamp) return; + const chain = new URL(options.substreamsEndpoint).hostname.split(".")[0]; const metadata = { cursor, session: { @@ -45,7 +46,9 @@ export async function action(options: WebhookRunOptions) { manifest: { substreamsEndpoint: options.substreamsEndpoint, moduleName: options.moduleName, + type: data.getType().typeName, moduleHash, + chain }, } // Sign body