Webcoin
:globe_with_meridians::moneybag: SPV Bitcoin client for Node.js and the browser
Install / Use
/learn @mappum/WebcoinREADME

A Bitcoin client for Node.js and the browser
Webcoin is a Bitcoin client that works in Node.js and the browser. In the browser, it uses WebRTC to make P2P connections rather than relying on a centralized server to get data (like all the other JS Bitcoin libraries). It's kind of like the Bitcoin equivalent of WebTorrent.
You can use Webcoin to add Bitcoin payments to your application, without the need to hold your users' funds, and without making them trust any third-parties with their money. Webcoin is an SPV light client, so it only uses a minimal amount of bandwidth and storage; it even works great on mobile devices!
Status
Much of Webcoin is already written and works well, including:
- Downloading block headers from peers
- Verifying block headers
- Creating HD wallets
- Filtering transactions with Bloom filters
- Detecting incoming transactions confirmed in blocks
I am currently making some major refactors to the codebase, and documenting all of it. Much of the code in this repo is being broken out into smaller modules, each with comprehensive tests and docs.
Modules
Webcoin is made up of many small modules, most of which can each be used independently.
| module | version | tests | issues | description |
|---|---|---|---|---|
| webcoin | |
|
| SPV Bitcoin client for Node and the browser (this module) |
| peer-exchange |
|
|
| Decentralized p2p signalling and discovery |
| blockchain-spv |
|
|
| Stores blockchain headers and verifies with SPV |
| blockchain-download |
|
|
| Download blockchain data from peers |
| bitcoin-wallet |
| [![][bitcoin-protocol-ti]][bitcoin-protocol-tu] |
| Sends and receives coins
| bitcoin-protocol | [![][bitcoin-protocol-ni]][bitcoin-protocol-nu] | [![][bitcoin-protocol-ti]][bitcoin-protocol-tu] | [![][bitcoin-protocol-ii]][bitcoin-protocol-iu] | Bitcoin network protocol streams |
| bitcoin-inventory |
|
|
| Exchange transactions with peers |
| bitcoin-util |
|
|
| Utility functions for Bitcoin hashes and targets |
| bitcoin-merkle-proof |
|
|
| Verify bitcoin Merkle proofs |
| bitcoin-filter |
|
|
| Bloom filtering (BIP37) |
| [webcoin-bridge][webcoin-bridge] | [![][webcoin-bridge-ni]][webcoin-bridge-nu] | [![][webcoin-bridge-ti]][webcoin-bridge-tu] | [![][webcoin-bridge-ii]][webcoin-bridge-iu] | A proxy that bridges the Bitcoin TCP and WebRTC networks |
| [webcoin-params][webcoin-params] | [![][webcoin-params-ni]][webcoin-params-nu] | [![][webcoin-params-ti]][webcoin-params-tu] | [![][webcoin-params-ii]][webcoin-params-iu] | Abstract parameters, used for supporting other cryptocurrencies |
| [webcoin-param-tests][webcoin-param-tests] | [![][webcoin-param-tests-ni]][webcoin-param-tests-nu] | [![][webcoin-param-tests-ti]][webcoin-param-tests-tu] | [![][webcoin-param-tests-ii]][webcoin-param-tests-iu] | Tests for parameters |
| [electron-webrtc][electron-webrtc] | [![][electron-webrtc-ni]][electron-webrtc-nu] | [![][electron-webrtc-ti]][electron-webrtc-tu] | [![][electron-webrtc-ii]][electron-webrtc-iu] | WebRTC for Node via a hidden Electron process |
[bitcoin-protocol-ni]
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
