lbryschema.go/binding/lbryschema-python-binding.go

22 lines
502 B
Go
Raw Normal View History

2017-11-09 04:01:32 +01:00
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() {}