@hiero-ledger/sdk
Version:
3 lines (2 loc) • 391 B
JavaScript
function t(t){return Buffer.from(t).toString("hex")}function r(t){const r=t.startsWith("0x")?t.substring(2):t;return Buffer.from(r,"hex")}function n(t){if("string"!=typeof t)return!1;const r=t.startsWith("0x")?t.substring(2):t;if(0===r.length)return!1;if(r.length%2!=0)return!1;return/^[0-9a-fA-F]+$/.test(r)}export{r as decode,t as encode,n as isHexString};
//# sourceMappingURL=hex.js.map