@fairmint/canton-node-sdk
Version:
Canton Node SDK
239 lines • 12.6 kB
TypeScript
import { z } from 'zod';
import { JsCantonErrorSchema, WsCantonErrorSchema } from '../../../schemas/api/errors';
import { JsTransactionTreeSchema, WsUpdateTreesSchema } from '../../../schemas/api/updates';
declare const UpdatesTreesParamsSchema: z.ZodObject<{
beginExclusive: z.ZodNumber;
endInclusive: z.ZodOptional<z.ZodNumber>;
limit: z.ZodOptional<z.ZodNumber>;
streamIdleTimeoutMs: z.ZodOptional<z.ZodNumber>;
updateFormat: z.ZodObject<{
includeTransactions: z.ZodOptional<z.ZodObject<{
eventFormat: z.ZodObject<{
filtersByParty: z.ZodRecord<z.ZodString, z.ZodObject<{
cumulative: z.ZodArray<z.ZodObject<{
identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
Empty: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
InterfaceFilter: z.ZodObject<{
interfaceId: z.ZodString;
includeInterfaceView: z.ZodOptional<z.ZodBoolean>;
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
TemplateFilter: z.ZodObject<{
templateId: z.ZodString;
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
WildcardFilter: z.ZodObject<{
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
}, z.core.$strip>]>;
}, z.core.$strip>>;
}, z.core.$strip>>;
filtersForAnyParty: z.ZodOptional<z.ZodObject<{
cumulative: z.ZodArray<z.ZodObject<{
identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
Empty: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
InterfaceFilter: z.ZodObject<{
interfaceId: z.ZodString;
includeInterfaceView: z.ZodOptional<z.ZodBoolean>;
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
TemplateFilter: z.ZodObject<{
templateId: z.ZodString;
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
WildcardFilter: z.ZodObject<{
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
}, z.core.$strip>]>;
}, z.core.$strip>>;
}, z.core.$strip>>;
verbose: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
transactionShape: z.ZodUnion<readonly [z.ZodLiteral<"TRANSACTION_SHAPE_ACS_DELTA">, z.ZodLiteral<"TRANSACTION_SHAPE_LEDGER_EFFECTS">]>;
}, z.core.$strip>>;
includeReassignments: z.ZodOptional<z.ZodObject<{
filtersByParty: z.ZodRecord<z.ZodString, z.ZodObject<{
cumulative: z.ZodArray<z.ZodObject<{
identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
Empty: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
InterfaceFilter: z.ZodObject<{
interfaceId: z.ZodString;
includeInterfaceView: z.ZodOptional<z.ZodBoolean>;
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
TemplateFilter: z.ZodObject<{
templateId: z.ZodString;
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
WildcardFilter: z.ZodObject<{
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
}, z.core.$strip>]>;
}, z.core.$strip>>;
}, z.core.$strip>>;
filtersForAnyParty: z.ZodOptional<z.ZodObject<{
cumulative: z.ZodArray<z.ZodObject<{
identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
Empty: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
InterfaceFilter: z.ZodObject<{
interfaceId: z.ZodString;
includeInterfaceView: z.ZodOptional<z.ZodBoolean>;
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
TemplateFilter: z.ZodObject<{
templateId: z.ZodString;
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
WildcardFilter: z.ZodObject<{
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
}, z.core.$strip>]>;
}, z.core.$strip>>;
}, z.core.$strip>>;
verbose: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>>;
includeTopologyEvents: z.ZodOptional<z.ZodObject<{
includeParticipantAuthorizationEvents: z.ZodOptional<z.ZodObject<{
parties: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>;
}, z.core.$strip>;
export type UpdatesTreesWsParams = z.infer<typeof UpdatesTreesParamsSchema>;
export type UpdatesTreesWsMessage = {
update: {
JsTransactionTree: z.infer<typeof JsTransactionTreeSchema>;
};
} | {
update: z.infer<typeof WsUpdateTreesSchema>;
} | z.infer<typeof JsCantonErrorSchema> | z.infer<typeof WsCantonErrorSchema>;
export declare const SubscribeToTrees: {
new (client: import("../../../../..").BaseClient): {
client: import("../../../../..").BaseClient;
validateParams<T>(params: T, schema: z.ZodType<T, unknown, z.core.$ZodTypeInternals<T, unknown>>): T;
subscribe(params: {
beginExclusive: number;
updateFormat: {
includeTransactions?: {
eventFormat: {
filtersByParty: Record<string, {
cumulative: {
identifierFilter: {
Empty: Record<string, never>;
} | {
InterfaceFilter: {
interfaceId: string;
includeInterfaceView?: boolean | undefined;
includeCreatedEventBlob?: boolean | undefined;
};
} | {
TemplateFilter: {
templateId: string;
includeCreatedEventBlob?: boolean | undefined;
};
} | {
WildcardFilter: {
includeCreatedEventBlob?: boolean | undefined;
};
};
}[];
}>;
filtersForAnyParty?: {
cumulative: {
identifierFilter: {
Empty: Record<string, never>;
} | {
InterfaceFilter: {
interfaceId: string;
includeInterfaceView?: boolean | undefined;
includeCreatedEventBlob?: boolean | undefined;
};
} | {
TemplateFilter: {
templateId: string;
includeCreatedEventBlob?: boolean | undefined;
};
} | {
WildcardFilter: {
includeCreatedEventBlob?: boolean | undefined;
};
};
}[];
} | undefined;
verbose?: boolean | undefined;
};
transactionShape: "TRANSACTION_SHAPE_ACS_DELTA" | "TRANSACTION_SHAPE_LEDGER_EFFECTS";
} | undefined;
includeReassignments?: {
filtersByParty: Record<string, {
cumulative: {
identifierFilter: {
Empty: Record<string, never>;
} | {
InterfaceFilter: {
interfaceId: string;
includeInterfaceView?: boolean | undefined;
includeCreatedEventBlob?: boolean | undefined;
};
} | {
TemplateFilter: {
templateId: string;
includeCreatedEventBlob?: boolean | undefined;
};
} | {
WildcardFilter: {
includeCreatedEventBlob?: boolean | undefined;
};
};
}[];
}>;
filtersForAnyParty?: {
cumulative: {
identifierFilter: {
Empty: Record<string, never>;
} | {
InterfaceFilter: {
interfaceId: string;
includeInterfaceView?: boolean | undefined;
includeCreatedEventBlob?: boolean | undefined;
};
} | {
TemplateFilter: {
templateId: string;
includeCreatedEventBlob?: boolean | undefined;
};
} | {
WildcardFilter: {
includeCreatedEventBlob?: boolean | undefined;
};
};
}[];
} | undefined;
verbose?: boolean | undefined;
} | undefined;
includeTopologyEvents?: {
includeParticipantAuthorizationEvents?: {
parties?: string[] | undefined;
} | undefined;
} | undefined;
};
endInclusive?: number | undefined;
limit?: number | undefined;
streamIdleTimeoutMs?: number | undefined;
}, handlers: import("../../../../..").WebSocketHandlers<UpdatesTreesWsMessage, unknown>): Promise<import("../../../../..").WebSocketSubscription>;
};
};
export {};
//# sourceMappingURL=subscribe-to-trees.d.ts.map