@digitalasset/daml-ledger
Version:
DAML Ledger API Node.js bindings
20 lines • 1.2 kB
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.NodeJsLedgerConfigurationClient = void 0;
const ledger_configuration_service_pb_1 = require("../generated/com/daml/ledger/api/v1/ledger_configuration_service_pb");
const ClientReadableObjectStream_1 = require("../call/ClientReadableObjectStream");
const GetLedgerConfigurationResponseCodec_1 = require("../codec/GetLedgerConfigurationResponseCodec");
class NodeJsLedgerConfigurationClient {
constructor(ledgerId, client) {
this.request = new ledger_configuration_service_pb_1.GetLedgerConfigurationRequest();
this.request.setLedgerId(ledgerId);
this.client = client;
}
getLedgerConfiguration() {
return ClientReadableObjectStream_1.ClientReadableObjectStream.from(this.client.getLedgerConfiguration(this.request), GetLedgerConfigurationResponseCodec_1.GetLedgerConfigurationResponseCodec);
}
}
exports.NodeJsLedgerConfigurationClient = NodeJsLedgerConfigurationClient;
//# sourceMappingURL=NodeJsLedgerConfigurationClient.js.map