Since the internal implementation is hex, and the JSON representation is hex (not Uint8Array), which is also what DashTx needs, perhaps we should expose the method for getting Hex directly rather than deconverting back to Hex from Bytes.
let pkhBytes = await DashKeys.addrToPkh(output.address);
output.pubKeyHash = DashKeys.utils.bytesToHex(pkhBytes);
See also:
Since the internal implementation is hex, and the JSON representation is hex (not Uint8Array), which is also what DashTx needs, perhaps we should expose the method for getting Hex directly rather than deconverting back to Hex from Bytes.
See also:
addrToPubKeyHashshould be namedaddrToPkhDashTx.js#33