spruceid / siwe-py

A Python implementation of Sign-In with Ethereum
https://login.xyz
Apache License 2.0
67 stars 30 forks source link

Initial siwe-py implementation and project foundation #2

Closed payton closed 2 years ago

payton commented 2 years ago

Summary

This sets up the project foundation along with including my own initial implementation based on https://github.com/spruceid/siwe

Core functionality of the SiweMessage class exists but general tests are needed along with EIP-1271 support.

Layout

Next Steps

I've included several TODO tags and will create issues for pending tasks in case members of the community wish to contribute.

Misc

payton commented 2 years ago

@sbihel, thanks for the comments! Everything actionable is addressed.

Haven't heard of poetry - neat!

Formatting: poetry run black Tests: poetry run nosetests

sbihel commented 2 years ago

I had some time so I did some things myself, hope you don't mind. Mainly, I completed the tests and fixed a couple of things.

You will need to run

git submodule update --init
poetry update
poetry run pytest

I suppose what's left to do is:

payton commented 2 years ago

Haha! As the maintainer, you have full veto power - I support whatever decisions fit best for you.

I've gone ahead and updated the README with some initial examples.

Re: "we can remove the SignatureType for now, we are only focused on EIP-191 for now;": Perhaps it makes sense to just leave it in since the impact on flow is minimal? I'll mark that step as done but feel free to remove if you wish.

Re: add CI: This looks promising (will leave that to you): https://github.com/marketplace/actions/python-poetry-action

Remaining steps:

payton commented 2 years ago

Oh nice. I see you got siwe on pypi 👍

sbihel commented 2 years ago

I see you got siwe on pypi

Yes, I thought we should probably reserve the name :ninja:

I am going to merge this PR and publish as v0.1. Contract wallets support is not that urgent. And I'll add the CI in another branch.

Thank you :slightly_smiling_face: