Skip to main content

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.

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
FieldTypeDescription
dsoParty
senderParty
receiverParty
amountDecimal
lockContextTextContext description of the lock. This is used to display the reason for the lock in wallets.
transferBeforeTime
transferBeforeDeadlineTextName of the deadline for the transfer
providerPartyProvider that should be marked as the app provider on the second step.
allowFeaturingBoolWhether 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 -> [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]