Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coin-ts

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coin-ts

A minimal cryptocurrency CLI implementation in TypeScript & Immutable.js

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-54.55%
Maintainers
1
Weekly downloads
 
Created
Source



Coin CLI

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:

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
NPM
$ npm install ts-node -g
$ npm install coin-ts -g
$ coin

🕹️ Usage

CommandAliasDescriptionExample
open oOpen to accept incoming connections.open 5000
connect cConnect to a new peer with and connect localhost 5000
blockchainbcSee the current state of the blockchain.
peerspGet the list of connected peers.
mine [address]mMine a new block with rewards going to optional [address].mine or mine xxx...
transactionstxSee unconfirmed transactions that can be mined.
wallet wCreate a new wallet with wallet mypassword
keykGet your public key
pay pMake payment to with and using wallet pay xxx... 10 5 mypassword
balance [address]bBalance of optional balance or balance xxx...
help [command...]Provides help for a given commandhelp balance or help
exitExits application.

Buy Me A Coffee


FAQs

Package last updated on 01 Feb 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc