iustosed
Version:
Web3 JS Quorum - JSON-RPC API
14 lines (10 loc) • 299 B
JavaScript
const hexToBase64 = (str) => {
return Buffer.from(str, "hex").toString("base64");
};
const base64toHex = (str) => {
return Buffer.from(str, "base64").toString("hex");
};
const intToHex = (int) => {
return `0x${int.toString(16)}`;
};
module.exports = { hexToBase64, base64toHex, intToHex };