- Setup
- Overview
- Tutorials
- How Tos
- Reference
- DAR Versions
- API Reference
- Commercials API
- Credential API
- Registry API
- Utility.Registry
- Utility.Registry.V0.Configuration.Instrument
- Utility.Registry.V0.Holding.Allocation
- Utility.Registry.V0.Holding.Burn
- Utility.Registry.V0.Holding.Lock
- Utility.Registry.V0.Holding.Mint
- Utility.Registry.V0.Holding.TokenApiUtils
- Utility.Registry.V0.Holding.Transfer
- Utility.Registry.V0.Holding.Unlock
- Utility.Registry.V0.Types
- Utility.Registry.V0.Util
- Utility.Registry.App
- Utility.Holding
- Utility.Registry
- Operator Backend API
- Releases
Utility.Credential.App.V0.Util¶
Functions¶
- verifyAmulet
: Party -> ContractId Amulet -> Update Decimal
Verify the DSO party of a given Amulet and return the amount.
- verifyAmulets
: Party -> [ContractId Amulet] -> Update Decimal
Verify a list of Amulets and return the total amount.
- minutesToRelTime
-
Convert a number of minutes to a
RelTime
.
- relTimeToMicros
-
Convert a
RelTime
to a number of microseconds expressed asDecimal
.
- relTimeToMinutes
-
Convert a
RelTime
to minutes. The time intervalsdt
we use are typically an integer multiple of minutes, so we can expect this calculation to be exact.
- minutesPerDay
: Decimal
Number of minutes in a day.
- chargeRatePerDay
: RatePerDay -> RelTime -> Decimal
Calculate the charge for a given period based on a
RatePerDay
. This operation might introduce rounding errors.
- fetchAndValidate
: (HasFetch t, Eq a, Show a) => ContractId t -> [(Text, t -> a, a)] -> Update t
Fetch a contract and validate that fields are as expected.