Hello,

Sign up to join our community!

Welcome Back,

Please login to your account!

Forgot Password,

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

mor8331052732 activity

mor8331052732 commented on What should I send to backend and I will be sure that it's owner of th wallet?

func CheckSignature(address string, sig string) bool { _, decodedAddress, _ := bech32.Decode(address) decodedBytes, err := bech32.ConvertBits(decodedAddress, byte(5), byte(8), !true) if err != nil { log.Fatal().Err(err).Msg("Address decode error: ") } token := "asd" prefix := "\x17Elrond Signed Message:\n" message := address + token + "{}" data := []byte(prefix + strconv.Itoa(len(message)) + message) hash := sha3.NewLegacyKeccak256() hash.Write(data) hashedMessage := hash.Sum(nil) decodedSig, _ := hex.DecodeString(sig) verified := ed25519.Verify(decodedBytes, hashedMessage, decodedSig) return verified } here it's my example GO code for validation on backend