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:
15 files changed
+1204
-175
No files matched your search
@@ -150,6 +150,22 @@ func (s *MockSigner) MuSig2RegisterNonces(input.MuSig2SessionID,
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// MuSig2RegisterCombinedNonce registers a pre-aggregated combined nonce for a
|
||||
// session identified by its ID.
|
||||
func (s *MockSigner) MuSig2RegisterCombinedNonce(input.MuSig2SessionID,
|
||||
[musig2.PubNonceSize]byte) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MuSig2GetCombinedNonce retrieves the combined nonce for a session identified
|
||||
// by its ID.
|
||||
func (s *MockSigner) MuSig2GetCombinedNonce(input.MuSig2SessionID) (
|
||||
[musig2.PubNonceSize]byte, error) {
|
||||
|
||||
return [musig2.PubNonceSize]byte{}, nil
|
||||
}
|
||||
|
||||
// MuSig2Sign creates a partial signature using the local signing key
|
||||
// that was specified when the session was created. This can only be
|
||||
// called when all public nonces of all participants are known and have
|
||||
|
||||
Reference in new issue
Block a user