UNPKG

@pannyparveen/energy-trading-platform

Version:

A decentralized system for renewable energy trading using blockchain, IoT, and AI

20 lines (19 loc) 506 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Blockchain = void 0; class Blockchain { constructor() { this.chain = []; } addTransaction(transaction) { this.chain.push(transaction); } getChain() { return this.chain; } verifyTransaction(transaction) { // Simplified verification process (more complex logic in real applications) return transaction.amount > 0; } } exports.Blockchain = Blockchain;