Factorial Coin Mining Programming Interface (examples in Perl) The goal is to find a permutation of [length] chars starting with A for example if [length]==6 a possible permutation is CEBFAD to adjust difficulty hints can be given containing the first char, in this example it can be ECF for example. 1. Create a FCC-wallet -------------------------------- You can do this by running 'perl wallet' 2. Find a node. -------------------------------- A miner should connect to a node. To find a nodelist, access http://factorialcoin.nl:5151 through a WebSocket connection and send a command in JSON: { command => 'nodelist' } You will get a JSON response containing { command => 'nodelist', nodelist => [ ip, ip, .. ] } Choose an IP at random. 3. Connect to a node. -------------------------------- Connect to the node-IP through websockets. You will receive a JSON-command { command => 'hello', fcctime => [UTC-time], version => [FCC-version] } Send a JSON command to reply: { command => 'identify', type => 'miner', version => [FCC-version] } 4. You will receive a challenge. -------------------------------- The following JSON command will be send: { command => 'challenge', challenge => target_hash, coincount => coinbase_sequence_number, diff => difficulty (number of calculations), length => length of permutation, hints => string of hints for the first char, reward => FCC to gain, time => fcc_time } 5. Send the answer ---------------------------------- The target hash is SHA256(SHA512('FCC' . hex_8chars(coinbase_sequence_number) . permutation)) when you find the answer (the target_hash is the same as hashing your permutation) you send the following message to collect your money in JSON: { command => 'solution', solution => permutation, wallet => your_wallet } When correct and you are the first you will receive the rewarded FCC!