input+signrpc+lnwallet+multi: implement combined nonce support

Add CombinedNonce() and RegisterCombinedNonce() methods with full implementation
stack.

Interface and core implementation:
- input/musig2.go: Added methods to MuSig2Session and MuSig2Signer interfaces
- input/musig2_session_manager.go: MusigSessionManager implementation using
  HaveAllNonces flag for state tracking (simplified, no extra fields)
- internal/musig2v040: Stub implementations returning ErrUnsupportedMethod
- Mock implementations (MockInputSigner, MockSigner, DummySigner)

RPC layer:
- lnrpc/signrpc/signer.proto: RPC method definitions and messages
- lnrpc/signrpc/signer.yaml: REST API endpoint mappings
- Generated protobuf code (all .pb.go files)
- lnwallet/rpcwallet/rpcwallet.go: RPCKeyRing client implementation

The proto types and RPCKeyRing are added together since RPCKeyRing implements
the Signer interface and requires proto types to fulfill the contract.

For v0.4.0, these methods return ErrUnsupportedMethod. Use MuSig2Version100RC2
to access these features.
This commit is contained in:
Elle Mouton committed 2025-12-10 07:15:06 +02:00
1 parent cbcb6a4dcf
commit c945f6749e
15 files changed
+1204 -175

No files matched your search

+14
View File
@@ -8,3 +8,17 @@ This corresponds to the [MuSig2 BIP specification version of
We only keep this code here to allow implementing a backward compatible,
versioned MuSig2 RPC.
## Unsupported Methods
The following methods from the newer MuSig2 specifications are not supported in
this legacy v0.4.0 implementation and will return `ErrUnsupportedMethod` if
called:
- `CombinedNonce()`: Returns error instead of the combined nonce.
- `RegisterCombinedNonce()`: Returns error instead of registering a
pre-aggregated combined nonce.
These methods are only available when using MuSig2 v1.0.0rc2 or later. To use
these features, create sessions with `MuSig2Version100RC2` instead of
`MuSig2Version040`.