Closed ameyarao98 closed 6 months ago
Tests currently fail because the AnyUrl type always appends a / at the end
Related to that, it's the reason why there was a custom date type, to enable transitivity. Mainly because the verification method re-serialises the message before verifying the method. Which is arguably a wasteful process.
I see a few alternatives:
SiweMessage
;from_message
method, it could do the verification before deserialising; orSiweMessage
type into SiweMessageBuilder
and SignedSiweMessage
.The last two are kind of the same, and I think it's probably the best way to go about it, JWT-style verification.
Do you have an opinion?
If the AnyUrl
thing got fixed, please also upgrade eth-account
, the current 0.8.0
is old
Do you have an opinion?
Just seeing this but I agree that split the SiweMessage type into SiweMessageBuilder and SignedSiweMessage.
is the right way to go. I do think that that might be beyond the scope of the PR however,. For now I think making AnyUrl
a string instead might be better, since I did have a similar issue with another project and I concluded that the benefits of Pydantic validating URL structure are minimal
Closed by #59
Closes #50 and #46
Note: Tests currently fail because the
AnyUrl
type always appends a/
at the end:Either find a way to modify it not to do that or go for a simple string instead https://github.com/pydantic/pydantic/issues/7186