executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
bitcoin-libraries-nbitcoinNBitcoin: comprehensive .NET / C# Bitcoin library. Used by BTCPay Server, NBXplorer, many .NET tools. Tx, Script, PSBT, BIP32, HW wallet integration. USE WHEN: building .NET Bitcoin apps, integrating with BTCPay ecosystem.
Independent GitHub snapshot · Automated classification · Original documentation governs
The .NET / C# Bitcoin library by Nicolas Dorier. Powers BTCPay Server, NBXplorer, and many enterprise .NET integrations.
Repo: github.com/MetacoSA/NBitcoin.
dotnet add package NBitcoin
using NBitcoin;
var network = Network.Main;
var key = new Key(); // random
var addr = key.PubKey.GetAddress(ScriptPubKeyType.Segwit, network);
Console.WriteLine(addr); // bc1q...
// Tx
var tx = network.CreateTransaction();
tx.Inputs.Add(new TxIn(new OutPoint(...), null));
tx.Outputs.Add(new TxOut(Money.Coins(0.001m), addr));
// PSBT
var psbt = PSBT.FromTransaction(tx, network);
psbt.AddCoins(prevOuts);
psbt.SignAll(ScriptPubKeyType.Segwit, key);
var finalTx = psbt.Finalize().ExtractTransaction();