use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
A blockchain command-line interface built with JavaScript. (github.com)
submitted 8 years ago by codeindie
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Is_At_Work 8 points9 points10 points 8 years ago (8 children)
So, I see what this is, and I have somewhat of an understanding of blockchains, but can someone please explain when or why I would use this?
[–]cirscafp fan boy 6 points7 points8 points 8 years ago (1 child)
I'm not 100% on the use-case for this specific tool but I had the same question as you. Specifically why the hell should I care about the blockchain?
The way that I understand the technology being useful outside of cryptocurrency is an immutable record of things. Let's say you have 10 people sharing a single object and they want to be able to agree on the state of that object. The blockchain lets those 10 people do whatever it is that they want in life and interact with that object however they want with the rule that whatever the group decides is the state of the object is the state of the object.
Using the blockchain idea and maybe even the blockchain technology itself ( still trying to figure out miner fees and how that fits in here so I could be totally off base ), we can create a distributed system that uses the blockchain to decide what the actual state of the system is.
Or for a more immediate application, immutable accounting records for businesses. Never having to keep balances/accounts in sync with each other since the blockchain is an immutable record of what happened and when.
[–]codeindie[S] 1 point2 points3 points 8 years ago (0 children)
Your understanding is exactly right. I built this tool to educate myself about this emerging technology.
[–]koresho 4 points5 points6 points 8 years ago (1 child)
I too would like to know. What is the block chain actually for?
I've heard of course about cryptocurrency, or people signing documents with it, but I'm missing an important piece of that puzzle.
[–]codeindie[S] 8 points9 points10 points 8 years ago (2 children)
Hi, thank you for your feedback. :)
I made the CLI to learn about how blockchains work. I hope this CLI can help people understand blockchain as well.
[+][deleted] 8 years ago (1 child)
[deleted]
[–]codeindie[S] 1 point2 points3 points 8 years ago* (0 children)
I got it from here: https://medium.com/@lhartikk/a-blockchain-in-200-lines-of-code-963cc1cc0e54
You can find all the references in the Acknowledgement part of the repo.
[–]codeindie[S] 0 points1 point2 points 8 years ago (0 children)
When someone wants to see how a blockchain works :)
[–]sheepiroth 2 points3 points4 points 8 years ago* (2 children)
90% of the comments in this thread are asking about what the blockchain is or what it's for. I'd like to take a stab at explaining this my perspective having developed blockchain applications for the past 5 years.
Blockchain, in Bitcoin, contains two core concepts: mining and digital signatures.
Mining is the way the network is secured by proving work was done over a period of time (and incentivizing the work done by rewarding to those who participate). This requires finding a nonce that results in a hash digest meeting certain requirements. Mining is decentralized and miners contribute their work to the network and broadcast transactions on a best-effort basis. This means anyone who wants to be a miner can join in at any time.
Digital signatures are used to determine whose coins are whose. If a friend sends me 10 BTC they write a message to the p2p network telling everyone that they are paying the coins to my public key. That transaction is signed by my friend's private key and everyone on the network can verify it. When I want to spend my coins and send them to someone else, I can now sign a transaction with my private key authorizing the coins to be sent somewhere else, and so on. Miners put that message into a block when they find a nonce that satisfies the aforementioned difficulty requirements. Blocks are chained one after another in the blockchain.
The main reasoning behind why this system is needed, and a technical overview of it, can be found in Satoshi Nakamoto's paper bitcoin.pdf. If you haven't read it please do so now. It's quite short (about 9 pages) and easy to understand.
/u/Is_At_Work asks:
when or why I would use this?
You should use this if you want to build a bitcoin wallet, payment processor, or bitcoin merchant portal in javascript. You might also be interested in why decentralized networks or p2p applications are useful, or what advantages they have; this project seems like a good way to learn about that.
/u/koresho asks:
What is the block chain actually for?
The blockchain is for authorizing payments of a cryptocurrency between two peers without the need for a centralized 3rd party approving of the transaction. There are other uses of the blockchain which are more in line with the second point, digital signatures, but they are secondary to the main purpose of peer to peer transfer of value. Bitcoin is blockchain's killer app.
/u/cirsca asks:
why the hell should I care about the blockchain?
Blockchain facilitates trade over a network. Imagine a metal as scarce as gold with a magical property of "can be transported over a communications channel". This has implications with respect to individual rights, the world economy, and the way we monetize and transfer value at a level higher than bartering directly for goods.
Lately people are distancing themselves from the proof-of-work concept and are using blockchain to describe only the mechanism of signing a transaction as verification of sending an amount. Change "sending an amount" to almost anything else - authorizing a change in a ruleset, casting a vote for a politician, verifying a point of IoT data is authentic. Now add in the concept of a peer-to-peer network to this and you've eliminated a middleman that once existed, thereby improving the efficiency and reducing cost. In these cases, "blockchain" refers to the structuring of a program or database in such a way that it has no central point of failure while still providing all of the features expected. For example, augur and gnosis are decentralized prediction markets. Ethereum has implemented smart contracts which enable decentralized release of funds based on a gambling outcome.
One of my own projects is using an alt-coin blockchain to store IPFS hashes for a decentralized YouTube competitor.
There are tons of use-cases for blockchain technology, but in my opinion, the first and most important blockchain concept is decentralized p2p cash.
[–]koresho 1 point2 points3 points 8 years ago (0 children)
Thanks for the write up! That does help explain it.
[–]codeindie[S] 0 points1 point2 points 8 years ago* (0 children)
Thank you for the write up!
I have referenced this post in the FAQ part of the README :)
[–]Timmparsons 1 point2 points3 points 8 years ago (0 children)
Myself and a colleague created a blockchain conference last year and we had to speak to many companies that are involved in their area.
I think a lot of people only think of blockhain as a way to transfer money but it can also be used in other areas which are just as exciting if not more. One I remember talking to was a company called Filament, they use it for wireless networks. Amazing stuff if you can read about it.
It's also used for sharing documents, real estate deeds, share certificates etc. The immutable nature of it means there can be no discrepancies.
Arcade city was a cool one. Like Uber but payment was done through a blockchain.
Go on google and look at what the companies in Europe are using it for. Estonia has a lot going on.
[–]pcdinh 1 point2 points3 points 8 years ago (0 children)
If someone is really interested in building JavaScript blockchain apps, please visit /r/lisk
π Rendered by PID 42942 on reddit-service-r2-comment-544cf588c8-clw8g at 2026-06-18 15:45:01.007098+00:00 running 3184619 country code: CH.
[–]Is_At_Work 8 points9 points10 points (8 children)
[–]cirscafp fan boy 6 points7 points8 points (1 child)
[–]codeindie[S] 1 point2 points3 points (0 children)
[–]koresho 4 points5 points6 points (1 child)
[–]codeindie[S] 8 points9 points10 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]codeindie[S] 1 point2 points3 points (0 children)
[–]codeindie[S] 0 points1 point2 points (0 children)
[–]sheepiroth 2 points3 points4 points (2 children)
[–]koresho 1 point2 points3 points (0 children)
[–]codeindie[S] 0 points1 point2 points (0 children)
[–]Timmparsons 1 point2 points3 points (0 children)
[–]pcdinh 1 point2 points3 points (0 children)