Skip to main content
POST
/
registry
/
transfer-instruction
/
v1
/
transfer-factory
/registry/transfer-instruction/v1/transfer-factory
curl --request POST \
  --url https://api.example.com/registry/transfer-instruction/v1/transfer-factory \
  --header 'Content-Type: application/json' \
  --data '
{
  "choiceArguments": {},
  "excludeDebugFields": false
}
'
{
  "factoryId": "<string>",
  "transferKind": "self",
  "choiceContext": {
    "choiceContextData": {},
    "disclosedContracts": [
      {
        "templateId": "<string>",
        "contractId": "<string>",
        "createdEventBlob": "<string>",
        "synchronizerId": "<string>",
        "debugPackageName": "<string>",
        "debugPayload": {},
        "debugCreatedAt": "2023-11-07T05:31:56Z"
      }
    ]
  }
}

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.

Body

application/json
choiceArguments
object
required

The arguments that are intended to be passed to the choice provided by the factory. To avoid repeating the Daml type definitions, they are specified as JSON objects. However the concrete format is given by how the choice arguments are encoded using the Daml JSON API (with the extraArgs.context and extraArgs.meta fields set to the empty object).

The choice arguments are provided so that the registry can also provide choice-argument specific contracts, e.g., the configuration for a specific instrument-id.

excludeDebugFields
boolean
default:false

If set to true, the response will not include fields prefixed with 'debug'. Useful to save bandwidth.

Response

ok

The transfer factory contract together with the choice context required to exercise the choice provided by the factory. Typically used to implement the generic initiation of on-ledger workflows via a Daml interface.

Clients SHOULD avoid reusing the same FactoryWithChoiceContext for exercising multiple choices, as the choice context MAY be specific to the choice being exercised.

factoryId
string
required

The contract ID of the contract implementing the factory interface.

transferKind
enum<string>
required

The kind of transfer workflow that will be used:

  • offer: offer a transfer to the receiver and only transfer if they accept
  • direct: transfer directly to the receiver without asking them for approval. Only chosen if the receiver has pre-approved direct transfers.
  • self: a self-transfer where the sender and receiver are the same party. No approval is required, and the transfer is typically immediate.
Available options:
self,
direct,
offer
choiceContext
object
required

The context required to exercise a choice on a contract via an interface. Used to retrieve additional reference data that is passed in via disclosed contracts, which are in turn referred to via their contract ID in the choiceContextData.