copy define.hpp BCW_API stuff from libwallet