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::"]
}
| Field | Meaning |
|---|---|
commands | Create or exercise commands in Ledger API JSON form. |
userId | Ledger API user id. Usually matches the JWT subject. |
commandId | Unique id for this command attempt. |
actAs | Submitting parties. |
readAs | Additional read parties for disclosure. |
synchronizerId | Optional. Use when the command must target one synchronizer. |
#pkg:Module:Entity | Package-name template id. It resolves during prepare. |
Exercise commands must contain real contract ids. Placeholder contract ids fail during prepare and appear as W011.