From 6cc549af901293a3362d8d78ab07120aaf7d4e64 Mon Sep 17 00:00:00 2001 From: Monsieur Le Berre Date: Mon, 11 May 2026 14:53:26 +0100 Subject: [PATCH 1/2] experiment: google.api.http annotations on CommandService + go_package options Demonstrates Option 4 from the C# SDK proposal appendix: annotate Canton's .proto files with google.api.http so the JSON HTTP surface can be derived from the protos directly, bypassing tapir's translation layer. Scope (one service end-to-end): - community/ledger-api-proto/.../v2/command_service.proto: imports google/api/annotations.proto and adds an option (google.api.http) block to each of the three RPCs (SubmitAndWait, SubmitAndWaitForTransaction, SubmitAndWaitForReassignment), matching the existing tapir routes. - All v2 .proto files (22) plus value.proto: add option go_package next to the existing csharp_namespace/java_package options. Required by every off-the-shelf OpenAPI generator in the ecosystem. Harmless to existing C#/Java/Scala codegen, which does not read this option. Verified with `buf build`: clean compile. Verified end-to-end OpenAPI generation with buf.build/grpc-ecosystem/openapiv2:v2.28.0: the output fixes all four type-system defects catalogued in the C# SDK proposal (numbered duplicate schemas, single-key oneOf wrappers, inline duplicated enums, untyped DAML payload fields). See peacefulstudio/documentation/dev-funding/openApi/upstream-fork-experiment.md for the full write-up. --- .../com/daml/ledger/api/v2/value.proto | 1 + .../api/v2/command_completion_service.proto | 1 + .../daml/ledger/api/v2/command_service.proto | 23 ++++++++++++++++--- .../api/v2/command_submission_service.proto | 1 + .../com/daml/ledger/api/v2/commands.proto | 1 + .../com/daml/ledger/api/v2/completion.proto | 1 + .../daml/ledger/api/v2/contract_service.proto | 1 + .../com/daml/ledger/api/v2/crypto.proto | 1 + .../com/daml/ledger/api/v2/event.proto | 1 + .../ledger/api/v2/event_query_service.proto | 1 + .../ledger/api/v2/experimental_features.proto | 1 + .../ledger/api/v2/offset_checkpoint.proto | 1 + .../ledger/api/v2/package_reference.proto | 1 + .../daml/ledger/api/v2/package_service.proto | 1 + .../com/daml/ledger/api/v2/reassignment.proto | 1 + .../ledger/api/v2/reassignment_commands.proto | 1 + .../daml/ledger/api/v2/state_service.proto | 1 + .../ledger/api/v2/topology_transaction.proto | 1 + .../daml/ledger/api/v2/trace_context.proto | 1 + .../com/daml/ledger/api/v2/transaction.proto | 1 + .../ledger/api/v2/transaction_filter.proto | 1 + .../daml/ledger/api/v2/update_service.proto | 1 + .../daml/ledger/api/v2/version_service.proto | 1 + 23 files changed, 42 insertions(+), 3 deletions(-) diff --git a/community/daml-lf/ledger-api-value-proto/src/main/protobuf/com/daml/ledger/api/v2/value.proto b/community/daml-lf/ledger-api-value-proto/src/main/protobuf/com/daml/ledger/api/v2/value.proto index c3bf1254e6f..14d28a28e61 100644 --- a/community/daml-lf/ledger-api-value-proto/src/main/protobuf/com/daml/ledger/api/v2/value.proto +++ b/community/daml-lf/ledger-api-value-proto/src/main/protobuf/com/daml/ledger/api/v2/value.proto @@ -10,6 +10,7 @@ package com.daml.ledger.api.v2; import "google/protobuf/empty.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "ValueOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/command_completion_service.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/command_completion_service.proto index 77ad2e52a17..3c1e4b3001c 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/command_completion_service.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/command_completion_service.proto @@ -8,6 +8,7 @@ package com.daml.ledger.api.v2; import "com/daml/ledger/api/v2/completion.proto"; import "com/daml/ledger/api/v2/offset_checkpoint.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "CommandCompletionServiceOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/command_service.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/command_service.proto index 1f5cac5bf2d..0f2fdca90cc 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/command_service.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/command_service.proto @@ -10,7 +10,9 @@ import "com/daml/ledger/api/v2/reassignment.proto"; import "com/daml/ledger/api/v2/reassignment_commands.proto"; import "com/daml/ledger/api/v2/transaction.proto"; import "com/daml/ledger/api/v2/transaction_filter.proto"; +import "google/api/annotations.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "CommandServiceOuterClass"; option java_package = "com.daml.ledger.api.v2"; @@ -23,15 +25,30 @@ option java_package = "com.daml.ledger.api.v2"; service CommandService { // Submits a single composite command and waits for its result. // Propagates the gRPC error of failed submissions including Daml interpretation errors. - rpc SubmitAndWait(SubmitAndWaitRequest) returns (SubmitAndWaitResponse); + rpc SubmitAndWait(SubmitAndWaitRequest) returns (SubmitAndWaitResponse) { + option (google.api.http) = { + post: "/v2/commands/submit-and-wait" + body: "commands" + }; + } // Submits a single composite command, waits for its result, and returns the transaction. // Propagates the gRPC error of failed submissions including Daml interpretation errors. - rpc SubmitAndWaitForTransaction(SubmitAndWaitForTransactionRequest) returns (SubmitAndWaitForTransactionResponse); + rpc SubmitAndWaitForTransaction(SubmitAndWaitForTransactionRequest) returns (SubmitAndWaitForTransactionResponse) { + option (google.api.http) = { + post: "/v2/commands/submit-and-wait-for-transaction" + body: "*" + }; + } // Submits a single composite reassignment command, waits for its result, and returns the reassignment. // Propagates the gRPC error of failed submission. - rpc SubmitAndWaitForReassignment(SubmitAndWaitForReassignmentRequest) returns (SubmitAndWaitForReassignmentResponse); + rpc SubmitAndWaitForReassignment(SubmitAndWaitForReassignmentRequest) returns (SubmitAndWaitForReassignmentResponse) { + option (google.api.http) = { + post: "/v2/commands/submit-and-wait-for-reassignment" + body: "*" + }; + } } // These commands are executed as a single atomic transaction. diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/command_submission_service.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/command_submission_service.proto index 16e2e335fbf..5d9b71bab57 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/command_submission_service.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/command_submission_service.proto @@ -8,6 +8,7 @@ package com.daml.ledger.api.v2; import "com/daml/ledger/api/v2/commands.proto"; import "com/daml/ledger/api/v2/reassignment_commands.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "CommandSubmissionServiceOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/commands.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/commands.proto index c8449eae60a..01b93711241 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/commands.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/commands.proto @@ -9,6 +9,7 @@ import "com/daml/ledger/api/v2/value.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "CommandsOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/completion.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/completion.proto index b9de1e9df30..c9be80e9bad 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/completion.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/completion.proto @@ -10,6 +10,7 @@ import "com/daml/ledger/api/v2/trace_context.proto"; import "google/protobuf/duration.proto"; import "google/rpc/status.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "CompletionOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/contract_service.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/contract_service.proto index 13608c625ec..80eb67ae520 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/contract_service.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/contract_service.proto @@ -7,6 +7,7 @@ package com.daml.ledger.api.v2; import "com/daml/ledger/api/v2/event.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "ContractServiceOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/crypto.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/crypto.proto index c75bfbc8b9d..0ec81b7ebb0 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/crypto.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/crypto.proto @@ -5,6 +5,7 @@ syntax = "proto3"; package com.daml.ledger.api.v2; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "CryptoOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/event.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/event.proto index 87b7672de32..89a1ea6eec7 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/event.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/event.proto @@ -9,6 +9,7 @@ import "com/daml/ledger/api/v2/value.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "EventOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/event_query_service.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/event_query_service.proto index 1d45036bdc0..8fb3ca24bac 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/event_query_service.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/event_query_service.proto @@ -8,6 +8,7 @@ package com.daml.ledger.api.v2; import "com/daml/ledger/api/v2/event.proto"; import "com/daml/ledger/api/v2/transaction_filter.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "EventQueryServiceOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/experimental_features.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/experimental_features.proto index fa9d3803d34..39d145e2707 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/experimental_features.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/experimental_features.proto @@ -5,6 +5,7 @@ syntax = "proto3"; package com.daml.ledger.api.v2; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "ExperimentalFeaturesOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/offset_checkpoint.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/offset_checkpoint.proto index 6bf4a760366..4b5d1cf469d 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/offset_checkpoint.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/offset_checkpoint.proto @@ -7,6 +7,7 @@ package com.daml.ledger.api.v2; import "google/protobuf/timestamp.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "OffsetCheckpointOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/package_reference.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/package_reference.proto index 8576c820f04..0ab516e85bc 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/package_reference.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/package_reference.proto @@ -8,6 +8,7 @@ package com.daml.ledger.api.v2; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "PackageReferenceOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/package_service.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/package_service.proto index f015a8a90d3..c929924db75 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/package_service.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/package_service.proto @@ -7,6 +7,7 @@ package com.daml.ledger.api.v2; import "com/daml/ledger/api/v2/package_reference.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "PackageServiceOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/reassignment.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/reassignment.proto index 6ab821809e0..38c0eb75874 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/reassignment.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/reassignment.proto @@ -10,6 +10,7 @@ import "com/daml/ledger/api/v2/trace_context.proto"; import "com/daml/ledger/api/v2/value.proto"; import "google/protobuf/timestamp.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "ReassignmentOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/reassignment_commands.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/reassignment_commands.proto index eb01f7ae7af..a8fb7e16428 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/reassignment_commands.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/reassignment_commands.proto @@ -5,6 +5,7 @@ syntax = "proto3"; package com.daml.ledger.api.v2; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "ReassignmentCommandOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/state_service.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/state_service.proto index 842e1cedd7b..52952c6c909 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/state_service.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/state_service.proto @@ -9,6 +9,7 @@ import "com/daml/ledger/api/v2/event.proto"; import "com/daml/ledger/api/v2/reassignment.proto"; import "com/daml/ledger/api/v2/transaction_filter.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "StateServiceOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/topology_transaction.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/topology_transaction.proto index 71bb3b873b8..9049e08854a 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/topology_transaction.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/topology_transaction.proto @@ -9,6 +9,7 @@ import "com/daml/ledger/api/v2/state_service.proto"; import "com/daml/ledger/api/v2/trace_context.proto"; import "google/protobuf/timestamp.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "TopologyTransactionOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/trace_context.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/trace_context.proto index a1b6a8466ac..c1b03d1e47d 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/trace_context.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/trace_context.proto @@ -5,6 +5,7 @@ syntax = "proto3"; package com.daml.ledger.api.v2; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "TraceContextOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/transaction.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/transaction.proto index 9b3c62de8ff..68b0183a012 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/transaction.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/transaction.proto @@ -9,6 +9,7 @@ import "com/daml/ledger/api/v2/event.proto"; import "com/daml/ledger/api/v2/trace_context.proto"; import "google/protobuf/timestamp.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "TransactionOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/transaction_filter.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/transaction_filter.proto index cb794a826bb..db0e8752d05 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/transaction_filter.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/transaction_filter.proto @@ -7,6 +7,7 @@ package com.daml.ledger.api.v2; import "com/daml/ledger/api/v2/value.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "TransactionFilterOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/update_service.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/update_service.proto index 0be81b54f43..9303dc90c26 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/update_service.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/update_service.proto @@ -11,6 +11,7 @@ import "com/daml/ledger/api/v2/topology_transaction.proto"; import "com/daml/ledger/api/v2/transaction.proto"; import "com/daml/ledger/api/v2/transaction_filter.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "UpdateServiceOuterClass"; option java_package = "com.daml.ledger.api.v2"; diff --git a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/version_service.proto b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/version_service.proto index 3d736272066..6fa09556f92 100644 --- a/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/version_service.proto +++ b/community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/version_service.proto @@ -8,6 +8,7 @@ package com.daml.ledger.api.v2; import "com/daml/ledger/api/v2/experimental_features.proto"; import "google/protobuf/duration.proto"; +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; option csharp_namespace = "Com.Daml.Ledger.Api.V2"; option java_outer_classname = "VersionServiceOuterClass"; option java_package = "com.daml.ledger.api.v2"; From 6137a00098f3a1ceaf97c3362453de513b84caa9 Mon Sep 17 00:00:00 2001 From: Monsieur Le Berre Date: Mon, 11 May 2026 16:18:53 +0100 Subject: [PATCH 2/2] experiment-evidence: burden-of-evidence for the experiment PR Adds review-aid artefacts proving: - go_package additions are inert for existing Canton consumers - source diff: one added line per file, sibling to existing csharp_namespace / java_package / java_outer_classname options - compiled FileDescriptorSet diff (source_code_info stripped): one added line `go_package: "..."` inside `options {}`, nothing else changes - canton-build-targets.txt: every PB.targets in BuildCommon.scala routes to scalapb.gen or PB.gens.java; no Go plugin invoked anywhere in the build, so go_package cannot be read - the annotated proto produces a clean OpenAPI - buf.gen.yaml + 1,372-line command_service.swagger.json - the "after" side of the SwaggerHub comparison linked from the PR description Internal to the Peaceful Studio fork. To be deleted before any upstream PR to digital-asset/canton. --- experiment-evidence/README.md | 16 + .../go-package-harmlessness/README.md | 89 ++ .../canton-build-targets.txt | 25 + ..._service.after.descriptor.nosourceinfo.txt | 138 ++ .../version_service.after.descriptor.txt | 913 +++++++++++ ...service.before.descriptor.nosourceinfo.txt | 137 ++ .../version_service.before.descriptor.txt | 899 +++++++++++ .../version_service.descriptor.semantic.diff | 10 + .../version_service.proto.after | 121 ++ .../version_service.proto.before | 120 ++ .../version_service.proto.diff | 10 + .../openapi-generation/README.md | 46 + .../openapi-generation/buf.gen.yaml | 8 + .../command_service.swagger.json | 1372 +++++++++++++++++ 14 files changed, 3904 insertions(+) create mode 100644 experiment-evidence/README.md create mode 100644 experiment-evidence/go-package-harmlessness/README.md create mode 100644 experiment-evidence/go-package-harmlessness/canton-build-targets.txt create mode 100644 experiment-evidence/go-package-harmlessness/version_service.after.descriptor.nosourceinfo.txt create mode 100644 experiment-evidence/go-package-harmlessness/version_service.after.descriptor.txt create mode 100644 experiment-evidence/go-package-harmlessness/version_service.before.descriptor.nosourceinfo.txt create mode 100644 experiment-evidence/go-package-harmlessness/version_service.before.descriptor.txt create mode 100644 experiment-evidence/go-package-harmlessness/version_service.descriptor.semantic.diff create mode 100644 experiment-evidence/go-package-harmlessness/version_service.proto.after create mode 100644 experiment-evidence/go-package-harmlessness/version_service.proto.before create mode 100644 experiment-evidence/go-package-harmlessness/version_service.proto.diff create mode 100644 experiment-evidence/openapi-generation/README.md create mode 100644 experiment-evidence/openapi-generation/buf.gen.yaml create mode 100644 experiment-evidence/openapi-generation/command_service.swagger.json diff --git a/experiment-evidence/README.md b/experiment-evidence/README.md new file mode 100644 index 00000000000..e4d61890909 --- /dev/null +++ b/experiment-evidence/README.md @@ -0,0 +1,16 @@ +# Experiment evidence + +Burden-of-evidence artefacts for the PR `experiment: google.api.http annotations on CommandService`. + +**This directory is internal to the Peaceful Studio fork.** Delete it before submitting any upstream PR to `digital-asset/canton` — these files are review aids, not part of the contribution. + +## Contents + +| Subdirectory | Purpose | +|---|---| +| [`go-package-harmlessness/`](go-package-harmlessness/) | Empirical proof that adding `option go_package = "..."` to the v2 protos does not affect any existing C# / Java / Scala codegen consumer. | +| [`openapi-generation/`](openapi-generation/) | The actual OpenAPI document generated from the annotated `command_service.proto`, plus the `buf.gen.yaml` used to produce it. The 1,372-line JSON is the "after" side of the SwaggerHub comparison linked from the PR description. | + +## How to verify everything from scratch + +The PR description (top of #1) has the full reproducible flow: install buf, drop the three google.api / google.rpc protos into `community/lib/google-common-protos-scala/target/protobuf_external/`, run `buf build` and `buf generate`. Every artefact in this directory is regeneratable from that flow. diff --git a/experiment-evidence/go-package-harmlessness/README.md b/experiment-evidence/go-package-harmlessness/README.md new file mode 100644 index 00000000000..d23c0926dec --- /dev/null +++ b/experiment-evidence/go-package-harmlessness/README.md @@ -0,0 +1,89 @@ +# Proof that `option go_package` is harmless for existing Canton consumers + +## Why we needed `go_package` in the first place + +Every off-the-shelf OpenAPI generator in the protobuf ecosystem is written in Go: `protoc-gen-openapiv2` (grpc-ecosystem/grpc-gateway), `protoc-gen-openapi` (google/gnostic), the buf-published variants of both. They walk the `FileDescriptorSet` for the target service and, for every `.proto` in the transitive closure, look up its declared Go import path so the generator can emit per-file artefacts. + +When the option is missing the plugin fails fast: + +``` +unable to determine Go import path for "com/daml/ledger/api/v2/value.proto" + +Please specify either: + • a "go_package" option in the .proto source file, or + • a "M" argument on the command line. +``` + +This is enforced even when no Go code is being emitted — it is a hard precondition for *running* the plugin. Canton's protos currently declare `csharp_namespace`, `java_package`, `java_outer_classname` but not `go_package`, because Canton has no Go target. So every Go-based OpenAPI tool refuses to run against the proto set until that gap is filled. + +The fix is a one-line `option go_package = "..."` per proto file, sitting alongside the existing language-target options. Three things to prove: + +1. The added option is the **only** semantic change to the compiled `FileDescriptorSet`. +2. Canton's actual codegen pipeline **never reads** `go_package`, so the option cannot affect generated Scala / Java / C# output. +3. The option is **inert by design** in protobuf — each language has its own `FileOptions` field; consumers read only their own. + +The artefacts below establish each claim with byte-level evidence. + +## Artefacts + +| File | What it proves | +|---|---| +| `version_service.proto.before` | Verbatim copy of the proto **as it exists upstream** in `digital-asset/canton@v3.5.1-rc3`. | +| `version_service.proto.after` | Verbatim copy of the proto **after our change**. | +| `version_service.proto.diff` | Unified diff of the two source files. One added line: `+option go_package = "...";`. | +| `version_service.before.descriptor.txt` | Full textproto-decoded `FileDescriptorProto` produced by `buf build` on the upstream proto. | +| `version_service.after.descriptor.txt` | Same, on the patched proto. | +| `version_service.before.descriptor.nosourceinfo.txt` | Same as above with `source_code_info` stripped. `source_code_info` only carries source-line spans for IDE tooling; it inevitably shifts when any line is added or removed and is not semantically meaningful. | +| `version_service.after.descriptor.nosourceinfo.txt` | Same. | +| `version_service.descriptor.semantic.diff` | Unified diff of the two `.nosourceinfo` descriptors. **One added line: `+ go_package: "..."` inside the `options { }` block, alongside `java_package`, `java_outer_classname`, `csharp_namespace`. Nothing else changes — no message field, no service method, no enum, no import.** | +| `canton-build-targets.txt` | `grep` of `project/BuildCommon.scala` for every `PB.targets` declaration. Every entry routes to `scalapb.gen` or `PB.gens.java`. No `gen_go`, no `protoc-gen-go`, no Go plugin anywhere. Canton's build pipeline literally cannot read the `go_package` option, because no Go plugin is invoked. | + +## Why this is sound — the protobuf-language guarantee + +`google/protobuf/descriptor.proto` defines `FileOptions` as a flat message with one field per language target: + +```proto +message FileOptions { + optional string java_package = 1; + optional string java_outer_classname = 8; + ... + optional string go_package = 11; + ... + optional string csharp_namespace = 37; + optional string swift_prefix = 39; + optional string php_class_prefix = 40; + ... +} +``` + +Each consuming plugin reads only the field assigned to its language. `protoc-gen-java` reads `java_package` and ignores the rest. `protoc-gen-go` reads `go_package` and ignores the rest. ScalaPB reads its own dedicated `scalapb.options` extension and ignores all of the language-target fields. Adding a sibling field to `options {}` has no effect on a plugin that does not read that field — this is the whole point of how proto FileOptions are structured. + +The semantic diff above demonstrates this empirically: the **only** change to the compiled descriptor is one new sibling field inside `options {}`. Every other byte of the descriptor — message definitions, service methods, RPC signatures, imports, dependencies — is identical. + +## Reproduce + +```bash +# from canton repo root, on this branch: +git checkout HEAD~1 -- community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/version_service.proto +( cd community/ledger-api-proto/src/main/protobuf && \ + buf build --path com/daml/ledger/api/v2/version_service.proto -o /tmp/version_service.before.binpb ) +git checkout HEAD -- community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/version_service.proto +( cd community/ledger-api-proto/src/main/protobuf && \ + buf build --path com/daml/ledger/api/v2/version_service.proto -o /tmp/version_service.after.binpb ) + +python3 - <<'EOF' +from google.protobuf import descriptor_pb2 +for state in ('before', 'after'): + fds = descriptor_pb2.FileDescriptorSet() + with open(f'/tmp/version_service.{state}.binpb', 'rb') as f: + fds.ParseFromString(f.read()) + for fproto in fds.file: + if fproto.name.endswith('version_service.proto'): + fproto.ClearField('source_code_info') + open(f'/tmp/version_service.{state}.txt', 'w').write(str(fproto)) +EOF + +diff -u /tmp/version_service.before.txt /tmp/version_service.after.txt +``` + +The diff is the same one-line addition shown in `version_service.descriptor.semantic.diff`. diff --git a/experiment-evidence/go-package-harmlessness/canton-build-targets.txt b/experiment-evidence/go-package-harmlessness/canton-build-targets.txt new file mode 100644 index 00000000000..92adc9cfe54 --- /dev/null +++ b/experiment-evidence/go-package-harmlessness/canton-build-targets.txt @@ -0,0 +1,25 @@ +922: Test / PB.targets := Seq( +923: scalapb.gen() -> (Test / sourceManaged).value / "protobuf" +1005: Compile / PB.targets := Seq( +1006: scalapb.gen(flatPackage = true) -> (Compile / sourceManaged).value / "protobuf" +1119: Compile / PB.targets := Seq( +1120: scalapb.gen(flatPackage = true) -> (Compile / sourceManaged).value / "protobuf" +1122: Test / PB.targets := Seq( +1123: scalapb.gen(flatPackage = true) -> (Test / sourceManaged).value / "protobuf" +1160: Compile / PB.targets := Seq( +1161: scalapb.gen(flatPackage = true) -> (Compile / sourceManaged).value / "protobuf" +1205: Compile / PB.targets := Seq( +1206: scalapb.gen(flatPackage = true) -> (Compile / sourceManaged).value / "protobuf" +1262: Compile / PB.targets := Seq( +1263: scalapb.gen(flatPackage = true) -> (Compile / sourceManaged).value / "protobuf" +1589: Compile / PB.targets := Seq( +1590: scalapb.gen(flatPackage = true) -> (Compile / sourceManaged).value / "protobuf" +2002: Compile / PB.targets := Seq( +2003: scalapb.gen(flatPackage = false) -> (Compile / sourceManaged).value / "protobuf" +2042: Test / PB.targets := Seq( +2044: PB.gens.java -> (Test / sourceManaged).value / "protobuf", +2046: scalapb.gen( +2916: Compile / PB.targets := Seq( +2917: scalapb.gen(flatPackage = true) -> (Compile / sourceManaged).value / "protobuf" +3141: Compile / PB.targets := Seq( +3143: scalapb.gen( diff --git a/experiment-evidence/go-package-harmlessness/version_service.after.descriptor.nosourceinfo.txt b/experiment-evidence/go-package-harmlessness/version_service.after.descriptor.nosourceinfo.txt new file mode 100644 index 00000000000..a5acf178b09 --- /dev/null +++ b/experiment-evidence/go-package-harmlessness/version_service.after.descriptor.nosourceinfo.txt @@ -0,0 +1,138 @@ +name: "com/daml/ledger/api/v2/version_service.proto" +package: "com.daml.ledger.api.v2" +dependency: "com/daml/ledger/api/v2/experimental_features.proto" +dependency: "google/protobuf/duration.proto" +message_type { + name: "GetLedgerApiVersionRequest" +} +message_type { + name: "GetLedgerApiVersionResponse" + field { + name: "version" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "version" + } + field { + name: "features" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.FeaturesDescriptor" + json_name: "features" + } +} +message_type { + name: "FeaturesDescriptor" + field { + name: "experimental" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.ExperimentalFeatures" + json_name: "experimental" + } + field { + name: "user_management" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.UserManagementFeature" + json_name: "userManagement" + } + field { + name: "party_management" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.PartyManagementFeature" + json_name: "partyManagement" + } + field { + name: "offset_checkpoint" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.OffsetCheckpointFeature" + json_name: "offsetCheckpoint" + } + field { + name: "package_feature" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.PackageFeature" + json_name: "packageFeature" + } +} +message_type { + name: "UserManagementFeature" + field { + name: "supported" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "supported" + } + field { + name: "max_rights_per_user" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxRightsPerUser" + } + field { + name: "max_users_page_size" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxUsersPageSize" + } +} +message_type { + name: "PartyManagementFeature" + field { + name: "max_parties_page_size" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxPartiesPageSize" + } +} +message_type { + name: "PackageFeature" + field { + name: "max_vetted_packages_page_size" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxVettedPackagesPageSize" + } +} +message_type { + name: "OffsetCheckpointFeature" + field { + name: "max_offset_checkpoint_emission_delay" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + json_name: "maxOffsetCheckpointEmissionDelay" + } +} +service { + name: "VersionService" + method { + name: "GetLedgerApiVersion" + input_type: ".com.daml.ledger.api.v2.GetLedgerApiVersionRequest" + output_type: ".com.daml.ledger.api.v2.GetLedgerApiVersionResponse" + } +} +options { + java_package: "com.daml.ledger.api.v2" + java_outer_classname: "VersionServiceOuterClass" + go_package: "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2" + csharp_namespace: "Com.Daml.Ledger.Api.V2" +} +syntax: "proto3" diff --git a/experiment-evidence/go-package-harmlessness/version_service.after.descriptor.txt b/experiment-evidence/go-package-harmlessness/version_service.after.descriptor.txt new file mode 100644 index 00000000000..7c493474e4f --- /dev/null +++ b/experiment-evidence/go-package-harmlessness/version_service.after.descriptor.txt @@ -0,0 +1,913 @@ +name: "com/daml/ledger/api/v2/version_service.proto" +package: "com.daml.ledger.api.v2" +dependency: "com/daml/ledger/api/v2/experimental_features.proto" +dependency: "google/protobuf/duration.proto" +message_type { + name: "GetLedgerApiVersionRequest" +} +message_type { + name: "GetLedgerApiVersionResponse" + field { + name: "version" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "version" + } + field { + name: "features" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.FeaturesDescriptor" + json_name: "features" + } +} +message_type { + name: "FeaturesDescriptor" + field { + name: "experimental" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.ExperimentalFeatures" + json_name: "experimental" + } + field { + name: "user_management" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.UserManagementFeature" + json_name: "userManagement" + } + field { + name: "party_management" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.PartyManagementFeature" + json_name: "partyManagement" + } + field { + name: "offset_checkpoint" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.OffsetCheckpointFeature" + json_name: "offsetCheckpoint" + } + field { + name: "package_feature" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.PackageFeature" + json_name: "packageFeature" + } +} +message_type { + name: "UserManagementFeature" + field { + name: "supported" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "supported" + } + field { + name: "max_rights_per_user" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxRightsPerUser" + } + field { + name: "max_users_page_size" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxUsersPageSize" + } +} +message_type { + name: "PartyManagementFeature" + field { + name: "max_parties_page_size" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxPartiesPageSize" + } +} +message_type { + name: "PackageFeature" + field { + name: "max_vetted_packages_page_size" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxVettedPackagesPageSize" + } +} +message_type { + name: "OffsetCheckpointFeature" + field { + name: "max_offset_checkpoint_emission_delay" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + json_name: "maxOffsetCheckpointEmissionDelay" + } +} +service { + name: "VersionService" + method { + name: "GetLedgerApiVersion" + input_type: ".com.daml.ledger.api.v2.GetLedgerApiVersionRequest" + output_type: ".com.daml.ledger.api.v2.GetLedgerApiVersionResponse" + } +} +options { + java_package: "com.daml.ledger.api.v2" + java_outer_classname: "VersionServiceOuterClass" + go_package: "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2" + csharp_namespace: "Com.Daml.Ledger.Api.V2" +} +source_code_info { + location { + span: 3 + span: 0 + span: 120 + span: 1 + } + location { + path: 12 + span: 3 + span: 0 + span: 18 + leading_detached_comments: " Copyright (c) 2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n SPDX-License-Identifier: Apache-2.0\n" + } + location { + path: 2 + span: 5 + span: 0 + span: 31 + } + location { + path: 3 + path: 0 + span: 7 + span: 0 + span: 60 + } + location { + path: 3 + path: 1 + span: 8 + span: 0 + span: 40 + } + location { + path: 8 + span: 10 + span: 0 + span: 83 + } + location { + path: 8 + path: 11 + span: 10 + span: 0 + span: 83 + } + location { + path: 8 + span: 11 + span: 0 + span: 51 + } + location { + path: 8 + path: 37 + span: 11 + span: 0 + span: 51 + } + location { + path: 8 + span: 12 + span: 0 + span: 57 + } + location { + path: 8 + path: 8 + span: 12 + span: 0 + span: 57 + } + location { + path: 8 + span: 13 + span: 0 + span: 47 + } + location { + path: 8 + path: 1 + span: 13 + span: 0 + span: 47 + } + location { + path: 6 + path: 0 + span: 16 + span: 0 + span: 19 + span: 1 + leading_comments: " Allows clients to retrieve information about the ledger API version\n" + } + location { + path: 6 + path: 0 + path: 1 + span: 16 + span: 8 + span: 22 + } + location { + path: 6 + path: 0 + path: 2 + path: 0 + span: 18 + span: 2 + span: 92 + leading_comments: " Read the Ledger API version\n" + } + location { + path: 6 + path: 0 + path: 2 + path: 0 + path: 1 + span: 18 + span: 6 + span: 25 + } + location { + path: 6 + path: 0 + path: 2 + path: 0 + path: 2 + span: 18 + span: 26 + span: 52 + } + location { + path: 6 + path: 0 + path: 2 + path: 0 + path: 3 + span: 18 + span: 63 + span: 90 + } + location { + path: 4 + path: 0 + span: 21 + span: 0 + span: 37 + } + location { + path: 4 + path: 0 + path: 1 + span: 21 + span: 8 + span: 34 + } + location { + path: 4 + path: 1 + span: 23 + span: 0 + span: 41 + span: 1 + } + location { + path: 4 + path: 1 + path: 1 + span: 23 + span: 8 + span: 35 + } + location { + path: 4 + path: 1 + path: 2 + path: 0 + path: 5 + span: 27 + span: 2 + span: 8 + } + location { + path: 4 + path: 1 + path: 2 + path: 0 + span: 27 + span: 2 + span: 21 + leading_comments: " The version of the ledger API.\n\n Required\n" + } + location { + path: 4 + path: 1 + path: 2 + path: 0 + path: 1 + span: 27 + span: 9 + span: 16 + } + location { + path: 4 + path: 1 + path: 2 + path: 0 + path: 3 + span: 27 + span: 19 + span: 20 + } + location { + path: 4 + path: 1 + path: 2 + path: 1 + path: 6 + span: 40 + span: 2 + span: 20 + } + location { + path: 4 + path: 1 + path: 2 + path: 1 + span: 40 + span: 2 + span: 34 + leading_comments: " The features supported by this Ledger API endpoint.\n\n Daml applications CAN use the feature descriptor on top of\n version constraints on the Ledger API version to determine\n whether a given Ledger API endpoint supports the features\n required to run the application.\n\n See the feature descriptions themselves for the relation between\n Ledger API versions and feature presence.\n\n Required\n" + } + location { + path: 4 + path: 1 + path: 2 + path: 1 + path: 1 + span: 40 + span: 21 + span: 29 + } + location { + path: 4 + path: 1 + path: 2 + path: 1 + path: 3 + span: 40 + span: 32 + span: 33 + } + location { + path: 4 + path: 2 + span: 43 + span: 0 + span: 77 + span: 1 + } + location { + path: 4 + path: 2 + path: 1 + span: 43 + span: 8 + span: 26 + } + location { + path: 4 + path: 2 + path: 2 + path: 0 + path: 6 + span: 50 + span: 2 + span: 22 + } + location { + path: 4 + path: 2 + path: 2 + path: 0 + span: 50 + span: 2 + span: 40 + leading_comments: " Features under development or features that are used\n for ledger implementation testing purposes only.\n\n Daml applications SHOULD not depend on these in production.\n\n Required\n" + } + location { + path: 4 + path: 2 + path: 2 + path: 0 + path: 1 + span: 50 + span: 23 + span: 35 + } + location { + path: 4 + path: 2 + path: 2 + path: 0 + path: 3 + span: 50 + span: 38 + span: 39 + } + location { + path: 4 + path: 2 + path: 2 + path: 1 + path: 6 + span: 57 + span: 2 + span: 23 + } + location { + path: 4 + path: 2 + path: 2 + path: 1 + span: 57 + span: 2 + span: 44 + leading_comments: " If set, then the Ledger API server supports user management.\n It is recommended that clients query this field to gracefully adjust their behavior for\n ledgers that do not support user management.\n\n Required\n" + } + location { + path: 4 + path: 2 + path: 2 + path: 1 + path: 1 + span: 57 + span: 24 + span: 39 + } + location { + path: 4 + path: 2 + path: 2 + path: 1 + path: 3 + span: 57 + span: 42 + span: 43 + } + location { + path: 4 + path: 2 + path: 2 + path: 2 + path: 6 + span: 64 + span: 2 + span: 24 + } + location { + path: 4 + path: 2 + path: 2 + path: 2 + span: 64 + span: 2 + span: 46 + leading_comments: " If set, then the Ledger API server supports party management configurability.\n It is recommended that clients query this field to gracefully adjust their behavior to\n maximum party page size.\n\n Required\n" + } + location { + path: 4 + path: 2 + path: 2 + path: 2 + path: 1 + span: 64 + span: 25 + span: 41 + } + location { + path: 4 + path: 2 + path: 2 + path: 2 + path: 3 + span: 64 + span: 44 + span: 45 + } + location { + path: 4 + path: 2 + path: 2 + path: 3 + path: 6 + span: 69 + span: 2 + span: 25 + } + location { + path: 4 + path: 2 + path: 2 + path: 3 + span: 69 + span: 2 + span: 48 + leading_comments: " It contains the timeouts related to the periodic offset checkpoint emission\n\n Required\n" + } + location { + path: 4 + path: 2 + path: 2 + path: 3 + path: 1 + span: 69 + span: 26 + span: 43 + } + location { + path: 4 + path: 2 + path: 2 + path: 3 + path: 3 + span: 69 + span: 46 + span: 47 + } + location { + path: 4 + path: 2 + path: 2 + path: 4 + path: 6 + span: 76 + span: 2 + span: 16 + } + location { + path: 4 + path: 2 + path: 2 + path: 4 + span: 76 + span: 2 + span: 37 + leading_comments: " If set, then the Ledger API server supports package listing\n configurability. It is recommended that clients query this field to\n gracefully adjust their behavior to maximum package listing page size.\n\n Required\n" + } + location { + path: 4 + path: 2 + path: 2 + path: 4 + path: 1 + span: 76 + span: 17 + span: 32 + } + location { + path: 4 + path: 2 + path: 2 + path: 4 + path: 3 + span: 76 + span: 35 + span: 36 + } + location { + path: 4 + path: 3 + span: 79 + span: 0 + span: 98 + span: 1 + } + location { + path: 4 + path: 3 + path: 1 + span: 79 + span: 8 + span: 29 + } + location { + path: 4 + path: 3 + path: 2 + path: 0 + path: 5 + span: 83 + span: 2 + span: 6 + } + location { + path: 4 + path: 3 + path: 2 + path: 0 + span: 83 + span: 2 + span: 21 + leading_comments: " Whether the Ledger API server provides the user management service.\n\n Required\n" + } + location { + path: 4 + path: 3 + path: 2 + path: 0 + path: 1 + span: 83 + span: 7 + span: 16 + } + location { + path: 4 + path: 3 + path: 2 + path: 0 + path: 3 + span: 83 + span: 19 + span: 20 + } + location { + path: 4 + path: 3 + path: 2 + path: 1 + path: 5 + span: 90 + span: 2 + span: 7 + } + location { + path: 4 + path: 3 + path: 2 + path: 1 + span: 90 + span: 2 + span: 32 + leading_comments: " The maximum number of rights that can be assigned to a single user.\n Servers MUST support at least 100 rights per user.\n A value of 0 means that the server enforces no rights per user limit.\n\n Required\n" + } + location { + path: 4 + path: 3 + path: 2 + path: 1 + path: 1 + span: 90 + span: 8 + span: 27 + } + location { + path: 4 + path: 3 + path: 2 + path: 1 + path: 3 + span: 90 + span: 30 + span: 31 + } + location { + path: 4 + path: 3 + path: 2 + path: 2 + path: 5 + span: 97 + span: 2 + span: 7 + } + location { + path: 4 + path: 3 + path: 2 + path: 2 + span: 97 + span: 2 + span: 32 + leading_comments: " The maximum number of users the server can return in a single response (page).\n Servers MUST support at least a 100 users per page.\n A value of 0 means that the server enforces no page size limit.\n\n Required\n" + } + location { + path: 4 + path: 3 + path: 2 + path: 2 + path: 1 + span: 97 + span: 8 + span: 27 + } + location { + path: 4 + path: 3 + path: 2 + path: 2 + path: 3 + span: 97 + span: 30 + span: 31 + } + location { + path: 4 + path: 4 + span: 100 + span: 0 + span: 105 + span: 1 + } + location { + path: 4 + path: 4 + path: 1 + span: 100 + span: 8 + span: 30 + } + location { + path: 4 + path: 4 + path: 2 + path: 0 + path: 5 + span: 104 + span: 2 + span: 7 + } + location { + path: 4 + path: 4 + path: 2 + path: 0 + span: 104 + span: 2 + span: 34 + leading_comments: " The maximum number of parties the server can return in a single response (page).\n\n Required\n" + } + location { + path: 4 + path: 4 + path: 2 + path: 0 + path: 1 + span: 104 + span: 8 + span: 29 + } + location { + path: 4 + path: 4 + path: 2 + path: 0 + path: 3 + span: 104 + span: 32 + span: 33 + } + location { + path: 4 + path: 5 + span: 107 + span: 0 + span: 113 + span: 1 + } + location { + path: 4 + path: 5 + path: 1 + span: 107 + span: 8 + span: 22 + } + location { + path: 4 + path: 5 + path: 2 + path: 0 + path: 5 + span: 112 + span: 2 + span: 7 + } + location { + path: 4 + path: 5 + path: 2 + path: 0 + span: 112 + span: 2 + span: 42 + leading_comments: " The maximum number of vetted packages the server can return in a single\n response (page) when listing them.\n\n Required\n" + } + location { + path: 4 + path: 5 + path: 2 + path: 0 + path: 1 + span: 112 + span: 8 + span: 37 + } + location { + path: 4 + path: 5 + path: 2 + path: 0 + path: 3 + span: 112 + span: 40 + span: 41 + } + location { + path: 4 + path: 6 + span: 115 + span: 0 + span: 120 + span: 1 + } + location { + path: 4 + path: 6 + path: 1 + span: 115 + span: 8 + span: 31 + } + location { + path: 4 + path: 6 + path: 2 + path: 0 + path: 6 + span: 119 + span: 2 + span: 26 + } + location { + path: 4 + path: 6 + path: 2 + path: 0 + span: 119 + span: 2 + span: 68 + leading_comments: " The maximum delay to emmit a new OffsetCheckpoint if it exists\n\n Required\n" + } + location { + path: 4 + path: 6 + path: 2 + path: 0 + path: 1 + span: 119 + span: 27 + span: 63 + } + location { + path: 4 + path: 6 + path: 2 + path: 0 + path: 3 + span: 119 + span: 66 + span: 67 + } +} +syntax: "proto3" diff --git a/experiment-evidence/go-package-harmlessness/version_service.before.descriptor.nosourceinfo.txt b/experiment-evidence/go-package-harmlessness/version_service.before.descriptor.nosourceinfo.txt new file mode 100644 index 00000000000..43f05971d08 --- /dev/null +++ b/experiment-evidence/go-package-harmlessness/version_service.before.descriptor.nosourceinfo.txt @@ -0,0 +1,137 @@ +name: "com/daml/ledger/api/v2/version_service.proto" +package: "com.daml.ledger.api.v2" +dependency: "com/daml/ledger/api/v2/experimental_features.proto" +dependency: "google/protobuf/duration.proto" +message_type { + name: "GetLedgerApiVersionRequest" +} +message_type { + name: "GetLedgerApiVersionResponse" + field { + name: "version" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "version" + } + field { + name: "features" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.FeaturesDescriptor" + json_name: "features" + } +} +message_type { + name: "FeaturesDescriptor" + field { + name: "experimental" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.ExperimentalFeatures" + json_name: "experimental" + } + field { + name: "user_management" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.UserManagementFeature" + json_name: "userManagement" + } + field { + name: "party_management" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.PartyManagementFeature" + json_name: "partyManagement" + } + field { + name: "offset_checkpoint" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.OffsetCheckpointFeature" + json_name: "offsetCheckpoint" + } + field { + name: "package_feature" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.PackageFeature" + json_name: "packageFeature" + } +} +message_type { + name: "UserManagementFeature" + field { + name: "supported" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "supported" + } + field { + name: "max_rights_per_user" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxRightsPerUser" + } + field { + name: "max_users_page_size" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxUsersPageSize" + } +} +message_type { + name: "PartyManagementFeature" + field { + name: "max_parties_page_size" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxPartiesPageSize" + } +} +message_type { + name: "PackageFeature" + field { + name: "max_vetted_packages_page_size" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxVettedPackagesPageSize" + } +} +message_type { + name: "OffsetCheckpointFeature" + field { + name: "max_offset_checkpoint_emission_delay" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + json_name: "maxOffsetCheckpointEmissionDelay" + } +} +service { + name: "VersionService" + method { + name: "GetLedgerApiVersion" + input_type: ".com.daml.ledger.api.v2.GetLedgerApiVersionRequest" + output_type: ".com.daml.ledger.api.v2.GetLedgerApiVersionResponse" + } +} +options { + java_package: "com.daml.ledger.api.v2" + java_outer_classname: "VersionServiceOuterClass" + csharp_namespace: "Com.Daml.Ledger.Api.V2" +} +syntax: "proto3" diff --git a/experiment-evidence/go-package-harmlessness/version_service.before.descriptor.txt b/experiment-evidence/go-package-harmlessness/version_service.before.descriptor.txt new file mode 100644 index 00000000000..5962f85f3ef --- /dev/null +++ b/experiment-evidence/go-package-harmlessness/version_service.before.descriptor.txt @@ -0,0 +1,899 @@ +name: "com/daml/ledger/api/v2/version_service.proto" +package: "com.daml.ledger.api.v2" +dependency: "com/daml/ledger/api/v2/experimental_features.proto" +dependency: "google/protobuf/duration.proto" +message_type { + name: "GetLedgerApiVersionRequest" +} +message_type { + name: "GetLedgerApiVersionResponse" + field { + name: "version" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "version" + } + field { + name: "features" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.FeaturesDescriptor" + json_name: "features" + } +} +message_type { + name: "FeaturesDescriptor" + field { + name: "experimental" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.ExperimentalFeatures" + json_name: "experimental" + } + field { + name: "user_management" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.UserManagementFeature" + json_name: "userManagement" + } + field { + name: "party_management" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.PartyManagementFeature" + json_name: "partyManagement" + } + field { + name: "offset_checkpoint" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.OffsetCheckpointFeature" + json_name: "offsetCheckpoint" + } + field { + name: "package_feature" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".com.daml.ledger.api.v2.PackageFeature" + json_name: "packageFeature" + } +} +message_type { + name: "UserManagementFeature" + field { + name: "supported" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "supported" + } + field { + name: "max_rights_per_user" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxRightsPerUser" + } + field { + name: "max_users_page_size" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxUsersPageSize" + } +} +message_type { + name: "PartyManagementFeature" + field { + name: "max_parties_page_size" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxPartiesPageSize" + } +} +message_type { + name: "PackageFeature" + field { + name: "max_vetted_packages_page_size" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "maxVettedPackagesPageSize" + } +} +message_type { + name: "OffsetCheckpointFeature" + field { + name: "max_offset_checkpoint_emission_delay" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + json_name: "maxOffsetCheckpointEmissionDelay" + } +} +service { + name: "VersionService" + method { + name: "GetLedgerApiVersion" + input_type: ".com.daml.ledger.api.v2.GetLedgerApiVersionRequest" + output_type: ".com.daml.ledger.api.v2.GetLedgerApiVersionResponse" + } +} +options { + java_package: "com.daml.ledger.api.v2" + java_outer_classname: "VersionServiceOuterClass" + csharp_namespace: "Com.Daml.Ledger.Api.V2" +} +source_code_info { + location { + span: 3 + span: 0 + span: 119 + span: 1 + } + location { + path: 12 + span: 3 + span: 0 + span: 18 + leading_detached_comments: " Copyright (c) 2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n SPDX-License-Identifier: Apache-2.0\n" + } + location { + path: 2 + span: 5 + span: 0 + span: 31 + } + location { + path: 3 + path: 0 + span: 7 + span: 0 + span: 60 + } + location { + path: 3 + path: 1 + span: 8 + span: 0 + span: 40 + } + location { + path: 8 + span: 10 + span: 0 + span: 51 + } + location { + path: 8 + path: 37 + span: 10 + span: 0 + span: 51 + } + location { + path: 8 + span: 11 + span: 0 + span: 57 + } + location { + path: 8 + path: 8 + span: 11 + span: 0 + span: 57 + } + location { + path: 8 + span: 12 + span: 0 + span: 47 + } + location { + path: 8 + path: 1 + span: 12 + span: 0 + span: 47 + } + location { + path: 6 + path: 0 + span: 15 + span: 0 + span: 18 + span: 1 + leading_comments: " Allows clients to retrieve information about the ledger API version\n" + } + location { + path: 6 + path: 0 + path: 1 + span: 15 + span: 8 + span: 22 + } + location { + path: 6 + path: 0 + path: 2 + path: 0 + span: 17 + span: 2 + span: 92 + leading_comments: " Read the Ledger API version\n" + } + location { + path: 6 + path: 0 + path: 2 + path: 0 + path: 1 + span: 17 + span: 6 + span: 25 + } + location { + path: 6 + path: 0 + path: 2 + path: 0 + path: 2 + span: 17 + span: 26 + span: 52 + } + location { + path: 6 + path: 0 + path: 2 + path: 0 + path: 3 + span: 17 + span: 63 + span: 90 + } + location { + path: 4 + path: 0 + span: 20 + span: 0 + span: 37 + } + location { + path: 4 + path: 0 + path: 1 + span: 20 + span: 8 + span: 34 + } + location { + path: 4 + path: 1 + span: 22 + span: 0 + span: 40 + span: 1 + } + location { + path: 4 + path: 1 + path: 1 + span: 22 + span: 8 + span: 35 + } + location { + path: 4 + path: 1 + path: 2 + path: 0 + path: 5 + span: 26 + span: 2 + span: 8 + } + location { + path: 4 + path: 1 + path: 2 + path: 0 + span: 26 + span: 2 + span: 21 + leading_comments: " The version of the ledger API.\n\n Required\n" + } + location { + path: 4 + path: 1 + path: 2 + path: 0 + path: 1 + span: 26 + span: 9 + span: 16 + } + location { + path: 4 + path: 1 + path: 2 + path: 0 + path: 3 + span: 26 + span: 19 + span: 20 + } + location { + path: 4 + path: 1 + path: 2 + path: 1 + path: 6 + span: 39 + span: 2 + span: 20 + } + location { + path: 4 + path: 1 + path: 2 + path: 1 + span: 39 + span: 2 + span: 34 + leading_comments: " The features supported by this Ledger API endpoint.\n\n Daml applications CAN use the feature descriptor on top of\n version constraints on the Ledger API version to determine\n whether a given Ledger API endpoint supports the features\n required to run the application.\n\n See the feature descriptions themselves for the relation between\n Ledger API versions and feature presence.\n\n Required\n" + } + location { + path: 4 + path: 1 + path: 2 + path: 1 + path: 1 + span: 39 + span: 21 + span: 29 + } + location { + path: 4 + path: 1 + path: 2 + path: 1 + path: 3 + span: 39 + span: 32 + span: 33 + } + location { + path: 4 + path: 2 + span: 42 + span: 0 + span: 76 + span: 1 + } + location { + path: 4 + path: 2 + path: 1 + span: 42 + span: 8 + span: 26 + } + location { + path: 4 + path: 2 + path: 2 + path: 0 + path: 6 + span: 49 + span: 2 + span: 22 + } + location { + path: 4 + path: 2 + path: 2 + path: 0 + span: 49 + span: 2 + span: 40 + leading_comments: " Features under development or features that are used\n for ledger implementation testing purposes only.\n\n Daml applications SHOULD not depend on these in production.\n\n Required\n" + } + location { + path: 4 + path: 2 + path: 2 + path: 0 + path: 1 + span: 49 + span: 23 + span: 35 + } + location { + path: 4 + path: 2 + path: 2 + path: 0 + path: 3 + span: 49 + span: 38 + span: 39 + } + location { + path: 4 + path: 2 + path: 2 + path: 1 + path: 6 + span: 56 + span: 2 + span: 23 + } + location { + path: 4 + path: 2 + path: 2 + path: 1 + span: 56 + span: 2 + span: 44 + leading_comments: " If set, then the Ledger API server supports user management.\n It is recommended that clients query this field to gracefully adjust their behavior for\n ledgers that do not support user management.\n\n Required\n" + } + location { + path: 4 + path: 2 + path: 2 + path: 1 + path: 1 + span: 56 + span: 24 + span: 39 + } + location { + path: 4 + path: 2 + path: 2 + path: 1 + path: 3 + span: 56 + span: 42 + span: 43 + } + location { + path: 4 + path: 2 + path: 2 + path: 2 + path: 6 + span: 63 + span: 2 + span: 24 + } + location { + path: 4 + path: 2 + path: 2 + path: 2 + span: 63 + span: 2 + span: 46 + leading_comments: " If set, then the Ledger API server supports party management configurability.\n It is recommended that clients query this field to gracefully adjust their behavior to\n maximum party page size.\n\n Required\n" + } + location { + path: 4 + path: 2 + path: 2 + path: 2 + path: 1 + span: 63 + span: 25 + span: 41 + } + location { + path: 4 + path: 2 + path: 2 + path: 2 + path: 3 + span: 63 + span: 44 + span: 45 + } + location { + path: 4 + path: 2 + path: 2 + path: 3 + path: 6 + span: 68 + span: 2 + span: 25 + } + location { + path: 4 + path: 2 + path: 2 + path: 3 + span: 68 + span: 2 + span: 48 + leading_comments: " It contains the timeouts related to the periodic offset checkpoint emission\n\n Required\n" + } + location { + path: 4 + path: 2 + path: 2 + path: 3 + path: 1 + span: 68 + span: 26 + span: 43 + } + location { + path: 4 + path: 2 + path: 2 + path: 3 + path: 3 + span: 68 + span: 46 + span: 47 + } + location { + path: 4 + path: 2 + path: 2 + path: 4 + path: 6 + span: 75 + span: 2 + span: 16 + } + location { + path: 4 + path: 2 + path: 2 + path: 4 + span: 75 + span: 2 + span: 37 + leading_comments: " If set, then the Ledger API server supports package listing\n configurability. It is recommended that clients query this field to\n gracefully adjust their behavior to maximum package listing page size.\n\n Required\n" + } + location { + path: 4 + path: 2 + path: 2 + path: 4 + path: 1 + span: 75 + span: 17 + span: 32 + } + location { + path: 4 + path: 2 + path: 2 + path: 4 + path: 3 + span: 75 + span: 35 + span: 36 + } + location { + path: 4 + path: 3 + span: 78 + span: 0 + span: 97 + span: 1 + } + location { + path: 4 + path: 3 + path: 1 + span: 78 + span: 8 + span: 29 + } + location { + path: 4 + path: 3 + path: 2 + path: 0 + path: 5 + span: 82 + span: 2 + span: 6 + } + location { + path: 4 + path: 3 + path: 2 + path: 0 + span: 82 + span: 2 + span: 21 + leading_comments: " Whether the Ledger API server provides the user management service.\n\n Required\n" + } + location { + path: 4 + path: 3 + path: 2 + path: 0 + path: 1 + span: 82 + span: 7 + span: 16 + } + location { + path: 4 + path: 3 + path: 2 + path: 0 + path: 3 + span: 82 + span: 19 + span: 20 + } + location { + path: 4 + path: 3 + path: 2 + path: 1 + path: 5 + span: 89 + span: 2 + span: 7 + } + location { + path: 4 + path: 3 + path: 2 + path: 1 + span: 89 + span: 2 + span: 32 + leading_comments: " The maximum number of rights that can be assigned to a single user.\n Servers MUST support at least 100 rights per user.\n A value of 0 means that the server enforces no rights per user limit.\n\n Required\n" + } + location { + path: 4 + path: 3 + path: 2 + path: 1 + path: 1 + span: 89 + span: 8 + span: 27 + } + location { + path: 4 + path: 3 + path: 2 + path: 1 + path: 3 + span: 89 + span: 30 + span: 31 + } + location { + path: 4 + path: 3 + path: 2 + path: 2 + path: 5 + span: 96 + span: 2 + span: 7 + } + location { + path: 4 + path: 3 + path: 2 + path: 2 + span: 96 + span: 2 + span: 32 + leading_comments: " The maximum number of users the server can return in a single response (page).\n Servers MUST support at least a 100 users per page.\n A value of 0 means that the server enforces no page size limit.\n\n Required\n" + } + location { + path: 4 + path: 3 + path: 2 + path: 2 + path: 1 + span: 96 + span: 8 + span: 27 + } + location { + path: 4 + path: 3 + path: 2 + path: 2 + path: 3 + span: 96 + span: 30 + span: 31 + } + location { + path: 4 + path: 4 + span: 99 + span: 0 + span: 104 + span: 1 + } + location { + path: 4 + path: 4 + path: 1 + span: 99 + span: 8 + span: 30 + } + location { + path: 4 + path: 4 + path: 2 + path: 0 + path: 5 + span: 103 + span: 2 + span: 7 + } + location { + path: 4 + path: 4 + path: 2 + path: 0 + span: 103 + span: 2 + span: 34 + leading_comments: " The maximum number of parties the server can return in a single response (page).\n\n Required\n" + } + location { + path: 4 + path: 4 + path: 2 + path: 0 + path: 1 + span: 103 + span: 8 + span: 29 + } + location { + path: 4 + path: 4 + path: 2 + path: 0 + path: 3 + span: 103 + span: 32 + span: 33 + } + location { + path: 4 + path: 5 + span: 106 + span: 0 + span: 112 + span: 1 + } + location { + path: 4 + path: 5 + path: 1 + span: 106 + span: 8 + span: 22 + } + location { + path: 4 + path: 5 + path: 2 + path: 0 + path: 5 + span: 111 + span: 2 + span: 7 + } + location { + path: 4 + path: 5 + path: 2 + path: 0 + span: 111 + span: 2 + span: 42 + leading_comments: " The maximum number of vetted packages the server can return in a single\n response (page) when listing them.\n\n Required\n" + } + location { + path: 4 + path: 5 + path: 2 + path: 0 + path: 1 + span: 111 + span: 8 + span: 37 + } + location { + path: 4 + path: 5 + path: 2 + path: 0 + path: 3 + span: 111 + span: 40 + span: 41 + } + location { + path: 4 + path: 6 + span: 114 + span: 0 + span: 119 + span: 1 + } + location { + path: 4 + path: 6 + path: 1 + span: 114 + span: 8 + span: 31 + } + location { + path: 4 + path: 6 + path: 2 + path: 0 + path: 6 + span: 118 + span: 2 + span: 26 + } + location { + path: 4 + path: 6 + path: 2 + path: 0 + span: 118 + span: 2 + span: 68 + leading_comments: " The maximum delay to emmit a new OffsetCheckpoint if it exists\n\n Required\n" + } + location { + path: 4 + path: 6 + path: 2 + path: 0 + path: 1 + span: 118 + span: 27 + span: 63 + } + location { + path: 4 + path: 6 + path: 2 + path: 0 + path: 3 + span: 118 + span: 66 + span: 67 + } +} +syntax: "proto3" diff --git a/experiment-evidence/go-package-harmlessness/version_service.descriptor.semantic.diff b/experiment-evidence/go-package-harmlessness/version_service.descriptor.semantic.diff new file mode 100644 index 00000000000..46b897eb25d --- /dev/null +++ b/experiment-evidence/go-package-harmlessness/version_service.descriptor.semantic.diff @@ -0,0 +1,10 @@ +--- /Users/matthieu/Code/peaceful/canton/experiment-evidence/go-package-harmlessness/version_service.before.descriptor.nosourceinfo.txt 2026-05-11 16:16:34 ++++ /Users/matthieu/Code/peaceful/canton/experiment-evidence/go-package-harmlessness/version_service.after.descriptor.nosourceinfo.txt 2026-05-11 16:16:34 +@@ -132,6 +132,7 @@ + options { + java_package: "com.daml.ledger.api.v2" + java_outer_classname: "VersionServiceOuterClass" ++ go_package: "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2" + csharp_namespace: "Com.Daml.Ledger.Api.V2" + } + syntax: "proto3" diff --git a/experiment-evidence/go-package-harmlessness/version_service.proto.after b/experiment-evidence/go-package-harmlessness/version_service.proto.after new file mode 100644 index 00000000000..6fa09556f92 --- /dev/null +++ b/experiment-evidence/go-package-harmlessness/version_service.proto.after @@ -0,0 +1,121 @@ +// Copyright (c) 2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +syntax = "proto3"; + +package com.daml.ledger.api.v2; + +import "com/daml/ledger/api/v2/experimental_features.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; +option csharp_namespace = "Com.Daml.Ledger.Api.V2"; +option java_outer_classname = "VersionServiceOuterClass"; +option java_package = "com.daml.ledger.api.v2"; + +// Allows clients to retrieve information about the ledger API version +service VersionService { + // Read the Ledger API version + rpc GetLedgerApiVersion(GetLedgerApiVersionRequest) returns (GetLedgerApiVersionResponse); +} + +message GetLedgerApiVersionRequest {} + +message GetLedgerApiVersionResponse { + // The version of the ledger API. + // + // Required + string version = 1; + + // The features supported by this Ledger API endpoint. + // + // Daml applications CAN use the feature descriptor on top of + // version constraints on the Ledger API version to determine + // whether a given Ledger API endpoint supports the features + // required to run the application. + // + // See the feature descriptions themselves for the relation between + // Ledger API versions and feature presence. + // + // Required + FeaturesDescriptor features = 2; +} + +message FeaturesDescriptor { + // Features under development or features that are used + // for ledger implementation testing purposes only. + // + // Daml applications SHOULD not depend on these in production. + // + // Required + ExperimentalFeatures experimental = 1; + + // If set, then the Ledger API server supports user management. + // It is recommended that clients query this field to gracefully adjust their behavior for + // ledgers that do not support user management. + // + // Required + UserManagementFeature user_management = 2; + + // If set, then the Ledger API server supports party management configurability. + // It is recommended that clients query this field to gracefully adjust their behavior to + // maximum party page size. + // + // Required + PartyManagementFeature party_management = 3; + + // It contains the timeouts related to the periodic offset checkpoint emission + // + // Required + OffsetCheckpointFeature offset_checkpoint = 4; + + // If set, then the Ledger API server supports package listing + // configurability. It is recommended that clients query this field to + // gracefully adjust their behavior to maximum package listing page size. + // + // Required + PackageFeature package_feature = 5; +} + +message UserManagementFeature { + // Whether the Ledger API server provides the user management service. + // + // Required + bool supported = 1; + + // The maximum number of rights that can be assigned to a single user. + // Servers MUST support at least 100 rights per user. + // A value of 0 means that the server enforces no rights per user limit. + // + // Required + int32 max_rights_per_user = 2; + + // The maximum number of users the server can return in a single response (page). + // Servers MUST support at least a 100 users per page. + // A value of 0 means that the server enforces no page size limit. + // + // Required + int32 max_users_page_size = 3; +} + +message PartyManagementFeature { + // The maximum number of parties the server can return in a single response (page). + // + // Required + int32 max_parties_page_size = 1; +} + +message PackageFeature { + // The maximum number of vetted packages the server can return in a single + // response (page) when listing them. + // + // Required + int32 max_vetted_packages_page_size = 1; +} + +message OffsetCheckpointFeature { + // The maximum delay to emmit a new OffsetCheckpoint if it exists + // + // Required + google.protobuf.Duration max_offset_checkpoint_emission_delay = 1; +} diff --git a/experiment-evidence/go-package-harmlessness/version_service.proto.before b/experiment-evidence/go-package-harmlessness/version_service.proto.before new file mode 100644 index 00000000000..3d736272066 --- /dev/null +++ b/experiment-evidence/go-package-harmlessness/version_service.proto.before @@ -0,0 +1,120 @@ +// Copyright (c) 2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +syntax = "proto3"; + +package com.daml.ledger.api.v2; + +import "com/daml/ledger/api/v2/experimental_features.proto"; +import "google/protobuf/duration.proto"; + +option csharp_namespace = "Com.Daml.Ledger.Api.V2"; +option java_outer_classname = "VersionServiceOuterClass"; +option java_package = "com.daml.ledger.api.v2"; + +// Allows clients to retrieve information about the ledger API version +service VersionService { + // Read the Ledger API version + rpc GetLedgerApiVersion(GetLedgerApiVersionRequest) returns (GetLedgerApiVersionResponse); +} + +message GetLedgerApiVersionRequest {} + +message GetLedgerApiVersionResponse { + // The version of the ledger API. + // + // Required + string version = 1; + + // The features supported by this Ledger API endpoint. + // + // Daml applications CAN use the feature descriptor on top of + // version constraints on the Ledger API version to determine + // whether a given Ledger API endpoint supports the features + // required to run the application. + // + // See the feature descriptions themselves for the relation between + // Ledger API versions and feature presence. + // + // Required + FeaturesDescriptor features = 2; +} + +message FeaturesDescriptor { + // Features under development or features that are used + // for ledger implementation testing purposes only. + // + // Daml applications SHOULD not depend on these in production. + // + // Required + ExperimentalFeatures experimental = 1; + + // If set, then the Ledger API server supports user management. + // It is recommended that clients query this field to gracefully adjust their behavior for + // ledgers that do not support user management. + // + // Required + UserManagementFeature user_management = 2; + + // If set, then the Ledger API server supports party management configurability. + // It is recommended that clients query this field to gracefully adjust their behavior to + // maximum party page size. + // + // Required + PartyManagementFeature party_management = 3; + + // It contains the timeouts related to the periodic offset checkpoint emission + // + // Required + OffsetCheckpointFeature offset_checkpoint = 4; + + // If set, then the Ledger API server supports package listing + // configurability. It is recommended that clients query this field to + // gracefully adjust their behavior to maximum package listing page size. + // + // Required + PackageFeature package_feature = 5; +} + +message UserManagementFeature { + // Whether the Ledger API server provides the user management service. + // + // Required + bool supported = 1; + + // The maximum number of rights that can be assigned to a single user. + // Servers MUST support at least 100 rights per user. + // A value of 0 means that the server enforces no rights per user limit. + // + // Required + int32 max_rights_per_user = 2; + + // The maximum number of users the server can return in a single response (page). + // Servers MUST support at least a 100 users per page. + // A value of 0 means that the server enforces no page size limit. + // + // Required + int32 max_users_page_size = 3; +} + +message PartyManagementFeature { + // The maximum number of parties the server can return in a single response (page). + // + // Required + int32 max_parties_page_size = 1; +} + +message PackageFeature { + // The maximum number of vetted packages the server can return in a single + // response (page) when listing them. + // + // Required + int32 max_vetted_packages_page_size = 1; +} + +message OffsetCheckpointFeature { + // The maximum delay to emmit a new OffsetCheckpoint if it exists + // + // Required + google.protobuf.Duration max_offset_checkpoint_emission_delay = 1; +} diff --git a/experiment-evidence/go-package-harmlessness/version_service.proto.diff b/experiment-evidence/go-package-harmlessness/version_service.proto.diff new file mode 100644 index 00000000000..b24476d6a77 --- /dev/null +++ b/experiment-evidence/go-package-harmlessness/version_service.proto.diff @@ -0,0 +1,10 @@ +--- experiment-evidence/go-package-harmlessness/version_service.proto.before 2026-05-11 16:16:51 ++++ experiment-evidence/go-package-harmlessness/version_service.proto.after 2026-05-11 16:16:51 +@@ -8,6 +8,7 @@ + import "com/daml/ledger/api/v2/experimental_features.proto"; + import "google/protobuf/duration.proto"; + ++option go_package = "github.com/digital-asset/canton/go/ledger/api/v2;ledgerapiv2"; + option csharp_namespace = "Com.Daml.Ledger.Api.V2"; + option java_outer_classname = "VersionServiceOuterClass"; + option java_package = "com.daml.ledger.api.v2"; diff --git a/experiment-evidence/openapi-generation/README.md b/experiment-evidence/openapi-generation/README.md new file mode 100644 index 00000000000..4786e635fef --- /dev/null +++ b/experiment-evidence/openapi-generation/README.md @@ -0,0 +1,46 @@ +# Generated OpenAPI artefacts + +## Contents + +| File | Source | +|---|---| +| `buf.gen.yaml` | The exact `buf generate` config used to produce the OpenAPI. | +| `command_service.swagger.json` | The 1,372-line OpenAPI 2.0 document generated from the annotated `command_service.proto` (plus its transitive proto closure). This is the "after" side of the SwaggerHub comparison linked at the top of PR #1. | + +## Reproduce + +```bash +# from canton repo root, on this branch: + +# 1. Make sure google common protos are unpacked where buf.work.yaml expects them +mkdir -p community/lib/google-common-protos-scala/target/protobuf_external/google/api \ + community/lib/google-common-protos-scala/target/protobuf_external/google/rpc +curl -sS -o community/lib/google-common-protos-scala/target/protobuf_external/google/api/annotations.proto \ + https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/annotations.proto +curl -sS -o community/lib/google-common-protos-scala/target/protobuf_external/google/api/http.proto \ + https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/http.proto +curl -sS -o community/lib/google-common-protos-scala/target/protobuf_external/google/rpc/status.proto \ + https://raw.githubusercontent.com/googleapis/googleapis/master/google/rpc/status.proto + +# 2. Run buf generate with the bundled config +cd experiment-evidence/openapi-generation +buf generate \ + --path ../../community/ledger-api-proto/src/main/protobuf/com/daml/ledger/api/v2/command_service.proto \ + ../../community/ledger-api-proto/src/main/protobuf + +# 3. Output appears at gen/openapi/com/daml/ledger/api/v2/command_service.swagger.json +diff gen/openapi/com/daml/ledger/api/v2/command_service.swagger.json command_service.swagger.json +# (empty — byte-identical) +``` + +## What's in the output + +Three operations, fully typed end-to-end: + +``` +POST /v2/commands/submit-and-wait +POST /v2/commands/submit-and-wait-for-transaction +POST /v2/commands/submit-and-wait-for-reassignment +``` + +Schema definitions are qualified by proto package (`com.daml.ledger.api.v2.Commands`, `com.daml.ledger.api.v2.Record`, …). No `Empty1`–`Empty10`, no single-key `oneOf` envelopes, no inline duplicated enums, no untyped DAML payload fields. See PR #1's defect-by-defect table for the side-by-side with the current tapir-emitted spec. diff --git a/experiment-evidence/openapi-generation/buf.gen.yaml b/experiment-evidence/openapi-generation/buf.gen.yaml new file mode 100644 index 00000000000..280be628146 --- /dev/null +++ b/experiment-evidence/openapi-generation/buf.gen.yaml @@ -0,0 +1,8 @@ +version: v2 +plugins: + - remote: buf.build/grpc-ecosystem/openapiv2:v2.28.0 + out: gen/openapi + opt: + - allow_delete_body=true + - json_names_for_fields=true + - openapi_naming_strategy=fqn diff --git a/experiment-evidence/openapi-generation/command_service.swagger.json b/experiment-evidence/openapi-generation/command_service.swagger.json new file mode 100644 index 00000000000..001ae3c37fc --- /dev/null +++ b/experiment-evidence/openapi-generation/command_service.swagger.json @@ -0,0 +1,1372 @@ +{ + "swagger": "2.0", + "info": { + "title": "com/daml/ledger/api/v2/command_service.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "CommandService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v2/commands/submit-and-wait": { + "post": { + "summary": "Submits a single composite command and waits for its result.\nPropagates the gRPC error of failed submissions including Daml interpretation errors.", + "operationId": "CommandService_SubmitAndWait", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/com.daml.ledger.api.v2.SubmitAndWaitResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ + { + "name": "commands", + "description": "The commands to be submitted.\n\nRequired", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Commands" + } + } + ], + "tags": [ + "CommandService" + ] + } + }, + "/v2/commands/submit-and-wait-for-reassignment": { + "post": { + "summary": "Submits a single composite reassignment command, waits for its result, and returns the reassignment.\nPropagates the gRPC error of failed submission.", + "operationId": "CommandService_SubmitAndWaitForReassignment", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/com.daml.ledger.api.v2.SubmitAndWaitForReassignmentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "This reassignment is executed as a single atomic update.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/com.daml.ledger.api.v2.SubmitAndWaitForReassignmentRequest" + } + } + ], + "tags": [ + "CommandService" + ] + } + }, + "/v2/commands/submit-and-wait-for-transaction": { + "post": { + "summary": "Submits a single composite command, waits for its result, and returns the transaction.\nPropagates the gRPC error of failed submissions including Daml interpretation errors.", + "operationId": "CommandService_SubmitAndWaitForTransaction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/com.daml.ledger.api.v2.SubmitAndWaitForTransactionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "These commands are executed as a single atomic transaction.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/com.daml.ledger.api.v2.SubmitAndWaitForTransactionRequest" + } + } + ], + "tags": [ + "CommandService" + ] + } + } + }, + "definitions": { + "com.daml.ledger.api.v2.ArchivedEvent": { + "type": "object", + "properties": { + "offset": { + "type": "string", + "format": "int64", + "description": "Required", + "title": "The offset of origin.\nOffsets are managed by the participant nodes.\nTransactions can thus NOT be assumed to have the same offsets on different participant nodes.\nIt is a valid absolute offset (positive integer)" + }, + "nodeId": { + "type": "integer", + "format": "int32", + "description": "Required", + "title": "The position of this event in the originating transaction or reassignment.\nNode IDs are not necessarily equal across participants,\nas these may see different projections/parts of transactions.\nMust be valid node ID (non-negative integer)" + }, + "contractId": { + "type": "string", + "description": "The ID of the archived contract.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nRequired" + }, + "templateId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "Identifies the template that defines the choice that archived the contract.\nThis template's package-id may differ from the target contract's package-id\nif the target contract has been upgraded or downgraded.\n\nThe identifier uses the package-id reference format.\n\nRequired" + }, + "witnessParties": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The parties that are notified of this event. For an ``ArchivedEvent``,\nthese are the intersection of the stakeholders of the contract in\nquestion and the parties specified in the ``TransactionFilter``. The\nstakeholders are the union of the signatories and the observers of\nthe contract.\nEach one of its elements must be a valid PartyIdString (as described\nin ``value.proto``).\n\nRequired: must be non-empty" + }, + "packageName": { + "type": "string", + "description": "The package name of the contract.\n\nRequired" + }, + "implementedInterfaces": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier" + }, + "description": "The interfaces implemented by the target template that have been\nmatched from the interface filter query.\nPopulated only in case interface filters with include_interface_view set.\n\nIf defined, the identifier uses the package-id reference format.\n\nOptional: can be empty" + } + }, + "description": "Records that a contract has been archived, and choices may no longer be exercised on it." + }, + "com.daml.ledger.api.v2.AssignCommand": { + "type": "object", + "properties": { + "reassignmentId": { + "type": "string", + "description": "The ID from the unassigned event to be completed by this assignment.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nRequired" + }, + "source": { + "type": "string", + "description": "Required", + "title": "The ID of the source synchronizer\nMust be a valid synchronizer id" + }, + "target": { + "type": "string", + "description": "Required", + "title": "The ID of the target synchronizer\nMust be a valid synchronizer id" + } + }, + "title": "Assign a contract" + }, + "com.daml.ledger.api.v2.AssignedEvent": { + "type": "object", + "properties": { + "source": { + "type": "string", + "description": "The ID of the source synchronizer.\nMust be a valid synchronizer id.\n\nRequired" + }, + "target": { + "type": "string", + "description": "The ID of the target synchronizer.\nMust be a valid synchronizer id.\n\nRequired" + }, + "reassignmentId": { + "type": "string", + "description": "The ID from the unassigned event.\nFor correlation capabilities.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nRequired" + }, + "submitter": { + "type": "string", + "description": "Party on whose behalf the assign command was executed.\nEmpty if the assignment happened offline via the repair service.\nMust be a valid PartyIdString (as described in ``value.proto``).\n\nOptional" + }, + "reassignmentCounter": { + "type": "string", + "format": "uint64", + "description": "Each corresponding assigned and unassigned event has the same reassignment_counter. This strictly increases\nwith each unassign command for the same contract. Creation of the contract corresponds to reassignment_counter\nequals zero.\n\nRequired" + }, + "createdEvent": { + "$ref": "#/definitions/com.daml.ledger.api.v2.CreatedEvent", + "description": "The offset of this event refers to the offset of the assignment,\nwhile the node_id is the index of within the batch.\n\nRequired" + } + }, + "description": "Records that a contract has been assigned, and it can be used on the target synchronizer." + }, + "com.daml.ledger.api.v2.Command": { + "type": "object", + "properties": { + "create": { + "$ref": "#/definitions/com.daml.ledger.api.v2.CreateCommand" + }, + "exercise": { + "$ref": "#/definitions/com.daml.ledger.api.v2.ExerciseCommand" + }, + "exerciseByKey": { + "$ref": "#/definitions/com.daml.ledger.api.v2.ExerciseByKeyCommand" + }, + "createAndExercise": { + "$ref": "#/definitions/com.daml.ledger.api.v2.CreateAndExerciseCommand" + } + }, + "description": "A command can either create a new contract or exercise a choice on an existing contract." + }, + "com.daml.ledger.api.v2.Commands": { + "type": "object", + "properties": { + "workflowId": { + "type": "string", + "description": "Identifier of the on-ledger workflow that this command is a part of.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nOptional" + }, + "userId": { + "type": "string", + "description": "Uniquely identifies the participant user that issued the command.\nMust be a valid UserIdString (as described in ``value.proto``).\nRequired unless authentication is used with a user token.\nIn that case, the token's user-id will be used for the request's user_id.\n\nOptional" + }, + "commandId": { + "type": "string", + "description": "Uniquely identifies the command.\nThe triple (user_id, act_as, command_id) constitutes the change ID for the intended ledger change,\nwhere act_as is interpreted as a set of party names.\nThe change ID can be used for matching the intended ledger changes with all their completions.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nRequired" + }, + "commands": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/com.daml.ledger.api.v2.Command" + }, + "description": "Individual elements of this atomic command. Must be non-empty.\n\nRequired: must be non-empty" + }, + "deduplicationDuration": { + "type": "string", + "description": "Specifies the length of the deduplication period.\nIt is interpreted relative to the local clock at some point during the submission's processing.\nMust be non-negative. Must not exceed the maximum deduplication time." + }, + "deduplicationOffset": { + "type": "string", + "format": "int64", + "description": "Specifies the start of the deduplication period by a completion stream offset (exclusive).\nMust be a valid absolute offset (positive integer) or participant begin (zero)." + }, + "minLedgerTimeAbs": { + "type": "string", + "format": "date-time", + "description": "Lower bound for the ledger time assigned to the resulting transaction.\nNote: The ledger time of a transaction is assigned as part of command interpretation.\nUse this property if you expect that command interpretation will take a considerate amount of time, such that by\nthe time the resulting transaction is sequenced, its assigned ledger time is not valid anymore.\nMust not be set at the same time as min_ledger_time_rel.\n\nOptional" + }, + "minLedgerTimeRel": { + "type": "string", + "description": "Same as min_ledger_time_abs, but specified as a duration, starting from the time the command is received by the server.\nMust not be set at the same time as min_ledger_time_abs.\n\nOptional" + }, + "actAs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Set of parties on whose behalf the command should be executed.\nIf ledger API authorization is enabled, then the authorization metadata must authorize the sender of the request\nto act on behalf of each of the given parties.\nEach element must be a valid PartyIdString (as described in ``value.proto``).\n\nRequired: must be non-empty" + }, + "readAs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Set of parties on whose behalf (in addition to all parties listed in ``act_as``) contracts can be retrieved.\nThis affects Daml operations such as ``fetch``, ``fetchByKey``, ``lookupByKey``, ``exercise``, and ``exerciseByKey``.\nNote: A participant node of a Daml network can host multiple parties. Each contract present on the participant\nnode is only visible to a subset of these parties. A command can only use contracts that are visible to at least\none of the parties in ``act_as`` or ``read_as``. This visibility check is independent from the Daml authorization\nrules for fetch operations.\nIf ledger API authorization is enabled, then the authorization metadata must authorize the sender of the request\nto read contract data on behalf of each of the given parties.\n\nOptional: can be empty" + }, + "submissionId": { + "type": "string", + "description": "A unique identifier to distinguish completions for different submissions with the same change ID.\nTypically a random UUID. Applications are expected to use a different UUID for each retry of a submission\nwith the same change ID.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nIf omitted, the participant or the committer may set a value of their choice.\n\nOptional" + }, + "disclosedContracts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/com.daml.ledger.api.v2.DisclosedContract" + }, + "description": "Additional contracts used to resolve contract \u0026 contract key lookups.\n\nOptional: can be empty" + }, + "synchronizerId": { + "type": "string", + "description": "Optional", + "title": "Must be a valid synchronizer id" + }, + "packageIdSelectionPreference": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional: can be empty", + "title": "The package-id selection preference of the client for resolving\npackage names and interface instances in command submission and interpretation" + }, + "prefetchContractKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/com.daml.ledger.api.v2.PrefetchContractKey" + }, + "description": "Fetches the contract keys into the caches to speed up the command processing.\nShould only contain contract keys that are expected to be resolved during interpretation of the commands.\nKeys of disclosed contracts do not need prefetching.\n\nOptional: can be empty" + }, + "tapsMaxPasses": { + "type": "integer", + "format": "int64", + "description": "The maximum number of passes for the Topology-Aware Package Selection (TAPS).\nHigher values can increase the chance of successful package selection for routing of interpreted transactions.\nIf unset, this defaults to the value defined in the participant configuration.\nThe provided value must not exceed the limit specified in the participant configuration.\n\nOptional" + } + }, + "description": "A composite command that groups multiple commands together." + }, + "com.daml.ledger.api.v2.CreateAndExerciseCommand": { + "type": "object", + "properties": { + "templateId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "The template of the contract the client wants to create.\nBoth package-name and package-id reference identifier formats for the template-id are supported.\nNote: The package-id reference identifier format is deprecated. We plan to end support for this format in version 3.4.\n\nRequired" + }, + "createArguments": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Record", + "description": "The arguments required for creating a contract from this template.\n\nRequired" + }, + "choice": { + "type": "string", + "description": "The name of the choice the client wants to exercise.\nMust be a valid NameString (as described in ``value.proto``).\n\nRequired" + }, + "choiceArgument": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Value", + "description": "The argument for this choice.\n\nRequired" + } + }, + "description": "Create a contract and exercise a choice on it in the same transaction." + }, + "com.daml.ledger.api.v2.CreateCommand": { + "type": "object", + "properties": { + "templateId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "The template of contract the client wants to create.\nBoth package-name and package-id reference identifier formats for the template-id are supported.\nNote: The package-id reference identifier format is deprecated. We plan to end support for this format in version 3.4.\n\nRequired" + }, + "createArguments": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Record", + "description": "The arguments required for creating a contract from this template.\n\nRequired" + } + }, + "description": "Create a new contract instance based on a template." + }, + "com.daml.ledger.api.v2.CreatedEvent": { + "type": "object", + "properties": { + "offset": { + "type": "string", + "format": "int64", + "description": "Required", + "title": "The offset of origin, which has contextual meaning, please see description at messages that include a CreatedEvent.\nOffsets are managed by the participant nodes.\nTransactions can thus NOT be assumed to have the same offsets on different participant nodes.\nIt is a valid absolute offset (positive integer)" + }, + "nodeId": { + "type": "integer", + "format": "int32", + "description": "Required", + "title": "The position of this event in the originating transaction or reassignment.\nThe origin has contextual meaning, please see description at messages that include a CreatedEvent.\nNode IDs are not necessarily equal across participants,\nas these may see different projections/parts of transactions.\nMust be valid node ID (non-negative integer)" + }, + "contractId": { + "type": "string", + "description": "The ID of the created contract.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nRequired" + }, + "templateId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "The template of the created contract.\nThe identifier uses the package-id reference format.\n\nRequired" + }, + "contractKey": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Value", + "description": "The key of the created contract.\nThis will be set if and only if ``template_id`` defines a contract key.\n\nOptional" + }, + "contractKeyHash": { + "type": "string", + "format": "byte", + "description": "The hash of contract_key.\nThis will be set if and only if ``template_id`` defines a contract key.\n\nOptional: can be empty" + }, + "createArguments": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Record", + "description": "The arguments that have been used to create the contract.\n\nRequired" + }, + "createdEventBlob": { + "type": "string", + "format": "byte", + "description": "Opaque representation of contract create event payload intended for forwarding\nto an API server as a contract disclosed as part of a command\nsubmission.\n\nOptional: can be empty" + }, + "interfaceViews": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/com.daml.ledger.api.v2.InterfaceView" + }, + "description": "- its party in the ``witness_parties`` of this event,\n- and which is implemented by the template of this event,\n- and which has ``include_interface_view`` set.\n\nOptional: can be empty", + "title": "Interface views specified in the transaction filter.\nIncludes an ``InterfaceView`` for each interface for which there is a ``InterfaceFilter`` with" + }, + "witnessParties": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The parties that are notified of this event. When a ``CreatedEvent``\nis returned as part of a transaction tree or ledger-effects transaction, this will include all\nthe parties specified in the ``TransactionFilter`` that are witnesses of the event\n(the stakeholders of the contract and all informees of all the ancestors\nof this create action that this participant knows about).\nIf served as part of a ACS delta transaction those will\nbe limited to all parties specified in the ``TransactionFilter`` that\nare stakeholders of the contract (i.e. either signatories or observers).\nIf the ``CreatedEvent`` is returned as part of an AssignedEvent,\nActiveContract or IncompleteUnassigned (so the event is related to\nan assignment or unassignment): this will include all parties of the\n``TransactionFilter`` that are stakeholders of the contract.\n\nThe behavior of reading create events visible to parties not hosted\non the participant node serving the Ledger API is undefined. Concretely,\nthere is neither a guarantee that the participant node will serve all their\ncreate events on the ACS stream, nor is there a guarantee that matching archive\nevents are delivered for such create events.\n\nFor most clients this is not a problem, as they only read events for parties\nthat are hosted on the participant node. If you need to read events\nfor parties that may not be hosted at all times on the participant node,\nsubscribe to the ``TopologyEvent``s for that party by setting a corresponding\n``UpdateFormat``. Using these events, query the ACS as-of an offset where the\nparty is hosted on the participant node, and ignore create events at offsets\nwhere the party is not hosted on the participant node.\n\nRequired: must be non-empty" + }, + "signatories": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The signatories for this contract as specified by the template.\n\nRequired: must be non-empty" + }, + "observers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The observers for this contract as specified explicitly by the template or implicitly as choice controllers.\nThis field never contains parties that are signatories.\n\nOptional: can be empty" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Ledger effective time of the transaction that created the contract.\n\nRequired" + }, + "packageName": { + "type": "string", + "description": "The package name of the created contract.\n\nRequired" + }, + "acsDelta": { + "type": "boolean", + "description": "Whether this event would be part of respective ACS_DELTA shaped stream,\nand should therefore considered when tracking contract activeness on the client-side.\n\nRequired" + }, + "representativePackageId": { + "type": "string", + "description": "A package-id present in the participant package store that typechecks the contract's argument.\nThis may differ from the package-id of the template used to create the contract.\nFor contracts created before Canton 3.4, this field matches the contract's creation package-id.\n\nNOTE: Experimental, server internal concept, not for client consumption. Subject to change without notice.\n\nRequired" + } + }, + "description": "Records that a contract has been created, and choices may now be exercised on it." + }, + "com.daml.ledger.api.v2.CumulativeFilter": { + "type": "object", + "properties": { + "wildcardFilter": { + "$ref": "#/definitions/com.daml.ledger.api.v2.WildcardFilter", + "description": "Optional", + "title": "A wildcard filter that matches all templates" + }, + "interfaceFilter": { + "$ref": "#/definitions/com.daml.ledger.api.v2.InterfaceFilter", + "description": "Include an ``InterfaceView`` for every ``InterfaceFilter`` matching a contract.\nThe ``InterfaceFilter`` instances MUST each use a unique ``interface_id``.\n\nOptional" + }, + "templateFilter": { + "$ref": "#/definitions/com.daml.ledger.api.v2.TemplateFilter", + "description": "A template for which the data will be included in the\n``create_arguments`` of a matching ``CreatedEvent``.\nIf a contract is simultaneously selected by a template filter and one or more interface filters,\nthe corresponding ``include_created_event_blob`` are consolidated using an OR operation.\n\nOptional" + } + }, + "description": "A filter that matches all contracts that are either an instance of one of\nthe ``template_filters`` or that match one of the ``interface_filters``." + }, + "com.daml.ledger.api.v2.DisclosedContract": { + "type": "object", + "properties": { + "templateId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "The template id of the contract.\nThe identifier uses the package-id reference format.\n\nIf provided, used to validate the template id of the contract serialized in the created_event_blob.\n\nOptional" + }, + "contractId": { + "type": "string", + "description": "If provided, used to validate the contract id of the contract serialized in the created_event_blob.\n\nOptional", + "title": "The contract id" + }, + "createdEventBlob": { + "type": "string", + "format": "byte", + "description": "Opaque byte string containing the complete payload required by the Daml engine\nto reconstruct a contract not known to the receiving participant.\n\nRequired: must be non-empty" + }, + "synchronizerId": { + "type": "string", + "description": "Optional", + "title": "The ID of the synchronizer where the contract is currently assigned" + } + }, + "description": "An additional contract that is used to resolve\ncontract \u0026 contract key lookups." + }, + "com.daml.ledger.api.v2.Enum": { + "type": "object", + "properties": { + "enumId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "Omitted from the transaction stream when verbose streaming is not enabled.\nOptional when submitting commands." + }, + "constructor": { + "type": "string", + "title": "Determines which of the Variant's alternatives is encoded in this message.\nMust be a valid NameString.\nRequired" + } + }, + "description": "A value with finite set of alternative representations." + }, + "com.daml.ledger.api.v2.Event": { + "type": "object", + "properties": { + "created": { + "$ref": "#/definitions/com.daml.ledger.api.v2.CreatedEvent", + "description": "The event as it appeared in the context of its original daml transaction on this participant node.\nIn particular, the offset, node_id pair of the daml transaction are preserved." + }, + "archived": { + "$ref": "#/definitions/com.daml.ledger.api.v2.ArchivedEvent" + }, + "exercised": { + "$ref": "#/definitions/com.daml.ledger.api.v2.ExercisedEvent" + } + }, + "description": "- ACS delta: events can be CreatedEvent or ArchivedEvent\n- ledger effects: events can be CreatedEvent or ExercisedEvent\n\nIn the update service the events are restricted to the events\nvisible for the parties specified in the transaction filter. Each\nevent message type below contains a ``witness_parties`` field which\nindicates the subset of the requested parties that can see the event\nin question.", + "title": "Events in transactions can have two primary shapes:" + }, + "com.daml.ledger.api.v2.EventFormat": { + "type": "object", + "properties": { + "filtersByParty": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Filters" + }, + "description": "1. For **ledger-effects** create and exercise events are returned, for which the witnesses include at least one of\n the listed parties and match the per-party filter.\n2. For **transaction and active-contract-set streams** create and archive events are returned for all contracts whose\n stakeholders include at least one of the listed parties and match the per-party filter.\n\nOptional: can be empty", + "title": "Each key must be a valid PartyIdString (as described in ``value.proto``).\nThe interpretation of the filter depends on the transaction-shape being filtered:" + }, + "filtersForAnyParty": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Filters", + "description": "Wildcard filters that apply to all the parties existing on the participant. The interpretation of the filters is the same\nwith the per-party filter as described above.\n\nOptional" + }, + "verbose": { + "type": "boolean", + "description": "If enabled, values served over the API will contain more information than strictly necessary to interpret the data.\nIn particular, setting the verbose flag to true triggers the ledger to include labels for record fields.\n\nOptional" + } + }, + "description": "A format for events which defines both which events should be included\nand what data should be computed and included for them.\n\nNote that some of the filtering behavior depends on the `TransactionShape`,\nwhich is expected to be specified alongside usages of `EventFormat`." + }, + "com.daml.ledger.api.v2.ExerciseByKeyCommand": { + "type": "object", + "properties": { + "templateId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "The template of contract the client wants to exercise.\nBoth package-name and package-id reference identifier formats for the template-id are supported.\nNote: The package-id reference identifier format is deprecated. We plan to end support for this format in version 3.4.\n\nRequired" + }, + "contractKey": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Value", + "description": "The key of the contract the client wants to exercise upon.\n\nRequired" + }, + "choice": { + "type": "string", + "description": "Required", + "title": "The name of the choice the client wants to exercise.\nMust be a valid NameString (as described in ``value.proto``)" + }, + "choiceArgument": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Value", + "description": "The argument for this choice.\n\nRequired" + } + }, + "description": "Exercise a choice on an existing contract specified by its key." + }, + "com.daml.ledger.api.v2.ExerciseCommand": { + "type": "object", + "properties": { + "templateId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "The template or interface of the contract the client wants to exercise.\nBoth package-name and package-id reference identifier formats for the template-id are supported.\nNote: The package-id reference identifier format is deprecated. We plan to end support for this format in version 3.4.\nTo exercise a choice on an interface, specify the interface identifier in the template_id field.\n\nRequired" + }, + "contractId": { + "type": "string", + "description": "The ID of the contract the client wants to exercise upon.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nRequired" + }, + "choice": { + "type": "string", + "description": "Required", + "title": "The name of the choice the client wants to exercise.\nMust be a valid NameString (as described in ``value.proto``)" + }, + "choiceArgument": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Value", + "description": "The argument for this choice.\n\nRequired" + } + }, + "description": "Exercise a choice on an existing contract." + }, + "com.daml.ledger.api.v2.ExercisedEvent": { + "type": "object", + "properties": { + "offset": { + "type": "string", + "format": "int64", + "description": "Required", + "title": "The offset of origin.\nOffsets are managed by the participant nodes.\nTransactions can thus NOT be assumed to have the same offsets on different participant nodes.\nIt is a valid absolute offset (positive integer)" + }, + "nodeId": { + "type": "integer", + "format": "int32", + "description": "Required", + "title": "The position of this event in the originating transaction or reassignment.\nNode IDs are not necessarily equal across participants,\nas these may see different projections/parts of transactions.\nMust be valid node ID (non-negative integer)" + }, + "contractId": { + "type": "string", + "description": "The ID of the target contract.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nRequired" + }, + "templateId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "Identifies the template that defines the executed choice.\nThis template's package-id may differ from the target contract's package-id\nif the target contract has been upgraded or downgraded.\n\nThe identifier uses the package-id reference format.\n\nRequired" + }, + "interfaceId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "The interface where the choice is defined, if inherited.\nIf defined, the identifier uses the package-id reference format.\n\nOptional" + }, + "choice": { + "type": "string", + "description": "The choice that was exercised on the target contract.\nMust be a valid NameString (as described in ``value.proto``).\n\nRequired" + }, + "choiceArgument": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Value", + "description": "The argument of the exercised choice.\n\nRequired" + }, + "actingParties": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The parties that exercised the choice.\nEach element must be a valid PartyIdString (as described in ``value.proto``).\n\nRequired: must be non-empty" + }, + "consuming": { + "type": "boolean", + "description": "If true, the target contract may no longer be exercised.\n\nRequired" + }, + "witnessParties": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The parties that are notified of this event. The witnesses of an exercise\nnode will depend on whether the exercise was consuming or not.\nIf consuming, the witnesses are the union of the stakeholders,\nthe actors and all informees of all the ancestors of this event this\nparticipant knows about.\nIf not consuming, the witnesses are the union of the signatories,\nthe actors and all informees of all the ancestors of this event this\nparticipant knows about.\nIn both cases the witnesses are limited to the querying parties, or not\nlimited in case anyParty filters are used.\nNote that the actors might not necessarily be observers\nand thus stakeholders. This is the case when the controllers of a\nchoice are specified using \"flexible controllers\", using the\n``choice ... controller`` syntax, and said controllers are not\nexplicitly marked as observers.\nEach element must be a valid PartyIdString (as described in ``value.proto``).\n\nRequired: must be non-empty" + }, + "lastDescendantNodeId": { + "type": "integer", + "format": "int32", + "description": "Specifies the upper boundary of the node ids of the events in the same transaction that appeared as a result of\nthis ``ExercisedEvent``. This allows unambiguous identification of all the members of the subtree rooted at this\nnode. A full subtree can be constructed when all descendant nodes are present in the stream. If nodes are heavily\nfiltered, it is only possible to determine if a node is in a consequent subtree or not.\n\nRequired" + }, + "exerciseResult": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Value", + "description": "The result of exercising the choice.\n\nOptional" + }, + "packageName": { + "type": "string", + "description": "The package name of the contract.\n\nRequired" + }, + "implementedInterfaces": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier" + }, + "description": "If the event is consuming, the interfaces implemented by the target template that have been\nmatched from the interface filter query.\nPopulated only in case interface filters with include_interface_view set.\n\nThe identifier uses the package-id reference format.\n\nOptional: can be empty" + }, + "acsDelta": { + "type": "boolean", + "description": "Whether this event would be part of respective ACS_DELTA shaped stream,\nand should therefore considered when tracking contract activeness on the client-side.\n\nRequired" + } + }, + "description": "Records that a choice has been exercised on a target contract." + }, + "com.daml.ledger.api.v2.Filters": { + "type": "object", + "properties": { + "cumulative": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/com.daml.ledger.api.v2.CumulativeFilter" + }, + "description": "Every filter in the cumulative list expands the scope of the resulting stream. Each interface,\ntemplate or wildcard filter means additional events that will match the query.\nThe impact of include_interface_view and include_created_event_blob fields in the filters will\nalso be accumulated.\nA template or an interface SHOULD NOT appear twice in the accumulative field.\nA wildcard filter SHOULD NOT be defined more than once in the accumulative field.\nIf no ``CumulativeFilter`` defined, the default of a single ``WildcardFilter`` with\ninclude_created_event_blob unset is used.\n\nOptional: can be empty" + } + }, + "description": "The union of a set of template filters, interface filters, or a wildcard." + }, + "com.daml.ledger.api.v2.GenMap": { + "type": "object", + "properties": { + "entries": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/com.daml.ledger.api.v2.GenMap.Entry" + } + } + } + }, + "com.daml.ledger.api.v2.GenMap.Entry": { + "type": "object", + "properties": { + "key": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Value" + }, + "value": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Value" + } + } + }, + "com.daml.ledger.api.v2.Identifier": { + "type": "object", + "properties": { + "packageId": { + "type": "string", + "description": "Generally, the identifier of the Daml package that contains the entity.\nWhen encoding a package-id, it must be a valid PackageIdString.\n\nThe field is overloaded to also be able to contain the package-name of the Daml package.\nThis is supported if the entity referenced is either an interface or template.\nWhen representing the Daml package-name, the encoding is of form `#\u003cpackage-name\u003e`\nwhere `#` (not a valid package-id character)\nis used as a discriminator for signalling a package-name encoding.\n\nRequired" + }, + "moduleName": { + "type": "string", + "title": "The dot-separated module name of the identifier.\nRequired" + }, + "entityName": { + "type": "string", + "title": "The dot-separated name of the entity (e.g. record, template, ...) within the module.\nRequired" + } + }, + "description": "- if a Daml package-id is encoded in the package_id field, it is referred to as using a \"package-id reference format\"\n - if a Daml package-name is encoded in the package_id field, it is referred to as using a \"package-name reference format\"", + "title": "Unique identifier of an entity.\nThroughout this API, the following terminology is being used:" + }, + "com.daml.ledger.api.v2.InterfaceFilter": { + "type": "object", + "properties": { + "interfaceId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "The interface that a matching contract must implement.\nThe ``interface_id`` needs to be valid: corresponding interface should be defined in\none of the available packages at the time of the query.\nBoth package-name and package-id reference formats for the identifier are supported.\nNote: The package-id reference identifier format is deprecated. We plan to end support for this format in version 3.4.\n\nRequired" + }, + "includeInterfaceView": { + "type": "boolean", + "description": "Whether to include the interface view on the contract in the returned ``CreatedEvent``.\nUse this to access contract data in a uniform manner in your API client.\n\nOptional" + }, + "includeCreatedEventBlob": { + "type": "boolean", + "description": "Whether to include a ``created_event_blob`` in the returned ``CreatedEvent``.\nUse this to access the contract create event payload in your API client\nfor submitting it as a disclosed contract with future commands.\n\nOptional" + } + }, + "description": "This filter matches contracts that implement a specific interface." + }, + "com.daml.ledger.api.v2.InterfaceView": { + "type": "object", + "properties": { + "interfaceId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "The interface implemented by the matched event.\nThe identifier uses the package-id reference format.\n\nRequired" + }, + "viewStatus": { + "$ref": "#/definitions/google.rpc.Status", + "description": "Whether the view was successfully computed, and if not,\nthe reason for the error. The error is reported using the same rules\nfor error codes and messages as the errors returned for API requests.\n\nRequired" + }, + "viewValue": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Record", + "description": "The value of the interface's view method on this event.\nSet if it was requested in the ``InterfaceFilter`` and it could be\nsuccessfully computed.\n\nOptional" + }, + "implementationPackageId": { + "type": "string", + "description": "The package defining the interface implementation used to compute the view.\nCan be different from the package that was used to create the contract itself,\nas the contract arguments can be upgraded or downgraded using smart-contract upgrading\nas part of computing the interface view.\nPopulated if the view computation is successful, otherwise empty.\n\nOptional" + } + }, + "description": "View of a create event matched by an interface filter." + }, + "com.daml.ledger.api.v2.List": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/com.daml.ledger.api.v2.Value" + }, + "title": "The elements must all be of the same concrete value type.\nOptional" + } + }, + "description": "A homogenous collection of values." + }, + "com.daml.ledger.api.v2.Optional": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Value", + "title": "optional" + } + }, + "description": "Corresponds to Java's Optional type, Scala's Option, and Haskell's Maybe.\nThe reason why we need to wrap this in an additional ``message`` is that we\nneed to be able to encode the ``None`` case in the ``Value`` oneof." + }, + "com.daml.ledger.api.v2.PrefetchContractKey": { + "type": "object", + "properties": { + "templateId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "The template of contract the client wants to prefetch.\nBoth package-name and package-id reference identifier formats for the template-id are supported.\nNote: The package-id reference identifier format is deprecated. We plan to end support for this format in version 3.4.\n\nRequired" + }, + "contractKey": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Value", + "description": "The key of the contract the client wants to prefetch.\n\nRequired" + } + }, + "title": "Preload contracts" + }, + "com.daml.ledger.api.v2.Reassignment": { + "type": "object", + "properties": { + "updateId": { + "type": "string", + "description": "Assigned by the server. Useful for correlating logs.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nRequired" + }, + "commandId": { + "type": "string", + "description": "The ID of the command which resulted in this reassignment. Missing for everyone except the submitting party on the submitting participant.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nOptional" + }, + "workflowId": { + "type": "string", + "description": "The workflow ID used in reassignment command submission. Only set if the ``workflow_id`` for the command was set.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nOptional" + }, + "offset": { + "type": "string", + "format": "int64", + "description": "The participant's offset. The details of this field are described in ``community/ledger-api/README.md``.\nMust be a valid absolute offset (positive integer).\n\nRequired" + }, + "events": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/com.daml.ledger.api.v2.ReassignmentEvent" + }, + "description": "The collection of reassignment events.\n\nRequired: must be non-empty" + }, + "traceContext": { + "$ref": "#/definitions/com.daml.ledger.api.v2.TraceContext", + "description": "The trace context transported in this message corresponds to the trace context supplied\nby the client application in a HTTP2 header of the original command submission.\nWe typically use a header to transfer this type of information. Here we use message\nbody, because it is used in gRPC streams which do not support per message headers.\nThis field will be populated with the trace context contained in the original submission.\nIf that was not provided, a unique ledger-api-server generated trace context will be used\ninstead.\n\nOptional", + "title": "Ledger API trace context" + }, + "recordTime": { + "type": "string", + "format": "date-time", + "description": "The time at which the reassignment was recorded. The record time refers to the source/target\nsynchronizer for an unassign/assign event respectively.\n\nRequired" + }, + "synchronizerId": { + "type": "string", + "description": "A valid synchronizer id.\nIdentifies the synchronizer that synchronized this Reassignment.\n\nRequired" + }, + "paidTrafficCost": { + "type": "string", + "format": "int64", + "description": "The traffic cost that this participant node paid for the corresponding (un)assignment request.\n\nNot set for transactions that were\n- initiated by another participant\n- initiated offline via the repair service\n- processed before the participant started serving traffic cost on the Ledger API\n- returned as part of a query filtering for a non submitting party\n\nOptional" + } + }, + "description": "Complete view of an on-ledger reassignment." + }, + "com.daml.ledger.api.v2.ReassignmentCommand": { + "type": "object", + "properties": { + "unassignCommand": { + "$ref": "#/definitions/com.daml.ledger.api.v2.UnassignCommand" + }, + "assignCommand": { + "$ref": "#/definitions/com.daml.ledger.api.v2.AssignCommand" + } + } + }, + "com.daml.ledger.api.v2.ReassignmentCommands": { + "type": "object", + "properties": { + "workflowId": { + "type": "string", + "description": "Identifier of the on-ledger workflow that this command is a part of.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nOptional" + }, + "userId": { + "type": "string", + "description": "Uniquely identifies the participant user that issued the command.\nMust be a valid UserIdString (as described in ``value.proto``).\nRequired unless authentication is used with a user token.\nIn that case, the token's user-id will be used for the request's user_id.\n\nOptional" + }, + "commandId": { + "type": "string", + "description": "Uniquely identifies the command.\nThe triple (user_id, submitter, command_id) constitutes the change ID for the intended ledger change.\nThe change ID can be used for matching the intended ledger changes with all their completions.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nRequired" + }, + "submitter": { + "type": "string", + "description": "Party on whose behalf the command should be executed.\nIf ledger API authorization is enabled, then the authorization metadata must authorize the sender of the request\nto act on behalf of the given party.\nMust be a valid PartyIdString (as described in ``value.proto``).\n\nRequired" + }, + "submissionId": { + "type": "string", + "description": "A unique identifier to distinguish completions for different submissions with the same change ID.\nTypically a random UUID. Applications are expected to use a different UUID for each retry of a submission\nwith the same change ID.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nIf omitted, the participant or the committer may set a value of their choice.\n\nOptional" + }, + "commands": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/com.daml.ledger.api.v2.ReassignmentCommand" + }, + "description": "Individual elements of this reassignment. Must be non-empty.\n\nRequired: must be non-empty" + } + } + }, + "com.daml.ledger.api.v2.ReassignmentEvent": { + "type": "object", + "properties": { + "unassigned": { + "$ref": "#/definitions/com.daml.ledger.api.v2.UnassignedEvent" + }, + "assigned": { + "$ref": "#/definitions/com.daml.ledger.api.v2.AssignedEvent" + } + } + }, + "com.daml.ledger.api.v2.Record": { + "type": "object", + "properties": { + "recordId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "Omitted from the transaction stream when verbose streaming is not enabled.\nOptional when submitting commands." + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/com.daml.ledger.api.v2.RecordField" + }, + "title": "The nested values of the record.\nRequired" + } + }, + "description": "Contains nested values." + }, + "com.daml.ledger.api.v2.RecordField": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "- if all keys within a single record are present, the order in which fields appear does not matter. however, each key must appear exactly once.\n- if any of the keys within a single record are omitted, the order of fields MUST match the order of declaration in the Daml template.\n\nMust be a valid NameString", + "title": "When reading a transaction stream, it's omitted if verbose streaming is not enabled.\nWhen submitting a command, it's optional:" + }, + "value": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Value", + "title": "A nested value of a record.\nRequired" + } + }, + "description": "A named nested value within a record." + }, + "com.daml.ledger.api.v2.SubmitAndWaitForReassignmentRequest": { + "type": "object", + "properties": { + "reassignmentCommands": { + "$ref": "#/definitions/com.daml.ledger.api.v2.ReassignmentCommands", + "description": "The reassignment commands to be submitted.\n\nRequired" + }, + "eventFormat": { + "$ref": "#/definitions/com.daml.ledger.api.v2.EventFormat", + "description": "If no event_format provided, the result will contain no events.\nThe events in the result, will take shape TRANSACTION_SHAPE_ACS_DELTA.\n\nOptional" + } + }, + "description": "This reassignment is executed as a single atomic update." + }, + "com.daml.ledger.api.v2.SubmitAndWaitForReassignmentResponse": { + "type": "object", + "properties": { + "reassignment": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Reassignment", + "description": "The reassignment that resulted from the submitted reassignment command.\nThe reassignment might contain no events (request conditions result in filtering out all of them).\n\nRequired" + } + } + }, + "com.daml.ledger.api.v2.SubmitAndWaitForTransactionRequest": { + "type": "object", + "properties": { + "commands": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Commands", + "description": "The commands to be submitted.\n\nRequired" + }, + "transactionFormat": { + "$ref": "#/definitions/com.daml.ledger.api.v2.TransactionFormat", + "description": "If no ``transaction_format`` is provided, a default will be used where ``transaction_shape`` is set to\nTRANSACTION_SHAPE_ACS_DELTA, ``event_format`` is defined with ``filters_by_party`` containing wildcard-template\nfilter for all original ``act_as`` and ``read_as`` parties and the ``verbose`` flag is set.\n\nOptional" + } + }, + "description": "These commands are executed as a single atomic transaction." + }, + "com.daml.ledger.api.v2.SubmitAndWaitForTransactionResponse": { + "type": "object", + "properties": { + "transaction": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Transaction", + "description": "The transaction that resulted from the submitted command.\nThe transaction might contain no events (request conditions result in filtering out all of them).\n\nRequired" + } + } + }, + "com.daml.ledger.api.v2.SubmitAndWaitResponse": { + "type": "object", + "properties": { + "updateId": { + "type": "string", + "description": "The id of the transaction that resulted from the submitted command.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nRequired" + }, + "completionOffset": { + "type": "string", + "format": "int64", + "description": "The details of the offset field are described in ``community/ledger-api/README.md``.\n\nRequired" + } + } + }, + "com.daml.ledger.api.v2.TemplateFilter": { + "type": "object", + "properties": { + "templateId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "A template for which the payload should be included in the response.\nThe ``template_id`` needs to be valid: corresponding template should be defined in\none of the available packages at the time of the query.\nBoth package-name and package-id reference formats for the identifier are supported.\nNote: The package-id reference identifier format is deprecated. We plan to end support for this format in version 3.4.\n\nRequired" + }, + "includeCreatedEventBlob": { + "type": "boolean", + "description": "Whether to include a ``created_event_blob`` in the returned ``CreatedEvent``.\nUse this to access the contract event payload in your API client\nfor submitting it as a disclosed contract with future commands.\n\nOptional" + } + }, + "description": "This filter matches contracts of a specific template." + }, + "com.daml.ledger.api.v2.TextMap": { + "type": "object", + "properties": { + "entries": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/com.daml.ledger.api.v2.TextMap.Entry" + } + } + } + }, + "com.daml.ledger.api.v2.TextMap.Entry": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Value" + } + } + }, + "com.daml.ledger.api.v2.TraceContext": { + "type": "object", + "properties": { + "traceparent": { + "type": "string", + "description": "Optional", + "title": "https://www.w3.org/TR/trace-context/" + }, + "tracestate": { + "type": "string", + "title": "Optional" + } + } + }, + "com.daml.ledger.api.v2.Transaction": { + "type": "object", + "properties": { + "updateId": { + "type": "string", + "description": "Assigned by the server. Useful for correlating logs.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nRequired" + }, + "commandId": { + "type": "string", + "description": "The ID of the command which resulted in this transaction. Missing for everyone except the submitting party.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nOptional" + }, + "workflowId": { + "type": "string", + "description": "The workflow ID used in command submission.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nOptional" + }, + "effectiveAt": { + "type": "string", + "format": "date-time", + "description": "Ledger effective time.\n\nRequired" + }, + "events": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/com.daml.ledger.api.v2.Event" + }, + "description": "- ``CreatedEvent`` or ``ArchivedEvent`` in case of ACS_DELTA transaction shape\n- ``CreatedEvent`` or ``ExercisedEvent`` in case of LEDGER_EFFECTS transaction shape\n\nRequired: must be non-empty", + "title": "The collection of events.\nContains:" + }, + "offset": { + "type": "string", + "format": "int64", + "description": "The absolute offset. The details of this field are described in ``community/ledger-api/README.md``.\nIt is a valid absolute offset (positive integer).\n\nRequired" + }, + "synchronizerId": { + "type": "string", + "description": "A valid synchronizer id.\nIdentifies the synchronizer that synchronized the transaction.\n\nRequired" + }, + "traceContext": { + "$ref": "#/definitions/com.daml.ledger.api.v2.TraceContext", + "description": "The trace context transported in this message corresponds to the trace context supplied\nby the client application in a HTTP2 header of the original command submission.\nWe typically use a header to transfer this type of information. Here we use message\nbody, because it is used in gRPC streams which do not support per message headers.\nThis field will be populated with the trace context contained in the original submission.\nIf that was not provided, a unique ledger-api-server generated trace context will be used\ninstead.\n\nOptional", + "title": "Ledger API trace context" + }, + "recordTime": { + "type": "string", + "format": "date-time", + "description": "The time at which the transaction was recorded. The record time refers to the synchronizer\nwhich synchronized the transaction.\n\nRequired" + }, + "externalTransactionHash": { + "type": "string", + "format": "byte", + "description": "For transaction externally signed, contains the external transaction hash\nsigned by the external party. Can be used to correlate an external submission with a committed transaction.\n\nOptional: can be empty" + }, + "paidTrafficCost": { + "type": "string", + "format": "int64", + "description": "The traffic cost that this participant node paid for the confirmation\nrequest for this transaction.\n\nNot set for transactions that were\n- initiated by another participant\n- initiated offline via the repair service\n- processed before the participant started serving traffic cost on the Ledger API\n- returned as part of a query filtering for a non submitting party\n\nOptional" + } + }, + "description": "Filtered view of an on-ledger transaction's create and archive events." + }, + "com.daml.ledger.api.v2.TransactionFormat": { + "type": "object", + "properties": { + "eventFormat": { + "$ref": "#/definitions/com.daml.ledger.api.v2.EventFormat", + "title": "Required" + }, + "transactionShape": { + "$ref": "#/definitions/com.daml.ledger.api.v2.TransactionShape", + "description": "What transaction shape to use for interpreting the filters of the event format.\n\nRequired" + } + }, + "description": "A format that specifies what events to include in Daml transactions\nand what data to compute and include for them." + }, + "com.daml.ledger.api.v2.TransactionShape": { + "type": "string", + "enum": [ + "TRANSACTION_SHAPE_UNSPECIFIED", + "TRANSACTION_SHAPE_ACS_DELTA", + "TRANSACTION_SHAPE_LEDGER_EFFECTS" + ], + "default": "TRANSACTION_SHAPE_UNSPECIFIED", + "description": "Event shape for Transactions.\nShapes are exclusive and only one of them can be defined in queries.\n\n - TRANSACTION_SHAPE_UNSPECIFIED: Following official proto3 convention, not intended for actual use.\n - TRANSACTION_SHAPE_ACS_DELTA: Transaction shape that is sufficient to maintain an accurate ACS view.\nThe field witness_parties in events are populated as stakeholders, transaction filter will apply accordingly.\nThis translates to create and archive events.\n - TRANSACTION_SHAPE_LEDGER_EFFECTS: Transaction shape that allows maintaining an ACS and also conveys detailed information about\nall exercises.\nThe field witness_parties in events are populated as cumulative informees, transaction filter will apply accordingly.\nThis translates to create, consuming exercise and non-consuming exercise." + }, + "com.daml.ledger.api.v2.UnassignCommand": { + "type": "object", + "properties": { + "contractId": { + "type": "string", + "description": "The ID of the contract the client wants to unassign.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nRequired" + }, + "source": { + "type": "string", + "description": "Required", + "title": "The ID of the source synchronizer\nMust be a valid synchronizer id" + }, + "target": { + "type": "string", + "description": "Required", + "title": "The ID of the target synchronizer\nMust be a valid synchronizer id" + } + }, + "title": "Unassign a contract" + }, + "com.daml.ledger.api.v2.UnassignedEvent": { + "type": "object", + "properties": { + "reassignmentId": { + "type": "string", + "description": "The ID of the unassignment. This needs to be used as an input for a assign ReassignmentCommand.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nRequired" + }, + "contractId": { + "type": "string", + "description": "The ID of the reassigned contract.\nMust be a valid LedgerString (as described in ``value.proto``).\n\nRequired" + }, + "templateId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "The template of the reassigned contract.\nThe identifier uses the package-id reference format.\n\nRequired" + }, + "source": { + "type": "string", + "description": "Required", + "title": "The ID of the source synchronizer\nMust be a valid synchronizer id" + }, + "target": { + "type": "string", + "description": "Required", + "title": "The ID of the target synchronizer\nMust be a valid synchronizer id" + }, + "submitter": { + "type": "string", + "description": "Party on whose behalf the unassign command was executed.\nEmpty if the unassignment happened offline via the repair service.\nMust be a valid PartyIdString (as described in ``value.proto``).\n\nOptional" + }, + "reassignmentCounter": { + "type": "string", + "format": "uint64", + "description": "Each corresponding assigned and unassigned event has the same reassignment_counter. This strictly increases\nwith each unassign command for the same contract. Creation of the contract corresponds to reassignment_counter\nequals zero.\n\nRequired" + }, + "assignmentExclusivity": { + "type": "string", + "format": "date-time", + "description": "Assignment exclusivity\nBefore this time (measured on the target synchronizer), only the submitter of the unassignment can initiate the assignment\nDefined for reassigning participants.\n\nOptional" + }, + "witnessParties": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The parties that are notified of this event.\n\nRequired: must be non-empty" + }, + "packageName": { + "type": "string", + "description": "The package name of the contract.\n\nRequired" + }, + "offset": { + "type": "string", + "format": "int64", + "description": "Required", + "title": "The offset of origin.\nOffsets are managed by the participant nodes.\nReassignments can thus NOT be assumed to have the same offsets on different participant nodes.\nMust be a valid absolute offset (positive integer)" + }, + "nodeId": { + "type": "integer", + "format": "int32", + "description": "Required", + "title": "The position of this event in the originating reassignment.\nNode IDs are not necessarily equal across participants,\nas these may see different projections/parts of reassignments.\nMust be valid node ID (non-negative integer)" + } + }, + "title": "Records that a contract has been unassigned, and it becomes unusable on the source synchronizer" + }, + "com.daml.ledger.api.v2.Value": { + "type": "object", + "properties": { + "unit": { + "type": "object", + "properties": {}, + "description": "This value is used for example for choices that don't take any arguments." + }, + "bool": { + "type": "boolean", + "description": "True or false." + }, + "int64": { + "type": "string", + "format": "int64" + }, + "date": { + "type": "integer", + "format": "int32", + "title": "Days since the unix epoch. Can go backwards. Limited from\n0001-01-01 to 9999-12-31, also to be compatible with\nhttps://www.ietf.org/rfc/rfc3339.txt" + }, + "timestamp": { + "type": "string", + "format": "int64", + "title": "Microseconds since the UNIX epoch. Can go backwards. Fixed\nsince the vast majority of values will be greater than\n2^28, since currently the number of microseconds since the\nepoch is greater than that. Range: 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59.999999Z, so that we can convert to/from\nhttps://www.ietf.org/rfc/rfc3339.txt" + }, + "numeric": { + "type": "string", + "description": ".. code-block:: none\n\n [+-]?\\d{1,38}(.\\d{0,37})?\n\nand should be representable by a Numeric without loss of precision.", + "title": "A Numeric, that is a decimal value with precision 38 (at most 38 significant digits) and a\nscale between 0 and 37 (significant digits on the right of the decimal point).\nThe field has to match the regex" + }, + "party": { + "type": "string", + "description": "An agent operating on the ledger.\nMust be a valid PartyIdString." + }, + "text": { + "type": "string", + "description": "A string." + }, + "contractId": { + "type": "string", + "description": "Identifier of an on-ledger contract. Commands which reference an unknown or already archived contract ID will fail.\nMust be a valid LedgerString." + }, + "optional": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Optional", + "title": "The Optional type, None or Some" + }, + "list": { + "$ref": "#/definitions/com.daml.ledger.api.v2.List", + "description": "Represents a homogeneous list of values." + }, + "textMap": { + "$ref": "#/definitions/com.daml.ledger.api.v2.TextMap", + "title": "The TextMap type" + }, + "genMap": { + "$ref": "#/definitions/com.daml.ledger.api.v2.GenMap", + "title": "The GenMap type" + }, + "record": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Record" + }, + "variant": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Variant" + }, + "enum": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Enum", + "title": "The Enum type" + } + }, + "description": "Encodes values that the ledger accepts as command arguments and emits as contract arguments.\n\nThe values encoding use different classes of non-empty strings as identifiers. Those classes are\ndefined as follows:\n\n- NameStrings are strings with length \u003c= 1000 that match the regexp ``[A-Za-z\\$_][A-Za-z0-9\\$_]*``.\n- PackageIdStrings are strings with length \u003c= 64 that match the regexp ``[A-Za-z0-9\\-_ ]+``.\n- PartyIdStrings are strings with length \u003c= 255 that match the regexp ``[A-Za-z0-9:\\-_ ]+``.\n- ParticipantIdStrings are strings with length \u003c= 255 that match the regexp ``[A-Za-z0-9:\\-_ ]+``.\n- LedgerStrings are strings with length \u003c= 255 that match the regexp ``[A-Za-z0-9#:\\-_/ ]+``.\n- UserIdStrings are strings with length \u003c= 128 that match the regexp ``[a-zA-Z0-9@^$.!`\\-#+'~_|:]+``." + }, + "com.daml.ledger.api.v2.Variant": { + "type": "object", + "properties": { + "variantId": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Identifier", + "description": "Omitted from the transaction stream when verbose streaming is not enabled.\nOptional when submitting commands." + }, + "constructor": { + "type": "string", + "title": "Determines which of the Variant's alternatives is encoded in this message.\nMust be a valid NameString.\nRequired" + }, + "value": { + "$ref": "#/definitions/com.daml.ledger.api.v2.Value", + "title": "The value encoded within the Variant.\nRequired" + } + }, + "description": "A value with alternative representations." + }, + "com.daml.ledger.api.v2.WildcardFilter": { + "type": "object", + "properties": { + "includeCreatedEventBlob": { + "type": "boolean", + "description": "Whether to include a ``created_event_blob`` in the returned ``CreatedEvent``.\nUse this to access the contract create event payload in your API client\nfor submitting it as a disclosed contract with future commands.\n\nOptional" + } + }, + "description": "This filter matches all templates." + }, + "google.protobuf.Any": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "google.rpc.Status": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code, which should be an enum value of\n[google.rpc.Code][google.rpc.Code]." + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized\nby the client." + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/google.protobuf.Any" + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." + } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + } + } +}