UNPKG

@fairmint/canton-node-sdk

Version:
26 lines 1.4 kB
import { z } from 'zod'; import type { LedgerJsonApiClient } from '../../../LedgerJsonApiClient.generated'; import { type JsGetActiveContractsResponse, type JsGetActiveContractsResponseItem } from '../../../schemas/api/state'; /** * We intentionally do not expose the JSON/REST version of this endpoint. The REST variant is too limited, while the * WebSocket variant returns the same snapshot and automatically closes the connection once the current state is sent. * Wrapping the WebSocket call behind a simple awaitable method gives a better DX and keeps the door open for optional * streaming via a callback. */ declare const ActiveContractsParamsSchema: z.ZodObject<{ parties: z.ZodOptional<z.ZodArray<z.ZodString>>; templateIds: z.ZodOptional<z.ZodArray<z.ZodString>>; includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>; activeAtOffset: z.ZodOptional<z.ZodNumber>; }, z.core.$strip>; export type GetActiveContractsParams = z.infer<typeof ActiveContractsParamsSchema> & { /** Optional per-item callback to consume results as they arrive. */ onItem?: (item: JsGetActiveContractsResponseItem) => void; }; export declare class GetActiveContracts { private readonly client; constructor(client: LedgerJsonApiClient); execute(params: GetActiveContractsParams): Promise<JsGetActiveContractsResponse>; } export {}; //# sourceMappingURL=get-active-contracts.d.ts.map