adapt to new API

Changes made to confirm to new API. Most changes made are signed with
{ck}

Added support for CopperLark and PrimeCoin.

CopperLark untested.