From f287e8f7a39e17c125c618685df695aeaeb50970 Mon Sep 17 00:00:00 2001 From: Emmo00 Date: Sun, 9 Nov 2025 11:03:05 +0100 Subject: [PATCH 1/2] feat: import Streamr logic and enhance connection logging --- src/index.ts | 1 + src/logic/streamr.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/index.ts b/src/index.ts index 0e787c6..b58b6a1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,6 +7,7 @@ import setupDatabase, { saveMeter, deleteMeterByPublicKey, } from "./store/sqlite"; +import "./logic/streamr"; handleUplinks(); diff --git a/src/logic/streamr.ts b/src/logic/streamr.ts index b718b2e..344a338 100644 --- a/src/logic/streamr.ts +++ b/src/logic/streamr.ts @@ -16,6 +16,12 @@ export const streamrClient = new StreamrClient({ const stream = streamrClient.getStream(STREAMR_STREAM_ID); +stream.then((stream) => { + console.log(`[Streamr] Connected to stream: ${stream.id}`); +}).catch((error) => { + console.error("[Streamr] Error connecting to stream:", error); +}); + async function getStream() { return await stream; } From 9c024f8609e128b241ba100a47e85b77b9ec1454 Mon Sep 17 00:00:00 2001 From: Emmo00 Date: Sun, 9 Nov 2025 11:06:41 +0100 Subject: [PATCH 2/2] docs: add pre-setup instructions for M3tering Console --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 119b730..16cb206 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # M3tering Console Setup +## Pre-setup + +- Make sure Public key is set on the M3ter contract +- Make sure the Console has been granted publish permission on the Streamr stream + ## Quick Setup 1. **Clone/Update**