UNPKG

@fairmint/canton-node-sdk

Version:
201 lines 10.3 kB
import { z } from 'zod'; export declare const CreateCommandSchema: z.ZodObject<{ CreateCommand: z.ZodObject<{ templateId: z.ZodString; createArguments: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; }, z.core.$strict>; }, z.core.$strict>; export declare const ExerciseCommandSchema: z.ZodObject<{ ExerciseCommand: z.ZodObject<{ templateId: z.ZodString; contractId: z.ZodString; choice: z.ZodString; choiceArgument: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; }, z.core.$strict>; }, z.core.$strict>; export declare const CommandSchema: z.ZodUnion<readonly [z.ZodObject<{ CreateCommand: z.ZodObject<{ templateId: z.ZodString; createArguments: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ ExerciseCommand: z.ZodObject<{ templateId: z.ZodString; contractId: z.ZodString; choice: z.ZodString; choiceArgument: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; }, z.core.$strict>; }, z.core.$strict>]>; export declare const DisclosedContractSchema: z.ZodObject<{ templateId: z.ZodString; contractId: z.ZodString; createdEventBlob: z.ZodString; synchronizerId: z.ZodString; }, z.core.$strict>; export declare const CommandRequestSchema: z.ZodObject<{ commands: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{ CreateCommand: z.ZodObject<{ templateId: z.ZodString; createArguments: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ ExerciseCommand: z.ZodObject<{ templateId: z.ZodString; contractId: z.ZodString; choice: z.ZodString; choiceArgument: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; }, z.core.$strict>; }, z.core.$strict>]>>; commandId: z.ZodString; actAs: z.ZodArray<z.ZodString>; readAs: z.ZodOptional<z.ZodArray<z.ZodString>>; disclosedContracts: z.ZodOptional<z.ZodArray<z.ZodObject<{ templateId: z.ZodString; contractId: z.ZodString; createdEventBlob: z.ZodString; synchronizerId: z.ZodString; }, z.core.$strict>>>; }, z.core.$strict>; /** Command to create a contract and immediately exercise a choice on it. */ export declare const CreateAndExerciseCommandSchema: z.ZodObject<{ CreateAndExerciseCommand: z.ZodObject<{ templateId: z.ZodString; createArguments: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; choice: z.ZodString; choiceArgument: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; }, z.core.$strict>; }, z.core.$strict>; /** Command to exercise a choice on a contract by key. */ export declare const ExerciseByKeyCommandSchema: z.ZodObject<{ ExerciseByKeyCommand: z.ZodObject<{ templateId: z.ZodString; contractKey: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; choice: z.ZodString; choiceArgument: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; }, z.core.$strict>; }, z.core.$strict>; /** Command to assign a contract (reassignment). */ export declare const AssignCommandSchema: z.ZodObject<{ AssignCommand: z.ZodObject<{ reassignmentId: z.ZodString; source: z.ZodString; target: z.ZodString; }, z.core.$strict>; }, z.core.$strict>; /** Command to unassign a contract (reassignment). */ export declare const UnassignCommandSchema: z.ZodObject<{ UnassignCommand: z.ZodObject<{ contractId: z.ZodString; source: z.ZodString; target: z.ZodString; }, z.core.$strict>; }, z.core.$strict>; /** Composite command type (oneOf all supported commands). */ export declare const CompositeCommandSchema: z.ZodUnion<readonly [z.ZodObject<{ CreateAndExerciseCommand: z.ZodObject<{ templateId: z.ZodString; createArguments: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; choice: z.ZodString; choiceArgument: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ CreateCommand: z.ZodObject<{ templateId: z.ZodString; createArguments: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ ExerciseByKeyCommand: z.ZodObject<{ templateId: z.ZodString; contractKey: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; choice: z.ZodString; choiceArgument: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ ExerciseCommand: z.ZodObject<{ templateId: z.ZodString; contractId: z.ZodString; choice: z.ZodString; choiceArgument: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ AssignCommand: z.ZodObject<{ reassignmentId: z.ZodString; source: z.ZodString; target: z.ZodString; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ UnassignCommand: z.ZodObject<{ contractId: z.ZodString; source: z.ZodString; target: z.ZodString; }, z.core.$strict>; }, z.core.$strict>]>; /** Deduplication period (oneOf duration, offset, or empty). */ export declare const DeduplicationPeriodSchema: z.ZodUnion<readonly [z.ZodObject<{ DeduplicationDuration: z.ZodObject<{ seconds: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ DeduplicationOffset: z.ZodObject<{ offset: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ Empty: z.ZodObject<{}, z.core.$strip>; }, z.core.$strip>]>; /** Commands container with all command types. */ export declare const JsCommandsSchema: z.ZodObject<{ workflowId: z.ZodOptional<z.ZodString>; userId: z.ZodString; commandId: z.ZodString; submitter: z.ZodString; submissionId: z.ZodOptional<z.ZodString>; commands: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{ CreateCommand: z.ZodObject<{ templateId: z.ZodString; createArguments: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ ExerciseCommand: z.ZodObject<{ templateId: z.ZodString; contractId: z.ZodString; choice: z.ZodString; choiceArgument: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>]>>; }, z.core.$strict>; }, z.core.$strict>]>>; deduplicationPeriod: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{ DeduplicationDuration: z.ZodObject<{ seconds: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ DeduplicationOffset: z.ZodObject<{ offset: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ Empty: z.ZodObject<{}, z.core.$strip>; }, z.core.$strip>]>>; minLedgerTimeRel: z.ZodOptional<z.ZodObject<{ seconds: z.ZodNumber; }, z.core.$strip>>; disclosedContracts: z.ZodOptional<z.ZodArray<z.ZodObject<{ templateId: z.ZodString; contractId: z.ZodString; createdEventBlob: z.ZodString; synchronizerId: z.ZodString; }, z.core.$strict>>>; prefetchContractKeys: z.ZodOptional<z.ZodArray<z.ZodObject<{ templateId: z.ZodString; contractKey: z.ZodRecord<z.ZodString, z.ZodAny>; }, z.core.$strip>>>; }, z.core.$strip>; export type CreateCommand = z.infer<typeof CreateCommandSchema>; export type ExerciseCommand = z.infer<typeof ExerciseCommandSchema>; export type Command = z.infer<typeof CommandSchema>; export type DisclosedContract = z.infer<typeof DisclosedContractSchema>; export type CommandRequest = z.infer<typeof CommandRequestSchema>; export type CreateAndExerciseCommand = z.infer<typeof CreateAndExerciseCommandSchema>; export type ExerciseByKeyCommand = z.infer<typeof ExerciseByKeyCommandSchema>; export type AssignCommand = z.infer<typeof AssignCommandSchema>; export type UnassignCommand = z.infer<typeof UnassignCommandSchema>; export type CompositeCommand = z.infer<typeof CompositeCommandSchema>; export type JsCommands = z.infer<typeof JsCommandsSchema>; //# sourceMappingURL=commands.d.ts.map