How to add an Altcoin
Last updated
Was this helpful?
Last updated
Was this helpful?
Bitcoin (and the original electrum) is the primary focus of the developers. When developing, we usually test two currencies just to check that multicurrency checkout works, but we don't check every coin frequently. Each coin's communities should maintain their coins.
For more information, checkout the page.
As Bitcart is made with extensibility in mind, it's usually not a hard process, but it depends on the coin you are adding
It all depends on whether there is an electrum fork for that coin
If so, the process is easy. If that electrum fork is maintained, usually the process is the following:
Add new daemon file, daemons/coin.py
, in the main bitcart
repository, where coin
is your coin's code. Copy the code from the daemons/btc.py
file and edit some metadata. Note that the default port for the coin must be in 5XXX range, and that you should increment it by one with each added coin. So find the latest port used, and use the next port number available. Check this for an example, but make sure to check the most up-to-date files.
Add a requirements file (requirements/daemons/coin.txt
), and pin electrum of that coin to some specific release. See this
Add the coin's decimal formatting settings, edit the api/ext/moneyformat/currencies.json
and add settings related to your currency. See the example crypto settings at the bottom of that file.
Add the coin to our SDK. Create a file bitcart/coins/coin.py
, and edit some metadata. See this .
Add the coin to our docker deployment:
Create a docker file for that coin (base on the btc one), a docker-compose component and edit the setup scripts. See this . Ensure to add COIN_HOST=component
line to this , where COIN
is the coin symbol, and component
is the name of the docker-compose component you have created
That's where things get a little bit more complex. You have two ways: either fork the electrum yourself and make it work for your coin, or, if your coin is completely different from btc-like coins, try to create an electrum-compatible daemon. If you do it correctly, you just need to implement the daemons/coin.py
file in a completely custom way, plus make sure to have all the daemons dependencies in the requirements file, but otherwise, the process is the same as when for that coin.