Skip to content
Documentation/canton-network-docs/Ledger APIgRPC APIPackagesv2.interactiveServicesInteractiveSubmissionServiceView on canton-network-docs
canton-network-docs/Ledger APIgRPC APIPackagesv2.interactiveServicesInteractiveSubmissionService

PrepareSubmission

Ledger APIgRPC APIv2.interactivePrepareSubmission

com.daml.ledger.api.v2.interactive

PrepareSubmission

gRPCSince 3.4.4
RPC/com.daml.ledger.api.v2.interactive.InteractiveSubmissionService/PrepareSubmission

Protocol Details

Inputs

PrepareSubmissionRequest

user_idstring
command_idstring
commandsrepeated Command
min_ledger_timeMinLedgerTime
max_record_timeTimestamp
act_asrepeated string
read_asrepeated string
disclosed_contractsrepeated DisclosedContract
synchronizer_idstring
package_id_selection_preferencerepeated string
verbose_hashingbool
prefetch_contract_keysrepeated PrefetchContractKey
estimate_traffic_costCostEstimationHints
hashing_scheme_versionHashingSchemeVersion
taps_max_passesuint32

Outputs

PrepareSubmissionResponse

prepared_transactionPreparedTransaction
prepared_transaction_hashbytes
hashing_scheme_versionHashingSchemeVersion
hashing_detailsstring
cost_estimationCostEstimation

Lifecycle Changes

3.4.4introduced

com.daml.ledger.api.v2.interactive.PrepareSubmissionRequest

user_idstring
command_idstring
commandsrepeated Command
min_ledger_timeMinLedgerTime
max_record_timeTimestamp
act_asrepeated string
read_asrepeated string
disclosed_contractsrepeated DisclosedContract
synchronizer_idstring
package_id_selection_preferencerepeated string
verbose_hashingbool
prefetch_contract_keysrepeated PrefetchContractKey
estimate_traffic_costCostEstimationHints
hashing_scheme_versionHashingSchemeVersion
taps_max_passesuint32

com.daml.ledger.api.v2.Command

createCreateCommand
exerciseExerciseCommand
exercise_by_keyExerciseByKeyCommand
create_and_exerciseCreateAndExerciseCommand

com.daml.ledger.api.v2.CreateCommand

template_idIdentifier
create_argumentsRecord

com.daml.ledger.api.v2.Identifier

package_idstring
module_namestring
entity_namestring

com.daml.ledger.api.v2.Record

record_idIdentifier
fieldsrepeated RecordField

com.daml.ledger.api.v2.RecordField

labelstring
valueValue

com.daml.ledger.api.v2.Value

unitEmpty
boolbool
int64sint64
dateint32
timestampsfixed64
numericstring
partystring
textstring
contract_idstring
optionalOptional
listList
text_mapTextMap
gen_mapGenMap
recordRecord
variantVariant
enumEnum

com.daml.ledger.api.v2.Optional

valueValue

com.daml.ledger.api.v2.List

elementsrepeated Value

com.daml.ledger.api.v2.TextMap

entriesrepeated Entry

com.daml.ledger.api.v2.TextMap.Entry

keystring
valueValue

com.daml.ledger.api.v2.GenMap

entriesrepeated Entry

com.daml.ledger.api.v2.GenMap.Entry

keyValue
valueValue

com.daml.ledger.api.v2.Variant

variant_idIdentifier
constructorstring
valueValue

com.daml.ledger.api.v2.Enum

enum_idIdentifier
constructorstring

com.daml.ledger.api.v2.ExerciseCommand

template_idIdentifier
contract_idstring
choicestring
choice_argumentValue

com.daml.ledger.api.v2.ExerciseByKeyCommand

template_idIdentifier
contract_keyValue
choicestring
choice_argumentValue

com.daml.ledger.api.v2.CreateAndExerciseCommand

template_idIdentifier
create_argumentsRecord
choicestring
choice_argumentValue

com.daml.ledger.api.v2.interactive.MinLedgerTime

min_ledger_time_absTimestamp
min_ledger_time_relDuration

com.daml.ledger.api.v2.DisclosedContract

template_idIdentifier
contract_idstring
created_event_blobbytes
synchronizer_idstring

com.daml.ledger.api.v2.PrefetchContractKey

template_idIdentifier
contract_keyValue
limituint32

com.daml.ledger.api.v2.interactive.CostEstimationHints

disabledbool
expected_signaturesrepeated SigningAlgorithmSpec

com.daml.ledger.api.v2.SigningAlgorithmSpec

  • SIGNING_ALGORITHM_SPEC_UNSPECIFIED
  • SIGNING_ALGORITHM_SPEC_ED25519
  • SIGNING_ALGORITHM_SPEC_EC_DSA_SHA_256
  • SIGNING_ALGORITHM_SPEC_EC_DSA_SHA_384

com.daml.ledger.api.v2.interactive.HashingSchemeVersion

  • HASHING_SCHEME_VERSION_UNSPECIFIED
  • HASHING_SCHEME_VERSION_V2
  • HASHING_SCHEME_VERSION_V3

com.daml.ledger.api.v2.interactive.PrepareSubmissionResponse

prepared_transactionPreparedTransaction
prepared_transaction_hashbytes
hashing_scheme_versionHashingSchemeVersion
hashing_detailsstring
cost_estimationCostEstimation

com.daml.ledger.api.v2.interactive.PreparedTransaction

transactionDamlTransaction
metadataMetadata

com.daml.ledger.api.v2.interactive.DamlTransaction

versionstring
rootsrepeated string
nodesrepeated Node
node_seedsrepeated NodeSeed

com.daml.ledger.api.v2.interactive.DamlTransaction.NodeSeed

node_idint32
seedbytes

com.daml.ledger.api.v2.interactive.DamlTransaction.Node

node_idstring
v1Node

com.daml.ledger.api.v2.interactive.transaction.v1.Node

createCreate
fetchFetch
exerciseExercise
rollbackRollback
query_by_keyQueryByKey

com.daml.ledger.api.v2.interactive.transaction.v1.Create

lf_versionstring
contract_idstring
package_namestring
template_idIdentifier
argumentValue
signatoriesrepeated string
stakeholdersrepeated string
keyGlobalKeyWithMaintainers

com.daml.ledger.api.v2.interactive.GlobalKeyWithMaintainers

keyGlobalKey
maintainersrepeated string

com.daml.ledger.api.v2.interactive.GlobalKey

template_idIdentifier
package_namestring
keyValue
hashbytes

com.daml.ledger.api.v2.interactive.transaction.v1.Fetch

lf_versionstring
contract_idstring
package_namestring
template_idIdentifier
signatoriesrepeated string
stakeholdersrepeated string
acting_partiesrepeated string
interface_idIdentifier
keyGlobalKeyWithMaintainers
by_keybool

com.daml.ledger.api.v2.interactive.transaction.v1.Exercise

lf_versionstring
contract_idstring
package_namestring
template_idIdentifier
signatoriesrepeated string
stakeholdersrepeated string
acting_partiesrepeated string
interface_idIdentifier
choice_idstring
chosen_valueValue
consumingbool
childrenrepeated string
exercise_resultValue
choice_observersrepeated string
keyGlobalKeyWithMaintainers
by_keybool

com.daml.ledger.api.v2.interactive.transaction.v1.Rollback

childrenrepeated string

com.daml.ledger.api.v2.interactive.transaction.v1.QueryByKey

lf_versionstring
package_namestring
template_idIdentifier
exhaustivebool
keyGlobalKeyWithMaintainers
resultrepeated string

com.daml.ledger.api.v2.interactive.Metadata

submitter_infoSubmitterInfo
synchronizer_idstring
mediator_groupuint32
transaction_uuidstring
preparation_timeuint64
input_contractsrepeated InputContract
min_ledger_effective_timeuint64
max_ledger_effective_timeuint64
max_record_timeuint64
global_key_mappingrepeated GlobalKeyMappingEntry

com.daml.ledger.api.v2.interactive.Metadata.SubmitterInfo

act_asrepeated string
command_idstring

com.daml.ledger.api.v2.interactive.Metadata.GlobalKeyMappingEntry

keyGlobalKey
valueValue

com.daml.ledger.api.v2.interactive.Metadata.InputContract

v1Create
created_atuint64
event_blobbytes

com.daml.ledger.api.v2.interactive.CostEstimation

estimation_timestampTimestamp
confirmation_request_traffic_cost_estimationuint64
confirmation_response_traffic_cost_estimationuint64
total_traffic_cost_estimationuint64
grpcurl
grpcurl
# Add -plaintext if the server is not using TLS.
grpcurl \
  -d @ \
  <HOST:PORT> \
  com.daml.ledger.api.v2.interactive.InteractiveSubmissionService/PrepareSubmission <<'EOF'
{
  "userId": "string",
  "commandId": "string",
  "commands": [
    {
      "create": {
        "templateId": {
          "packageId": "string",
          "moduleName": "string",
          "entityName": "string"
        },
        "createArguments": {
          "recordId": {},
          "fields": [
            {}
          ]
        }
      }
    }
  ],
  "minLedgerTime": {
    "minLedgerTimeAbs": "string"
  },
  "maxRecordTime": "string",
  "actAs": [
    "string"
  ],
  "readAs": [
    "string"
  ],
  "disclosedContracts": [
    {
      "templateId": {
        "packageId": "string",
        "moduleName": "string",
        "entityName": "string"
      },
      "contractId": "string",
      "createdEventBlob": "BASE64_ENCODED_BYTES",
      "synchronizerId": "string"
    }
  ]
}
EOF
OKapplication/json
OK
{
  "preparedTransaction": {
    "transaction": {
      "version": "string",
      "roots": [
        "string"
      ],
      "nodes": [
        {
          "nodeId": "string",
          "v1": {}
        }
      ],
      "nodeSeeds": [
        {
          "nodeId": 0,
          "seed": "BASE64_ENCODED_BYTES"
        }
      ]
    },
    "metadata": {
      "submitterInfo": {
        "actAs": [
          "string"
        ],
        "commandId": "string"
      },
      "synchronizerId": "string",
      "mediatorGroup": 0,
      "transactionUuid": "string",
      "preparationTime": "0",
      "inputContracts": [
        {
          "v1": {},
          "createdAt": "0",
          "eventBlob": "BASE64_ENCODED_BYTES"
        }
      ],
      "minLedgerEffectiveTime": "0",
      "maxLedgerEffectiveTime": "0"
    }
  },
  "preparedTransactionHash": "BASE64_ENCODED_BYTES",
  "hashingSchemeVersion": "HASHING_SCHEME_VERSION_UNSPECIFIED",
  "hashingDetails": "string",
  "costEstimation": {
    "estimationTimestamp": "string",
    "confirmationRequestTrafficCostEstimation": "0",
    "confirmationResponseTrafficCostEstimation": "0",
    "totalTrafficCostEstimation": "0"
  }
}