{"library":"siwe","title":"Sign-In with Ethereum","description":"A Python implementation of Sign-In with Ethereum (EIP-4361). Supports parsing, verifying, and generating EIP-4361 messages for Ethereum authentication. Current version 4.4.0, requires Python >=3.8, <4.0. Actively maintained.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install siwe"],"cli":null},"imports":["from siwe import SiweMessage","from siwe import generate_nonce"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from siwe import SiweMessage, generate_nonce\nfrom eth_account.messages import encode_defunct\nfrom eth_account.account import Account\n\n# Generate a nonce\nnonce = generate_nonce()\n\n# Create a SIWE message\nmessage = SiweMessage(\n    domain='example.com',\n    address='0x1234...',\n    uri='https://example.com',\n    version='1',\n    chain_id=1,\n    nonce=nonce,\n    issued_at='2022-01-01T00:00:00Z'\n)\n\n# Prepare message for signing\nprepared = message.prepare_message()\n\n# (Typically you'd send `prepared` to the client to sign with their wallet)\n# To verify, you need the signature from the wallet\n# signature = '0x...'  # signature from the client\n# recovered_address = message.verify(signature=signature)\n# print(recovered_address)\n","lang":"python","description":"Create and verify a SIWE message.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}