POST /v2/interactive-submission/preferred-packages

Compute the preferred packages for the vetting requirements in the request. A preferred package is the highest-versioned package for a provided package-name that is vetted by all the participants hosting the provided parties.

Ledger API clients should use this endpoint for constructing command submissions that are compatible with the provided preferred packages, by making informed decisions on:

  • which are the compatible packages that can be used to create contracts
  • which contract or exercise choice argument version can be used in the command
  • which choices can be executed on a template or interface of a contract

If the package preferences could not be computed due to no selection satisfying the requirements, a FAILED_PRECONDITION error will be returned.

Can be accessed by any Ledger API client with a valid token when Ledger API authorization is enabled.

Experimental API: this endpoint is not guaranteed to provide backwards compatibility in future releases

post/v2/interactive-submission/preferred-packages

Request body

synchronizerIdstring

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

vettingValidAtstring

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

synchronizerIdstring 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

Changes

No recorded changes to this endpoint across all 1 revision of this API.