Skip to main content

Command JSON

estimate and simulate take a path to a Ledger API command payload. There is no required folder layout; pass the file path that fits your project.

{
"commands": [{
"CreateCommand": {
"templateId": "#my-pkg:Main:MyTemplate",
"createArguments": {
"owner": "Alice::",
"amount": "100.00",
"label": "Example create"
}
}
}],
"userId": "ledger-api-user",
"commandId": "unique-command-id",
"actAs": ["Alice::"],
"readAs": ["Alice::"]
}
FieldMeaning
commandsCreate or exercise commands in Ledger API JSON form.
userIdLedger API user id. Usually matches the JWT subject.
commandIdUnique id for this command attempt.
actAsSubmitting parties.
readAsAdditional read parties for disclosure.
synchronizerIdOptional. Use when the command must target one synchronizer.
#pkg:Module:EntityPackage-name template id. It resolves during prepare.

Exercise commands must contain real contract ids. Placeholder contract ids fail during prepare and appear as W011.