UNPKG

@digitalasset/daml-ledger

Version:
23 lines 1.11 kB
"use strict"; // Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", { value: true }); exports.CheckpointCodec = void 0; const LedgerOffsetCodec_1 = require("./LedgerOffsetCodec"); const TimestampCodec_1 = require("./TimestampCodec"); const command_completion_service_pb_1 = require("../generated/com/daml/ledger/api/v1/command_completion_service_pb"); exports.CheckpointCodec = { deserialize(message) { return { offset: LedgerOffsetCodec_1.LedgerOffsetCodec.deserialize(message.getOffset()), recordTime: TimestampCodec_1.TimestampCodec.deserialize(message.getRecordTime()) }; }, serialize(object) { const message = new command_completion_service_pb_1.Checkpoint(); message.setOffset(LedgerOffsetCodec_1.LedgerOffsetCodec.serialize(object.offset)); message.setRecordTime(TimestampCodec_1.TimestampCodec.serialize(object.recordTime)); return message; } }; //# sourceMappingURL=CheckpointCodec.js.map