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

# @daml/types

> TypeScript and JavaScript language bindings for Canton.

Generated from published `@daml/types` TypeDoc snapshots.

## Table of Contents

| Name                                                        | Kind       | Summary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Introduced | Changed                                                         | Deprecated | Removed |
| ----------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | --------------------------------------------------------------- | ---------- | ------- |
| [`Choice`](#interface-choice)                               | Interface  | Interface for objects representing Daml choices.                                                                                                                                                                                                                                                                                                                                                                                                                                                  | `3.4.8`    | -                                                               | -          | -       |
| [`ChoiceFrom`](#interface-choicefrom)                       | Interface  | The origin companion that contained a \[\[Choice]].                                                                                                                                                                                                                                                                                                                                                                                                                                               | `3.4.8`    | -                                                               | -          | -       |
| [`ContractTypeCompanion`](#interface-contracttypecompanion) | Interface  | Companion objects for templates and interfaces, containing their choices.                                                                                                                                                                                                                                                                                                                                                                                                                         | `3.4.8`    | `3.4.9`: members added: `templateIdWithPackageId`               | -          | -       |
| [`FromTemplate`](#interface-fromtemplate)                   | Interface  | A mixin for \[\[InterfaceCompanion]].  This supplies the basis<br />for the methods of \[\[ToInterface]].<br /><br />Even interfaces that retroactively implement for no templates implement this,<br />because forward implementations still require this marker to work.                                                                                                                                                                                                                        | `3.4.8`    | -                                                               | -          | -       |
| [`Map`](#interface-map)                                     | Interface  | The counterpart of Daml's `DA.Map.Map K V` type.<br /><br />This is an immutable map which compares keys via deep equality. The order of<br />iteration is unspecified; the only guarantee is that the order in `keys` and<br />`values` match, i.e. `m.get(k)` is (deep-, value-based) equal to<br />`[...m.values()][[...m.keys()].findIndex((l) =&gt; _.isEqual(k, l))]`                                                                                                                       | `3.4.8`    | -                                                               | -          | -       |
| [`Serializable`](#interface-serializable)                   | Interface  | Interface for companion objects of serializable types. Its main purpose is<br />to serialize and deserialize values between raw JSON and typed values.                                                                                                                                                                                                                                                                                                                                            | `3.4.8`    | -                                                               | -          | -       |
| [`Template`](#interface-template)                           | Interface  | Interface for objects representing Daml templates. It is similar to the<br />`Template` type class in Daml.                                                                                                                                                                                                                                                                                                                                                                                       | `3.4.8`    | `3.4.9`: members added: `templateIdWithPackageId`               | -          | -       |
| [`ToInterface`](#interface-tointerface)                     | Interface  | A mixin for \[\[Template]] that provides the `toInterface` and<br />`unsafeFromInterface` contract ID conversion functions.<br /><br />Even templates that directly implement no interfaces implement this, because<br />this also permits conversion with interfaces that supply retroactive<br />implementations to this template.                                                                                                                                                              | `3.4.8`    | -                                                               | -          | -       |
| [`Unit`](#interface-unit)                                   | Interface  | The counterpart of Daml's `()` type.                                                                                                                                                                                                                                                                                                                                                                                                                                                              | `3.4.8`    | -                                                               | -          | -       |
| [`Bool`](#type-alias-bool)                                  | Type Alias | The counterpart of Daml's `Bool` type.                                                                                                                                                                                                                                                                                                                                                                                                                                                            | `3.4.8`    | -                                                               | -          | -       |
| [`ContractId`](#type-alias-contractid)                      | Type Alias | The counterpart of Daml's `ContractId T` type.<br /><br />We represent `ContractId`s as strings. Their exact format of these strings depends on the ledger<br />the Daml application is running on.<br /><br />The purpose of the intersection with `{ [ContractIdBrand]: T }` is to<br />prevent accidental use of a `ContractId&lt;T&gt;` when a `ContractId&lt;U&gt;` is<br />needed (unless `T` is a subtype of `U`). This technique is known as<br />"branding" in the TypeScript community. | `3.4.8`    | -                                                               | -          | -       |
| [`Date`](#type-alias-date)                                  | Type Alias | The counterpart of Daml's `Date` type.<br /><br />We represent `Date`s as strings with format `YYYY-MM-DD`.                                                                                                                                                                                                                                                                                                                                                                                       | `3.4.8`    | -                                                               | -          | -       |
| [`Decimal`](#type-alias-decimal)                            | Type Alias | The counterpart of Daml's `Decimal` type.<br /><br />In Daml, Decimal's are the same as Numeric with precision 10.                                                                                                                                                                                                                                                                                                                                                                                | `3.4.8`    | -                                                               | -          | -       |
| [`DisclosedContract`](#type-alias-disclosedcontract)        | Type Alias | A disclosed contract that can be passed on a command submission.                                                                                                                                                                                                                                                                                                                                                                                                                                  | `3.4.8`    | -                                                               | -          | -       |
| [`Int`](#type-alias-int)                                    | Type Alias | The counterpart of Daml's `Int` type.<br /><br />We represent `Int`s as string in order to avoid a loss of precision.                                                                                                                                                                                                                                                                                                                                                                             | `3.4.8`    | -                                                               | -          | -       |
| [`Interface`](#type-alias-interface)                        | Type Alias | An interface type, for use with contract IDs.                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `3.4.8`    | -                                                               | -          | -       |
| [`InterfaceCompanion`](#type-alias-interfacecompanion)      | Type Alias | Interface for objects representing Daml interfaces.                                                                                                                                                                                                                                                                                                                                                                                                                                               | `3.4.8`    | -                                                               | -          | -       |
| [`List`](#type-alias-list)                                  | Type Alias | The counterpart of Daml's `[T]` list type.<br /><br />We represent lists using arrays.                                                                                                                                                                                                                                                                                                                                                                                                            | `3.4.8`    | -                                                               | -          | -       |
| [`Numeric`](#type-alias-numeric)                            | Type Alias | The counterpart of Daml's `Numeric` type.<br /><br />We represent `Numeric`s as string in order to avoid a loss of precision. The string must match<br />the regular expression `-?(?:0\|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?`.                                                                                                                                                                                                                                                                   | `3.4.8`    | -                                                               | -          | -       |
| [`Optional`](#type-alias-optional)                          | Type Alias | The counterpart of Daml's `Optional T` type.                                                                                                                                                                                                                                                                                                                                                                                                                                                      | `3.4.8`    | -                                                               | -          | -       |
| [`Party`](#type-alias-party)                                | Type Alias | The counterpart of Daml's `Party` type.<br /><br />We represent `Party`s as strings matching the regular expression `[A-Za-z0-9:_\- ]+`.                                                                                                                                                                                                                                                                                                                                                          | `3.4.8`    | -                                                               | -          | -       |
| [`TemplateOrInterface`](#type-alias-templateorinterface)    | Type Alias | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `3.4.8`    | `3.4.9`: signature updated; type parameter renamed: `I` -> `Id` | -          | -       |
| [`Text`](#type-alias-text)                                  | Type Alias | The counterpart of Daml's `Text` type.                                                                                                                                                                                                                                                                                                                                                                                                                                                            | `3.4.8`    | -                                                               | -          | -       |
| [`TextMap`](#type-alias-textmap)                            | Type Alias | The counterpart of Daml's `TextMap T` type.<br /><br />We represent `TextMap`s as dictionaries.                                                                                                                                                                                                                                                                                                                                                                                                   | `3.4.8`    | -                                                               | -          | -       |
| [`Time`](#type-alias-time)                                  | Type Alias | The counterpart of Daml's `Time` type.<br /><br />We represent `Times`s as strings with format `YYYY-MM-DDThh:mm:ss[.ssssss]Z`.                                                                                                                                                                                                                                                                                                                                                                   | `3.4.8`    | -                                                               | -          | -       |
| [`Bool`](#variable-bool)                                    | Variable   | Companion object of the \[\[Bool]] type.                                                                                                                                                                                                                                                                                                                                                                                                                                                          | `3.4.8`    | -                                                               | -          | -       |
| [`Date`](#variable-date)                                    | Variable   | Companion object of the \[\[Date]] type.                                                                                                                                                                                                                                                                                                                                                                                                                                                          | `3.4.8`    | -                                                               | -          | -       |
| [`Decimal`](#variable-decimal)                              | Variable   | Companion object of the \[\[Decimal]] type.                                                                                                                                                                                                                                                                                                                                                                                                                                                       | `3.4.8`    | -                                                               | -          | -       |
| [`Int`](#variable-int)                                      | Variable   | Companion object of the \[\[Int]] type.                                                                                                                                                                                                                                                                                                                                                                                                                                                           | `3.4.8`    | -                                                               | -          | -       |
| [`Party`](#variable-party)                                  | Variable   | Companion object of the \[\[Party]] type.                                                                                                                                                                                                                                                                                                                                                                                                                                                         | `3.4.8`    | -                                                               | -          | -       |
| [`Text`](#variable-text)                                    | Variable   | Companion object of the \[\[Text]] type.                                                                                                                                                                                                                                                                                                                                                                                                                                                          | `3.4.8`    | -                                                               | -          | -       |
| [`Time`](#variable-time)                                    | Variable   | Companion object of the \[\[Time]] type.                                                                                                                                                                                                                                                                                                                                                                                                                                                          | `3.4.8`    | -                                                               | -          | -       |
| [`Unit`](#variable-unit)                                    | Variable   | Companion object of the \[\[Unit]] type.                                                                                                                                                                                                                                                                                                                                                                                                                                                          | `3.4.8`    | -                                                               | -          | -       |
| [`ContractId`](#function-contractid)                        | Function   | Companion object of the \[\[ContractId]] type.                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `3.4.8`    | -                                                               | -          | -       |
| [`emptyMap`](#function-emptymap)                            | Function   | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `3.4.8`    | -                                                               | -          | -       |
| [`List`](#function-list)                                    | Function   | Companion object of the \[\[List]] type.                                                                                                                                                                                                                                                                                                                                                                                                                                                          | `3.4.8`    | -                                                               | -          | -       |
| [`Map`](#function-map)                                      | Function   | Companion function of the \[\[GenMap]] type.                                                                                                                                                                                                                                                                                                                                                                                                                                                      | `3.4.8`    | -                                                               | -          | -       |
| [`Numeric`](#function-numeric)                              | Function   | Companion function of the \[\[Numeric]] type.                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `3.4.8`    | -                                                               | -          | -       |
| [`Optional`](#function-optional)                            | Function   | Companion function of the \[\[Optional]] type.                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `3.4.8`    | -                                                               | -          | -       |
| [`TextMap`](#function-textmap)                              | Function   | Companion object of the \[\[TextMap]] type.                                                                                                                                                                                                                                                                                                                                                                                                                                                       | `3.4.8`    | -                                                               | -          | -       |

## Version Change Summary

| Version  | Added | Changed | Removed |
| -------- | ----- | ------- | ------- |
| `3.4.8`  | `40`  | -       | -       |
| `3.4.9`  | -     | `3`     | -       |
| `3.4.10` | -     | -       | -       |
| `3.4.11` | -     | -       | -       |

## Reference

### Interfaces

<span id="interface-choice" />

#### Choice

* Kind: `Interface`
* Introduced: `3.4.8`
* Source: `index.d.ts:113`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
interface Choice<T extends object = void, C extends void = void, R extends void = void, K extends void = unknown> extends ChoiceFrom<TemplateOrInterface<T, K>>
```

Interface for objects representing Daml choices.

**Type Parameters**

| Name | Constraint | Default   | Description             |
| ---- | ---------- | --------- | ----------------------- |
| `T`  | `object`   | -         | The template type.      |
| `C`  | -          | -         | The choice type.        |
| `R`  | -          | -         | The choice return type. |
| `K`  | -          | `unknown` | The contract key type.  |

**Members**

| Member       | Type                           | Description                                        |
| ------------ | ------------------------------ | -------------------------------------------------- |
| `choiceName` | `string`                       | The choice name.                                   |
| `template`   | `() =&gt; TemplateOrInterface` | Returns the template to which this choice belongs. |

<span id="interface-choicefrom" />

#### ChoiceFrom

* Kind: `Interface`
* Introduced: `3.4.8`
* Source: `index.d.ts:140`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
interface ChoiceFrom<O extends void = void>
```

The origin companion that contained a \[\[Choice]].

**Type Parameters**

| Name | Constraint | Default | Description                                                                                   |
| ---- | ---------- | ------- | --------------------------------------------------------------------------------------------- |
| `O`  | -          | -       | The type of the template or interface of which<br />           this \[\[Choice]] is a member. |

**Members**

| Member     | Type         | Description                                        |
| ---------- | ------------ | -------------------------------------------------- |
| `template` | `() =&gt; O` | Returns the template to which this choice belongs. |

<span id="interface-contracttypecompanion" />

#### ContractTypeCompanion

* Kind: `Interface`
* Introduced: `3.4.8`
* Changed in: `3.4.9`
* Source: `index.d.ts:25`

**Version Changes**

| Version | Changes                                  |
| ------- | ---------------------------------------- |
| `3.4.9` | members added: `templateIdWithPackageId` |

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
interface ContractTypeCompanion<T extends object = void, K extends void = void, I extends string = void>
```

Companion objects for templates and interfaces, containing their choices.

**Type Parameters**

| Name | Constraint | Default | Description                                    |
| ---- | ---------- | ------- | ---------------------------------------------- |
| `T`  | `object`   | -       | The template payload format or interface view. |
| `K`  | -          | -       | The contract key type.                         |
| `I`  | `string`   | -       | The template or interface id.                  |

**Members**

| Member                    | Type     | Description |
| ------------------------- | -------- | ----------- |
| `templateId`              | `I`      | -           |
| `templateIdWithPackageId` | `string` | -           |

<span id="interface-fromtemplate" />

#### FromTemplate

* Kind: `Interface`
* Introduced: `3.4.8`
* Source: `index.d.ts:101`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
interface FromTemplate<If extends void = void, TX extends void = void>
```

A mixin for \[\[InterfaceCompanion]].  This supplies the basis
for the methods of \[\[ToInterface]].

Even interfaces that retroactively implement for no templates implement this,
because forward implementations still require this marker to work.

**Type Parameters**

| Name | Constraint | Default | Description                                                                                                                    |
| ---- | ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `If` | -          | -       | The interface type.                                                                                                            |
| `TX` | -          | -       | The intersection of template types this interface retroactively<br />              implements, or `unknown` if there are none. |

**Members**

| Member                | Type       | Description |
| --------------------- | ---------- | ----------- |
| `[FromTemplateBrand]` | `[If, TX]` | -           |

<span id="interface-map" />

#### Map

* Kind: `Interface`
* Introduced: `3.4.8`
* Source: `index.d.ts:340`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
interface Map<K extends void = void, V extends void = void>
```

The counterpart of Daml's `DA.Map.Map K V` type.

This is an immutable map which compares keys via deep equality. The order of
iteration is unspecified; the only guarantee is that the order in `keys` and
`values` match, i.e. `m.get(k)` is (deep-, value-based) equal to
`[...m.values()][[...m.keys()].findIndex((l) =&gt; _.isEqual(k, l))]`

**Type Parameters**

| Name | Constraint | Default | Description                 |
| ---- | ---------- | ------- | --------------------------- |
| `K`  | -          | -       | The type of the map keys.   |
| `V`  | -          | -       | The type of the map values. |

**Members**

| Member         | Type                                                                      | Description |
| -------------- | ------------------------------------------------------------------------- | ----------- |
| `delete`       | `(k: K) =&gt; Map&lt;K, V&gt;`                                            | -           |
| `entries`      | `() =&gt; Iterator&lt;[K, V], undefined, undefined&gt;`                   | -           |
| `entriesArray` | `() =&gt; [K, V][]`                                                       | -           |
| `forEach`      | `(f: (value: V, key: K, map: Map&lt;K, V&gt;) =&gt; T, u?: U) =&gt; void` | -           |
| `get`          | `(k: K) =&gt; undefined \| V`                                             | -           |
| `has`          | `(k: K) =&gt; boolean`                                                    | -           |
| `keys`         | `() =&gt; Iterator&lt;K, undefined, undefined&gt;`                        | -           |
| `set`          | `(k: K, v: V) =&gt; Map&lt;K, V&gt;`                                      | -           |
| `values`       | `() =&gt; Iterator&lt;V, undefined, undefined&gt;`                        | -           |

<span id="interface-serializable" />

#### Serializable

* Kind: `Interface`
* Introduced: `3.4.8`
* Source: `index.d.ts:8`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
interface Serializable<T extends void = void>
```

Interface for companion objects of serializable types. Its main purpose is
to serialize and deserialize values between raw JSON and typed values.

**Type Parameters**

| Name | Constraint | Default | Description        |
| ---- | ---------- | ------- | ------------------ |
| `T`  | -          | -       | The template type. |

<span id="interface-template" />

#### Template

* Kind: `Interface`
* Introduced: `3.4.8`
* Changed in: `3.4.9`
* Source: `index.d.ts:50`

**Version Changes**

| Version | Changes                                  |
| ------- | ---------------------------------------- |
| `3.4.9` | members added: `templateIdWithPackageId` |

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
interface Template<T extends object = void, K extends void = unknown, I extends string = string> extends ContractTypeCompanion<T, K, I>, Serializable<T>
```

Interface for objects representing Daml templates. It is similar to the
`Template` type class in Daml.

**Type Parameters**

| Name | Constraint | Default   | Description            |
| ---- | ---------- | --------- | ---------------------- |
| `T`  | `object`   | -         | The template type.     |
| `K`  | -          | `unknown` | The contract key type. |
| `I`  | `string`   | `string`  | The template id type.  |

**Members**

| Member                    | Type                                                                         | Description |
| ------------------------- | ---------------------------------------------------------------------------- | ----------- |
| `Archive`                 | `Choice&lt;T, {}, {}, K&gt; &amp; ChoiceFrom&lt;Template&lt;T, K, I&gt;&gt;` | -           |
| `templateId`              | `I`                                                                          | -           |
| `templateIdWithPackageId` | `string`                                                                     | -           |

<span id="interface-tointerface" />

#### ToInterface

* Kind: `Interface`
* Introduced: `3.4.8`
* Source: `index.d.ts:69`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
interface ToInterface<T extends object = void, IfU extends void = void>
```

A mixin for \[\[Template]] that provides the `toInterface` and
`unsafeFromInterface` contract ID conversion functions.

Even templates that directly implement no interfaces implement this, because
this also permits conversion with interfaces that supply retroactive
implementations to this template.

**Type Parameters**

| Name  | Constraint | Default | Description                                                                                                         |
| ----- | ---------- | ------- | ------------------------------------------------------------------------------------------------------------------- |
| `T`   | `object`   | -       | The template type.                                                                                                  |
| `IfU` | -          | -       | The union of implemented interfaces, or `never` for templates<br />           that directly implement no interface. |

**Members**

| Member                | Type   | Description |
| --------------------- | ------ | ----------- |
| `toInterface`         | `void` | -           |
| `unsafeFromInterface` | `void` | -           |

<span id="interface-unit" />

#### Unit

* Kind: `Interface`
* Introduced: `3.4.8`
* Source: `index.d.ts:181`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
interface Unit
```

The counterpart of Daml's `()` type.

### Type Aliases

<span id="type-alias-bool" />

#### Bool

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:190`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type Bool = boolean
```

The counterpart of Daml's `Bool` type.

<span id="type-alias-contractid" />

#### ContractId

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:294`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type ContractId<T extends void = void> = string & { [ContractIdBrand]: T }
```

The counterpart of Daml's `ContractId T` type.

We represent `ContractId`s as strings. Their exact format of these strings depends on the ledger
the Daml application is running on.

The purpose of the intersection with `{ [ContractIdBrand]: T }` is to
prevent accidental use of a `ContractId&lt;T&gt;` when a `ContractId&lt;U&gt;` is
needed (unless `T` is a subtype of `U`). This technique is known as
"branding" in the TypeScript community.

**Type Parameters**

| Name | Constraint | Default | Description            |
| ---- | ---------- | ------- | ---------------------- |
| `T`  | -          | -       | The contract template. |

<span id="type-alias-date" />

#### Date

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:272`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type Date = string
```

The counterpart of Daml's `Date` type.

We represent `Date`s as strings with format `YYYY-MM-DD`.

<span id="type-alias-decimal" />

#### Decimal

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:218`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type Decimal = Numeric
```

The counterpart of Daml's `Decimal` type.

In Daml, Decimal's are the same as Numeric with precision 10.

<span id="type-alias-disclosedcontract" />

#### DisclosedContract

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:362`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type DisclosedContract = { contractId: ContractId<unknown>; createdEventBlob: string; templateId: string }
```

A disclosed contract that can be passed on a command submission.

<span id="type-alias-int" />

#### Int

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:200`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type Int = string
```

The counterpart of Daml's `Int` type.

We represent `Int`s as string in order to avoid a loss of precision.

<span id="type-alias-interface" />

#### Interface

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:81`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type Interface<IfId extends void = void> = { readonly [InterfaceBrand]: IfId }
```

An interface type, for use with contract IDs.

**Type Parameters**

| Name   | Constraint | Default | Description                            |
| ------ | ---------- | ------- | -------------------------------------- |
| `IfId` | -          | -       | The interface ID as a constant string. |

<span id="type-alias-interfacecompanion" />

#### InterfaceCompanion

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:87`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type InterfaceCompanion<T extends object = void, K extends void = void, I extends string = string> = ContractTypeCompanion<T, K, I>
```

Interface for objects representing Daml interfaces.

**Type Parameters**

| Name | Constraint | Default  | Description |
| ---- | ---------- | -------- | ----------- |
| `T`  | `object`   | -        | -           |
| `K`  | -          | -        | -           |
| `I`  | `string`   | `string` | -           |

<span id="type-alias-list" />

#### List

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:262`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type List<T extends void = void> = T[]
```

The counterpart of Daml's `[T]` list type.

We represent lists using arrays.

**Type Parameters**

| Name | Constraint | Default | Description                  |
| ---- | ---------- | ------- | ---------------------------- |
| `T`  | -          | -       | The type of the list values. |

<span id="type-alias-numeric" />

#### Numeric

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:211`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type Numeric = string
```

The counterpart of Daml's `Numeric` type.

We represent `Numeric`s as string in order to avoid a loss of precision. The string must match
the regular expression `-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?`.

<span id="type-alias-optional" />

#### Optional

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:306`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type Optional<T extends void = void> = null | OptionalInner<T>
```

The counterpart of Daml's `Optional T` type.

**Type Parameters**

| Name | Constraint | Default | Description                               |
| ---- | ---------- | ------- | ----------------------------------------- |
| `T`  | -          | -       | The type of the optionally present value. |

<span id="type-alias-party" />

#### Party

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:250`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type Party = string
```

The counterpart of Daml's `Party` type.

We represent `Party`s as strings matching the regular expression `[A-Za-z0-9:_\- ]+`.

<span id="type-alias-templateorinterface" />

#### TemplateOrInterface

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Changed in: `3.4.9`
* Source: `index.d.ts:88`

**Version Changes**

| Version | Changes                                                |
| ------- | ------------------------------------------------------ |
| `3.4.9` | signature updated; type parameter renamed: `I` -> `Id` |

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type TemplateOrInterface<T extends object = void, K extends void = unknown, Id extends string = string> = Template<T, K, Id> | InterfaceCompanion<T, K, Id>
```

**Type Parameters**

| Name | Constraint | Default   | Description |
| ---- | ---------- | --------- | ----------- |
| `T`  | `object`   | -         | -           |
| `K`  | -          | `unknown` | -           |
| `Id` | `string`   | `string`  | -           |

<span id="type-alias-text" />

#### Text

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:230`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type Text = string
```

The counterpart of Daml's `Text` type.

<span id="type-alias-textmap" />

#### TextMap

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:322`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type TextMap<T extends void = void> = {}
```

The counterpart of Daml's `TextMap T` type.

We represent `TextMap`s as dictionaries.

**Type Parameters**

| Name | Constraint | Default | Description                 |
| ---- | ---------- | ------- | --------------------------- |
| `T`  | -          | -       | The type of the map values. |

<span id="type-alias-time" />

#### Time

* Kind: `Type Alias`
* Introduced: `3.4.8`
* Source: `index.d.ts:240`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type Time = string
```

The counterpart of Daml's `Time` type.

We represent `Times`s as strings with format `YYYY-MM-DDThh:mm:ss[.ssssss]Z`.

### Variables

<span id="variable-bool" />

#### Bool

* Kind: `Variable`
* Introduced: `3.4.8`
* Source: `index.d.ts:190`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const Bool: Serializable<boolean>
```

Companion object of the \[\[Bool]] type.

<span id="variable-date" />

#### Date

* Kind: `Variable`
* Introduced: `3.4.8`
* Source: `index.d.ts:272`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const Date: Serializable<string>
```

Companion object of the \[\[Date]] type.

<span id="variable-decimal" />

#### Decimal

* Kind: `Variable`
* Introduced: `3.4.8`
* Source: `index.d.ts:218`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const Decimal: Serializable<string>
```

Companion object of the \[\[Decimal]] type.

<span id="variable-int" />

#### Int

* Kind: `Variable`
* Introduced: `3.4.8`
* Source: `index.d.ts:200`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const Int: Serializable<string>
```

Companion object of the \[\[Int]] type.

<span id="variable-party" />

#### Party

* Kind: `Variable`
* Introduced: `3.4.8`
* Source: `index.d.ts:250`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const Party: Serializable<string>
```

Companion object of the \[\[Party]] type.

<span id="variable-text" />

#### Text

* Kind: `Variable`
* Introduced: `3.4.8`
* Source: `index.d.ts:230`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const Text: Serializable<string>
```

Companion object of the \[\[Text]] type.

<span id="variable-time" />

#### Time

* Kind: `Variable`
* Introduced: `3.4.8`
* Source: `index.d.ts:240`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const Time: Serializable<string>
```

Companion object of the \[\[Time]] type.

<span id="variable-unit" />

#### Unit

* Kind: `Variable`
* Introduced: `3.4.8`
* Source: `index.d.ts:181`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const Unit: Serializable<Unit>
```

Companion object of the \[\[Unit]] type.

### Functions

<span id="function-contractid" />

#### ContractId

* Kind: `Function`
* Introduced: `3.4.8`
* Source: `index.d.ts:294`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
ContractId<T extends void = void>(_t: Serializable<T> | TemplateOrInterface<T & object, unknown, string>): Serializable<ContractId<T>>
```

Companion object of the \[\[ContractId]] type.

**Call Signatures**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
ContractId<T extends void = void>(_t: Serializable<T> | TemplateOrInterface<T & object, unknown, string>): Serializable<ContractId<T>>
```

| Type Parameter | Constraint | Default | Description |
| -------------- | ---------- | ------- | ----------- |
| `T`            | -          | -       | -           |

| Parameter | Type                                                                                  | Required | Description |
| --------- | ------------------------------------------------------------------------------------- | -------- | ----------- |
| `_t`      | `Serializable&lt;T&gt; \| TemplateOrInterface&lt;T &amp; object, unknown, string&gt;` | yes      | -           |

Returns: `Serializable<ContractId<T>>`

<span id="function-emptymap" />

#### emptyMap

* Kind: `Function`
* Introduced: `3.4.8`
* Source: `index.d.ts:351`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
emptyMap<K extends void = void, V extends void = void>(): Map<K, V>
```

**Call Signatures**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
emptyMap<K extends void = void, V extends void = void>(): Map<K, V>
```

| Type Parameter | Constraint | Default | Description |
| -------------- | ---------- | ------- | ----------- |
| `K`            | -          | -       | -           |
| `V`            | -          | -       | -           |

Returns: `Map<K, V>`

<span id="function-list" />

#### List

* Kind: `Function`
* Introduced: `3.4.8`
* Source: `index.d.ts:262`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
List<T extends void = void>(t: Serializable<T>): Serializable<T[]>
```

Companion object of the \[\[List]] type.

**Call Signatures**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
List<T extends void = void>(t: Serializable<T>): Serializable<T[]>
```

| Type Parameter | Constraint | Default | Description |
| -------------- | ---------- | ------- | ----------- |
| `T`            | -          | -       | -           |

| Parameter | Type                    | Required | Description |
| --------- | ----------------------- | -------- | ----------- |
| `t`       | `Serializable&lt;T&gt;` | yes      | -           |

Returns: `Serializable<T[]>`

<span id="function-map" />

#### Map

* Kind: `Function`
* Introduced: `3.4.8`
* Source: `index.d.ts:340`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
Map<K extends void = void, V extends void = void>(kd: Serializable<K>, vd: Serializable<V>): Serializable<Map<K, V>>
```

Companion function of the \[\[GenMap]] type.

**Call Signatures**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
Map<K extends void = void, V extends void = void>(kd: Serializable<K>, vd: Serializable<V>): Serializable<Map<K, V>>
```

| Type Parameter | Constraint | Default | Description |
| -------------- | ---------- | ------- | ----------- |
| `K`            | -          | -       | -           |
| `V`            | -          | -       | -           |

| Parameter | Type                    | Required | Description |
| --------- | ----------------------- | -------- | ----------- |
| `kd`      | `Serializable&lt;K&gt;` | yes      | -           |
| `vd`      | `Serializable&lt;V&gt;` | yes      | -           |

Returns: `Serializable<Map<K, V>>`

<span id="function-numeric" />

#### Numeric

* Kind: `Function`
* Introduced: `3.4.8`
* Source: `index.d.ts:211`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
Numeric(_: number): Serializable<string>
```

Companion function of the \[\[Numeric]] type.

**Call Signatures**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
Numeric(_: number): Serializable<string>
```

| Parameter | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `_`       | `number` | yes      | -           |

Returns: `Serializable<string>`

<span id="function-optional" />

#### Optional

* Kind: `Function`
* Introduced: `3.4.8`
* Source: `index.d.ts:306`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
Optional<T extends void = void>(t: Serializable<T>): Serializable<Optional<T>>
```

Companion function of the \[\[Optional]] type.

**Call Signatures**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
Optional<T extends void = void>(t: Serializable<T>): Serializable<Optional<T>>
```

| Type Parameter | Constraint | Default | Description |
| -------------- | ---------- | ------- | ----------- |
| `T`            | -          | -       | -           |

| Parameter | Type                    | Required | Description |
| --------- | ----------------------- | -------- | ----------- |
| `t`       | `Serializable&lt;T&gt;` | yes      | -           |

Returns: `Serializable<Optional<T>>`

<span id="function-textmap" />

#### TextMap

* Kind: `Function`
* Introduced: `3.4.8`
* Source: `index.d.ts:322`

**Signature**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
TextMap<T extends void = void>(t: Serializable<T>): Serializable<TextMap<T>>
```

Companion object of the \[\[TextMap]] type.

**Call Signatures**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
TextMap<T extends void = void>(t: Serializable<T>): Serializable<TextMap<T>>
```

| Type Parameter | Constraint | Default | Description |
| -------------- | ---------- | ------- | ----------- |
| `T`            | -          | -       | -           |

| Parameter | Type                    | Required | Description |
| --------- | ----------------------- | -------- | ----------- |
| `t`       | `Serializable&lt;T&gt;` | yes      | -           |

Returns: `Serializable<TextMap<T>>`
