Splice.AmuletRules
Templates
template AmuletRules
The rules governing how Amulet users can modify the Amulet state managed by the DSO party.
Signatory: dso
Field
Type
Description
dso
configSchedule
isDevNet
Choice AmuletRules_AddFutureAmuletConfigSchedule
Controller: dso
Returns: AmuletRules_AddFutureAmuletConfigScheduleResult
Field
Type
Description
newScheduleItem
(Time, AmuletConfig USD)
Choice AmuletRules_AdvanceOpenMiningRounds
Controller: dso
Returns: AmuletRules_AdvanceOpenMiningRoundsResult
Field
Type
Description
amuletPrice
roundToArchiveCid
middleRoundCid
latestRoundCid
Choice AmuletRules_Bootstrap_Rounds
Controller: dso
Returns: AmuletRules_Bootstrap_RoundsResult
Field
Type
Description
amuletPrice
round0Duration
Choice AmuletRules_BuyMemberTraffic
Controller: provider
Returns: AmuletRules_BuyMemberTrafficResult
Field
Type
Description
inputs
context
provider
memberId
synchronizerId
migrationId
trafficAmount
Choice AmuletRules_ClaimExpiredRewards
Controller: dso
Returns: AmuletRules_ClaimExpiredRewardsResult
Field
Type
Description
closedRoundCid
validatorRewardCouponCids
appCouponCids
svRewardCouponCids
optValidatorFaucetCouponCids
optValidatorLivenessActivityRecordCids
Choice AmuletRules_ComputeFees
Compute the output fees for transfer against the given context
Controller: sender
Returns: AmuletRules_ComputeFeesResult
Field
Type
Description
context
sender
outputs
Choice AmuletRules_CreateExternalPartySetupProposal
Propose to host an external party The provider pre-pays the fees for the creation of a TransferPreapproval contract on behalf of the external party when exercising this choice
Controller: validator
Returns: AmuletRules_CreateExternalPartySetupProposalResult
Field
Type
Description
context
inputs
user
validator
preapprovalExpiresAt
Choice AmuletRules_CreateTransferPreapproval
Pre-approve incoming amulet transfers
Controller: provider, receiver
Returns: AmuletRules_CreateTransferPreapprovalResult
Field
Type
Description
context
inputs
receiver
provider
expiresAt
Choice AmuletRules_DevNet_FeatureApp
Controller: provider
Returns: AmuletRules_DevNet_FeatureAppResult
Field
Type
Description
provider
Choice AmuletRules_DevNet_Tap
Controller: receiver
Returns: AmuletRules_DevNet_TapResult
Field
Type
Description
receiver
amount
openRound
Choice AmuletRules_Fetch
Controller: p
Returns: AmuletRules
Field
Type
Description
p
Choice AmuletRules_MergeMemberTrafficContracts
Controller: dso
Returns: AmuletRules_MergeMemberTrafficContractsResult
Field
Type
Description
trafficCids
Choice AmuletRules_MergeUnclaimedRewards
Controller: dso
Returns: AmuletRules_MergeUnclaimedRewardsResult
Field
Type
Description
unclaimedRewardCids
Choice AmuletRules_MiningRound_Archive
Controller: dso
Returns: AmuletRules_MiningRound_ArchiveResult
Field
Type
Description
closedRoundCid
Choice AmuletRules_MiningRound_Close
Controller: dso
Returns: AmuletRules_MiningRound_CloseResult
Field
Type
Description
issuingRoundCid
Choice AmuletRules_MiningRound_StartIssuing
Controller: dso
Returns: AmuletRules_MiningRound_StartIssuingResult
Field
Type
Description
miningRoundCid
summary
Choice AmuletRules_Mint
Controller: dso, receiver
Returns: AmuletRules_MintResult
Field
Type
Description
receiver
amount
openRound
Choice AmuletRules_RemoveFutureAmuletConfigSchedule
Controller: dso
Returns: AmuletRules_RemoveFutureAmuletConfigScheduleResult
Field
Type
Description
scheduleTime
Choice AmuletRules_Transfer
Controller: Set.toList (transferControllers transfer)
Returns: TransferResult
Field
Type
Description
transfer
context
Choice AmuletRules_UpdateFutureAmuletConfigSchedule
Controller: dso
Returns: AmuletRules_UpdateFutureAmuletConfigScheduleResult
Field
Type
Description
scheduleItem
(Time, AmuletConfig USD)
Choice Archive
Controller: dso
Returns: ()
(no fields)
template ExternalPartySetupProposal
Signatory: validator, dso
Field
Type
Description
validator
user
dso
createdAt
preapprovalExpiresAt
Choice Archive
Controller: validator, dso
Returns: ()
(no fields)
Choice ExternalPartySetupProposal_Accept
Controller: user
Returns: ExternalPartySetupProposal_AcceptResult
(no fields)
template TransferPreapproval
A pre-approval by a receiver to receive Amulet from anybody.
Pre-approvals are indexed by the SVs and served from scan for easy discovery until they expire. The cost of providing this discovery service is charged by burning Amulet.
Receivers can either purchase and renew these pre-approvals by themselves, or have an app provider do so for them in exchange for the app rewards for the amulet transfers completed via the managed pre-approval.
Signatory: receiver, provider, dso
Field
Type
Description
dso
receiver
The receiver party
provider
The app provider that manages the pre-approval for the receiver. Equal to the receiver for self-managed pre-approvals.
validFrom
This timestamp marks the start of the period for which fees were paid for the pre-approval. Preserved across renewals.
lastRenewedAt
When the pre-approval was last renewed. Set equal to
validFrom
on creation and updated on each renewal.expiresAt
Provider selected timestamp defining the lifetime of the contract. Can be extended by renewing the contract.
Choice Archive
Controller: receiver, provider, dso
Returns: ()
(no fields)
Choice TransferPreapproval_Cancel
Controller: p
Returns: TransferPreapproval_CancelResult
Field
Type
Description
p
Choice TransferPreapproval_Expire
Controller: dso
Returns: TransferPreapproval_ExpireResult
(no fields)
Choice TransferPreapproval_Fetch
Controller: p
Returns: TransferPreapproval
Field
Type
Description
p
Choice TransferPreapproval_Renew
Controller: provider
Returns: TransferPreapproval_RenewResult
Field
Type
Description
context
inputs
newExpiresAt
Choice TransferPreapproval_Send
Controller: sender
Returns: TransferPreapproval_SendResult
Field
Type
Description
context
inputs
amount
sender
Data Types
data AmuletRules_AddFutureAmuletConfigScheduleResult
AmuletRules_AddFutureAmuletConfigScheduleResult
Field
Type
Description
newAmuletRules
instance GetField "newAmuletRules" AmuletRules_AddFutureAmuletConfigScheduleResult (ContractId AmuletRules)
instance SetField "newAmuletRules" AmuletRules_AddFutureAmuletConfigScheduleResult (ContractId AmuletRules)
instance HasExercise AmuletRules AmuletRules_AddFutureAmuletConfigSchedule AmuletRules_AddFutureAmuletConfigScheduleResult
instance HasFromAnyChoice AmuletRules AmuletRules_AddFutureAmuletConfigSchedule AmuletRules_AddFutureAmuletConfigScheduleResult
instance HasToAnyChoice AmuletRules AmuletRules_AddFutureAmuletConfigSchedule AmuletRules_AddFutureAmuletConfigScheduleResult
data AmuletRules_AdvanceOpenMiningRoundsResult
AmuletRules_AdvanceOpenMiningRoundsResult
Field
Type
Description
summarizingRoundCid
openRoundCid
instance GetField "openRoundCid" AmuletRules_AdvanceOpenMiningRoundsResult (ContractId OpenMiningRound)
instance GetField "summarizingRoundCid" AmuletRules_AdvanceOpenMiningRoundsResult (ContractId SummarizingMiningRound)
instance SetField "openRoundCid" AmuletRules_AdvanceOpenMiningRoundsResult (ContractId OpenMiningRound)
instance SetField "summarizingRoundCid" AmuletRules_AdvanceOpenMiningRoundsResult (ContractId SummarizingMiningRound)
instance HasExercise AmuletRules AmuletRules_AdvanceOpenMiningRounds AmuletRules_AdvanceOpenMiningRoundsResult
instance HasFromAnyChoice AmuletRules AmuletRules_AdvanceOpenMiningRounds AmuletRules_AdvanceOpenMiningRoundsResult
instance HasToAnyChoice AmuletRules AmuletRules_AdvanceOpenMiningRounds AmuletRules_AdvanceOpenMiningRoundsResult
data AmuletRules_Bootstrap_RoundsResult
AmuletRules_Bootstrap_RoundsResult
Field
Type
Description
openMiningRoundCid
instance GetField "openMiningRoundCid" AmuletRules_Bootstrap_RoundsResult (ContractId OpenMiningRound)
instance SetField "openMiningRoundCid" AmuletRules_Bootstrap_RoundsResult (ContractId OpenMiningRound)
instance HasExercise AmuletRules AmuletRules_Bootstrap_Rounds AmuletRules_Bootstrap_RoundsResult
instance HasFromAnyChoice AmuletRules AmuletRules_Bootstrap_Rounds AmuletRules_Bootstrap_RoundsResult
instance HasToAnyChoice AmuletRules AmuletRules_Bootstrap_Rounds AmuletRules_Bootstrap_RoundsResult
data AmuletRules_BuyMemberTrafficResult
AmuletRules_BuyMemberTrafficResult
Field
Type
Description
round
summary
amuletPaid
purchasedTraffic
senderChangeAmulet
instance Eq AmuletRules_BuyMemberTrafficResult
instance Show AmuletRules_BuyMemberTrafficResult
instance GetField "amuletPaid" AmuletRules_BuyMemberTrafficResult Decimal
instance GetField "purchasedTraffic" AmuletRules_BuyMemberTrafficResult (ContractId MemberTraffic)
instance GetField "round" AmuletRules_BuyMemberTrafficResult Round
instance GetField "senderChangeAmulet" AmuletRules_BuyMemberTrafficResult (Optional (ContractId Amulet))
instance GetField "summary" AmuletRules_BuyMemberTrafficResult TransferSummary
instance SetField "amuletPaid" AmuletRules_BuyMemberTrafficResult Decimal
instance SetField "purchasedTraffic" AmuletRules_BuyMemberTrafficResult (ContractId MemberTraffic)
instance SetField "round" AmuletRules_BuyMemberTrafficResult Round
instance SetField "senderChangeAmulet" AmuletRules_BuyMemberTrafficResult (Optional (ContractId Amulet))
instance SetField "summary" AmuletRules_BuyMemberTrafficResult TransferSummary
instance HasExercise AmuletRules AmuletRules_BuyMemberTraffic AmuletRules_BuyMemberTrafficResult
instance HasFromAnyChoice AmuletRules AmuletRules_BuyMemberTraffic AmuletRules_BuyMemberTrafficResult
instance HasToAnyChoice AmuletRules AmuletRules_BuyMemberTraffic AmuletRules_BuyMemberTrafficResult
data AmuletRules_ClaimExpiredRewardsResult
AmuletRules_ClaimExpiredRewardsResult
Field
Type
Description
unclaimedRewardCid
instance GetField "unclaimedRewardCid" AmuletRules_ClaimExpiredRewardsResult (Optional (ContractId UnclaimedReward))
instance SetField "unclaimedRewardCid" AmuletRules_ClaimExpiredRewardsResult (Optional (ContractId UnclaimedReward))
instance HasExercise AmuletRules AmuletRules_ClaimExpiredRewards AmuletRules_ClaimExpiredRewardsResult
instance HasFromAnyChoice AmuletRules AmuletRules_ClaimExpiredRewards AmuletRules_ClaimExpiredRewardsResult
instance HasToAnyChoice AmuletRules AmuletRules_ClaimExpiredRewards AmuletRules_ClaimExpiredRewardsResult
data AmuletRules_ComputeFeesResult
Field
Type
Description
fees
[Decimal]
instance GetField "fees" AmuletRules_ComputeFeesResult [Decimal]
instance SetField "fees" AmuletRules_ComputeFeesResult [Decimal]
instance HasExercise AmuletRules AmuletRules_ComputeFees AmuletRules_ComputeFeesResult
instance HasFromAnyChoice AmuletRules AmuletRules_ComputeFees AmuletRules_ComputeFeesResult
instance HasToAnyChoice AmuletRules AmuletRules_ComputeFees AmuletRules_ComputeFeesResult
data AmuletRules_CreateExternalPartySetupProposalResult
AmuletRules_CreateExternalPartySetupProposalResult
Field
Type
Description
proposalCid
user
validator
transferResult
amuletPaid
instance Eq AmuletRules_CreateExternalPartySetupProposalResult
instance Show AmuletRules_CreateExternalPartySetupProposalResult
instance GetField "amuletPaid" AmuletRules_CreateExternalPartySetupProposalResult Decimal
instance GetField "proposalCid" AmuletRules_CreateExternalPartySetupProposalResult (ContractId ExternalPartySetupProposal)
instance GetField "transferResult" AmuletRules_CreateExternalPartySetupProposalResult TransferResult
instance GetField "user" AmuletRules_CreateExternalPartySetupProposalResult Party
instance GetField "validator" AmuletRules_CreateExternalPartySetupProposalResult Party
instance SetField "amuletPaid" AmuletRules_CreateExternalPartySetupProposalResult Decimal
instance SetField "proposalCid" AmuletRules_CreateExternalPartySetupProposalResult (ContractId ExternalPartySetupProposal)
instance SetField "transferResult" AmuletRules_CreateExternalPartySetupProposalResult TransferResult
instance SetField "user" AmuletRules_CreateExternalPartySetupProposalResult Party
instance SetField "validator" AmuletRules_CreateExternalPartySetupProposalResult Party
instance HasExercise AmuletRules AmuletRules_CreateExternalPartySetupProposal AmuletRules_CreateExternalPartySetupProposalResult
instance HasFromAnyChoice AmuletRules AmuletRules_CreateExternalPartySetupProposal AmuletRules_CreateExternalPartySetupProposalResult
instance HasToAnyChoice AmuletRules AmuletRules_CreateExternalPartySetupProposal AmuletRules_CreateExternalPartySetupProposalResult
data AmuletRules_CreateTransferPreapprovalResult
AmuletRules_CreateTransferPreapprovalResult
Field
Type
Description
transferPreapprovalCid
transferResult
amuletPaid
instance Eq AmuletRules_CreateTransferPreapprovalResult
instance Show AmuletRules_CreateTransferPreapprovalResult
instance GetField "amuletPaid" AmuletRules_CreateTransferPreapprovalResult Decimal
instance GetField "transferPreapprovalCid" AmuletRules_CreateTransferPreapprovalResult (ContractId TransferPreapproval)
instance GetField "transferResult" AmuletRules_CreateTransferPreapprovalResult TransferResult
instance SetField "amuletPaid" AmuletRules_CreateTransferPreapprovalResult Decimal
instance SetField "transferPreapprovalCid" AmuletRules_CreateTransferPreapprovalResult (ContractId TransferPreapproval)
instance SetField "transferResult" AmuletRules_CreateTransferPreapprovalResult TransferResult
instance HasExercise AmuletRules AmuletRules_CreateTransferPreapproval AmuletRules_CreateTransferPreapprovalResult
instance HasFromAnyChoice AmuletRules AmuletRules_CreateTransferPreapproval AmuletRules_CreateTransferPreapprovalResult
instance HasToAnyChoice AmuletRules AmuletRules_CreateTransferPreapproval AmuletRules_CreateTransferPreapprovalResult
data AmuletRules_DevNet_FeatureAppResult
AmuletRules_DevNet_FeatureAppResult
Field
Type
Description
featuredAppRightCid
instance GetField "featuredAppRightCid" AmuletRules_DevNet_FeatureAppResult (ContractId FeaturedAppRight)
instance SetField "featuredAppRightCid" AmuletRules_DevNet_FeatureAppResult (ContractId FeaturedAppRight)
instance HasExercise AmuletRules AmuletRules_DevNet_FeatureApp AmuletRules_DevNet_FeatureAppResult
instance HasFromAnyChoice AmuletRules AmuletRules_DevNet_FeatureApp AmuletRules_DevNet_FeatureAppResult
instance HasToAnyChoice AmuletRules AmuletRules_DevNet_FeatureApp AmuletRules_DevNet_FeatureAppResult
data AmuletRules_DevNet_TapResult
Field
Type
Description
amuletSum
instance GetField "amuletSum" AmuletRules_DevNet_TapResult (AmuletCreateSummary (ContractId Amulet))
instance SetField "amuletSum" AmuletRules_DevNet_TapResult (AmuletCreateSummary (ContractId Amulet))
instance HasExercise AmuletRules AmuletRules_DevNet_Tap AmuletRules_DevNet_TapResult
instance HasFromAnyChoice AmuletRules AmuletRules_DevNet_Tap AmuletRules_DevNet_TapResult
instance HasToAnyChoice AmuletRules AmuletRules_DevNet_Tap AmuletRules_DevNet_TapResult
data AmuletRules_MergeMemberTrafficContractsResult
AmuletRules_MergeMemberTrafficContractsResult
Field
Type
Description
mergedTrafficCid
instance GetField "mergedTrafficCid" AmuletRules_MergeMemberTrafficContractsResult (ContractId MemberTraffic)
instance SetField "mergedTrafficCid" AmuletRules_MergeMemberTrafficContractsResult (ContractId MemberTraffic)
instance HasExercise AmuletRules AmuletRules_MergeMemberTrafficContracts AmuletRules_MergeMemberTrafficContractsResult
instance HasFromAnyChoice AmuletRules AmuletRules_MergeMemberTrafficContracts AmuletRules_MergeMemberTrafficContractsResult
instance HasToAnyChoice AmuletRules AmuletRules_MergeMemberTrafficContracts AmuletRules_MergeMemberTrafficContractsResult
data AmuletRules_MergeUnclaimedRewardsResult
AmuletRules_MergeUnclaimedRewardsResult
Field
Type
Description
unclaimedRewardCid
instance GetField "unclaimedRewardCid" AmuletRules_MergeUnclaimedRewardsResult (ContractId UnclaimedReward)
instance SetField "unclaimedRewardCid" AmuletRules_MergeUnclaimedRewardsResult (ContractId UnclaimedReward)
instance HasExercise AmuletRules AmuletRules_MergeUnclaimedRewards AmuletRules_MergeUnclaimedRewardsResult
instance HasFromAnyChoice AmuletRules AmuletRules_MergeUnclaimedRewards AmuletRules_MergeUnclaimedRewardsResult
instance HasToAnyChoice AmuletRules AmuletRules_MergeUnclaimedRewards AmuletRules_MergeUnclaimedRewardsResult
data AmuletRules_MiningRound_ArchiveResult
AmuletRules_MiningRound_ArchiveResult
instance HasExercise AmuletRules AmuletRules_MiningRound_Archive AmuletRules_MiningRound_ArchiveResult
instance HasFromAnyChoice AmuletRules AmuletRules_MiningRound_Archive AmuletRules_MiningRound_ArchiveResult
instance HasToAnyChoice AmuletRules AmuletRules_MiningRound_Archive AmuletRules_MiningRound_ArchiveResult
data AmuletRules_MiningRound_CloseResult
AmuletRules_MiningRound_CloseResult
Field
Type
Description
closedRoundCid
instance GetField "closedRoundCid" AmuletRules_MiningRound_CloseResult (ContractId ClosedMiningRound)
instance SetField "closedRoundCid" AmuletRules_MiningRound_CloseResult (ContractId ClosedMiningRound)
instance HasExercise AmuletRules AmuletRules_MiningRound_Close AmuletRules_MiningRound_CloseResult
instance HasFromAnyChoice AmuletRules AmuletRules_MiningRound_Close AmuletRules_MiningRound_CloseResult
instance HasToAnyChoice AmuletRules AmuletRules_MiningRound_Close AmuletRules_MiningRound_CloseResult
data AmuletRules_MiningRound_StartIssuingResult
AmuletRules_MiningRound_StartIssuingResult
Field
Type
Description
issuingRoundCid
instance GetField "issuingRoundCid" AmuletRules_MiningRound_StartIssuingResult (ContractId IssuingMiningRound)
instance SetField "issuingRoundCid" AmuletRules_MiningRound_StartIssuingResult (ContractId IssuingMiningRound)
instance HasExercise AmuletRules AmuletRules_MiningRound_StartIssuing AmuletRules_MiningRound_StartIssuingResult
instance HasFromAnyChoice AmuletRules AmuletRules_MiningRound_StartIssuing AmuletRules_MiningRound_StartIssuingResult
instance HasToAnyChoice AmuletRules AmuletRules_MiningRound_StartIssuing AmuletRules_MiningRound_StartIssuingResult
Field
Type
Description
amuletSum
instance GetField "amuletSum" AmuletRules_MintResult (AmuletCreateSummary (ContractId Amulet))
instance SetField "amuletSum" AmuletRules_MintResult (AmuletCreateSummary (ContractId Amulet))
instance HasExercise AmuletRules AmuletRules_Mint AmuletRules_MintResult
instance HasFromAnyChoice AmuletRules AmuletRules_Mint AmuletRules_MintResult
instance HasToAnyChoice AmuletRules AmuletRules_Mint AmuletRules_MintResult
data AmuletRules_RemoveFutureAmuletConfigScheduleResult
AmuletRules_RemoveFutureAmuletConfigScheduleResult
Field
Type
Description
newAmuletRules
instance GetField "newAmuletRules" AmuletRules_RemoveFutureAmuletConfigScheduleResult (ContractId AmuletRules)
instance SetField "newAmuletRules" AmuletRules_RemoveFutureAmuletConfigScheduleResult (ContractId AmuletRules)
instance HasExercise AmuletRules AmuletRules_RemoveFutureAmuletConfigSchedule AmuletRules_RemoveFutureAmuletConfigScheduleResult
instance HasFromAnyChoice AmuletRules AmuletRules_RemoveFutureAmuletConfigSchedule AmuletRules_RemoveFutureAmuletConfigScheduleResult
instance HasToAnyChoice AmuletRules AmuletRules_RemoveFutureAmuletConfigSchedule AmuletRules_RemoveFutureAmuletConfigScheduleResult
data AmuletRules_UpdateFutureAmuletConfigScheduleResult
AmuletRules_UpdateFutureAmuletConfigScheduleResult
Field
Type
Description
newAmuletRules
instance GetField "newAmuletRules" AmuletRules_UpdateFutureAmuletConfigScheduleResult (ContractId AmuletRules)
instance SetField "newAmuletRules" AmuletRules_UpdateFutureAmuletConfigScheduleResult (ContractId AmuletRules)
instance HasExercise AmuletRules AmuletRules_UpdateFutureAmuletConfigSchedule AmuletRules_UpdateFutureAmuletConfigScheduleResult
instance HasFromAnyChoice AmuletRules AmuletRules_UpdateFutureAmuletConfigSchedule AmuletRules_UpdateFutureAmuletConfigScheduleResult
instance HasToAnyChoice AmuletRules AmuletRules_UpdateFutureAmuletConfigSchedule AmuletRules_UpdateFutureAmuletConfigScheduleResult
data AppTransferContext
Field
Type
Description
amuletRules
openMiningRound
featuredAppRight
instance Eq AppTransferContext
instance Show AppTransferContext
instance GetField "amuletRules" AppTransferContext (ContractId AmuletRules)
instance GetField "featuredAppRight" AppTransferContext (Optional (ContractId FeaturedAppRight))
instance GetField "openMiningRound" AppTransferContext (ContractId OpenMiningRound)
instance SetField "amuletRules" AppTransferContext (ContractId AmuletRules)
instance SetField "featuredAppRight" AppTransferContext (Optional (ContractId FeaturedAppRight))
instance SetField "openMiningRound" AppTransferContext (ContractId OpenMiningRound)
data BalanceChange
Field
Type
Description
changeToInitialAmountAsOfRoundZero
The change to the total balance introduced by this balance change, normalized to round zero, i.e., a amulet created in round 3 is treated as a amulet created in round 0 with a higher initial amount.
changeToHoldingFeesRate
The change of total holding fees introduced by this balance change.
instance Eq BalanceChange
instance Additive BalanceChange
instance Show BalanceChange
instance GetField "balanceChanges" TransferSummary (Map Party BalanceChange)
instance GetField "changeToHoldingFeesRate" BalanceChange Decimal
instance GetField "changeToInitialAmountAsOfRoundZero" BalanceChange Decimal
instance SetField "balanceChanges" TransferSummary (Map Party BalanceChange)
instance SetField "changeToHoldingFeesRate" BalanceChange Decimal
instance SetField "changeToInitialAmountAsOfRoundZero" BalanceChange Decimal
data CreatedAmulet
TransferResultAmulet (ContractId Amulet)
TransferResultLockedAmulet (ContractId LockedAmulet)
Field
Type
Description
dummyUnitField
()
Extension constructor (and field) to work around the current lack of upgrading for variants in Daml 3.0
instance Eq CreatedAmulet
instance Ord CreatedAmulet
instance Show CreatedAmulet
instance GetField "createdAmulets" TransferResult [CreatedAmulet]
instance GetField "dummyUnitField" CreatedAmulet ()
instance SetField "createdAmulets" TransferResult [CreatedAmulet]
instance SetField "dummyUnitField" CreatedAmulet ()
data ExternalPartySetupProposal_AcceptResult
ExternalPartySetupProposal_AcceptResult
Field
Type
Description
validatorRightCid
transferPreapprovalCid
instance Eq ExternalPartySetupProposal_AcceptResult
instance Show ExternalPartySetupProposal_AcceptResult
instance GetField "transferPreapprovalCid" ExternalPartySetupProposal_AcceptResult (ContractId TransferPreapproval)
instance GetField "validatorRightCid" ExternalPartySetupProposal_AcceptResult (ContractId ValidatorRight)
instance SetField "transferPreapprovalCid" ExternalPartySetupProposal_AcceptResult (ContractId TransferPreapproval)
instance SetField "validatorRightCid" ExternalPartySetupProposal_AcceptResult (ContractId ValidatorRight)
instance HasExercise ExternalPartySetupProposal ExternalPartySetupProposal_Accept ExternalPartySetupProposal_AcceptResult
instance HasFromAnyChoice ExternalPartySetupProposal ExternalPartySetupProposal_Accept ExternalPartySetupProposal_AcceptResult
instance HasToAnyChoice ExternalPartySetupProposal ExternalPartySetupProposal_Accept ExternalPartySetupProposal_AcceptResult
data InvalidTransfer
Field
Type
Description
reason
instance Eq InvalidTransfer
instance Show InvalidTransfer
instance HasFromAnyException InvalidTransfer
instance HasMessage InvalidTransfer
instance HasThrow InvalidTransfer
instance HasToAnyException InvalidTransfer
instance GetField "reason" InvalidTransfer InvalidTransferReason
instance SetField "reason" InvalidTransfer InvalidTransferReason
Field
Type
Description
missingAmount
Field
Type
Description
synchronizerId
Field
Type
Description
description
Field
Type
Description
dummyUnitField
()
Extension constructor (and field) to work around the current lack of upgrading for variants in Daml 3.0
instance Eq InvalidTransferReason
instance Show InvalidTransferReason
instance GetField "description" InvalidTransferReason Text
instance GetField "dummyUnitField" InvalidTransferReason ()
instance GetField "minTopupAmount" InvalidTransferReason Int
instance GetField "missingAmount" InvalidTransferReason Decimal
instance GetField "reason" InvalidTransfer InvalidTransferReason
instance GetField "reason" TransferCommandResult InvalidTransferReason
instance GetField "requestedTopupAmount" InvalidTransferReason Int
instance GetField "synchronizerId" InvalidTransferReason Text
instance SetField "description" InvalidTransferReason Text
instance SetField "dummyUnitField" InvalidTransferReason ()
instance SetField "minTopupAmount" InvalidTransferReason Int
instance SetField "missingAmount" InvalidTransferReason Decimal
instance SetField "reason" InvalidTransfer InvalidTransferReason
instance SetField "reason" TransferCommandResult InvalidTransferReason
instance SetField "requestedTopupAmount" InvalidTransferReason Int
instance SetField "synchronizerId" InvalidTransferReason Text
Field
Type
Description
amuletRules
context
instance Eq PaymentTransferContext
instance Show PaymentTransferContext
instance GetField "amuletRules" PaymentTransferContext (ContractId AmuletRules)
instance GetField "context" AmuletRules_CreateExternalPartySetupProposal PaymentTransferContext
instance GetField "context" AmuletRules_CreateTransferPreapproval PaymentTransferContext
instance GetField "context" PaymentTransferContext TransferContext
instance GetField "context" TransferPreapproval_Renew PaymentTransferContext
instance GetField "context" TransferPreapproval_Send PaymentTransferContext
instance GetField "context" TransferCommand_Send PaymentTransferContext
instance SetField "amuletRules" PaymentTransferContext (ContractId AmuletRules)
instance SetField "context" AmuletRules_CreateExternalPartySetupProposal PaymentTransferContext
instance SetField "context" AmuletRules_CreateTransferPreapproval PaymentTransferContext
instance SetField "context" PaymentTransferContext TransferContext
instance SetField "context" TransferPreapproval_Renew PaymentTransferContext
instance SetField "context" TransferPreapproval_Send PaymentTransferContext
instance SetField "context" TransferCommand_Send PaymentTransferContext
data PreprocessedTransferOutput
instance Eq PreprocessedTransferOutput
instance Show PreprocessedTransferOutput
instance GetField "amount" PreprocessedTransferOutput Decimal
instance GetField "lock" PreprocessedTransferOutput (Optional TimeLock)
instance GetField "outputFee" PreprocessedTransferOutput Decimal
instance GetField "owner" PreprocessedTransferOutput Party
instance SetField "amount" PreprocessedTransferOutput Decimal
instance SetField "lock" PreprocessedTransferOutput (Optional TimeLock)
instance SetField "outputFee" PreprocessedTransferOutput Decimal
instance SetField "owner" PreprocessedTransferOutput Party
An easy way to configure
exucuteTransfer
wrt what rewards to issue. We currently only use two configurations: but all of the options in here make sense, so we keep them.instance GetField "issueAppRewards" RewardsIssuanceConfig Bool
instance GetField "issueValidatorRewards" RewardsIssuanceConfig Bool
instance SetField "issueAppRewards" RewardsIssuanceConfig Bool
instance SetField "issueValidatorRewards" RewardsIssuanceConfig Bool
data Transfer
Representation of a batch transfer.
Field
Type
Description
sender
provider
inputs
outputs
instance GetField "inputs" Transfer [TransferInput]
instance GetField "outputs" Transfer [TransferOutput]
instance GetField "provider" Transfer Party
instance GetField "sender" Transfer Party
instance GetField "transfer" AmuletRules_Transfer Transfer
instance SetField "inputs" Transfer [TransferInput]
instance SetField "outputs" Transfer [TransferOutput]
instance SetField "provider" Transfer Party
instance SetField "sender" Transfer Party
instance SetField "transfer" AmuletRules_Transfer Transfer
data TransferContext
Contracts that need to be passed in to a Transfer so that we can reference them by contract id instead of by key.
Field
Type
Description
openMiningRound
issuingMiningRounds
validatorRights
Map from user to ValidatorRight contract.
featuredAppRight
Optional proof that the provider is a featured app provider.
instance Eq TransferContext
instance Show TransferContext
instance GetField "context" AmuletRules_BuyMemberTraffic TransferContext
instance GetField "context" AmuletRules_ComputeFees TransferContext
instance GetField "context" AmuletRules_Transfer TransferContext
instance GetField "context" PaymentTransferContext TransferContext
instance GetField "featuredAppRight" TransferContext (Optional (ContractId FeaturedAppRight))
instance GetField "issuingMiningRounds" TransferContext (Map Round (ContractId IssuingMiningRound))
instance GetField "openMiningRound" TransferContext (ContractId OpenMiningRound)
instance GetField "validatorRights" TransferContext (Map Party (ContractId ValidatorRight))
instance SetField "context" AmuletRules_BuyMemberTraffic TransferContext
instance SetField "context" AmuletRules_ComputeFees TransferContext
instance SetField "context" AmuletRules_Transfer TransferContext
instance SetField "context" PaymentTransferContext TransferContext
instance SetField "featuredAppRight" TransferContext (Optional (ContractId FeaturedAppRight))
instance SetField "issuingMiningRounds" TransferContext (Map Round (ContractId IssuingMiningRound))
instance SetField "openMiningRound" TransferContext (ContractId OpenMiningRound)
instance SetField "validatorRights" TransferContext (Map Party (ContractId ValidatorRight))
Field
Type
Description
featuredAppProvider
config
openRound
issuingMiningRounds
validatorRights
instance Eq TransferContextSummary
instance Show TransferContextSummary
instance GetField "config" TransferContextSummary (TransferConfig Amulet)
instance GetField "featuredAppProvider" TransferContextSummary (Optional Party)
instance GetField "issuingMiningRounds" TransferContextSummary (Map Round IssuingMiningRound)
instance GetField "openRound" TransferContextSummary OpenMiningRound
instance GetField "validatorRights" TransferContextSummary (Map Party (ContractId ValidatorRight))
instance SetField "config" TransferContextSummary (TransferConfig Amulet)
instance SetField "featuredAppProvider" TransferContextSummary (Optional Party)
instance SetField "issuingMiningRounds" TransferContextSummary (Map Round IssuingMiningRound)
instance SetField "openRound" TransferContextSummary OpenMiningRound
instance SetField "validatorRights" TransferContextSummary (Map Party (ContractId ValidatorRight))
data TransferInput
An individual input for a batch transfer.
InputAppRewardCoupon (ContractId AppRewardCoupon)
InputValidatorRewardCoupon (ContractId ValidatorRewardCoupon)
InputSvRewardCoupon (ContractId SvRewardCoupon)
InputAmulet (ContractId Amulet)
Field
Type
Description
dummyUnitField
()
Extension constructor (and field) to work around the current lack of upgrading for variants in Daml 3.0
optInputValidatorFaucetCoupon
Added in CIP-3. Optional validator faucet coupon input into this transfer.
InputValidatorLivenessActivityRecord (ContractId ValidatorLivenessActivityRecord)
instance Eq TransferInput
instance Ord TransferInput
instance Show TransferInput
instance GetField "dummyUnitField" TransferInput ()
instance GetField "inputs" AmuletRules_BuyMemberTraffic [TransferInput]
instance GetField "inputs" AmuletRules_CreateExternalPartySetupProposal [TransferInput]
instance GetField "inputs" AmuletRules_CreateTransferPreapproval [TransferInput]
instance GetField "inputs" Transfer [TransferInput]
instance GetField "inputs" TransferPreapproval_Renew [TransferInput]
instance GetField "inputs" TransferPreapproval_Send [TransferInput]
instance GetField "inputs" TransferCommand_Send [TransferInput]
instance GetField "optInputValidatorFaucetCoupon" TransferInput (Optional (ContractId ValidatorFaucetCoupon))
instance SetField "dummyUnitField" TransferInput ()
instance SetField "inputs" AmuletRules_BuyMemberTraffic [TransferInput]
instance SetField "inputs" AmuletRules_CreateExternalPartySetupProposal [TransferInput]
instance SetField "inputs" AmuletRules_CreateTransferPreapproval [TransferInput]
instance SetField "inputs" Transfer [TransferInput]
instance SetField "inputs" TransferPreapproval_Renew [TransferInput]
instance SetField "inputs" TransferPreapproval_Send [TransferInput]
instance SetField "inputs" TransferCommand_Send [TransferInput]
instance SetField "optInputValidatorFaucetCoupon" TransferInput (Optional (ContractId ValidatorFaucetCoupon))
Field
Type
Description
totalAmuletAmount
totalAppRewardAmount
totalValidatorRewardAmount
totalValidatorFaucetAmount
Note that the validator faucet amount does not need to be optional in this type, as it is not stored on the ledger.
totalSvRewardAmount
totalHoldingFees
amountArchivedAsOfRoundZero
changeToHoldingFeesRate
instance Eq TransferInputsSummary
instance Show TransferInputsSummary
instance GetField "amountArchivedAsOfRoundZero" TransferInputsSummary Decimal
instance GetField "changeToHoldingFeesRate" TransferInputsSummary Decimal
instance GetField "totalAmuletAmount" TransferInputsSummary Decimal
instance GetField "totalAppRewardAmount" TransferInputsSummary Decimal
instance GetField "totalHoldingFees" TransferInputsSummary Decimal
instance GetField "totalSvRewardAmount" TransferInputsSummary Decimal
instance GetField "totalValidatorFaucetAmount" TransferInputsSummary Decimal
instance GetField "totalValidatorRewardAmount" TransferInputsSummary Decimal
instance SetField "amountArchivedAsOfRoundZero" TransferInputsSummary Decimal
instance SetField "changeToHoldingFeesRate" TransferInputsSummary Decimal
instance SetField "totalAmuletAmount" TransferInputsSummary Decimal
instance SetField "totalAppRewardAmount" TransferInputsSummary Decimal
instance SetField "totalHoldingFees" TransferInputsSummary Decimal
instance SetField "totalSvRewardAmount" TransferInputsSummary Decimal
instance SetField "totalValidatorFaucetAmount" TransferInputsSummary Decimal
instance SetField "totalValidatorRewardAmount" TransferInputsSummary Decimal
data TransferOutput
An individual output for a batch transfer.
Field
Type
Description
receiver
The receiver who will own the created output amulet.
receiverFeeRatio
The ratio of the output fee paid from receiver’s output amount. 1.0 means the whole fee is deducted from the specified output amount, 0.0 the whole fee is deducted from the sender’s input balance. If a receiver’s fee is not covered by the specified output amount, the transfer is aborted.
amount
The amount of amulet to receive, before deducting the receiver’s part of the output fee.
lock
The lock to be added, if any.
instance Eq TransferOutput
instance Ord TransferOutput
instance Show TransferOutput
instance GetField "amount" TransferOutput Decimal
instance GetField "lock" TransferOutput (Optional TimeLock)
instance GetField "outputs" AmuletRules_ComputeFees [TransferOutput]
instance GetField "outputs" Transfer [TransferOutput]
instance GetField "receiver" TransferOutput Party
instance GetField "receiverFeeRatio" TransferOutput Decimal
instance SetField "amount" TransferOutput Decimal
instance SetField "lock" TransferOutput (Optional TimeLock)
instance SetField "outputs" AmuletRules_ComputeFees [TransferOutput]
instance SetField "outputs" Transfer [TransferOutput]
instance SetField "receiver" TransferOutput Party
instance SetField "receiverFeeRatio" TransferOutput Decimal
data TransferPreapproval_CancelResult
TransferPreapproval_CancelResult
instance Eq TransferPreapproval_CancelResult
instance Show TransferPreapproval_CancelResult
instance HasExercise TransferPreapproval TransferPreapproval_Cancel TransferPreapproval_CancelResult
instance HasFromAnyChoice TransferPreapproval TransferPreapproval_Cancel TransferPreapproval_CancelResult
instance HasToAnyChoice TransferPreapproval TransferPreapproval_Cancel TransferPreapproval_CancelResult
data TransferPreapproval_ExpireResult
TransferPreapproval_ExpireResult
(no fields)
instance Eq TransferPreapproval_ExpireResult
instance Show TransferPreapproval_ExpireResult
instance HasExercise TransferPreapproval TransferPreapproval_Expire TransferPreapproval_ExpireResult
instance HasFromAnyChoice TransferPreapproval TransferPreapproval_Expire TransferPreapproval_ExpireResult
instance HasToAnyChoice TransferPreapproval TransferPreapproval_Expire TransferPreapproval_ExpireResult
data TransferPreapproval_RenewResult
TransferPreapproval_RenewResult
Field
Type
Description
transferPreapprovalCid
transferResult
receiver
provider
amuletPaid
instance Eq TransferPreapproval_RenewResult
instance Show TransferPreapproval_RenewResult
instance GetField "amuletPaid" TransferPreapproval_RenewResult Decimal
instance GetField "provider" TransferPreapproval_RenewResult Party
instance GetField "receiver" TransferPreapproval_RenewResult Party
instance GetField "transferPreapprovalCid" TransferPreapproval_RenewResult (ContractId TransferPreapproval)
instance GetField "transferResult" TransferPreapproval_RenewResult TransferResult
instance SetField "amuletPaid" TransferPreapproval_RenewResult Decimal
instance SetField "provider" TransferPreapproval_RenewResult Party
instance SetField "receiver" TransferPreapproval_RenewResult Party
instance SetField "transferPreapprovalCid" TransferPreapproval_RenewResult (ContractId TransferPreapproval)
instance SetField "transferResult" TransferPreapproval_RenewResult TransferResult
instance HasExercise TransferPreapproval TransferPreapproval_Renew TransferPreapproval_RenewResult
instance HasFromAnyChoice TransferPreapproval TransferPreapproval_Renew TransferPreapproval_RenewResult
instance HasToAnyChoice TransferPreapproval TransferPreapproval_Renew TransferPreapproval_RenewResult
data TransferPreapproval_SendResult
TransferPreapproval_SendResult
Field
Type
Description
result
instance Eq TransferPreapproval_SendResult
instance Show TransferPreapproval_SendResult
instance GetField "result" TransferPreapproval_SendResult TransferResult
instance SetField "result" TransferPreapproval_SendResult TransferResult
instance HasExercise TransferPreapproval TransferPreapproval_Send TransferPreapproval_SendResult
instance HasFromAnyChoice TransferPreapproval TransferPreapproval_Send TransferPreapproval_SendResult
instance HasToAnyChoice TransferPreapproval TransferPreapproval_Send TransferPreapproval_SendResult
data TransferResult
Field
Type
Description
round
Round for which this transfer was registered.
summary
Summary of amount input and outputs, and fees paid.
createdAmulets
References to the created output amulets.
senderChangeAmulet
Optional reference to the amulet for the change returned to the sender. Only created if there was some change to be returned after deducting the fee for returning change.
instance Eq TransferResult
instance Show TransferResult
instance GetField "createdAmulets" TransferResult [CreatedAmulet]
instance GetField "result" TransferPreapproval_SendResult TransferResult
instance GetField "result" TransferCommandResult TransferResult
instance GetField "round" TransferResult Round
instance GetField "senderChangeAmulet" TransferResult (Optional (ContractId Amulet))
instance GetField "summary" TransferResult TransferSummary
instance GetField "transferResult" AmuletRules_CreateExternalPartySetupProposalResult TransferResult
instance GetField "transferResult" AmuletRules_CreateTransferPreapprovalResult TransferResult
instance GetField "transferResult" TransferPreapproval_RenewResult TransferResult
instance SetField "createdAmulets" TransferResult [CreatedAmulet]
instance SetField "result" TransferPreapproval_SendResult TransferResult
instance SetField "result" TransferCommandResult TransferResult
instance SetField "round" TransferResult Round
instance SetField "senderChangeAmulet" TransferResult (Optional (ContractId Amulet))
instance SetField "summary" TransferResult TransferSummary
instance SetField "transferResult" AmuletRules_CreateExternalPartySetupProposalResult TransferResult
instance SetField "transferResult" AmuletRules_CreateTransferPreapprovalResult TransferResult
instance SetField "transferResult" TransferPreapproval_RenewResult TransferResult
instance HasExercise AmuletRules AmuletRules_Transfer TransferResult
instance HasFromAnyChoice AmuletRules AmuletRules_Transfer TransferResult
instance HasToAnyChoice AmuletRules AmuletRules_Transfer TransferResult
data TransferSummary
Summary of input and output amounts and fees paid. This summary is intended to be used together with the
Transfer
specification used to initiate the transfer when displaying a transaction summary. Its fields are intended to provide shortcuts for key numbers that are complex to compute off-ledger.All amounts are denominated in Splice.
Field
Type
Description
inputAppRewardAmount
Total amount of app reward coupon issunace input into this transfer.
inputValidatorRewardAmount
Total amount of validator rewards coupon issuance input into this transfer.
inputSvRewardAmount
Total amount of SV reward coupon issuance input into this transfer.
inputAmuletAmount
Total input amount of amulet input into this transfer, before deducting holding fees.
balanceChanges
Balance changes per party
holdingFees
Holding fees paid by the sender on their input amulets.
outputFees
[Decimal]
Fees paid for the individual output amulets in the order they were specified.
senderChangeFee
Fee charged for returning change to the sender, which is the smaller of the left-over balance after paying for all outputs or one amulet create fee. In case the left-over balance after paying for all outputs is smaller than a create fee, all of that balance is consumed by the fee for returning change, and no actual amulet is created for the sender, i.e., the
senderChangeAmount
is zero. The transfer does though succeed. For transfers that do not allow returning change to the sender, the left-over balance after paying for all outputs must be zero, and thus thesenderChangeFee
must be zero as well.senderChangeAmount
The final amount of amulet returned to the sender after paying for all outputs and fees. If it is zero, then no amulet is created for the sender.
amuletPrice
The amulet price at the round this transfer was executed.
inputValidatorFaucetAmount
Added in CIP-3. Total amount of validator faucet coupon issuance input into this transfer.
instance Eq TransferSummary
instance Show TransferSummary
instance GetField "amuletPrice" TransferSummary Decimal
instance GetField "balanceChanges" TransferSummary (Map Party BalanceChange)
instance GetField "holdingFees" TransferSummary Decimal
instance GetField "inputAmuletAmount" TransferSummary Decimal
instance GetField "inputAppRewardAmount" TransferSummary Decimal
instance GetField "inputSvRewardAmount" TransferSummary Decimal
instance GetField "inputValidatorFaucetAmount" TransferSummary (Optional Decimal)
instance GetField "inputValidatorRewardAmount" TransferSummary Decimal
instance GetField "outputFees" TransferSummary [Decimal]
instance GetField "senderChangeAmount" TransferSummary Decimal
instance GetField "senderChangeFee" TransferSummary Decimal
instance GetField "summary" AmuletRules_BuyMemberTrafficResult TransferSummary
instance GetField "summary" TransferResult TransferSummary
instance SetField "amuletPrice" TransferSummary Decimal
instance SetField "balanceChanges" TransferSummary (Map Party BalanceChange)
instance SetField "holdingFees" TransferSummary Decimal
instance SetField "inputAmuletAmount" TransferSummary Decimal
instance SetField "inputAppRewardAmount" TransferSummary Decimal
instance SetField "inputSvRewardAmount" TransferSummary Decimal
instance SetField "inputValidatorFaucetAmount" TransferSummary (Optional Decimal)
instance SetField "inputValidatorRewardAmount" TransferSummary Decimal
instance SetField "outputFees" TransferSummary [Decimal]
instance SetField "senderChangeAmount" TransferSummary Decimal
instance SetField "senderChangeFee" TransferSummary Decimal
instance SetField "summary" AmuletRules_BuyMemberTrafficResult TransferSummary
instance SetField "summary" TransferResult TransferSummary
Functions
- transferControllers
-
The controllers for a transfer.
- computeFees
: Party -> TransferContext -> Party -> [TransferOutput] -> Update [Decimal]
- checkTransferConstraints
: Transfer -> TransferSummary -> TransferConfig Amulet -> Either InvalidTransferReason ()
- executeTransfer
: RewardsIssuanceConfig -> TransferContext -> Party -> Transfer -> Update TransferResult
Execute a transfer.
- summarizeAndConsumeInputs
: TransferContextSummary -> Party -> Party -> [TransferInput] -> Update TransferInputsSummary
- dedupOutputLockHolders
: TransferOutput -> TransferOutput
Deduplicate lock-holders to store them and charge for them at most once
- preprocessOutputs
: TransferConfig Amulet -> Party -> [TransferOutput] -> Update TransferOutputsSummary
- summarizeTransfer
: Party -> OpenMiningRound -> TransferConfig Amulet -> TransferInputsSummary -> TransferOutputsSummary -> Update TransferSummary
- issueRewards
: RewardsIssuanceConfig -> TransferContextSummary -> Party -> Party -> TransferSummary -> Update ()
- createTransferOutputs
: OpenMiningRound -> TransferConfig Amulet -> Party -> Party -> TransferSummary -> TransferOutputsSummary -> Update ([CreatedAmulet], Optional (ContractId Amulet))
- scaleFees
: Decimal -> TransferConfig USD -> TransferConfig Amulet
Scale the ‘AmuletConfig’ such that the fees charged are scaled by the same scale factor.
- computeSynchronizerFees
: Party -> Int -> AmuletRules -> TransferContext -> Update (Decimal, Decimal)
Computing synchronizer fees
- exerciseComputeFees
: PaymentTransferContext -> Party -> [TransferOutput] -> Update [Decimal]
- amuletTransferContext
: ContractId OpenMiningRound -> Optional (ContractId FeaturedAppRight) -> TransferContext
Helper to construct transfer context with only amulet inputs
- mkInputValidatorFaucetCoupon
: ContractId ValidatorFaucetCoupon -> TransferInput
Smart constructor for inputing validator faucet coupons into a transfer.
- computeTransferPreapprovalFee
: RelTime -> AmuletConfig USD -> TransferContext -> Party -> Update (Decimal, Decimal)
- chargeTransferPreapprovalFee
: Party -> Decimal -> [TransferInput] -> PaymentTransferContext -> Party -> Update TransferResult