Skip to main content

ChainCash - Crypto payments library for BEP20

Project description

ChainCash

🚀 ChainCash — A Python library for building crypto payment solutions on Binance Smart Chain (BEP20).

With ChainCash, you can easily create wallets for your users, monitor deposits (BNB & USDT), and process outgoing transactions asynchronously.


✨ Features

✅ Create unique wallets for each user
✅ Monitor incoming deposits with a callback mechanism
✅ Transfer BNB and USDT tokens
✅ Fully async, built on top of AsyncWeb3
✅ Default support for BSC Mainnet


📦 Installation

Install the package:

pip install chaincash

🔷 Requirements

  • Python >= 3.9

Usage/Examples

from chaincash.core.blockchain_client import BlockchainClient
from chaincash.core.wallet_manager import WalletManager
from chaincash.core.monitor import Monitor
from chaincash.core.transfer_service import TransferService

# Initialize blockchain client
client = BlockchainClient()

# Create a wallet
wallet = WalletManager.create_wallet(user_id=1)
print(wallet)

# Monitor deposits
async def on_deposit(event):
    print(f"📥 Deposit detected: {event}")

monitor = Monitor(client, address_map={1: wallet.address})
await monitor.start(on_deposit)

# Send BNB
transfer_service = TransferService(client, wallet.private_key)
await transfer_service.send_bnb(to_address="0x...", amount=0.1)

🤝 Contributing

Pull requests and issues are welcome! If you have ideas, improvements, or bug reports — feel free to open a PR or issue. 🌟

Support

For support, email noroozisaeed7@gmail.com.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chaincash-0.1.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chaincash-0.1.2-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file chaincash-0.1.2.tar.gz.

File metadata

  • Download URL: chaincash-0.1.2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for chaincash-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5c99d29c08d634b33c67f0161abbd6c6cc3d20ba518c334a3a30fae4a0fc2d49
MD5 6eedf4b8e342490df1501a91b6b562eb
BLAKE2b-256 723f518cf79fdb5043dd7be7056fd90db459b0cca5c50a0327ce4bfcd882aa60

See more details on using hashes here.

File details

Details for the file chaincash-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: chaincash-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for chaincash-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e4c94cd62faaa3759c6fc4fada02c69054d925192746041fb8bcc1b0268b023c
MD5 62819642255068b50048afc85c253910
BLAKE2b-256 53f9118288a0839f328359071f2243596976915739db9a2bd8da893787a610d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page