Skip to content

Instantly share code, notes, and snippets.

View RahulMishra0722's full-sized avatar

IRahul MIshra RahulMishra0722

View GitHub Profile
import WebSocket, { WebSocketServer } from 'ws';
import crypto from 'crypto';
export class Node {
private isValidTransactionFlag: boolean;
private data: string;
private wsServer: WebSocketServer;
private wsClients: WebSocket[];
constructor() {
this.isValidTransactionFlag = false;