lbryschema.go/binding/lbryschema-python-binding.go
2017-11-08 22:01:32 -05:00

22 lines
502 B
Go

package main
import (
"C"
"../claim"
)
//export VerifySignature
func VerifySignature(claimHex string, certificateHex string, claimAddress string, certificateId string) (bool) {
decodedClaim, err := claim.DecodeClaimHex(claimHex)
if err != nil {
return false
}
decodedCertificate, err := claim.DecodeClaimHex(certificateHex)
result, err := decodedClaim.ValidateClaimSignature(decodedCertificate, claimAddress, certificateId)
if err != nil {
return false
}
return result
}
func main() {}