Skip to content

gustavo-pin/typescript-blockchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a simple implementation of blockchain using typescript.

You need sqlite and typescript to work.

To use this program, follow the steps:

Install dependencies

npm install

Create Prisma migration

Init prisma instance:

npx prisma init

Paste this table model into prisma/schema.prisma:

model Chain {
  index Int @unique
  timestamp BigInt
  data String
  previousHash String
  merkle String
  hash String
  difficult Int
  nonce Int
}

Create a migration:

npx prisma migrate dev --name init

Compile

tsc

Run the program

node dist/index.js help

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published