This PocketBase extension offers seamless integration of cryptocurrency wallet transaction tracking. By scanning wallet addresses for BTC transactions and storing results in collections, it simplifies backend operations without the need for direct blockchain queries. Ideal for developers looking to enhance their applications with crypto capabilities.
crypto-pb is a powerful extension designed for PocketBase that automates the monitoring of cryptocurrency wallet transactions. This tool effectively scans and tracks addresses associated with Bitcoin (BTC) on both mainnet and testnet, systematically storing transaction data within PocketBase collections.
By streamlining the integration of crypto transactions into backend operations, crypto-pb eliminates the need for direct blockchain polling, thereby enhancing efficiency and performance.
Current Version
The project is currently at version 0.1. It is specifically targeted for PocketBase 0.22.x, having been tested with version 0.22.7, although other versions may function without verification.
Development Roadmap
Future updates aim to enhance the functionality of crypto-pb with features such as:
- Adding comprehensive support for Ethereum (ETH)
Running the Application
Setting up and running crypto-pb is straightforward. Use the following commands to build and execute the application, which operates seamlessly as any conventional PocketBase app:
go run main.go
To create a binary for deployment, utilize:
go build -o crypto-pb
# run against mainnet
./crypto-pb serve
# run against testnet
./crypto-pb serve --testnet
By omitting the --testnet
option, the application defaults to operating on the Bitcoin mainnet. Once initiated, the application will ensure that all necessary collections are created and will commence a scheduling process to periodically scan all stored wallets.
Python Client Example
A Python script located at examples/python/client.py
serves as an illustrative guide for utilizing the REST API to retrieve relevant data. This example covers the following steps:
- User authentication
- Listing wallets along with their addresses and balances
- Displaying all transactions associated with a selected wallet, including amounts and confirmations
To list all wallets linked to a specific user:
python examples/python/client.py --email user@example.com --password secret
To view all transactions for a designated wallet belonging to that user:
python examples/python/client.py --email user@example.com --password secret --wallet <address>
Contributing
Contributions are encouraged, whether through feature requests (open an issue in the repository) or code contributions (fork the repo and submit a pull request). Community support is appreciated, and users finding value in the project can consider backing it via GitHub's Support button.
No comments yet.
Sign in to be the first to comment.