This repository contains the Bitails ElectrumX Adapter, a Node.js/NestJS application designed to bridge ElectrumSV clients with the Bitails backend API, emulating ElectrumX server functionality. While commonly used for ElectrumSV, this adapter facilitates interactions between various ElectrumSV clients and Bitails, leveraging the full range of ElectrumX capabilities, including transaction history, balance inquiries, and more.
Implementing the API is straightforward for individual use or development with a single wallet. However, to serve this adapter as a public service for multiple users, it's advisable to use a unique Bitails API key to prevent hitting rate limits on the Bitails backend.
- Supports the full ElectrumX protocol, commonly used with ElectrumSV clients.
- Seamless integration with the Bitails backend API.
- Enhanced performance and reliability for users accessing Bitails services through ElectrumSV clients.
- Designed for easy setup and deployment, allowing for quick starts with minimal configuration.
- Node.js (v14 or later)
- NestJS (v7 or later)
- Access to the Bitails API with a unique API key for large-scale or multi-wallet deployments.
-
Clone the Repository
git clone https://github.com/bitails/electrumx-adaptor.git cd bitails-electrumx-adaptor
-
Install Dependencies
npm install
-
Configuration
- Copy the sample configuration file:
cp .env.sample .env
. - Edit
.env
to include your Bitails API credentials and other configurations. Ensure each deployment or user has a unique Bitails API key to manage rate limiting effectively.
- Copy the sample configuration file:
-
Start the Adapter
npm run start
Configure your ElectrumSV client to connect to the adapter's host and port as specified in your .env
configuration file. The adapter will automatically manage requests from the client, interfacing with the Bitails backend API and returning results in the format recognized by ElectrumX clients. While it is commonly used with ElectrumSV, the adapter is designed to be client-agnostic, offering broad compatibility.
We welcome contributions to the Bitails ElectrumX Adapter. If you'd like to contribute, please fork the repository and use a feature branch for your developments. Pull requests are greatly appreciated.
- Fork the Repository
- Create Your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit Your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This server implements a subset of the ElectrumX RPC protocol. Below is the complete list of methods defined in the ElectrumX documentation, along with their current implementation status in our server.
-
blockchain.block.header
-
blockchain.block.headers
-
blockchain.estimatefee
-
blockchain.headers.subscribe
-
blockchain.relayfee
-
blockchain.scripthash.get_balance
-
blockchain.scripthash.get_history
-
blockchain.scripthash.get_mempool
-
blockchain.scripthash.listunspent
-
blockchain.scripthash.subscribe
-
blockchain.scripthash.unsubscribe
-
blockchain.transaction.broadcast
-
blockchain.transaction.get
-
blockchain.transaction.get_merkle
-
blockchain.transaction.id_from_pos
- Not implemented.
-
server.banner
-
server.donation_address
-
server.features
-
server.peers.subscribe
-
server.ping
-
server.version
-
mempool.get_fee_histogram
- Not implemented.
- Additional methods from the ElectrumX protocol not explicitly listed above are under consideration for future implementation. Our goal is to provide comprehensive support for the protocol to facilitate a wide range of use cases and enhance user experience.
The list above represents our current implementation status and may change as we continue to develop and update our server. Please check back for the latest updates on supported methods and new features.
To facilitate the evaluation and deployment of this project, we provide the following endpoints:
- TCP Connection:
esv.bitails.io:50001
- TLS Connection:
esv.bitails.io:50002
These endpoints serve both as a demonstration of the Bitails ElectrumX Adapter's capabilities and as a test environment for integrating ElectrumSV clients. While they are fully functional and can be used for production purposes, we recommend conducting thorough testing to ensure they meet your specific requirements and adhere to your security standards.
For support requests and feedback on the Bitails ElectrumX Adapter, please open an issue in this repository.
This project is licensed under the MIT License - see the LICENSE file for details.
- The ElectrumX community for the protocol specification.
- The NestJS team for the excellent framework.
- All contributors and users of the Bitails ElectrumX Adapter.
ESV Adaptor is a side project of the Bitails team, so if you find it useful, a donation(size des not matter here!) encourages us to do more.
BSV: 1Gj7Bi8H1qK4jWrHYDBirr2McyDkxG9wwx
BTC: bc1qcd84l66g5jllj8u476f6w95uk7wf2ynj6xz6a5
If you have any questions or want to talk to the team, send us an email or contact us through our telegram group.