key formats code now ported over to libwallet.