> ## 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.

# Splice.Expiry

> Documentation for Splice.Expiry

Functions for computing amulet and lock expiry times and conditions.

## Data Types

<div id="type-splice-expiry-boundedset-6748">
  **data** BoundedSet a
</div>

> A symbolic representation of a set of values of type `a` useful for computing upper-bounds.
>
> <div id="constr-splice-expiry-singleton-7610">
>   Singleton a
> </div>
>
> > `Singleton x` represents the singleton set `{x}`
>
> <div id="constr-splice-expiry-aftermaxbound-46101">
>   AfterMaxBound
> </div>
>
> > `AfterMaxBound` represents the set of all values larger than the maximal value that can be represented by type `a`
>
> **instance** [Functor](/appdev/reference/daml-standard-library/prelude#class-ghc-base-functor-31205) BoundedSet
>
> **instance** [Eq](/appdev/reference/daml-standard-library/prelude#class-ghc-classes-eq-22713) a => [Eq](/appdev/reference/daml-standard-library/prelude#class-ghc-classes-eq-22713) (BoundedSet a)
>
> **instance** [Show](/appdev/reference/daml-standard-library/prelude#class-ghc-show-show-65360) a => [Show](/appdev/reference/daml-standard-library/prelude#class-ghc-show-show-65360) (BoundedSet a)

<div id="type-splice-expiry-timelock-2221">
  **data** TimeLock
</div>

> A lock held by multiple parties until its expiry.
>
> <div id="constr-splice-expiry-timelock-44256">
>   TimeLock
> </div>
>
> > | Field      | Type                                                                                                                                                                                  | Description                                                                                                                                                                                                                                                                       |
> > | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
> > | holders    | \[[Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932)]                                                                                           |                                                                                                                                                                                                                                                                                   |
> > | expiresAt  | [Time](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-time-63886)                                                                                                |                                                                                                                                                                                                                                                                                   |
> > | optContext | [Optional](/appdev/reference/daml-standard-library/prelude#type-da-internal-prelude-optional-37153) [Text](/appdev/reference/daml-standard-library/prelude#type-ghc-types-text-51952) | Short, human-readable description of the context in which the amulet is locked. Intended for wallets to inform the user about the reason for the lock. Consider what details to share about the context, as that might be private and the string here will be public information. |
>
> **instance** FromAnyValue TimeLock
>
> **instance** ToAnyValue TimeLock
>
> **instance** [Eq](/appdev/reference/daml-standard-library/prelude#class-ghc-classes-eq-22713) TimeLock
>
> **instance** [Ord](/appdev/reference/daml-standard-library/prelude#class-ghc-classes-ord-6395) TimeLock
>
> **instance** [Show](/appdev/reference/daml-standard-library/prelude#class-ghc-show-show-65360) TimeLock
>
> **instance** GetField "expiresAt" TimeLock [Time](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-time-63886)
>
> **instance** GetField "holders" TimeLock \[[Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932)]
>
> **instance** GetField "lock" LockedAmulet TimeLock
>
> **instance** GetField "lock" PreprocessedTransferOutput ([Optional](/appdev/reference/daml-standard-library/prelude#type-da-internal-prelude-optional-37153) TimeLock)
>
> **instance** GetField "lock" TransferOutput ([Optional](/appdev/reference/daml-standard-library/prelude#type-da-internal-prelude-optional-37153) TimeLock)
>
> **instance** GetField "optContext" TimeLock ([Optional](/appdev/reference/daml-standard-library/prelude#type-da-internal-prelude-optional-37153) [Text](/appdev/reference/daml-standard-library/prelude#type-ghc-types-text-51952))
>
> **instance** SetField "expiresAt" TimeLock [Time](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-time-63886)
>
> **instance** SetField "holders" TimeLock \[[Party](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-party-57932)]
>
> **instance** SetField "lock" LockedAmulet TimeLock
>
> **instance** SetField "lock" PreprocessedTransferOutput ([Optional](/appdev/reference/daml-standard-library/prelude#type-da-internal-prelude-optional-37153) TimeLock)
>
> **instance** SetField "lock" TransferOutput ([Optional](/appdev/reference/daml-standard-library/prelude#type-da-internal-prelude-optional-37153) TimeLock)
>
> **instance** SetField "optContext" TimeLock ([Optional](/appdev/reference/daml-standard-library/prelude#type-da-internal-prelude-optional-37153) [Text](/appdev/reference/daml-standard-library/prelude#type-ghc-types-text-51952))

## Functions

<div id="function-splice-expiry-maxint-28108">
  maxInt
  : [Int](/appdev/reference/daml-standard-library/prelude#type-ghc-types-int-37261)
</div>

<div id="function-splice-expiry-maxdecimaldiv10-64031">
  maxDecimalDiv10
  : [Decimal](/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135)
</div>

<div id="function-splice-expiry-mintime-10075">
  minTime
  : [Time](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-time-63886)

  The smallest time point that can be represented by the `Time` type.
</div>

<div id="function-splice-expiry-maxtime-17293">
  maxTime
  : [Time](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-time-63886)

  The largest time point that can be represented by the `Time` type.
</div>

<div id="function-splice-expiry-amountexpiresat-59287">
  amountExpiresAt
  : ExpiringAmount -> BoundedSet Round

  Compute the round where the amulet expires. i.e. the amulet is fully expired.
</div>

<div id="function-splice-expiry-isamuletexpired-66613">
  isAmuletExpired
  : Round -> ExpiringAmount -> [Bool](/appdev/reference/daml-standard-library/prelude#type-ghc-types-bool-66265)

  `isAmuletExpired openRound amuletAmount` computes whether the expiring `amuletAmount` is definitely expired in case the `openRound` is open.
</div>
