SPV client in pure JavaScript?



Summary:

The question of whether it is possible to build a Simplified Payment Verification (SPV) wallet entirely in JavaScript was posed on the Bitcoin-development mailing list in 2013. While JavaScript is Turing complete, the real issue with building such a wallet would be its compatibility with web apps. The author believes that web apps are not allowed to make raw TCP socket connections, although there may be ways around this by using browser-specific extensions or "installable apps" which give code greater access permissions. However, this approach relies on Chrome as an app platform rather than a Java Virtual Machine (JVM). While more users may have access to Chrome than a JVM, users who don't use Chrome might balk at the prospect of installing an entire browser just to run a wallet app. Furthermore, there is no convenient way to "statically link" Chrome into a regular-looking application. The author argues that Java is a better language than JavaScript because it offers more safety, performance, features, and mature tools. They claim that using JavaScript outside the browser results in fewer benefits than using languages/platforms designed for the purpose. If the end result is an installable app like any other, using JavaScript only serves to cripple oneself against the competition.


Updated on: 2023-06-07T15:27:39.486052+00:00