UNPKG

@swtc/serializer

Version:
24 lines 756 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const Utils_1 = require("../Utils"); const SerializedType_1 = __importDefault(require("./SerializedType")); const STHash256 = new SerializedType_1.default({ id: 5, serialize(so, val) { if (Utils_1.isHexHASH256String(val)) { Utils_1.serializeHex(so, val, true); } else { throw new Error("Invalid Hash256"); } }, parse() { // return UInt256.from_bytes(so.read(32)); return NaN; } }); exports.default = STHash256; //# sourceMappingURL=STHash256.js.map