New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

leo-blockchain

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leo-blockchain

Blockchain Implementation

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Leo-Blockchain

Easy & Simple implementation of blockchian

Hello World here is my blockchain implementation which you can use anywhere without more effort whether it be a simple wallet project or a transaction project. I have made use of Crypto Library of NodeJS to generate "SHA256" for the blocks.

// Import the module
const blockchain = require("leo-blockchain");

Following are the functionality provided by the module.

(1) Perform Transaction

blockchain.addTransaction(data); // datatype of "data" ---> JSON

(2) Search Transaction by transactionId

blockchain.searchTransaction(transactionId); // datatype of "transactionId" ---> Number

(3) Set Difficulty

blockchain.addTransaction(difficulty); // datatype of "difficulty" ---> Number

(4) Export your Chain

blockchain.exportBlocks("fileName.xyz");

(5) Import your Chain

blockchain.importBlocks("fileName.xyz");

This blockchain is not meant for professional use. There may be loophole. By no means I assure you that it will work like a charm. But I have tried my best to discover and fix all the loopholes

Keywords

blockchain

FAQs

Package last updated on 24 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts