pub enum DamlCommand {
Create {
template_id: DamlTemplateId,
create_arguments: DamlValue,
},
Exercise {
template_id: DamlTemplateId,
contract_id: DamlContractId,
choice: String,
choice_argument: DamlValue,
},
CreateAndExercise {
template_id: DamlTemplateId,
create_arguments: DamlValue,
choice: String,
choice_argument: DamlValue,
},
ExerciseByKey {
template_id: DamlTemplateId,
contract_key: DamlValue,
choice: String,
choice_argument: DamlValue,
},
}Expand description
Daml command — an action to submit to the Canton Ledger API.
Commands are submitted via CommandService.SubmitAndWait (synchronous) or
CommandSubmissionService.Submit (asynchronous). Multiple commands in a
single submission are executed atomically.
In Daml 3.x, the InteractiveSubmissionService also supports a two-step
prepare→sign→execute flow for external signing.
Variants§
Create
Create a new contract from a template. The submitting party must be a signatory of the template.
Fields
template_id: DamlTemplateIdTemplate to instantiate
Exercise
Exercise a choice on an existing contract. The submitting party must be a controller of the choice. Consuming choices archive the contract; non-consuming choices leave it active.
Fields
template_id: DamlTemplateIdTemplate of the contract
contract_id: DamlContractIdContract to exercise on
CreateAndExercise
Create a contract and immediately exercise a choice on it. Useful when commands depend on each other within a single transaction.
Fields
template_id: DamlTemplateIdTemplate to instantiate
ExerciseByKey
Exercise a choice on a contract identified by its key rather than contract ID. The contract key must be maintained by the submitting party.
Trait Implementations§
Source§impl Clone for DamlCommand
impl Clone for DamlCommand
Source§fn clone(&self) -> DamlCommand
fn clone(&self) -> DamlCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DamlCommand
impl Debug for DamlCommand
Source§impl<'de> Deserialize<'de> for DamlCommand
impl<'de> Deserialize<'de> for DamlCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for DamlCommand
impl PartialEq for DamlCommand
Source§fn eq(&self, other: &DamlCommand) -> bool
fn eq(&self, other: &DamlCommand) -> bool
self and other values to be equal, and is used by ==.