Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 69 additions & 17 deletions proto/com/daml/ledger/api/v2/commands.pb.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ typedef struct _com_daml_ledger_api_v2_CreateCommand {
bool has_template_id;
com_daml_ledger_api_v2_Identifier template_id;
/* The arguments required for creating a contract from this template.

Required */
bool has_create_arguments;
com_daml_ledger_api_v2_Record create_arguments;
Expand All @@ -40,13 +41,16 @@ typedef struct _com_daml_ledger_api_v2_ExerciseCommand {
com_daml_ledger_api_v2_Identifier template_id;
/* The ID of the contract the client wants to exercise upon.
Must be a valid LedgerString (as described in ``value.proto``).

Required */
char contract_id[1024];
/* The name of the choice the client wants to exercise.
Must be a valid NameString (as described in ``value.proto``)

Required */
char choice[1024];
/* The argument for this choice.

Required */
bool has_choice_argument;
com_daml_ledger_api_v2_Value choice_argument;
Expand All @@ -62,14 +66,17 @@ typedef struct _com_daml_ledger_api_v2_ExerciseByKeyCommand {
bool has_template_id;
com_daml_ledger_api_v2_Identifier template_id;
/* The key of the contract the client wants to exercise upon.

Required */
bool has_contract_key;
com_daml_ledger_api_v2_Value contract_key;
/* The name of the choice the client wants to exercise.
Must be a valid NameString (as described in ``value.proto``)

Required */
char choice[1024];
/* The argument for this choice.

Required */
bool has_choice_argument;
com_daml_ledger_api_v2_Value choice_argument;
Expand All @@ -85,14 +92,17 @@ typedef struct _com_daml_ledger_api_v2_CreateAndExerciseCommand {
bool has_template_id;
com_daml_ledger_api_v2_Identifier template_id;
/* The arguments required for creating a contract from this template.

Required */
bool has_create_arguments;
com_daml_ledger_api_v2_Record create_arguments;
/* The name of the choice the client wants to exercise.
Must be a valid NameString (as described in ``value.proto``).

Required */
char choice[1024];
/* The argument for this choice.

Required */
bool has_choice_argument;
com_daml_ledger_api_v2_Value choice_argument;
Expand All @@ -117,19 +127,23 @@ typedef struct _com_daml_ledger_api_v2_DisclosedContract {
The identifier uses the package-id reference format.

If provided, used to validate the template id of the contract serialized in the created_event_blob.

Optional */
bool has_template_id;
com_daml_ledger_api_v2_Identifier template_id;
/* The contract id

If provided, used to validate the contract id of the contract serialized in the created_event_blob.

Optional */
char contract_id[1024];
/* Opaque byte string containing the complete payload required by the Daml engine
to reconstruct a contract not known to the receiving participant.
Required */

Required: must be non-empty */
com_daml_ledger_api_v2_DisclosedContract_created_event_blob_t created_event_blob;
/* The ID of the synchronizer where the contract is currently assigned

Optional */
char synchronizer_id[1024];
} com_daml_ledger_api_v2_DisclosedContract;
Expand All @@ -138,22 +152,27 @@ typedef struct _com_daml_ledger_api_v2_DisclosedContract {
typedef struct _com_daml_ledger_api_v2_Commands {
/* Identifier of the on-ledger workflow that this command is a part of.
Must be a valid LedgerString (as described in ``value.proto``).

Optional */
char workflow_id[1024];
/* Uniquely identifies the participant user that issued the command.
Must be a valid UserIdString (as described in ``value.proto``).
Required unless authentication is used with a user token.
In that case, the token's user-id will be used for the request's user_id. */
In that case, the token's user-id will be used for the request's user_id.

Optional */
char user_id[1024];
/* Uniquely identifies the command.
The triple (user_id, act_as, command_id) constitutes the change ID for the intended ledger change,
where act_as is interpreted as a set of party names.
The change ID can be used for matching the intended ledger changes with all their completions.
Must be a valid LedgerString (as described in ``value.proto``).

Required */
char command_id[1024];
/* Individual elements of this atomic command. Must be non-empty.
Required */

Required: must be non-empty */
pb_callback_t commands;
pb_size_t which_deduplication_period;
union {
Expand All @@ -170,19 +189,22 @@ typedef struct _com_daml_ledger_api_v2_Commands {
Use this property if you expect that command interpretation will take a considerate amount of time, such that by
the time the resulting transaction is sequenced, its assigned ledger time is not valid anymore.
Must not be set at the same time as min_ledger_time_rel.

Optional */
bool has_min_ledger_time_abs;
google_protobuf_Timestamp min_ledger_time_abs;
/* Same as min_ledger_time_abs, but specified as a duration, starting from the time the command is received by the server.
Must not be set at the same time as min_ledger_time_abs.

Optional */
bool has_min_ledger_time_rel;
google_protobuf_Duration min_ledger_time_rel;
/* Set of parties on whose behalf the command should be executed.
If ledger API authorization is enabled, then the authorization metadata must authorize the sender of the request
to act on behalf of each of the given parties.
Each element must be a valid PartyIdString (as described in ``value.proto``).
Required, must be non-empty. */

Required: must be non-empty */
pb_callback_t act_as;
/* Set of parties on whose behalf (in addition to all parties listed in ``act_as``) contracts can be retrieved.
This affects Daml operations such as ``fetch``, ``fetchByKey``, ``lookupByKey``, ``exercise``, and ``exerciseByKey``.
Expand All @@ -192,31 +214,47 @@ typedef struct _com_daml_ledger_api_v2_Commands {
rules for fetch operations.
If ledger API authorization is enabled, then the authorization metadata must authorize the sender of the request
to read contract data on behalf of each of the given parties.
Optional */

Optional: can be empty */
pb_callback_t read_as;
/* A unique identifier to distinguish completions for different submissions with the same change ID.
Typically a random UUID. Applications are expected to use a different UUID for each retry of a submission
with the same change ID.
Must be a valid LedgerString (as described in ``value.proto``).

If omitted, the participant or the committer may set a value of their choice.

Optional */
char submission_id[1024];
/* Additional contracts used to resolve contract & contract key lookups.
Optional */

Optional: can be empty */
pb_callback_t disclosed_contracts;
/* Must be a valid synchronizer id

Optional */
char synchronizer_id[1024];
/* The package-id selection preference of the client for resolving
package names and interface instances in command submission and interpretation */
package names and interface instances in command submission and interpretation

Optional: can be empty */
pb_callback_t package_id_selection_preference;
/* Fetches the contract keys into the caches to speed up the command processing.
Should only contain contract keys that are expected to be resolved during interpretation of the commands.
Keys of disclosed contracts do not need prefetching.
Each entry specifies a key and a limit on how many contracts to prefetch for that key.
The limit does not count disclosed contracts, and should reflect the number of
additional contracts expected to be resolved during interpretation of the commands.
If a key appears multiple times, the last entry's limit wins.

Optional */
Optional: can be empty */
pb_callback_t prefetch_contract_keys;
/* The maximum number of passes for the Topology-Aware Package Selection (TAPS).
Higher values can increase the chance of successful package selection for routing of interpreted transactions.
If unset, this defaults to the value defined in the participant configuration.
The provided value must not exceed the limit specified in the participant configuration.

Optional */
bool has_taps_max_passes;
uint32_t taps_max_passes;
} com_daml_ledger_api_v2_Commands;

/* Preload contracts */
Expand All @@ -229,9 +267,19 @@ typedef struct _com_daml_ledger_api_v2_PrefetchContractKey {
bool has_template_id;
com_daml_ledger_api_v2_Identifier template_id;
/* The key of the contract the client wants to prefetch.

Required */
bool has_contract_key;
com_daml_ledger_api_v2_Value contract_key;
/* The number of contracts to prefetch for this key, if available.
This is in addition to disclosed contracts.
- for backward compatibility reason, absence is interpreted as 1
- 0 is forbidden
- capped at 2^31 - 1. The system may impose further limits.

Optional */
bool has_limit;
uint32_t limit;
} com_daml_ledger_api_v2_PrefetchContractKey;


Expand All @@ -246,16 +294,16 @@ extern "C" {
#define com_daml_ledger_api_v2_ExerciseByKeyCommand_init_default {false, com_daml_ledger_api_v2_Identifier_init_default, false, com_daml_ledger_api_v2_Value_init_default, "", false, com_daml_ledger_api_v2_Value_init_default}
#define com_daml_ledger_api_v2_CreateAndExerciseCommand_init_default {false, com_daml_ledger_api_v2_Identifier_init_default, false, com_daml_ledger_api_v2_Record_init_default, "", false, com_daml_ledger_api_v2_Value_init_default}
#define com_daml_ledger_api_v2_DisclosedContract_init_default {false, com_daml_ledger_api_v2_Identifier_init_default, "", {0, {0}}, ""}
#define com_daml_ledger_api_v2_Commands_init_default {"", "", "", {{NULL}, NULL}, 0, {google_protobuf_Duration_init_default}, false, google_protobuf_Timestamp_init_default, false, google_protobuf_Duration_init_default, {{NULL}, NULL}, {{NULL}, NULL}, "", {{NULL}, NULL}, "", {{NULL}, NULL}, {{NULL}, NULL}}
#define com_daml_ledger_api_v2_PrefetchContractKey_init_default {false, com_daml_ledger_api_v2_Identifier_init_default, false, com_daml_ledger_api_v2_Value_init_default}
#define com_daml_ledger_api_v2_Commands_init_default {"", "", "", {{NULL}, NULL}, 0, {google_protobuf_Duration_init_default}, false, google_protobuf_Timestamp_init_default, false, google_protobuf_Duration_init_default, {{NULL}, NULL}, {{NULL}, NULL}, "", {{NULL}, NULL}, "", {{NULL}, NULL}, {{NULL}, NULL}, false, 0}
#define com_daml_ledger_api_v2_PrefetchContractKey_init_default {false, com_daml_ledger_api_v2_Identifier_init_default, false, com_daml_ledger_api_v2_Value_init_default, false, 0}
#define com_daml_ledger_api_v2_Command_init_zero {0, {com_daml_ledger_api_v2_CreateCommand_init_zero}}
#define com_daml_ledger_api_v2_CreateCommand_init_zero {false, com_daml_ledger_api_v2_Identifier_init_zero, false, com_daml_ledger_api_v2_Record_init_zero}
#define com_daml_ledger_api_v2_ExerciseCommand_init_zero {false, com_daml_ledger_api_v2_Identifier_init_zero, "", "", false, com_daml_ledger_api_v2_Value_init_zero}
#define com_daml_ledger_api_v2_ExerciseByKeyCommand_init_zero {false, com_daml_ledger_api_v2_Identifier_init_zero, false, com_daml_ledger_api_v2_Value_init_zero, "", false, com_daml_ledger_api_v2_Value_init_zero}
#define com_daml_ledger_api_v2_CreateAndExerciseCommand_init_zero {false, com_daml_ledger_api_v2_Identifier_init_zero, false, com_daml_ledger_api_v2_Record_init_zero, "", false, com_daml_ledger_api_v2_Value_init_zero}
#define com_daml_ledger_api_v2_DisclosedContract_init_zero {false, com_daml_ledger_api_v2_Identifier_init_zero, "", {0, {0}}, ""}
#define com_daml_ledger_api_v2_Commands_init_zero {"", "", "", {{NULL}, NULL}, 0, {google_protobuf_Duration_init_zero}, false, google_protobuf_Timestamp_init_zero, false, google_protobuf_Duration_init_zero, {{NULL}, NULL}, {{NULL}, NULL}, "", {{NULL}, NULL}, "", {{NULL}, NULL}, {{NULL}, NULL}}
#define com_daml_ledger_api_v2_PrefetchContractKey_init_zero {false, com_daml_ledger_api_v2_Identifier_init_zero, false, com_daml_ledger_api_v2_Value_init_zero}
#define com_daml_ledger_api_v2_Commands_init_zero {"", "", "", {{NULL}, NULL}, 0, {google_protobuf_Duration_init_zero}, false, google_protobuf_Timestamp_init_zero, false, google_protobuf_Duration_init_zero, {{NULL}, NULL}, {{NULL}, NULL}, "", {{NULL}, NULL}, "", {{NULL}, NULL}, {{NULL}, NULL}, false, 0}
#define com_daml_ledger_api_v2_PrefetchContractKey_init_zero {false, com_daml_ledger_api_v2_Identifier_init_zero, false, com_daml_ledger_api_v2_Value_init_zero, false, 0}

/* Field tags (for use in manual encoding/decoding) */
#define com_daml_ledger_api_v2_CreateCommand_template_id_tag 1
Expand Down Expand Up @@ -295,8 +343,10 @@ extern "C" {
#define com_daml_ledger_api_v2_Commands_synchronizer_id_tag 13
#define com_daml_ledger_api_v2_Commands_package_id_selection_preference_tag 14
#define com_daml_ledger_api_v2_Commands_prefetch_contract_keys_tag 15
#define com_daml_ledger_api_v2_Commands_taps_max_passes_tag 16
#define com_daml_ledger_api_v2_PrefetchContractKey_template_id_tag 1
#define com_daml_ledger_api_v2_PrefetchContractKey_contract_key_tag 2
#define com_daml_ledger_api_v2_PrefetchContractKey_limit_tag 3

/* Struct field encoding specification for nanopb */
#define com_daml_ledger_api_v2_Command_FIELDLIST(X, a) \
Expand Down Expand Up @@ -375,7 +425,8 @@ X(a, STATIC, SINGULAR, STRING, submission_id, 11) \
X(a, CALLBACK, REPEATED, MESSAGE, disclosed_contracts, 12) \
X(a, STATIC, SINGULAR, STRING, synchronizer_id, 13) \
X(a, CALLBACK, REPEATED, STRING, package_id_selection_preference, 14) \
X(a, CALLBACK, REPEATED, MESSAGE, prefetch_contract_keys, 15)
X(a, CALLBACK, REPEATED, MESSAGE, prefetch_contract_keys, 15) \
X(a, STATIC, OPTIONAL, UINT32, taps_max_passes, 16)
#define com_daml_ledger_api_v2_Commands_CALLBACK pb_default_field_callback
#define com_daml_ledger_api_v2_Commands_DEFAULT NULL
#define com_daml_ledger_api_v2_Commands_commands_MSGTYPE com_daml_ledger_api_v2_Command
Expand All @@ -387,7 +438,8 @@ X(a, CALLBACK, REPEATED, MESSAGE, prefetch_contract_keys, 15)

#define com_daml_ledger_api_v2_PrefetchContractKey_FIELDLIST(X, a) \
X(a, STATIC, OPTIONAL, MESSAGE, template_id, 1) \
X(a, STATIC, OPTIONAL, MESSAGE, contract_key, 2)
X(a, STATIC, OPTIONAL, MESSAGE, contract_key, 2) \
X(a, STATIC, OPTIONAL, UINT32, limit, 3)
#define com_daml_ledger_api_v2_PrefetchContractKey_CALLBACK NULL
#define com_daml_ledger_api_v2_PrefetchContractKey_DEFAULT NULL
#define com_daml_ledger_api_v2_PrefetchContractKey_template_id_MSGTYPE com_daml_ledger_api_v2_Identifier
Expand Down Expand Up @@ -425,7 +477,7 @@ union com_daml_ledger_api_v2_Command_command_size_union {char f1[(3093 + com_dam
#endif
#if defined(com_daml_ledger_api_v2_Value_size)
#define com_daml_ledger_api_v2_ExerciseCommand_size (5139 + com_daml_ledger_api_v2_Value_size)
#define com_daml_ledger_api_v2_PrefetchContractKey_size (3087 + com_daml_ledger_api_v2_Value_size)
#define com_daml_ledger_api_v2_PrefetchContractKey_size (3093 + com_daml_ledger_api_v2_Value_size)
#endif
#if defined(com_daml_ledger_api_v2_Value_size) && defined(com_daml_ledger_api_v2_Value_size)
#define com_daml_ledger_api_v2_ExerciseByKeyCommand_size (4119 + com_daml_ledger_api_v2_Value_size + com_daml_ledger_api_v2_Value_size)
Expand Down
Loading
Loading