@digitalasset/daml-ledger
Version:
DAML Ledger API Node.js bindings
21 lines • 742 B
JavaScript
;
// 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.DurationCodec = void 0;
const duration_pb_1 = require("google-protobuf/google/protobuf/duration_pb");
exports.DurationCodec = {
deserialize(message) {
return {
seconds: message.getSeconds(),
nanoseconds: message.getNanos()
};
},
serialize(object) {
const message = new duration_pb_1.Duration();
message.setSeconds(object.seconds);
message.setNanos(object.nanoseconds);
return message;
}
};
//# sourceMappingURL=DurationCodec.js.map