EIP712 TODO

This commit is contained in:
2025-09-06 17:22:27 +03:30
parent 723d883bc2
commit 6d16a6ea8c
2 changed files with 17 additions and 0 deletions
+6
View File
@@ -46,12 +46,18 @@ type User struct {
DeletedAt *time.Time
}
// TODO: move to another file?
type Challenge struct {
Message uuid.UUID
TimeStamp time.Time
ExpiresAt time.Time
}
// TODO: check EIP712 in here for challenge validation
func (c *Challenge) IsExpired() bool {
return time.Now().After(c.ExpiresAt)
}
func NewUser(pubKey, name, lastName, phoneNumber, email, nationalID string) (*User, error) {
_, err := phone.IsValid(phoneNumber)