At the moment, the library does verify surjection proofs once generated, but doesn't let the user perform such verification.
We need to expose a VerifySurjectionProof method in the confidential pkg accepting in/out assets and asset blinders as bytes, a proof as byte that basically wraps the respective method of the go-secp256 library.
Also, a ValidateBlinding function needs to be added to the pset's blinder expecting a pset object, and a list of in/out private blinding keys that unblinds all the inputs and outputs of the tx and calls the new method defined in the confidential pkg. This way we validate both range and surjection proofs at once.
At the moment, the library does verify surjection proofs once generated, but doesn't let the user perform such verification.
We need to expose a
VerifySurjectionProof
method in theconfidential
pkg accepting in/out assets and asset blinders as bytes, a proof as byte that basically wraps the respective method of the go-secp256 library.Also, a
ValidateBlinding
function needs to be added to thepset
's blinder expecting a pset object, and a list of in/out private blinding keys that unblinds all the inputs and outputs of the tx and calls the new method defined in the confidential pkg. This way we validate both range and surjection proofs at once.