.. _module-splice-api-token-transferinstructionv1-72974: Splice.Api.Token.TransferInstructionV1 ====================================== Instruct transfers of holdings between parties\. Interfaces ---------- .. _type-splice-api-token-transferinstructionv1-transferfactory-55548: **interface** `TransferFactory `_ A factory contract to instruct transfers of holdings between parties\. **viewtype** `TransferFactoryView `_ + **Choice** Archive Controller\: Signatories of implementing template Returns\: () (no fields) + .. _type-splice-api-token-transferinstructionv1-transferfactorypublicfetch-56912: **Choice** `TransferFactory_PublicFetch `_ Fetch the view of the factory contract\. Controller\: actor Returns\: `TransferFactoryView `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - expectedAdmin - `Party `_ - The expected admin party issuing the factory\. Implementations MUST validate that this matches the admin of the factory\. Callers SHOULD ensure they get ``expectedAdmin`` from a trusted source, e\.g\., a read against their own participant\. That way they can ensure that it is safe to exercise a choice on a factory contract acquired from an untrusted source *provided* all vetted Daml packages only contain interface implementations that check the expected admin party\. * - actor - `Party `_ - The party fetching the contract\. + .. _type-splice-api-token-transferinstructionv1-transferfactorytransfer-25365: **Choice** `TransferFactory_Transfer `_ Instruct the registry to execute a transfer\. Implementations MUST ensure that this choice fails if ``transfer.executeBefore`` is in the past\. Controller\: (DA\.Internal\.Record\.getField @\"sender\" transfer) Returns\: `TransferInstructionResult `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - expectedAdmin - `Party `_ - The expected admin party issuing the factory\. Implementations MUST validate that this matches the admin of the factory\. Callers SHOULD ensure they get ``expectedAdmin`` from a trusted source, e\.g\., a read against their own participant\. That way they can ensure that it is safe to exercise a choice on a factory contract acquired from an untrusted source *provided* all vetted Daml packages only contain interface implementations that check the expected admin party\. * - transfer - `Transfer `_ - The transfer to execute\. * - extraArgs - ExtraArgs - The extra arguments to pass to the transfer implementation\. + **Method transferFactory\_publicFetchImpl \:** `ContractId `_ `TransferFactory `_ \-\> `TransferFactory_PublicFetch `_ \-\> `Update `_ `TransferFactoryView `_ + **Method transferFactory\_transferImpl \:** `ContractId `_ `TransferFactory `_ \-\> `TransferFactory_Transfer `_ \-\> `Update `_ `TransferInstructionResult `_ .. _type-splice-api-token-transferinstructionv1-transferinstruction-69882: **interface** `TransferInstruction `_ An interface for tracking the status of a transfer instruction, i\.e\., a request to a registry app to execute a transfer\. Registries MAY evolve the transfer instruction in multiple steps\. They SHOULD do so using only the choices on this interface, so that wallets can reliably parse the transaction history and determine whether the instruction ultimately succeeded or failed\. **viewtype** `TransferInstructionView `_ + **Choice** Archive Controller\: Signatories of implementing template Returns\: () (no fields) + .. _type-splice-api-token-transferinstructionv1-transferinstructionaccept-36884: **Choice** `TransferInstruction_Accept `_ Accept the transfer as the receiver\. This choice is only available if the instruction is in ``TransferPendingReceiverAcceptance`` state\. Note that while implementations will typically return ``TransferInstructionResult_Completed``, this is not guaranteed\. The result of the choice is implementation\-specific and MAY be any of the three possible results\. Controller\: (DA\.Internal\.Record\.getField @\"receiver\" (DA\.Internal\.Record\.getField @\"transfer\" (view this))) Returns\: `TransferInstructionResult `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - extraArgs - ExtraArgs - Additional context required in order to exercise the choice\. + .. _type-splice-api-token-transferinstructionv1-transferinstructionreject-89645: **Choice** `TransferInstruction_Reject `_ Reject the transfer as the receiver\. This choice is only available if the instruction is in ``TransferPendingReceiverAcceptance`` state\. Controller\: (DA\.Internal\.Record\.getField @\"receiver\" (DA\.Internal\.Record\.getField @\"transfer\" (view this))) Returns\: `TransferInstructionResult `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - extraArgs - ExtraArgs - Additional context required in order to exercise the choice\. + .. _type-splice-api-token-transferinstructionv1-transferinstructionupdate-27423: **Choice** `TransferInstruction_Update `_ Update the state of the transfer instruction\. Used by the registry to execute registry internal workflow steps that advance the state of the transfer instruction\. A reason may be communicated via the metadata\. Controller\: (DA\.Internal\.Record\.getField @\"admin\" (DA\.Internal\.Record\.getField @\"instrumentId\" (DA\.Internal\.Record\.getField @\"transfer\" (view this)))), extraActors Returns\: `TransferInstructionResult `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - extraActors - \[`Party `_\] - Extra actors authorizing the update\. Implementations MUST check that this field contains the expected actors for the specific update\. * - extraArgs - ExtraArgs - Additional context required in order to exercise the choice\. + .. _type-splice-api-token-transferinstructionv1-transferinstructionwithdraw-43648: **Choice** `TransferInstruction_Withdraw `_ Withdraw the transfer instruction as the sender\. Controller\: (DA\.Internal\.Record\.getField @\"sender\" (DA\.Internal\.Record\.getField @\"transfer\" (view this))) Returns\: `TransferInstructionResult `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - extraArgs - ExtraArgs - Additional context required in order to exercise the choice\. + **Method transferInstruction\_acceptImpl \:** `ContractId `_ `TransferInstruction `_ \-\> `TransferInstruction_Accept `_ \-\> `Update `_ `TransferInstructionResult `_ + **Method transferInstruction\_rejectImpl \:** `ContractId `_ `TransferInstruction `_ \-\> `TransferInstruction_Reject `_ \-\> `Update `_ `TransferInstructionResult `_ + **Method transferInstruction\_updateImpl \:** `ContractId `_ `TransferInstruction `_ \-\> `TransferInstruction_Update `_ \-\> `Update `_ `TransferInstructionResult `_ + **Method transferInstruction\_withdrawImpl \:** `ContractId `_ `TransferInstruction `_ \-\> `TransferInstruction_Withdraw `_ \-\> `Update `_ `TransferInstructionResult `_ Data Types ---------- .. _type-splice-api-token-transferinstructionv1-transfer-51973: **data** `Transfer `_ A specification of a transfer of holdings between two parties\. .. _constr-splice-api-token-transferinstructionv1-transfer-5022: `Transfer `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - sender - `Party `_ - The sender of the transfer\. * - receiver - `Party `_ - The receiver of the transfer\. * - amount - `Decimal `_ - The amount to transfer\. * - instrumentId - InstrumentId - The instrument identifier\. * - requestedAt - `Time `_ - Wallet provided timestamp when the transfer was requested\. MUST be in the past when instructing the transfer\. * - executeBefore - `Time `_ - Until when (exclusive) the transfer may be executed\. MUST be in the future when instructing the transfer\. Registries SHOULD NOT execute the transfer instruction after this time, so that senders can retry creating a new transfer instruction after this time\. * - inputHoldingCids - \[`ContractId `_ Holding\] - The holding contracts that should be used to fund the transfer\. MAY be empty if the registry supports automatic selection of holdings for transfers or does not represent holdings on\-ledger\. If specified, then the transfer MUST archive all of these holdings, so that the execution of the transfer conflicts with any other transfers using these holdings\. Thereby allowing that the sender can use deliberate contention on holdings to prevent duplicate transfers\. * - meta - Metadata - Metadata\. **instance** `Eq `_ `Transfer `_ **instance** `Show `_ `Transfer `_ **instance** `GetField `_ \"amount\" `Transfer `_ `Decimal `_ **instance** `GetField `_ \"executeBefore\" `Transfer `_ `Time `_ **instance** `GetField `_ \"inputHoldingCids\" `Transfer `_ \[`ContractId `_ Holding\] **instance** `GetField `_ \"instrumentId\" `Transfer `_ InstrumentId **instance** `GetField `_ \"meta\" `Transfer `_ Metadata **instance** `GetField `_ \"receiver\" `Transfer `_ `Party `_ **instance** `GetField `_ \"requestedAt\" `Transfer `_ `Time `_ **instance** `GetField `_ \"sender\" `Transfer `_ `Party `_ **instance** `GetField `_ \"transfer\" `TransferFactory_Transfer `_ `Transfer `_ **instance** `GetField `_ \"transfer\" `TransferInstructionView `_ `Transfer `_ **instance** `SetField `_ \"amount\" `Transfer `_ `Decimal `_ **instance** `SetField `_ \"executeBefore\" `Transfer `_ `Time `_ **instance** `SetField `_ \"inputHoldingCids\" `Transfer `_ \[`ContractId `_ Holding\] **instance** `SetField `_ \"instrumentId\" `Transfer `_ InstrumentId **instance** `SetField `_ \"meta\" `Transfer `_ Metadata **instance** `SetField `_ \"receiver\" `Transfer `_ `Party `_ **instance** `SetField `_ \"requestedAt\" `Transfer `_ `Time `_ **instance** `SetField `_ \"sender\" `Transfer `_ `Party `_ **instance** `SetField `_ \"transfer\" `TransferFactory_Transfer `_ `Transfer `_ **instance** `SetField `_ \"transfer\" `TransferInstructionView `_ `Transfer `_ .. _type-splice-api-token-transferinstructionv1-transferfactoryview-36679: **data** `TransferFactoryView `_ View for ``TransferFactory``\. .. _constr-splice-api-token-transferinstructionv1-transferfactoryview-43930: `TransferFactoryView `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - admin - `Party `_ - The party representing the registry app that administers the instruments for which this transfer factory can be used\. * - meta - Metadata - Additional metadata specific to the transfer factory, used for extensibility\. **instance** `Eq `_ `TransferFactoryView `_ **instance** `Show `_ `TransferFactoryView `_ **instance** HasMethod `TransferFactory `_ \"transferFactory\_publicFetchImpl\" (`ContractId `_ `TransferFactory `_ \-\> `TransferFactory_PublicFetch `_ \-\> `Update `_ `TransferFactoryView `_) **instance** `HasFromAnyView `_ `TransferFactory `_ `TransferFactoryView `_ **instance** `HasInterfaceView `_ `TransferFactory `_ `TransferFactoryView `_ **instance** `GetField `_ \"admin\" `TransferFactoryView `_ `Party `_ **instance** `GetField `_ \"meta\" `TransferFactoryView `_ Metadata **instance** `SetField `_ \"admin\" `TransferFactoryView `_ `Party `_ **instance** `SetField `_ \"meta\" `TransferFactoryView `_ Metadata **instance** `HasExercise `_ `TransferFactory `_ `TransferFactory_PublicFetch `_ `TransferFactoryView `_ **instance** `HasExerciseGuarded `_ `TransferFactory `_ `TransferFactory_PublicFetch `_ `TransferFactoryView `_ **instance** `HasFromAnyChoice `_ `TransferFactory `_ `TransferFactory_PublicFetch `_ `TransferFactoryView `_ **instance** `HasToAnyChoice `_ `TransferFactory `_ `TransferFactory_PublicFetch `_ `TransferFactoryView `_ .. _type-splice-api-token-transferinstructionv1-transferinstructionresult-24735: **data** `TransferInstructionResult `_ The result of instructing a transfer or advancing the state of a transfer instruction\. .. _constr-splice-api-token-transferinstructionv1-transferinstructionresult-25274: `TransferInstructionResult `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - output - `TransferInstructionResult_Output `_ - The output of the step\. * - senderChangeCids - \[`ContractId `_ Holding\] - New holdings owned by the sender created to return \"change\"\. Can be used by callers to batch creating or updating multiple transfer instructions in a single Daml transaction\. * - meta - Metadata - Additional metadata specific to the transfer instruction, used for extensibility; e\.g\., fees charged\. **instance** `Eq `_ `TransferInstructionResult `_ **instance** `Show `_ `TransferInstructionResult `_ **instance** HasMethod `TransferFactory `_ \"transferFactory\_transferImpl\" (`ContractId `_ `TransferFactory `_ \-\> `TransferFactory_Transfer `_ \-\> `Update `_ `TransferInstructionResult `_) **instance** HasMethod `TransferInstruction `_ \"transferInstruction\_acceptImpl\" (`ContractId `_ `TransferInstruction `_ \-\> `TransferInstruction_Accept `_ \-\> `Update `_ `TransferInstructionResult `_) **instance** HasMethod `TransferInstruction `_ \"transferInstruction\_rejectImpl\" (`ContractId `_ `TransferInstruction `_ \-\> `TransferInstruction_Reject `_ \-\> `Update `_ `TransferInstructionResult `_) **instance** HasMethod `TransferInstruction `_ \"transferInstruction\_updateImpl\" (`ContractId `_ `TransferInstruction `_ \-\> `TransferInstruction_Update `_ \-\> `Update `_ `TransferInstructionResult `_) **instance** HasMethod `TransferInstruction `_ \"transferInstruction\_withdrawImpl\" (`ContractId `_ `TransferInstruction `_ \-\> `TransferInstruction_Withdraw `_ \-\> `Update `_ `TransferInstructionResult `_) **instance** `GetField `_ \"meta\" `TransferInstructionResult `_ Metadata **instance** `GetField `_ \"output\" `TransferInstructionResult `_ `TransferInstructionResult_Output `_ **instance** `GetField `_ \"senderChangeCids\" `TransferInstructionResult `_ \[`ContractId `_ Holding\] **instance** `SetField `_ \"meta\" `TransferInstructionResult `_ Metadata **instance** `SetField `_ \"output\" `TransferInstructionResult `_ `TransferInstructionResult_Output `_ **instance** `SetField `_ \"senderChangeCids\" `TransferInstructionResult `_ \[`ContractId `_ Holding\] **instance** `HasExercise `_ `TransferFactory `_ `TransferFactory_Transfer `_ `TransferInstructionResult `_ **instance** `HasExercise `_ `TransferInstruction `_ `TransferInstruction_Accept `_ `TransferInstructionResult `_ **instance** `HasExercise `_ `TransferInstruction `_ `TransferInstruction_Reject `_ `TransferInstructionResult `_ **instance** `HasExercise `_ `TransferInstruction `_ `TransferInstruction_Update `_ `TransferInstructionResult `_ **instance** `HasExercise `_ `TransferInstruction `_ `TransferInstruction_Withdraw `_ `TransferInstructionResult `_ **instance** `HasExerciseGuarded `_ `TransferFactory `_ `TransferFactory_Transfer `_ `TransferInstructionResult `_ **instance** `HasExerciseGuarded `_ `TransferInstruction `_ `TransferInstruction_Accept `_ `TransferInstructionResult `_ **instance** `HasExerciseGuarded `_ `TransferInstruction `_ `TransferInstruction_Reject `_ `TransferInstructionResult `_ **instance** `HasExerciseGuarded `_ `TransferInstruction `_ `TransferInstruction_Update `_ `TransferInstructionResult `_ **instance** `HasExerciseGuarded `_ `TransferInstruction `_ `TransferInstruction_Withdraw `_ `TransferInstructionResult `_ **instance** `HasFromAnyChoice `_ `TransferFactory `_ `TransferFactory_Transfer `_ `TransferInstructionResult `_ **instance** `HasFromAnyChoice `_ `TransferInstruction `_ `TransferInstruction_Accept `_ `TransferInstructionResult `_ **instance** `HasFromAnyChoice `_ `TransferInstruction `_ `TransferInstruction_Reject `_ `TransferInstructionResult `_ **instance** `HasFromAnyChoice `_ `TransferInstruction `_ `TransferInstruction_Update `_ `TransferInstructionResult `_ **instance** `HasFromAnyChoice `_ `TransferInstruction `_ `TransferInstruction_Withdraw `_ `TransferInstructionResult `_ **instance** `HasToAnyChoice `_ `TransferFactory `_ `TransferFactory_Transfer `_ `TransferInstructionResult `_ **instance** `HasToAnyChoice `_ `TransferInstruction `_ `TransferInstruction_Accept `_ `TransferInstructionResult `_ **instance** `HasToAnyChoice `_ `TransferInstruction `_ `TransferInstruction_Reject `_ `TransferInstructionResult `_ **instance** `HasToAnyChoice `_ `TransferInstruction `_ `TransferInstruction_Update `_ `TransferInstructionResult `_ **instance** `HasToAnyChoice `_ `TransferInstruction `_ `TransferInstruction_Withdraw `_ `TransferInstructionResult `_ .. _type-splice-api-token-transferinstructionv1-transferinstructionresultoutput-59824: **data** `TransferInstructionResult_Output `_ The output of instructing a transfer or advancing the state of a transfer instruction\. .. _constr-splice-api-token-transferinstructionv1-transferinstructionresultpending-18902: `TransferInstructionResult_Pending `_ Use this result to communicate that the transfer is pending further steps\. .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - transferInstructionCid - `ContractId `_ `TransferInstruction `_ - Contract id of the transfer instruction representing the pending state\. .. _constr-splice-api-token-transferinstructionv1-transferinstructionresultcompleted-47798: `TransferInstructionResult_Completed `_ Use this result to communicate that the transfer succeeded and the receiver has received their holdings\. .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - receiverHoldingCids - \[`ContractId `_ Holding\] - The newly created holdings owned by the receiver as part of successfully completing the transfer\. .. _constr-splice-api-token-transferinstructionv1-transferinstructionresultfailed-21543: `TransferInstructionResult_Failed `_ Use this result to communicate that the transfer did not succeed and all holdings (minus fees) have been returned to the sender\. **instance** `Eq `_ `TransferInstructionResult_Output `_ **instance** `Show `_ `TransferInstructionResult_Output `_ **instance** `GetField `_ \"output\" `TransferInstructionResult `_ `TransferInstructionResult_Output `_ **instance** `GetField `_ \"receiverHoldingCids\" `TransferInstructionResult_Output `_ \[`ContractId `_ Holding\] **instance** `GetField `_ \"transferInstructionCid\" `TransferInstructionResult_Output `_ (`ContractId `_ `TransferInstruction `_) **instance** `SetField `_ \"output\" `TransferInstructionResult `_ `TransferInstructionResult_Output `_ **instance** `SetField `_ \"receiverHoldingCids\" `TransferInstructionResult_Output `_ \[`ContractId `_ Holding\] **instance** `SetField `_ \"transferInstructionCid\" `TransferInstructionResult_Output `_ (`ContractId `_ `TransferInstruction `_) .. _type-splice-api-token-transferinstructionv1-transferinstructionstatus-36298: **data** `TransferInstructionStatus `_ Status of a transfer instruction\. .. _constr-splice-api-token-transferinstructionv1-transferpendingreceiveracceptance-84710: `TransferPendingReceiverAcceptance `_ The transfer is pending acceptance by the receiver\. .. _constr-splice-api-token-transferinstructionv1-transferpendinginternalworkflow-24806: `TransferPendingInternalWorkflow `_ The transfer is pending actions to be taken as part of registry internal workflows\. .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - pendingActions - `Map `_ `Party `_ `Text `_ - The actions that a party could take to advance the transfer\. This field can by used to inform wallet users whether they need to take an action or not\. **instance** `Eq `_ `TransferInstructionStatus `_ **instance** `Show `_ `TransferInstructionStatus `_ **instance** `GetField `_ \"pendingActions\" `TransferInstructionStatus `_ (`Map `_ `Party `_ `Text `_) **instance** `GetField `_ \"status\" `TransferInstructionView `_ `TransferInstructionStatus `_ **instance** `SetField `_ \"pendingActions\" `TransferInstructionStatus `_ (`Map `_ `Party `_ `Text `_) **instance** `SetField `_ \"status\" `TransferInstructionView `_ `TransferInstructionStatus `_ .. _type-splice-api-token-transferinstructionv1-transferinstructionview-46309: **data** `TransferInstructionView `_ View for ``TransferInstruction``\. .. _constr-splice-api-token-transferinstructionv1-transferinstructionview-88808: `TransferInstructionView `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - originalInstructionCid - `Optional `_ (`ContractId `_ `TransferInstruction `_) - The contract id of the original transfer instruction contract\. Used by the wallet to track the lineage of transfer instructions through multiple steps\. Only set if the registry evolves the transfer instruction in multiple steps\. * - transfer - `Transfer `_ - The transfer specified by the transfer instruction\. * - status - `TransferInstructionStatus `_ - The status of the transfer instruction\. * - meta - Metadata - Additional metadata specific to the transfer instruction, used for extensibility; e\.g\., more detailed status information\. **instance** `Eq `_ `TransferInstructionView `_ **instance** `Show `_ `TransferInstructionView `_ **instance** `HasFromAnyView `_ `TransferInstruction `_ `TransferInstructionView `_ **instance** `HasInterfaceView `_ `TransferInstruction `_ `TransferInstructionView `_ **instance** `GetField `_ \"meta\" `TransferInstructionView `_ Metadata **instance** `GetField `_ \"originalInstructionCid\" `TransferInstructionView `_ (`Optional `_ (`ContractId `_ `TransferInstruction `_)) **instance** `GetField `_ \"status\" `TransferInstructionView `_ `TransferInstructionStatus `_ **instance** `GetField `_ \"transfer\" `TransferInstructionView `_ `Transfer `_ **instance** `SetField `_ \"meta\" `TransferInstructionView `_ Metadata **instance** `SetField `_ \"originalInstructionCid\" `TransferInstructionView `_ (`Optional `_ (`ContractId `_ `TransferInstruction `_)) **instance** `SetField `_ \"status\" `TransferInstructionView `_ `TransferInstructionStatus `_ **instance** `SetField `_ \"transfer\" `TransferInstructionView `_ `Transfer `_ Functions --------- .. _function-splice-api-token-transferinstructionv1-transferinstructionacceptimpl-78274: `transferInstruction_acceptImpl `_ \: `TransferInstruction `_ \-\> `ContractId `_ `TransferInstruction `_ \-\> `TransferInstruction_Accept `_ \-\> `Update `_ `TransferInstructionResult `_ .. _function-splice-api-token-transferinstructionv1-transferinstructionrejectimpl-50311: `transferInstruction_rejectImpl `_ \: `TransferInstruction `_ \-\> `ContractId `_ `TransferInstruction `_ \-\> `TransferInstruction_Reject `_ \-\> `Update `_ `TransferInstructionResult `_ .. _function-splice-api-token-transferinstructionv1-transferinstructionwithdrawimpl-10586: `transferInstruction_withdrawImpl `_ \: `TransferInstruction `_ \-\> `ContractId `_ `TransferInstruction `_ \-\> `TransferInstruction_Withdraw `_ \-\> `Update `_ `TransferInstructionResult `_ .. _function-splice-api-token-transferinstructionv1-transferinstructionupdateimpl-73329: `transferInstruction_updateImpl `_ \: `TransferInstruction `_ \-\> `ContractId `_ `TransferInstruction `_ \-\> `TransferInstruction_Update `_ \-\> `Update `_ `TransferInstructionResult `_ .. _function-splice-api-token-transferinstructionv1-transferfactorytransferimpl-82483: `transferFactory_transferImpl `_ \: `TransferFactory `_ \-\> `ContractId `_ `TransferFactory `_ \-\> `TransferFactory_Transfer `_ \-\> `Update `_ `TransferInstructionResult `_ .. _function-splice-api-token-transferinstructionv1-transferfactorypublicfetchimpl-930: `transferFactory_publicFetchImpl `_ \: `TransferFactory `_ \-\> `ContractId `_ `TransferFactory `_ \-\> `TransferFactory_PublicFetch `_ \-\> `Update `_ `TransferFactoryView `_