Repository navigation
Conversation
|
@louisinger I merged new commits of master to this PR but now CI always fails with this |
|
@tiero @louisinger I fixed the issues with tx estimation by making a little refactor of the core logic. Note that at the moment the estimation assumes all inputs are of type |
| const signingKeyPair = ECPairFactory(this.ecclib).fromPrivateKey( | ||
| privateKeyBuffer | ||
| ); | ||
| const preimage = pset.getInputPreimage(i, sighashType); |
There was a problem hiding this comment.
Maybe here we should decode the script type? if is segwit v1 we should branch out, and at least if is a key-path spend try to make the schnorr signature necessary?
There was a problem hiding this comment.
If not in this PR, at least let's throw an error that is not implemented in the case is a taproot output and/or input.tapLeafScript is present, so user knows can only signs segwit v0
This adds 2 new methods to identities
signPsetV2andblindPsetV2to manage transactions with the new psetv2 format.The base
Identitytype has a new functionblindPsetV2WithSourcethat basically takes care of creating the xkp blinding generator either from a list of unblinded inputs, a master blinding key or a list of blinding private keys by giving priority in this exact order in case more than one source is defined.NOTE: The method
blindPsetV2accepts an optional list of unblinded inputs that the user can pass in case he already unblinded them all. Otherwise the master key/list of blinding keys of the identity will be used to unblind the tx inputs if needed.Closes #125.
Please @tiero @louisinger review.