block based api

implements https://github.com/michaelochs/BCScanner/issues/6