Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "index"

Index

Type aliases

Bool

Bool: boolean

The counterpart of DAML's Bool type.

ContractId

ContractId<T>: string & { __computed: T }

The counterpart of DAML's ContractId T type.

We represent ContractIds 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<T> when a ContractId<U> is needed (unless T is a subtype of U). This technique is known as "branding" in the TypeScript community.

Type parameters

  • T

    The contract template.

Date

Date: string

The counterpart of DAML's Date type.

We represent Dates as strings with format YYYY-MM-DD.

Decimal

Decimal: Numeric

The counterpart of DAML's Decimal type.

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

Int

Int: string

The counterpart of DAML's Int type.

We represent Ints as string in order to avoid a loss of precision.

List

List<T>: T[]

The counterpart of DAML's [T] list type.

We represent lists using arrays.

Type parameters

  • T

    The type of the list values.

Numeric

Numeric: string

The counterpart of DAML's Numeric type.

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

Optional

Optional<T>: null | OptionalInner<T>

The counterpart of DAML's Optional T type.

Type parameters

  • T

    The type of the optionally present value.

OptionalInner

OptionalInner<T>: null extends T ? [] | [Exclude<T, null>] : T

Inner type of Optional.

Type parameters

  • T

Party

Party: string

The counterpart of DAML's Party type.

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

Text

Text: string

The counterpart of DAML's Text type.

TextMap

TextMap<T>: {}

The counterpart of DAML's TextMap T type.

We represent TextMaps as dictionaries.

Type parameters

  • T

    The type of the map values.

Type declaration

  • [key: string]: T

Time

Time: string

The counterpart of DAML's Time type.

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

Unit

Unit: {}

The counterpart of DAML's () type.

Type declaration

Variables

Const ContractIdBrand

ContractIdBrand: keyof symbol = Symbol()

Used to brand ContractId.

Const Decimal

Decimal: Serializable<Decimal> = Numeric(10)

Companion object of the Decimal type.

Functions

Const ContractId

Const List

Const Numeric

Const Optional

Const TextMap

Object literals

Const Bool

Bool: object

Companion object of the Bool type.

decoder

decoder: any = jtv.boolean

Const Date

Date: object

Companion object of the Date type.

decoder

decoder: any = jtv.string

Const Int

Int: object

Companion object of the Int type.

decoder

decoder: any = jtv.string

Const Party

Party: object

Companion object of the Party type.

decoder

decoder: any = jtv.string

Const Text

Text: object

Companion object of the Text type.

decoder

decoder: any = jtv.string

Const Time

Time: object

Companion object of the Time type.

decoder

decoder: any = jtv.string

Const Unit

Unit: object

Companion obect of the Unit type.

decoder

  • decoder(): any
  • Returns any

Generated using TypeDoc