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
data TwoStepTransfer
Field
Type
Description
dso
sender
receiver
amount
lockContext
Context description of the lock. This is used to display the reason for the lock in wallets.
transferBefore
transferBeforeDeadline
Name of the deadline for the transfer
provider
Provider that should be marked as the app provider on the second step.
allowFeaturing
Whether the second step can be featured.
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 -> PaymentTransferContext -> [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] -> PaymentTransferContext -> 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]
Comments