@fairmint/canton-node-sdk
Version:
Canton Node SDK
123 lines • 4.74 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StatusDetailsSchema = exports.EmptyCommandSchema = exports.UnassignedEventDetailsSchema = exports.AssignedEventDetailsSchema = exports.ArchivedEventDetailsSchema = exports.CreatedEventDetailsSchema = void 0;
const zod_1 = require("zod");
const base_1 = require("../base");
/**
* Created event details.
*/
exports.CreatedEventDetailsSchema = zod_1.z.object({
/** Offset of the event in the ledger stream. */
offset: zod_1.z.number(),
/** Node ID of the event in the transaction tree. */
nodeId: zod_1.z.number(),
/** Contract ID of the created contract. */
contractId: zod_1.z.string(),
/** Template ID of the created contract. */
templateId: zod_1.z.string(),
/** Contract key, if present. */
contractKey: zod_1.z.string().nullable(),
/** Arguments used to create the contract. */
createArgument: base_1.RecordSchema,
/** Serialized event blob for the created contract. */
createdEventBlob: zod_1.z.string(),
/** List of interface view names implemented by the contract. */
interfaceViews: zod_1.z.array(zod_1.z.string()),
/** Parties that witnessed the creation. */
witnessParties: zod_1.z.array(zod_1.z.string()),
/** Parties that must sign the contract. */
signatories: zod_1.z.array(zod_1.z.string()),
/** Parties that observe the contract. */
observers: zod_1.z.array(zod_1.z.string()),
/** ISO 8601 timestamp when the contract was created. */
createdAt: zod_1.z.string(),
/** Name of the Daml package containing the template. */
packageName: zod_1.z.string(),
/** List of interface IDs implemented by the contract. */
implementedInterfaces: zod_1.z.array(zod_1.z.string()).optional(),
});
/**
* Archived event details.
*/
exports.ArchivedEventDetailsSchema = zod_1.z.object({
/** Offset of the event in the ledger stream. */
offset: zod_1.z.number(),
/** Node ID of the event in the transaction tree. */
nodeId: zod_1.z.number(),
/** Contract ID of the archived contract. */
contractId: zod_1.z.string(),
/** Template ID of the archived contract. */
templateId: zod_1.z.string(),
/** Parties that witnessed the archival. */
witnessParties: zod_1.z.array(zod_1.z.string()),
/** Name of the Daml package containing the template. */
packageName: zod_1.z.string(),
/** List of interface IDs implemented by the contract. */
implementedInterfaces: zod_1.z.array(zod_1.z.string()).optional(),
});
/**
* Assigned event details.
*/
exports.AssignedEventDetailsSchema = zod_1.z.object({
/** Offset of the event in the ledger stream. */
offset: zod_1.z.number(),
/** Node ID of the event in the transaction tree. */
nodeId: zod_1.z.number(),
/** Contract ID of the assigned contract. */
contractId: zod_1.z.string(),
/** Template ID of the assigned contract. */
templateId: zod_1.z.string(),
/** Source synchronizer ID. */
source: zod_1.z.string(),
/** Target synchronizer ID. */
target: zod_1.z.string(),
/** Reassignment ID. */
reassignmentId: zod_1.z.string(),
/** Party submitting the assignment. */
submitter: zod_1.z.string(),
/** Reassignment counter. */
reassignmentCounter: zod_1.z.number(),
/** Name of the Daml package containing the template. */
packageName: zod_1.z.string(),
});
/**
* Unassigned event details.
*/
exports.UnassignedEventDetailsSchema = zod_1.z.object({
/** Offset of the event in the ledger stream. */
offset: zod_1.z.number(),
/** Node ID of the event in the transaction tree. */
nodeId: zod_1.z.number(),
/** Contract ID of the unassigned contract. */
contractId: zod_1.z.string(),
/** Template ID of the unassigned contract. */
templateId: zod_1.z.string(),
/** Source synchronizer ID. */
source: zod_1.z.string(),
/** Target synchronizer ID. */
target: zod_1.z.string(),
/** Reassignment ID. */
reassignmentId: zod_1.z.string(),
/** Party submitting the unassignment. */
submitter: zod_1.z.string(),
/** Reassignment counter. */
reassignmentCounter: zod_1.z.number(),
/** Name of the Daml package containing the template. */
packageName: zod_1.z.string(),
});
/**
* Empty command.
*/
exports.EmptyCommandSchema = zod_1.z.object({});
/**
* Status details for completions.
*/
exports.StatusDetailsSchema = zod_1.z.object({
/** Error code. */
code: zod_1.z.number(),
/** Error message. */
message: zod_1.z.string(),
/** Additional error details. */
details: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
});
//# sourceMappingURL=event-details.js.map