Metadata-Version: 2.4
Name: verify-crypto-signature
Version: 0.0.1
Summary: A comprehensive Python library to verify crypto wallet signatures
Home-page: https://github.com/walver-io/verify-crypto-signature
Author: BonifacioCalindoro
Author-email: admin@walver.io
Keywords: verify,crypto,signature,wallet,blockchain,solana,ethereum,cryptography
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: annotated-types==0.7.0
Requires-Dist: bitarray==3.4.0
Requires-Dist: ckzg==2.1.1
Requires-Dist: cytoolz==1.0.1
Requires-Dist: eth-account==0.13.7
Requires-Dist: eth-hash==0.7.1
Requires-Dist: eth-keyfile==0.8.1
Requires-Dist: eth-keys==0.7.0
Requires-Dist: eth-rlp==2.2.0
Requires-Dist: eth-typing==5.2.1
Requires-Dist: eth-utils==5.3.0
Requires-Dist: eth_abi==5.2.0
Requires-Dist: hexbytes==1.3.0
Requires-Dist: jsonalias==0.1.1
Requires-Dist: parsimonious==0.10.0
Requires-Dist: pycryptodome==3.22.0
Requires-Dist: pydantic==2.11.4
Requires-Dist: pydantic_core==2.33.2
Requires-Dist: regex==2024.11.6
Requires-Dist: rlp==4.1.0
Requires-Dist: solders==0.26.0
Requires-Dist: toolz==1.0.0
Requires-Dist: typing-inspection==0.4.0
Requires-Dist: typing_extensions==4.13.2
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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

```bash
pip install verify-crypto-signature
```

## Dependencies

- eth_account
- eth_utils
- eth_keys
- solders

## Usage

### Verifying an EVM Signature

```python
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

```python
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)

```python
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

```python
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

```python
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

[MIT License](LICENSE)

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request. 
