Boilerplate extracted from hivewallet/hive-js