Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

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

An archived contract.

Type parameters

  • T: object

    The contract template or interface type.

  • I: string = string

    The template or interface id.

Type declaration

  • contractId: ContractId<T>
  • templateId: I
CanActAs: { party: string; type: "CanActAs" }

Type declaration

  • party: string
  • type: "CanActAs"
CanReadAs: { party: string; type: "CanReadAs" }

Type declaration

  • party: string
  • type: "CanReadAs"
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 payload type.

  • K = unknown

    The contract key type.

  • I: string = string

    The contract type id.

Type declaration

  • agreementText: Text
  • contractId: ContractId<T>
  • key: K
  • observers: List<Party>
  • payload: T
  • signatories: List<Party>
  • templateId: I
Event<T, K, I>: { created: CreateEvent<T, K, I>; matchedQueries: number[] } | { 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 = unknown

    The contract key type.

  • I: string = string

    The contract id type.

LedgerOptions: { httpBaseUrl?: string; multiplexQueryStreams?: boolean; 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 multiplexQueryStreams?: boolean

    Optional to enable/disable feature of all streaming request to the query endpoint being multiplexed through a single web socket, is enabled by default.

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

PackageId: string
ParticipantAdmin: { type: "ParticipantAdmin" }

Type declaration

  • type: "ParticipantAdmin"
PartyInfo: { displayName?: string; identifier: Party; isLocal: boolean }

Full information about a Party.

Type declaration

  • Optional displayName?: string
  • identifier: Party
  • isLocal: boolean
Query<T>: T extends object ? { [ K in keyof T]?: Query<T[K]> } : T

Query<T> is the type of queries for searching for contracts of template or interface 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.

QueryResult<T, K, I>: { contracts: readonly CreateEvent<T, K, I>[]; loading: boolean }

The result of a query against the ledger.

Note: this is meant to be used by @daml/react.

Type parameters

  • T: object

    The contract template type of the query.

  • K

    The contract key type of the query.

  • I: string

    The template id type.

Type declaration

  • contracts: readonly CreateEvent<T, K, I>[]

    Contracts matching the query.

  • loading: boolean

    Indicator for whether the query is executing.

StreamCloseEvent: { code: number; reason: string }

Event emitted when a stream gets closed.

Type declaration

  • code: number
  • reason: string
User: { primaryParty?: Party; userId: string }

Type declaration

  • Optional primaryParty?: Party
  • userId: string

Functions

  • assert(b: boolean, m: string): void
  • internal

    exported for testing only

    Parameters

    • b: boolean
    • m: string

    Returns void

Generated using TypeDoc