Bryant-Anjos / fatecoin

A typescript blockchain for studies purposes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fatecoin 🪙

A blockchain for studies purposes. (this is not a project ready to production, it's just to learn the basics blockchains concepts)

How to run?

Prerequisites

Instalation

  • Clone with git or download this repo;
git clone https://github.com/Bryant-Anjos/fatecoin.git
  • In the project folder install the dependencies:
npm install

or

yarn install
  • Copy the .env.example that is in the root of this project and rename it to .env;

  • Change the MONGO_URL variable with your mongodb connection string.

Execution

npm run dev

or

yarn dev

Usage

You can use a browser or any http client to access the project routes. The routes are the following:

Base url: localhost:3333/chainparams

Route Description
/difficulty get the current blockchain difficulty
/isvalid verify if the blockchain is valid
/latestblock get the latest block mined from the blockchain
/mineblock mine a block
/blockchain verify all blocks stored in the blockchain

About

A typescript blockchain for studies purposes


Languages

Language:TypeScript 99.7%Language:Shell 0.3%