Skip to main content
POST
/
v2
/
interactive-submission
/
preferred-packages
/v2/interactive-submission/preferred-packages
curl --request POST \
  --url https://api.example.com/v2/interactive-submission/preferred-packages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "packageVettingRequirements": [
    {
      "parties": [
        "<string>"
      ],
      "packageName": "<string>"
    }
  ],
  "synchronizerId": "<string>",
  "vettingValidAt": "<string>"
}
'
{
  "packageReferences": [
    {
      "packageId": "<string>",
      "packageName": "<string>",
      "packageVersion": "<string>"
    }
  ],
  "synchronizerId": "<string>"
}

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.

Authorizations

Authorization
string
header
required

Ledger API standard JWT token

Body

application/json
packageVettingRequirements
PackageVettingRequirement · object[]
required

The package-name vetting requirements for which the preferred packages should be resolved.

Generally it is enough to provide the requirements for the intended command's root package-names. Additional package-name requirements can be provided when additional Daml transaction informees need to use package dependencies of the command's root packages.

Required: must be non-empty

synchronizerId
string

The synchronizer whose vetting state should be used for resolving this query. If not specified, the vetting states of all synchronizers to which the participant is connected are used.

Optional

vettingValidAt
string

The timestamp at which the package vetting validity should be computed on the latest topology snapshot as seen by the participant. If not provided, the participant's current clock time is used.

Optional

Response

packageReferences
PackageReference · object[]
required

The package references of the preferred packages. Must contain one package reference for each requested package-name.

If you build command submissions whose content depends on the returned preferred packages, then we recommend submitting the preferred package-ids in the package_id_selection_preference of the command submission to avoid race conditions with concurrent changes of the on-ledger package vetting state.

Required: must be non-empty

synchronizerId
string
required

The synchronizer for which the package preferences are computed. If the synchronizer_id was specified in the request, then it matches the request synchronizer_id.

Required