Rovereto, Tuesday 24 November 2026 · Year XIII, n. 328 Block 977356
en
Bitcoin Valley
ContentsClose

Dispatches from the valley where you pay in bitcoin.

Learn · For programmers

From your first hash to your first commit

Updated on Nov. 23, 2026

Eight steps in order, from the exercises on this site to the code that runs it. Then the texts Bitcoin developers learn from, freely licensed and free of charge.

In the Valley, the code came before the shops. The merchant software's first commit is dated 1 May 2015.1 From 2016 the developers at inbitcoin, the Rovereto company behind the Valley's payment software, were paid in bitcoin, and spent it in the bar that ran the point-of-sale software they wrote.2 In the autumn of 2018 the same team was writing the lessons for a developer course, and in December it released Lighter, its first open-source software.3

Today the Valley's software is called bitmentor, and it's free software. In our view, people who work on open source go where the giants are: they want to be “the dumbest person in the room”, because that's where they learn the most. With Bitcoin the room is open to everyone: specifications, code and books are free. This page tells you the order to go in.

The path, in eight steps

  1. Get your hands on the ledger. The experiments in the lessons do the maths on your phone: change an old line and everything after it breaks. Then read a real transaction with a block explorer, and solve the first two exercises in Sealed envelope, the site's cryptography exercises: the hash done by hand and the Merkle proof, in Python with nothing but the standard library.
  2. Sign and verify. In the signature your phone creates a throwaway key and signs a sentence of yours with BIP-340, as in Taproot spends. Exercises 3 and 4 of Sealed envelope move on to the twelve words (BIP-39) and to derived keys (BIP-32). For something different there's steganography, where you find out that hidden doesn't mean protected.
  3. Move on to Lightning and LNURL. Lesson 4 explains channels with a bar tab. Exercise 5 of Sealed envelope leads to the relative timelocks of channels, exercise 6 to the hash that serves as a receipt on Lightning. LNURL puts everything a wallet needs into a QR code: to sign in to a website with a signature (Signing in without a password) and to get paid at a Lightning address (Who creates your invoices).
  4. Run a node. Bitcoin Core on a computer at home is the step that counts: from then on your wallet asks your own node, and bitcoin-cli becomes your lab. Then, if you like, a Lightning node. The first test is at the bottom of the software page: find Satoshi's white paper in the blockchain and check its fingerprint.
  5. Read the Valley's software. bitmentor is Django with Postgres. The till runs in the browser: it asks the shop's Lightning address (like an email address, but for payments) for the invoice and checks the payment with LUD-21 verify. There's no node on the server, and no keys that can spend. On your own computer, with made-up shops, you can try it in five minutes.
  6. Change it for your town. A community's name, colours, pages and data live in one folder, separate from the code. The Valley in your town prepares it for you in the browser; the code is on GitHub.
  7. Read the licence. bitmentor is GNU AGPLv3: you can use it, study it, change it and redistribute it, and if you modify it and run it on a network, you also offer your code to the people who use it. Why we chose it: the legacy.4
  8. Contribute. A bug report counts as much as a patch: a wallet tested at the till, with its version and the date, helps every community, in bitmentor's issues. For code, the contributing guidelines apply: you write in English and sign off every commit with git commit -s.5

The texts everyone reads

These are the texts people who build Bitcoin learn from, and they're free to read. The two books can also be copied and translated. All links were checked on 23 November 2026.6

Start with Sealed envelope The Valley's software


  1. Chronicle of the Valley, from the code history of the merchant system: commits of 1 and 14 May 2015. ↩

  2. Chronicle of the Valley and inbitcoin; Amadori on Sicurezza Bitcoin, 2025, min. 10 and on Final Step Bitcoin, 2026, min. 6. ↩

  3. Sealed envelope, from the Jupyter notebooks of the bcademy course, September-November 2018, in inbitcoin's archive; the ten-week course: Amadori on Final Step Bitcoin, 2026, min. 76. Lighter: Chronicle of the Valley. ↩

  4. GNU Affero General Public License, version 3, section 13, read on 23 November 2026; other licences on request: bitmentor's COPYING.md. ↩

  5. bitmentor's CONTRIBUTING.md, read on 23 November 2026. ↩

  6. The licences of the two books are in their repositories: the LICENSE of Mastering Bitcoin, which gives CC BY-SA 4.0 to the first, second and third editions, and the README of Mastering the Lightning Network. The bitcoin.org documentation was last modified on 10 April 2021, in its repository. Bitcoin Core is MIT according to its repository. All read on 23 November 2026. ↩