Verify Crypto Signature
A Python library for verifying and working with cryptographic signatures, currently supporting EVM and Solana blockchain signatures.
Features
- Verify message signatures from EVM and Solana addresses
- Sign messages using private keys
- Recover wallet addresses from signatures (Only supports EVM)
- Validate EVM and Solana addresses
Installation
pip install verify-crypto-signature
Dependencies
- eth_account
- eth_utils
- eth_keys
- solders
Usage
Verifying an EVM Signature
from verify_crypto_signature.evm import VerifyEVM
# Verify if a message was signed by a specific address
wallet_address = "0x..." # Example address
message = "Hello, world!"
signature = "0x..." # Signature obtained from the wallet
# Verify the signature
is_valid = VerifyEVM.verify_signature(wallet_address, message, signature)
if is_valid:
print("Signature is valid")
else:
print("Signature is invalid")
Signing a Message
from verify_crypto_signature.evm import VerifyEVM
# Sign a message with a private key
private_key = "0x..." # Your private key (keep this secret!)
message = "Hello, world!"
# Sign the message
signed_message = VerifyEVM.sign_message(message, private_key)
signature = signed_message.signature.hex()
print(f"Signature: {signature}")
Recovering an Address from a Signature (Only supports EVM)
from verify_crypto_signature.evm import VerifyEVM
# Recover the signer's address
message = "Hello, world!"
signature = "0x..." # The signature
address = VerifyEVM.get_address_from_message(message, signature=signature)
print(f"Signer address: {address}")
Verifying a Solana Signature
from verify_crypto_signature.sol import VerifySOL
# Verify if a message was signed by a specific address
wallet_address = "5yQ6...." # Example address
message = "Hello, world!"
signature = "4K2...." # Signature obtained from the wallet
# Verify the signature
is_valid = VerifySOL.verify_signature(wallet_address, message, signature)
Signing a Message
from verify_crypto_signature.sol import VerifySOL
# Sign a message with a private key
private_key = "4K2...." # Your private key (keep this secret!)
message = "Hello, world!"
# Sign the message
signed_message = VerifySOL.sign_message(message, private_key)
License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for verify-crypto-signature 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| verify_crypto_signature-0.0.1.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| verify_crypto_signature-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.3 kB
Release files / verify_crypto_signature-0.0.1.tar.gz
| Download URL | verify_crypto_signature-0.0.1.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f9085fd1b7990aef0476b7e4e33ade3a602f911c02e52c1f5dab5bc1e3fb19e
|
|
BLAKE2b-256 checksum How to use checksums |
0ea71ccba064677ec08ccdbbb9ac91aa33b7157768734a525c04787c46596dae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / verify_crypto_signature-0.0.1-py3-none-any.whl
| Download URL | verify_crypto_signature-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7336e58d847b720238a4885d958cdf4c42b9c2a8b53b11ad7db76b127b26b85
|
|
BLAKE2b-256 checksum How to use checksums |
c0a7ad8abb17c6b632df7bf5d5a256111b84575ed6550833ff1a24862b17fd46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|