Skip to main content
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

data TwoStepTransfer
TwoStepTransfer
instance GetField “allowFeaturing” TwoStepTransfer Bool instance GetField “amount” TwoStepTransfer Decimal instance GetField “dso” TwoStepTransfer Party instance GetField “lockContext” TwoStepTransfer Text instance GetField “provider” TwoStepTransfer Party instance GetField “receiver” TwoStepTransfer Party instance GetField “sender” TwoStepTransfer Party instance GetField “transferBefore” TwoStepTransfer Time instance GetField “transferBeforeDeadline” TwoStepTransfer Text instance SetField “allowFeaturing” TwoStepTransfer Bool instance SetField “amount” TwoStepTransfer Decimal instance SetField “dso” TwoStepTransfer Party instance SetField “lockContext” TwoStepTransfer Text instance SetField “provider” TwoStepTransfer Party instance SetField “receiver” TwoStepTransfer Party instance SetField “sender” TwoStepTransfer Party instance SetField “transferBefore” TwoStepTransfer Time instance SetField “transferBeforeDeadline” TwoStepTransfer Text

Functions

holdingToTransferInputs : ForOwner -> [ContractId Holding] -> Update [TransferInput]Converting a set of holding inputs to inputs for an amulet transfer, unlocking any expired LockedAmulet holdings on the fly.
prepareTwoStepTransfer : TwoStepTransfer -> Time -> [ContractId Holding] -> ExternalPartyTransferContext -> Update (ContractId LockedAmulet, [ContractId Holding], Metadata)Prepare a two-step transfer of amulet by locking the funds.
executeTwoStepTransfer : TwoStepTransfer -> ContractId LockedAmulet -> ExtraArgs -> Update ([ContractId Holding], [ContractId Holding], Metadata)
abortTwoStepTransfer : TwoStepTransfer -> ContractId LockedAmulet -> ExtraArgs -> Update [ContractId Holding]