Coder Social home page Coder Social logo

umaar / coin-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 0xs34n/coin-cli

0.0 1.0 0.0 6.79 MB

A minimal cryptocurrency CLI implementation in TypeScript & Immutable.js

Home Page: https://coindemo.io

License: Apache License 2.0

TypeScript 100.00%

coin-cli's Introduction

A minimal cryptocurrency CLI implementation in TypeScript & Immutable.js


Demo

Connect

connect

Mining

mining

Payment

payment

๐ŸŽ‰ Features

  • ๐Ÿ’ฐ Wallet with public and private key.
  • ๐Ÿ’ณ Make Payments between wallets.
  • ๐Ÿ”‘ Transactions are signed with the wallet's private key.
  • ๐Ÿ”— Blocks with index, hash, data, transactions, and timestamp.
  • โ› Proof-of-work implementation.
  • โ›“ In-memory JavaScript array to store the blockchain.
  • โœ… Block & Transaction integrity validation.
  • ๐Ÿ“ก Decentralized and distributed peer-to-peer communication.
  • โœจ Minimal implementation in 900 lines of code.

๐Ÿ“ฆ Installation

To install this application, you'll need Node.js 7+ (which comes with npm) installed on your computer. From your command line:

Source (recommended)

You'll need Git to run the project from source. From your command line:

# Clone this repository
$ git clone https://github.com/seanjameshan/coin-cli

# Go into the repository
$ cd coin-cli

# Install dependencies
$ npm install

# Run the app
$ npm start

๐Ÿ•น๏ธ Usage

Command Alias Description Example
open o Open port to accept incoming connections. open 5000
connect c Connect to a new peer with host and connect localhost 5000
blockchain bc See the current state of the blockchain.
peers p Get the list of connected peers.
mine [address] m Mine a new block with rewards going to optional [address]. mine or mine xxx...
transactions tx See unconfirmed transactions that can be mined.
wallet w Create a new wallet with wallet mypassword
key k Get your public key
pay p Make payment to address with and using wallet pay xxx... 10 5 mypassword
balance [address] b Balance of optional address balance or balance xxx...
help [command...] Provides help for a given command help balance or help
exit Exits application.

Buy Me A Coffee


coin-cli's People

Contributors

0xs34n avatar

Watchers

James Cloos avatar

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.