homebrewed bitcoin code