GithubHelp home page GithubHelp logo

kreig-chain's Introduction

KREIG-CHAIN...Blockchain and Cryptocurrency built from scratch by yours truly...

Working blockchain storage and cryptocurrency (wallets, transactions, verification, signatures...etc)

built with node.js

FRONTEND COMING SOON that will make requests via an API to the chain

How to use this on postman...cryptocurrency in action

#1. Launch multiple servers...npm run dev ... new one then HTTP_PORT=3002 P2P_PORT=5002 PEERS=ws://localhost:5001 npm run dev... and so on

#2. Postman get request to localhost:3002/public-key and copy that key

#3. POST localhost:3001/transact and put this in... { "recipient": "address you copied", "amount": 50 }

#4. GET localhost:3001/transactions to make sure it worked and they exist

#5. GET localhost:3002/transactions same thing

#6. GET localhost:3001/mine-transactions to mine them and broadcast

#7. POST localhost:3001/transact make sure wallet has + reward amount (so currently 50)

#EXTENDing

GET /balance endpoint allow user to see their balance

Add transaction fee and include it with miner reward

#frontend #Route the blockchain-approved reward transactions through its own dedicated server. That way, not everyone can create transactions through the special blockchain wallet. #An implementation where the Miner’s mine() function only grabs a group of the transactions, and not the entire pool. When the subset of transactions from the pool is included in the chain, they would need to be cleared from the pool, and synchronized across all miners.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.