Bitcoin implementation in scala