FairCoin makes it easy for developers to integrate FairCoin into their applications.
FairCoin Developers Portal is a developer resource that provides the essential concepts and references for building applications on FairCoin. Each concept and reference will focus on specific aspects of FairCoin development while providing additional details and usage examples.
FairCoin is a cutting edge cryptocurrency, fair, secure, and sustainable with many features not available in most other cryptocurrencies:
Anonymized transactions using coin mixing technology, we call it Coin Mixing.
Fast transactions featuring guaranteed zero confirmation transactions, we call it FastSend.
Decentralized blockchain voting providing for consensus based advancement of the current Masternodetechnology used to secure the network and provide the above features, each Masternode is secured with collateral of 25K faircoin.
A blockchain is a public database that is updated and shared across many computers in a network.
"Block" refers to data and state being stored in consecutive groups known as "blocks". If you send FAIR to someone else, the transaction data needs to be added to a block to be successful.
"Chain" refers to the fact that each block cryptographically references its parent. In other words, blocks get chained together. The data in a block cannot change without changing all subsequent blocks, which would require the consensus of the entire network.
Every computer in the network must agree upon each new block and the chain as a whole. These computers are known as "nodes". Nodes ensure everyone interacting with the blockchain has the same data. To accomplish this distributed agreement, blockchains need a consensus mechanism.
FairCoin is based on a Proof-of-Stake consensus algorithm. Each participant's chance to generate the next block is proportional to their economic stake in the network. Unlike Proof-of-Work, Proof-of-Stake is hardware-savvy and power-savvy, making attacks profitless for miners.
We are constantly looking for skilled people who want to help in developing this beautiful movement.
is a distributed network of computers running software (known as nodes) that can verify blocks and transaction data. You need an application, known as a client, on your computer to "run" a node.
You should understand the concept of a peer-to-peer network and the basics of the FVM before diving deeper and running your own instance of an FairCoin client. Take a look at our introduction to FairCoin.
If you're new to the topic of nodes, we recommend first checking out our user-friendly introduction on running a FairCoin node.
"Node" refers to a running piece of client software. A client is an implementation of FairCoin that verifies all transactions in each block, keeping the network secure and the data accurate.
Many FairCoin clients exist, in a variety of programming languages such as Go, Rust, JavaScript, Typescript, PHP, Python, C# .NET and Java.
Running a node allows you to trustlessly and privately use FairCoin while supporting the ecosystem.
Running your own node enables you to use FairCoin in a truly private, self-sufficient and trustless manner. You don't need to trust the network because you can verify the data yourself with your client. "Don't trust, verify" is a popular blockchain mantra.
A diverse set of nodes is important for FairCoin's health, security and operational resiliency.
If you run a full node, the whole FairCoin network benefits from it.
In order to use FairCoin Core GUI, you will need several libraries installed. All of them should be available in all major recently-released Linux distributions, but they may not be installed on your computer yet. To determine whether you’re missing any libraries, open a terminal (if you haven’t already) and run the command /usr/local/bin/faircoin-qt to start FairCoin Core GUI.
If all the required libraries are installed, FairCoin Core will start. If a required library is missing, an error message similar to the following message will be displayed:
Search your distribution’s package database for the missing file missing and install package containing that file. Then re-run /usr/local/bin/faircoin-qt to see if it’s missing another file. Repeat until FairCoin Core GUI starts.
You will be prompted to choose a directory to store the FairCoin block chain and your wallet. Unless you have a separate partition or drive you want to use, click Ok to use the default.
FairCoin Core GUI will begin to download the blockchain. This step will take at least several days, and it may take much more time on a slow Internet connection or with a slow computer. During the download, FairCoin Core will use a significant part of your connection bandwidth.
You can stop FairCoin Core at any time by closing it; it will resume from the point where it stopped the next time you start it.
After download is complete, you may use FairCoin Core as your wallet or you can just let it run to help support the FairCoin network.
Starting your node automatically each time you login to your computer makes it easy for you to contribute to the network. The easiest way to do this is to tell FairCoin Core GUI to start at login. This only works in desktop environments that support the autostart specification, such as Gnome, KDE, and Unity.
While running FairCoin Core GUI, open the Settings menu and choose Options. On the Main tab, click Start FairCoin on system login. Click the Ok button to save the new settings.
The next time you login to your desktop, FairCoin Core GUI should be automatically started as an icon in the tray.
If FairCoin Core GUI does not automatically start, you may need to add it to an .xinit or .xsession file as described here.
You have now completed installing FairCoin Core. If you have any questions, please ask in one of FairCoin's many communities, such as Reddit, or the FairCoin Official Telegram group.
To support the FairCoin network, you also need to allow incoming connections. Please read the Network Configuration section for details.
If you’re logged in as an administrative user with sudo access, you may log out. The steps in this section should be performed as the user you want to run FairCoin Core. (This can be a locked account used only by FairCoin Core.) If you changed users in a graphical interface, start a terminal.
Type the following command:
It will print a message that FairCoin Core is starting. To interact with FairCoin Core daemon, you will use the command faircoin-cli (FairCoin command line interface).
Note: it may take up to several minutes for FairCoin Core to start, during which it will display the following message whenever you use faircoin-cli:
After it starts, you may find the following commands useful for basic interaction with your node: getblockchaininfo, getnetworkinfo, getnettotals, getwalletinfo, stop, and help.
For example, to safely stop your node, run the following command:
A complete list of commands is available in the RPC API reference.
When FairCoin Core daemon first starts, it will begin to download the blockchain. This step can take long, and it may take much more time on a slow Internet connection or with a slow computer. During the download, FairCoin Core will use a part of your connection bandwidth. You can stop FairCoin Core at any time using the stop command; it will resume from the point where it stopped the next time you start it.
Starting your node automatically each time your computer boots makes it easy for you to contribute to the network. The easiest way to do this is to start FairCoin Core daemon from your crontab. To edit your crontab on most distributions, run the following command:
Scroll to the bottom of the file displayed and add the following line:
Save the file and exit; the updated crontab file will be installed for you. On most distributions, this will cause FairCoin Core daemon to be automatically started each time you reboot your computer.
You have now completed installing FairCoin Core. If you have any questions, please ask in one of FairCoin's many communities, such as Reddit, or the FairCoin Official Telegram group.
To support the FairCoin network, you also need to allow incoming connections. Please read the Network Configuration section for details.
If you are running an older version, shut it down. Wait until it has completely shut down (which might take a few minutes for older versions), then run the installer (on Windows) or just copy over /Applications/Faircoin-Qt (on Mac) or faircoind/faircoin-qt (on Linux).
The blockchain and wallet files in the data directory are compatible between versions so there is no requirement to make any changes to the data directory when upgrading. Occasionally the format of those files changes, but the new FairCoin Core version will include code that automatically upgrades the files to the new format so no manual intervention is required.
Sometimes upgrade of the blockchain data files from very old versions to the new versions is not supported. In those cases it may be necessary to redownload the blockchain. Check the release notes of the new version if you are planning to upgrade from a very old version.
Sometimes downgrade is not possible because of changes to the data files. Again, check the release notes for the new version if you are planning to downgrade.
If you want to support the FairCoin network, you must allow inbound connections.
When FairCoin Core starts, it establishes 8 outbound connections to other full nodes so it can download the latest blocks and transactions. If you just want to use your full node as a wallet, you don’t need more than these 8 connections—but if you want to support lightweight clients and other full nodes on the network, you must allow inbound connections.
Servers connected directly to the Internet usually don’t require any special configuration. You can use the testing instructions below to confirm your server-based node accepts inbound connections.
Home connections are usually filtered by a router or modem. FairCoin Core will request your router automatically configure itself to allow inbound connections to FairCoin’s port, port 53472. Unfortunately many routers don’t allow automatic configuration, so you must manually configure your router. You may also need to configure your firewall to allow inbound connections to port 53472. Please see the following subsections for details.