xiot-core-spec-ts
Version:
XIOT Specification Codec
17 lines (16 loc) • 557 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeviceRootInactiveCodec = void 0;
const DeviceRootInactive_1 = require("../../../typedef/notice/device/impl/DeviceRootInactive");
class DeviceRootInactiveCodec {
static encode(x) {
return {
did: x.did,
timestamp: x.timestamp
};
}
static decode(o) {
return new DeviceRootInactive_1.DeviceRootInactive(o.timestamp || new Date().getTime(), o.did);
}
}
exports.DeviceRootInactiveCodec = DeviceRootInactiveCodec;