Skip to content
Merged

... #25

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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**
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import setupDatabase, {
saveMeter,
deleteMeterByPublicKey,
} from "./store/sqlite";
import "./logic/streamr";

handleUplinks();

Expand Down
6 changes: 6 additions & 0 deletions src/logic/streamr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down