lightning-taproot-channels
Simple Taproot Channels (BOLT 9 bit 56): MuSig2-aggregated funding output, Tapscript commitment leaves, taproot-native HTLCs. USE WHEN: enabling taproot channels in your impl, evaluating cooperative-spend privacy gains, designing taproot HTLC scripts.
What this skill does
# Simple Taproot Channels Replaces the legacy 2-of-2 P2WSH funding output with a P2TR + MuSig2 aggregated key. Cooperative spends (the common case) are indistinguishable from single-sig outputs on chain. Status: deployed in early form across LDK, CLN, LND, Eclair as of late 2025; spec ongoing. ## Funding output Pre-taproot: ``` P2WSH(MULTI 2 <pk1> <pk2> 2 CHECKMULTISIG) ``` Taproot channel: ``` P2TR(MuSig2(pk1, pk2)) ``` Both parties run MuSig2 KeyAgg → single 32-byte x-only pubkey, which is the Taproot output key (potentially with empty taptree, or with emergency-script leaf). ## Commitment tx Outputs: - `to_local` — Tapscript with revocation + delay. - `to_remote` — simple P2TR(remote_static_pubkey) — looks like single-sig! - `to_local_anchor` / `to_remote_anchor` — small-value Taproot. - HTLC outputs — Tapscript leaves with hash/timeout/revocation paths. ## Cooperative close Cooperative close in taproot channels: - Both parties sign a single Schnorr sig over the new tx (via MuSig2 on the funding output). - Result: tx with **single 64-byte witness** — looks like ordinary Taproot single-sig. - On-chain analysis cannot distinguish from a regular wallet spend. ## Privacy gain | Tx type | Pre-taproot | Taproot channel | |---------|-------------|-----------------| | Funding tx | P2WSH 2-of-2 (visible) | P2TR (looks single-sig) | | Cooperative close | P2WSH spend (visible script) | P2TR keypath spend (single-sig look) | | Force close | P2WSH commitment | P2TR keypath spend, Tapscript only on revealed branch | Force-close with Tapscript reveals the script branch used; the other branches stay private. ## HTLC scripts in Tapscript HTLC offered (Tapscript leaf): ``` <remote_htlc_pk> CHECKSIG <local_htlc_pk> CHECKSIGADD 2 NUMEQUAL ; 2-of-2 HASH160 <RIPEMD160(payment_hash)> EQUALVERIFY CHECKSIG ``` Simpler than legacy because: - No P2WSH wrapper. - Schnorr 64-byte sigs vs DER 71-byte. - `OP_CHECKSIGADD` cleaner than `OP_CHECKMULTISIG`. ## Funding key generation Each party generates: - `funding_pubkey` (will be aggregated via MuSig2). - `revocation_basepoint`, `delayed_payment_basepoint`, `htlc_basepoint`, `payment_basepoint` (per-commitment-derivation basepoints). MuSig2 KeyAgg of `funding_pubkey_local` + `funding_pubkey_remote` → funding output key. ## Implementation challenges - **Nonce management**: MuSig2 requires careful nonce state across signing rounds. Channel updates need MuSig2 sessions for the funding output spend. - **Hardware wallet support**: lags. Most HW wallets don't support MuSig2 yet (Coldcard Mk4 has experimental). - **Splicing + taproot**: splice tx needs both MuSig2 cooperative spend + new output construction; protocol coordination is more complex than legacy. ## Compatibility `option_simple_taproot_chans` (BOLT 9 bit 56/57) negotiated in init. If only one side supports, channel falls back to legacy. ## Implementations (late 2025) | Implementation | Status | |----------------|--------| | LDK | Production with experimental flag | | CLN | Beta | | LND | Beta | | Eclair | Beta | Spec is in late stages but not finalized; some interop differences remain. ## Common bugs - MuSig2 nonce reuse across commitment updates → catastrophic key leak. - Forgetting to commit empty taptree (or chosen leaves) on funding output construction → mismatched output key. - Tapscript HTLC scripts with wrong sigops budget calculation. - HW wallet signing without MuSig2 capability → channel cannot be opened or updated. ## See also - [channels/SKILL.md](../channels/SKILL.md) - [htlcs/SKILL.md](../htlcs/SKILL.md) - [../../cryptography/musig2/SKILL.md](../../cryptography/musig2/SKILL.md) - [../../protocol/taproot/SKILL.md](../../protocol/taproot/SKILL.md)
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.