> ## 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.

# Splice.Amulet.TwoStepTransfer

> Documentation for Splice.Amulet.TwoStepTransfer

Generic code for a two-step transfer of amulet. The first step is to lock the amulet, the second step is to transfer it.

## Data Types

<div id="type-splice-amulet-twosteptransfer-twosteptransfer-31697">
  **data** TwoStepTransfer
</div>

> <div id="constr-splice-amulet-twosteptransfer-twosteptransfer-922">
>   TwoStepTransfer
> </div>
>
> > | Field                  | Type                                                                                     | Description                                                                                  |
> > | ---------------------- | ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
> > | dso                    | [Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932) |                                                                                              |
> > | sender                 | [Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932) |                                                                                              |
> > | receiver               | [Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932) |                                                                                              |
> > | amount                 | [Decimal](/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135)  |                                                                                              |
> > | lockContext            | [Text](/appdev/reference/daml-standard-library/prelude#type-ghc-types-text-51952)        | Context description of the lock. This is used to display the reason for the lock in wallets. |
> > | transferBefore         | [Time](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-time-63886)   |                                                                                              |
> > | transferBeforeDeadline | [Text](/appdev/reference/daml-standard-library/prelude#type-ghc-types-text-51952)        | Name of the deadline for the transfer                                                        |
> > | provider               | [Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932) | Provider that should be marked as the app provider on the second step.                       |
> > | allowFeaturing         | [Bool](/appdev/reference/daml-standard-library/prelude#type-ghc-types-bool-66265)        | Whether the second step can be featured.                                                     |
>
> **instance** GetField "allowFeaturing" TwoStepTransfer [Bool](/appdev/reference/daml-standard-library/prelude#type-ghc-types-bool-66265)
>
> **instance** GetField "amount" TwoStepTransfer [Decimal](/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135)
>
> **instance** GetField "dso" TwoStepTransfer [Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932)
>
> **instance** GetField "lockContext" TwoStepTransfer [Text](/appdev/reference/daml-standard-library/prelude#type-ghc-types-text-51952)
>
> **instance** GetField "provider" TwoStepTransfer [Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932)
>
> **instance** GetField "receiver" TwoStepTransfer [Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932)
>
> **instance** GetField "sender" TwoStepTransfer [Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932)
>
> **instance** GetField "transferBefore" TwoStepTransfer [Time](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-time-63886)
>
> **instance** GetField "transferBeforeDeadline" TwoStepTransfer [Text](/appdev/reference/daml-standard-library/prelude#type-ghc-types-text-51952)
>
> **instance** SetField "allowFeaturing" TwoStepTransfer [Bool](/appdev/reference/daml-standard-library/prelude#type-ghc-types-bool-66265)
>
> **instance** SetField "amount" TwoStepTransfer [Decimal](/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135)
>
> **instance** SetField "dso" TwoStepTransfer [Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932)
>
> **instance** SetField "lockContext" TwoStepTransfer [Text](/appdev/reference/daml-standard-library/prelude#type-ghc-types-text-51952)
>
> **instance** SetField "provider" TwoStepTransfer [Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932)
>
> **instance** SetField "receiver" TwoStepTransfer [Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932)
>
> **instance** SetField "sender" TwoStepTransfer [Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932)
>
> **instance** SetField "transferBefore" TwoStepTransfer [Time](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-time-63886)
>
> **instance** SetField "transferBeforeDeadline" TwoStepTransfer [Text](/appdev/reference/daml-standard-library/prelude#type-ghc-types-text-51952)

## Functions

<div id="function-splice-amulet-twosteptransfer-holdingtotransferinputs-13824">
  holdingToTransferInputs
  : ForOwner -> \[[ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) Holding] -> [Update](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-update-68072) \[TransferInput]

  Converting a set of holding inputs to inputs for an amulet transfer, unlocking any expired LockedAmulet holdings on the fly.
</div>

<div id="function-splice-amulet-twosteptransfer-preparetwosteptransfer-60675">
  prepareTwoStepTransfer
  : TwoStepTransfer -> [Time](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-time-63886) -> \[[ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) Holding] -> ExternalPartyTransferContext -> [Update](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-update-68072) ([ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) LockedAmulet, \[[ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) Holding], Metadata)

  Prepare a two-step transfer of amulet by locking the funds.
</div>

<div id="function-splice-amulet-twosteptransfer-executetwosteptransfer-18767">
  executeTwoStepTransfer
  : TwoStepTransfer -> [ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) LockedAmulet -> ExtraArgs -> [Update](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-update-68072) (\[[ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) Holding], \[[ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) Holding], Metadata)
</div>

<div id="function-splice-amulet-twosteptransfer-aborttwosteptransfer-11048">
  abortTwoStepTransfer
  : TwoStepTransfer -> [ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) LockedAmulet -> ExtraArgs -> [Update](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-update-68072) \[[ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) Holding]
</div>
