You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BDK exposes a very similar functionality in the wallet api itself with the verify feature flag and uses the same bitcoinconsensus underneath like this..
I think I looked into this a while ago. Back then it didn't quite match. But maybe something has changed in the meantime, and it is worth another detailed look. If it works out, it would certainly be cool.
I would guess nothing changed much since your last look.. This part of lib hasn't been touched much.. The API asks for a full Transaction and the database (can be taken from the wallet) and performs the same consensus verification call as in the bare code in this crate..
So it depends on weather stuffs being verified here can be a full transaction itself in the wallet db.. In that case it should be theoretically possible to use this API instead of the bare call.. All this api does, before the bare bitcoinconsensus::verify is to get the prev outputs and script pubkeys from the given transaction..
I just had a quick look at this again. Since the first input is the special hashed message, I would need a way to skip the first input. Adding functionality to skip some inputs might undermine the validity for normal transactions.
The
bitcoinconsensus
crate is used to do the proof verification here https://github.com/weareseba/bdk-reserves/blob/61b5f517f4c227bdf62507d1fcc2fd79bb87db8d/src/reserves.rs#L273-L279BDK exposes a very similar functionality in the wallet api itself with the
verify
feature flag and uses the samebitcoinconsensus
underneath like this..https://github.com/bitcoindevkit/bdk/blob/2283444f727b85663b19d100af86db4392ebc891/src/wallet/verify.rs#L58-L68
This api is publicly exposed via
verify
feature of BDK.. So may be one more opportunity to reduce external dependency onbitcoinconsensus
??But might need some restructuring of the proof verification logic in this crate..
The text was updated successfully, but these errors were encountered: