Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "index"

Index

Type aliases

ArchiveEvent

ArchiveEvent<T, I>: { contractId: ContractId<T>; templateId: I }

An archived contract.

Type parameters

  • T: object

    The contract template type.

  • I: string

    The contract id type.

Type declaration

  • contractId: ContractId<T>
  • templateId: I

CreateEvent

CreateEvent<T, K, I>: { agreementText: Text; contractId: ContractId<T>; key: K; observers: List<Party>; payload: T; signatories: List<Party>; templateId: I }

A newly created contract.

Type parameters

  • T: object

    The contract template type.

  • K

    The contract key type.

  • I: string

    The contract id type.

Type declaration

  • agreementText: Text
  • contractId: ContractId<T>
  • key: K
  • observers: List<Party>
  • payload: T
  • signatories: List<Party>
  • templateId: I

Event

Event<T, K, I>: { created: CreateEvent<T, K, I> } | { archived: ArchiveEvent<T, I> }

An event is either the creation or archival of a contract.

Type parameters

  • T: object

    The contract template type.

  • K

    The contract key type.

  • I: string

    The contract id type.

LedgerError

LedgerError: { errors: string[]; status: number }

Error code and messages returned by the ledger.

Type declaration

  • errors: string[]
  • status: number

LedgerOptions

LedgerOptions: { httpBaseUrl?: string; reconnectThreshold?: number; token: string; wsBaseUrl?: string }

Options for creating a handle to a DAML ledger.

Type declaration

  • Optional httpBaseUrl?: string

    Optional base URL for the non-streaming endpoints of the JSON API. If this parameter is not provided, the protocol, host and port of the window.location object are used.

  • Optional reconnectThreshold?: number

    Optional number of milliseconds a connection has to be live to be considered healthy. If the connection is closed after being live for at least this amount of time, the Ledger tries to reconnect, else not.

  • token: string

    JSON web token used for authentication.

  • Optional wsBaseUrl?: string

    Optional base URL for the streaming endpoints of the JSON API. If this parameter is not provided, the base URL for the non-streaming endpoints is used with the protocol 'http' or 'https' replaced by 'ws' or 'wss', respectively. Specifying this parameter explicitly can be useful when the non-streaming requests are proxied but the streaming request cannot be proxied, as it is the case with the development server of create-react-app.

LedgerResponse

LedgerResponse: { result: unknown; status: number }

Status code and result returned by a call to the ledger.

Type declaration

  • result: unknown
  • status: number

Query

Query<T>: T extends object ? {} : T

Query<T> is the type of queries for searching for contracts of template type T.

Query<T> is an object consisting of a subset of the fields of T.

Comparison queries are not yet supported.

NB: This type is heavily related to the DeepPartial type that can be found in the TypeScript community.

Type parameters

  • T

    The contract template type.

StreamCloseEvent

StreamCloseEvent: { code: number; reason: string }

Event emitted when a stream gets closed.

Type declaration

  • code: number
  • reason: string

Variables

Const decodeArchiveEventUnknown

decodeArchiveEventUnknown: jtv.Decoder<ArchiveEvent<object>> = jtv.valueAt(['templateId'], jtv.string()).andThen(templateId =>decodeArchiveEvent(lookupTemplate(templateId)))

Decoder for an ArchiveEvent of unknown contract template.

Const decodeCreateEventUnknown

decodeCreateEventUnknown: jtv.Decoder<CreateEvent<object>> = jtv.valueAt(['templateId'], jtv.string()).andThen((templateId) =>decodeCreateEvent(lookupTemplate(templateId)))

Decoder for a CreateEvent of unknown contract template.

Const decodeEventUnknown

decodeEventUnknown: jtv.Decoder<Event<object>> = jtv.oneOf<Event<object>>(jtv.object({created: decodeCreateEventUnknown}),jtv.object({archived: decodeArchiveEventUnknown}),)

Decoder for an Event with unknown contract template.

Functions

Const decodeArchiveEvent

  • decodeArchiveEvent<T, K, I>(template: Template<T, K, I>): jtv.Decoder<ArchiveEvent<T, I>>
  • Decoder for an ArchiveEvent.

    Type parameters

    • T: object

    • K

    • I: string

    Parameters

    • template: Template<T, K, I>

    Returns jtv.Decoder<ArchiveEvent<T, I>>

Const decodeCreateEvent

  • decodeCreateEvent<T, K, I>(template: Template<T, K, I>): jtv.Decoder<CreateEvent<T, K, I>>
  • Decoder for a CreateEvent.

    Type parameters

    • T: object

    • K

    • I: string

    Parameters

    • template: Template<T, K, I>

    Returns jtv.Decoder<CreateEvent<T, K, I>>

Const decodeEvent

  • decodeEvent<T, K, I>(template: Template<T, K, I>): jtv.Decoder<Event<T, K, I>>
  • Decoder for an Event.

    Type parameters

    • T: object

    • K

    • I: string

    Parameters

    • template: Template<T, K, I>

    Returns jtv.Decoder<Event<T, K, I>>

Generated using TypeDoc