UNPKG

@digitalasset/daml-ledger

Version:
131 lines (116 loc) 7.56 kB
// GENERATED CODE -- DO NOT EDIT! // Original file comments: // Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. // SPDX-License-Identifier: Apache-2.0 // 'use strict'; var com_daml_ledger_api_v1_command_service_pb = require('../../../../../com/daml/ledger/api/v1/command_service_pb.js'); var com_daml_ledger_api_v1_commands_pb = require('../../../../../com/daml/ledger/api/v1/commands_pb.js'); var com_daml_ledger_api_v1_trace_context_pb = require('../../../../../com/daml/ledger/api/v1/trace_context_pb.js'); var com_daml_ledger_api_v1_transaction_pb = require('../../../../../com/daml/ledger/api/v1/transaction_pb.js'); var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); function serialize_com_daml_ledger_api_v1_SubmitAndWaitForTransactionIdResponse(arg) { if (!(arg instanceof com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitForTransactionIdResponse)) { throw new Error('Expected argument of type com.daml.ledger.api.v1.SubmitAndWaitForTransactionIdResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_com_daml_ledger_api_v1_SubmitAndWaitForTransactionIdResponse(buffer_arg) { return com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitForTransactionIdResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_com_daml_ledger_api_v1_SubmitAndWaitForTransactionResponse(arg) { if (!(arg instanceof com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitForTransactionResponse)) { throw new Error('Expected argument of type com.daml.ledger.api.v1.SubmitAndWaitForTransactionResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_com_daml_ledger_api_v1_SubmitAndWaitForTransactionResponse(buffer_arg) { return com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitForTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_com_daml_ledger_api_v1_SubmitAndWaitForTransactionTreeResponse(arg) { if (!(arg instanceof com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitForTransactionTreeResponse)) { throw new Error('Expected argument of type com.daml.ledger.api.v1.SubmitAndWaitForTransactionTreeResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_com_daml_ledger_api_v1_SubmitAndWaitForTransactionTreeResponse(buffer_arg) { return com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitForTransactionTreeResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_com_daml_ledger_api_v1_SubmitAndWaitRequest(arg) { if (!(arg instanceof com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitRequest)) { throw new Error('Expected argument of type com.daml.ledger.api.v1.SubmitAndWaitRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_com_daml_ledger_api_v1_SubmitAndWaitRequest(buffer_arg) { return com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_google_protobuf_Empty(arg) { if (!(arg instanceof google_protobuf_empty_pb.Empty)) { throw new Error('Expected argument of type google.protobuf.Empty'); } return Buffer.from(arg.serializeBinary()); } function deserialize_google_protobuf_Empty(buffer_arg) { return google_protobuf_empty_pb.Empty.deserializeBinary(new Uint8Array(buffer_arg)); } // Command Service is able to correlate submitted commands with completion data, identify timeouts, and return contextual // information with each tracking result. This supports the implementation of stateless clients. var CommandServiceService = exports['com.daml.ledger.api.v1.CommandService'] = { // Submits a single composite command and waits for its result. // Returns ``RESOURCE_EXHAUSTED`` if the number of in-flight commands reached the maximum (if a limit is configured). // Propagates the gRPC error of failed submissions including DAML interpretation errors. submitAndWait: { path: '/com.daml.ledger.api.v1.CommandService/SubmitAndWait', requestStream: false, responseStream: false, requestType: com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitRequest, responseType: google_protobuf_empty_pb.Empty, requestSerialize: serialize_com_daml_ledger_api_v1_SubmitAndWaitRequest, requestDeserialize: deserialize_com_daml_ledger_api_v1_SubmitAndWaitRequest, responseSerialize: serialize_google_protobuf_Empty, responseDeserialize: deserialize_google_protobuf_Empty, }, // Submits a single composite command, waits for its result, and returns the transaction id. // Returns ``RESOURCE_EXHAUSTED`` if the number of in-flight commands reached the maximum (if a limit is configured). // Propagates the gRPC error of failed submissions including DAML interpretation errors. submitAndWaitForTransactionId: { path: '/com.daml.ledger.api.v1.CommandService/SubmitAndWaitForTransactionId', requestStream: false, responseStream: false, requestType: com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitRequest, responseType: com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitForTransactionIdResponse, requestSerialize: serialize_com_daml_ledger_api_v1_SubmitAndWaitRequest, requestDeserialize: deserialize_com_daml_ledger_api_v1_SubmitAndWaitRequest, responseSerialize: serialize_com_daml_ledger_api_v1_SubmitAndWaitForTransactionIdResponse, responseDeserialize: deserialize_com_daml_ledger_api_v1_SubmitAndWaitForTransactionIdResponse, }, // Submits a single composite command, waits for its result, and returns the transaction. // Returns ``RESOURCE_EXHAUSTED`` if the number of in-flight commands reached the maximum (if a limit is configured). // Propagates the gRPC error of failed submissions including DAML interpretation errors. submitAndWaitForTransaction: { path: '/com.daml.ledger.api.v1.CommandService/SubmitAndWaitForTransaction', requestStream: false, responseStream: false, requestType: com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitRequest, responseType: com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitForTransactionResponse, requestSerialize: serialize_com_daml_ledger_api_v1_SubmitAndWaitRequest, requestDeserialize: deserialize_com_daml_ledger_api_v1_SubmitAndWaitRequest, responseSerialize: serialize_com_daml_ledger_api_v1_SubmitAndWaitForTransactionResponse, responseDeserialize: deserialize_com_daml_ledger_api_v1_SubmitAndWaitForTransactionResponse, }, // Submits a single composite command, waits for its result, and returns the transaction tree. // Returns ``RESOURCE_EXHAUSTED`` if the number of in-flight commands reached the maximum (if a limit is configured). // Propagates the gRPC error of failed submissions including DAML interpretation errors. submitAndWaitForTransactionTree: { path: '/com.daml.ledger.api.v1.CommandService/SubmitAndWaitForTransactionTree', requestStream: false, responseStream: false, requestType: com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitRequest, responseType: com_daml_ledger_api_v1_command_service_pb.SubmitAndWaitForTransactionTreeResponse, requestSerialize: serialize_com_daml_ledger_api_v1_SubmitAndWaitRequest, requestDeserialize: deserialize_com_daml_ledger_api_v1_SubmitAndWaitRequest, responseSerialize: serialize_com_daml_ledger_api_v1_SubmitAndWaitForTransactionTreeResponse, responseDeserialize: deserialize_com_daml_ledger_api_v1_SubmitAndWaitForTransactionTreeResponse, }, };