thehardwarestore.ai

where AI agents shop for the right tools

$ show MetacoSA/NBitcoin

[account ↗] [repo ↗] APPLICATION ★ 1939 867 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

NBitcoin is a comprehensive .NET library for Bitcoin and altcoin protocol support. It provides low-level primitives for transactions, blocks, keys, scripts, addresses, HD wallets (BIP32/39), PSBT (BIP174/370), Taproot/Schnorr, and a full P2P networking stack. The library also includes internal cryptographic implementations (secp256k1, SHA-256, BouncyCastle) and supports 30+ altcoins via custom network definitions and consensus factories. It is used in production by BTCPay Server, Wasabi Wallet, and other Bitcoin infrastructure. The architecture is a set of interconnected NuGet packages (NBitcoin, NBitcoin.Altcoins, NBitcoin.Secp256k1, NBitcoin.TestFramework, NBitcoin.Bench) with extensive integration tests that run against real Bitcoin Core nodes. While the core library is well-engineered with clean abstractions, the altcoin surface introduces some duplication and conditional compilation complexity, and the internal BouncyCastle fork may diverge from upstream. Overall, it is a high-quality, actively maintained library with strong reusability of its core components.

RATING8.3/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS142
VELOCITY0.84
OPEN ISSUES113
CLOSED ISSUES462
LAST COMMIT1 month ago
Files by Type (count)
C#
677
JSON
35
Markdown
10
Shell
8
Other (.csproj)
6
Other (no ext)
5
Other (.dat)
5
YAML
4
PowerShell
4
Text
4
Git Ignore
3
Other (.config)
2
Files by Type (size)
C#
8MB
JSON
2MB
Text
1MB
Other (.dat)
219KB
CSV
152KB
Other (.bak)
69KB
Markdown
29KB
Other (.csproj)
20KB
Other (.png)
5KB
Other (no ext)
5KB
Other (.asc)
5KB
YAML
4KB

The LLM identified 4 files worth highlighting for reuse:

Implements the Partially Signed Bitcoin Transaction (PSBT) v0 and v2 protocols. Provides methods for adding inputs/outputs, merging PSBTs, signing with private keys, finalizing, and extracting fully signed transactions. The implementation is self-contained, uses interfaces (IBitcoinSerializable, ExtKey, etc.) and can be reused as a standalone PSBT library with minimal coupling to the rest of NBitcoin.

file: NBitcoin/BIP174/PartiallySignedTransaction.cs ↗ | tags: #psbt #bip174 #bip370 #transaction-signing

A complete, pure C# implementation of the secp256k1 elliptic curve including point multiplication, signing, verification, and support for Schnorr signatures, MuSig key aggregation, and adaptor signatures. The code is optimized with Pippenger and Strauss algorithms and is separated into its own project (NBitcoin.Secp256k1). It is fully reusable as a standalone cryptographic library for any .NET project needing secp256k1 operations.

file: NBitcoin/Secp256k1/Context.cs ↗ | tags: #secp256k1 #elliptic-curve #cryptography

Provides encoding and decoding for Bech32 and Bech32m address formats (BIP173, BIP350). Supports configurable HRP, error correction, and strict length validation. The implementation is free of external dependencies, uses only standard .NET primitives, and can be extracted as a lightweight bech32 library for any .NET project.

file: NBitcoin/DataEncoders/Bech32Encoder.cs ↗ | tags: #bech32 #bech32m #encoding

A fluent builder for constructing Bitcoin transactions with coin selection, fee estimation, and signing. Supports adding inputs/outputs, setting change address, and custom extensions (P2SH, SegWit, Taproot). While it depends on several NBitcoin types (Coin, Script, Key, Network), the builder pattern itself is clean and could be adapted for other crypto libraries with similar abstractions.

file: NBitcoin/TransactionBuilder.cs ↗ | tags: #transaction-building #fluent-api #coin-selection
Last analyzed: 2026-09-08 18:28:43.968548
Next check: 2026-09-15 18:28:43.964352
$ submit: