> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canton.network/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# prepareExecuteAndWait

Wallet Gateway

›

[Sync dApp API](https://docs.canton.network/reference/wallet-gateway-json-rpc/specs/dapp-api.md)

›

prepareExecuteAndWait

Sync dApp API

# prepareExecuteAndWait

JSON-RPC

[Updated 1.4.0](#history-updated-1-4-0)

POST

`JSON-RPC prepareExecuteAndWait`

## Protocol Details

Protocol
JSON-RPC

Transport
HTTP POST

Method
prepareExecuteAndWait

Parameters
1

Result
object

## Inputs

### params

Shape
object

Schema
JsPrepareSubmissionRequest

Required
commands

`commands`
array\[object]

required

## Outputs

### result

Shape
object

Required
tx

`tx`
object

required

## Related Schemas

> [accordion] JsPrepareSubmissionRequest
>
> `commands`
> array\[object]
>
> required

> [accordion] result
>
> `tx`
> object
>
> required

## History

Updated
`1.4.0`

The method was updated in this snapshot.

cURL

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl \
  <JSON_RPC_URL> \
  -H 'content-type: application/json' \
  --data @- <<'EOF'
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "prepareExecuteAndWait",
  "params": {
    "params": {
      "commands": [
        {
          "CreateCommand": {}
        }
      ]
    }
  }
}
EOF
```

Result

application/json

```json Result theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "tx": {
    "status": "<string>",
    "commandId": "<string>",
    "payload": {
      "updateId": "<string>",
      "completionOffset": "<integer>"
    }
  }
}
```
