inizierei da qua:
https://bitcoin.org/en/developer-documentation

un esempio minimale qua:
https://github.com/lithander/Minimal-Bitcoin-Miner