n0-space/lnd — Lightning Network Daemon

- **Source:** https://github.com/n0-space/lnd fork of lightningnetwork/lnd - **License:** MIT Copyright 2015-2022 Lightning Labs + LN developers - **Language:** Go Makefile build system

n0-space/lnd — Lightning Network Daemon

Metadata

Purpose

Complete Lightning Network node implementation. Manages channels, payments, routing, and UTXO lifecycle.

Features

  • Channel creation, closing, state management
  • Fully authenticated + validated channel graph
  • Path finding for payments
  • Onion-encrypted payment routing
  • Fee schedule management
  • Automatic channel management (autopilot)

BOLT Compliance

Full conformance to Lightning Network specification:

  • BOLT 1: Base Protocol ✅
  • BOLT 2: Peer Protocol for Channel Management ✅
  • BOLT 3: Bitcoin Transaction and Script Formats ✅
  • BOLTs 4-12: Various (in progress at fork time)

Architecture

lnd/
  ├── autopilot/        — Automatic channel management
  ├── chainntnfs/       — Chain notifications
  ├── channeldb/        — Channel database
  ├── contractcourt/    — Contract resolution
  ├── discovery/        — Network discovery
  ├── funding/          — Channel funding
  ├── htlcswitch/       — HTLC switching
  ├── lnwallet/         — Lightning wallet
  ├── routing/          — Payment routing
  ├── watchtower/       — Watchtower (fraud detection)
  ├── zpay32/           — Payment encoding
  ├── cmd/              — CLI commands
  ├── docs/             — Documentation
  ├── mobile/           — Mobile bindings (iOS/Android)
  └── tools/            — Build tools

Pluggable Backends

  • btcd — Full node (btcsuite)
  • bitcoind — Bitcoin Core RPC
  • neutrino — Light client (experimental)
  • electrum — Electrum server

Relevance to Kapnet

Payment Rail

Lnd is THE payment rail for Kapnet:

  • Invoice creation and payment
  • Channel management for treasury
  • Routing fees as revenue source
  • BOLT-11 invoices for Hedlbit payments

Integration Points

  1. Treasury hot wallet: Lnd manages channels and balances
  2. Hedlbit payments: BOLT-11 invoices for coordination work
  3. Mining pool payouts: Lightning payouts to miners
  4. User subscriptions: Recurring Lightning payments

Fork Notes

This is n0-space’s fork of lnd. Diff from upstream should be checked for:

  • Custom patches for Kapnet treasury
  • Modified fee policies
  • Additional BOLT compliance

Action Items

  1. Check diff from upstream lnd
  2. Evaluate for treasury hot wallet deployment
  3. Design Hedlbit payment flow (BOLT-11 invoice → lnd pay)
  4. Assess channel management strategy
  5. Review autopilot for treasury channel management

Write a comment
No comments yet.