multi: return input.Signature from SignOutputRaw

This commit is contained in:
Conner Fromknecht
2020-04-05 17:06:38 -07:00
parent 37dffb225a
commit 0f94b8dc62
29 changed files with 168 additions and 110 deletions

View File

@@ -225,7 +225,7 @@ func maybeTweakPrivKey(signDesc *input.SignDescriptor,
//
// This is a part of the WalletController interface.
func (b *BtcWallet) SignOutputRaw(tx *wire.MsgTx,
signDesc *input.SignDescriptor) ([]byte, error) {
signDesc *input.SignDescriptor) (input.Signature, error) {
witnessScript := signDesc.WitnessScript
@@ -256,7 +256,7 @@ func (b *BtcWallet) SignOutputRaw(tx *wire.MsgTx,
}
// Chop off the sighash flag at the end of the signature.
return sig[:len(sig)-1], nil
return btcec.ParseDERSignature(sig[:len(sig)-1], btcec.S256())
}
// ComputeInputScript generates a complete InputScript for the passed
@@ -358,7 +358,7 @@ var _ input.Signer = (*BtcWallet)(nil)
//
// NOTE: This is a part of the MessageSigner interface.
func (b *BtcWallet) SignMessage(pubKey *btcec.PublicKey,
msg []byte) (*btcec.Signature, error) {
msg []byte) (input.Signature, error) {
// First attempt to fetch the private key which corresponds to the
// specified public key.