func UnblindOutputWithNonce(
	out *transaction.TxOutput,
	nonce []byte,
) (*UnblindOutputResult, error) {
	if !out.IsConfidential() {
		return nil, nil
	}
	var nonce32 [32]byte
	copy(nonce32[:], nonce)
	return unblindOutput(out, nonce32)
}
UnblindOutputWithNonce method unblinds a confidential transaction output with
the given ecdh nonce calculated for example with the above NonceHash func.
package confidential
import (
	"crypto/sha256"
	"errors"
	"github.com/vulpemventures/go-elements/transaction"
	"github.com/vulpemventures/go-secp256k1-zkp"
)
func NonceHash(pubKey, privKey []byte) (
	result [32]byte,
	err error,
) {
	return nonceHash(pubKey, privKey)
}
type UnblindOutputResult struct {
	Value               uint64
	Asset               []byte
	ValueBlindingFactor []byte
	AssetBlindingFactor []byte
}
func UnblindOutputWithKey(
	out *transaction.TxOutput,
	blindKey []byte,
) (*UnblindOutputResult, error) {
	if !out.IsConfidential() {
		return nil, nil
	}
	nonce, err := NonceHash(out.Nonce, blindKey)
	if err != nil {
		return nil, err
	}
	return unblindOutput(out, nonce)
}