eserialize
This goal of this module is to provide easy functions to serialize and deserialize data for the Ethereum Stack.
Usage
npm install @etclabscore/eserialize --save
Examples
Serialize
import { stringToHex, dateToHex, numberToHex } from "@etclabscore/eserialize";
stringToHex("foo");
dateToHex(new Date("2019-09-28T22:47:08.000Z"));
numberToHex(0);
Deserialize
import { hexToString, hexToDate, hexToNumber } from "@etclabscore/eserialize";
hexToString("0x666F6F");
hexToDate("0x5d8fe2ec").toISOString();
hexToNumber("0x0");
hexToNumber("0x1");
hexToNumber("0x878328");
Contributing
How to contribute, build and release are outlined in CONTRIBUTING.md, BUILDING.md and RELEASING.md respectively. Commits in this repository follow the CONVENTIONAL_COMMITS.md specification.