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

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# Splice.Schedule

> Documentation for Splice.Schedule

## Data Types

**data** Schedule t a

> A schedule of values that change over time.
>
> Schedule
>
> > | Field | Type | Description |
> > | - | - | - |
> > | initialValue | a | Initial value to use until the future values come into effect. |
> > | futureValues | \[(t, a)] | sorted in ascending order |
>
> **instance** [Functor](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-base-functor-31205) (Schedule t)
>
> **instance** ([Eq](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-eq-22713) a, [Eq](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-eq-22713) t) => [Eq](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-eq-22713) (Schedule t a)
>
> **instance** ([Show](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-show-show-65360) a, [Show](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-show-show-65360) t) => [Show](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-show-show-65360) (Schedule t a)
>
> **instance** GetField "configSchedule" AmuletRules (Schedule [Time](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-time-63886) (AmuletConfig USD))
>
> **instance** GetField "futureValues" (Schedule t a) \[(t, a)]
>
> **instance** GetField "initialValue" (Schedule t a) a
>
> **instance** GetField "issuanceCurve" (AmuletConfig unit) (Schedule [RelTime](https://docs.canton.network/appdev/reference/daml-standard-library/da-time.md#type-da-time-types-reltime-23082) IssuanceConfig)
>
> **instance** SetField "configSchedule" AmuletRules (Schedule [Time](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-time-63886) (AmuletConfig USD))
>
> **instance** SetField "futureValues" (Schedule t a) \[(t, a)]
>
> **instance** SetField "initialValue" (Schedule t a) a
>
> **instance** SetField "issuanceCurve" (AmuletConfig unit) (Schedule [RelTime](https://docs.canton.network/appdev/reference/daml-standard-library/da-time.md#type-da-time-types-reltime-23082) IssuanceConfig)
>
> **instance** (Patchable t, Patchable a, [Ord](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-ord-6395) t, [Eq](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-eq-22713) a) => Patchable (Schedule t a)

## Functions

getValueAsOf
: [Ord](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-ord-6395) t => t -> Schedule t a -> a

Get the value as of a specific time

getValueAsOfLedgerTime
: Schedule [Time](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-time-63886) a -> [Update](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-update-68072) a

Variant of `getValueAsOf` that communicates workflow-level bounds.

validSchedule
: [Ord](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-ord-6395) t => Schedule t a -> (a -> [Bool](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-ghc-types-bool-66265)) -> [Bool](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-ghc-types-bool-66265)

Check the validity of a schedule given a function to check the validity of its values

allValues
: Schedule t a -> \[a]

nextChangeScheduledAt
: Schedule t a -> [Optional](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-prelude-optional-37153) t

prune
: [Ord](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-ord-6395) t => t -> Schedule t a -> Schedule t a

splitAtTime
: [Ord](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-ord-6395) t => \[(t, a)] -> t -> (\[(t, a)], [Optional](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-prelude-optional-37153) (t, a), \[(t, a)])

insert
: [Ord](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-ord-6395) t => (t, a) -> Schedule t a -> Schedule t a

remove
: [Ord](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-ord-6395) t => t -> Schedule t a -> Schedule t a

update
: [Ord](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-ord-6395) t => (t, a) -> Schedule t a -> Schedule t a
