@fairmint/canton-node-sdk
Version:
Canton Node SDK
104 lines • 5.31 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetTransferInstructionWithdrawContextResponseSchema = exports.GetTransferInstructionRejectContextResponseSchema = exports.GetTransferInstructionAcceptContextResponseSchema = exports.GetTransferFactoryResponseSchema = exports.TransferFactoryWithChoiceContextSchema = exports.GetAllocationCancelContextResponseSchema = exports.GetAllocationWithdrawContextResponseSchema = exports.GetAllocationTransferContextResponseSchema = exports.GetAllocationFactoryResponseSchema = exports.ChoiceContextSchema = exports.GetInstrumentResponseSchema = exports.ListInstrumentsResponseSchema = exports.InstrumentSchema = exports.GetRegistryInfoResponseSchema = exports.LookupTransferPreapprovalByPartyResponseSchema = exports.LookupTransferCommandStatusResponseSchema = exports.LookupTransferCommandCounterByPartyResponseSchema = exports.GetAmuletRulesResponseSchema = exports.GetMiningRoundDetailsResponseSchema = exports.MiningRoundDetailsSchema = exports.GetOpenAndIssuingMiningRoundsResponseSchema = exports.GetMemberTrafficStatusResponseSchema = exports.GetDsoPartyIdResponseSchema = void 0;
const zod_1 = require("zod");
// DSO Party ID Response
exports.GetDsoPartyIdResponseSchema = zod_1.z.object({
dso_party_id: zod_1.z.string(),
});
// Member Traffic Status Response
exports.GetMemberTrafficStatusResponseSchema = zod_1.z.object({
traffic_status: zod_1.z.object({
actual: zod_1.z.object({
total_consumed: zod_1.z.number(),
total_limit: zod_1.z.number(),
}),
target: zod_1.z.object({
total_purchased: zod_1.z.number(),
}),
}),
});
// Mining Rounds Schemas
exports.GetOpenAndIssuingMiningRoundsResponseSchema = zod_1.z.object({
open_mining_rounds: zod_1.z.array(zod_1.z.any()),
issuing_mining_rounds: zod_1.z.array(zod_1.z.any()),
});
exports.MiningRoundDetailsSchema = zod_1.z.object({
round_number: zod_1.z.number(),
issuance_per_featured_app_reward_coupon: zod_1.z.string(),
issuance_per_unfeatured_app_reward_coupon: zod_1.z.string(),
effective_at: zod_1.z.string(),
status: zod_1.z.enum(['open', 'issuing', 'closed']),
});
exports.GetMiningRoundDetailsResponseSchema = zod_1.z.object({
mining_round: exports.MiningRoundDetailsSchema,
});
// Amulet Rules Schema
exports.GetAmuletRulesResponseSchema = zod_1.z.object({
amulet_rules: zod_1.z.object({
contract: zod_1.z.any(),
domain_id: zod_1.z.string(),
}),
});
// Transfer Command Schemas
exports.LookupTransferCommandCounterByPartyResponseSchema = zod_1.z.object({
counter: zod_1.z.number(),
});
exports.LookupTransferCommandStatusResponseSchema = zod_1.z.object({
status: zod_1.z.string(),
});
// Transfer Preapproval Schema
exports.LookupTransferPreapprovalByPartyResponseSchema = zod_1.z.object({
transfer_preapproval: zod_1.z.object({
contract: zod_1.z.any(),
domain_id: zod_1.z.string(),
}),
});
// Token Standard Registry Response Schemas
exports.GetRegistryInfoResponseSchema = zod_1.z.object({
adminId: zod_1.z.string(),
supportedApis: zod_1.z.record(zod_1.z.string(), zod_1.z.number()),
});
exports.InstrumentSchema = zod_1.z.object({
id: zod_1.z.string(),
name: zod_1.z.string(),
symbol: zod_1.z.string(),
totalSupply: zod_1.z.string().optional(),
totalSupplyAsOf: zod_1.z.string().optional(),
decimals: zod_1.z.number(),
supportedApis: zod_1.z.record(zod_1.z.string(), zod_1.z.number()),
});
exports.ListInstrumentsResponseSchema = zod_1.z.object({
instruments: zod_1.z.array(exports.InstrumentSchema),
nextPageToken: zod_1.z.string().optional(),
});
exports.GetInstrumentResponseSchema = exports.InstrumentSchema;
exports.ChoiceContextSchema = zod_1.z.object({
choiceContextData: zod_1.z.record(zod_1.z.string(), zod_1.z.never()),
disclosedContracts: zod_1.z.array(zod_1.z.object({
templateId: zod_1.z.string(),
contractId: zod_1.z.string(),
createdEventBlob: zod_1.z.string(),
synchronizerId: zod_1.z.string(),
debugPackageName: zod_1.z.string().optional(),
debugPayload: zod_1.z.record(zod_1.z.string(), zod_1.z.never()).optional(),
debugCreatedAt: zod_1.z.string().optional(),
})),
});
exports.GetAllocationFactoryResponseSchema = zod_1.z.object({
factoryId: zod_1.z.string(),
choiceContext: exports.ChoiceContextSchema,
});
exports.GetAllocationTransferContextResponseSchema = exports.ChoiceContextSchema;
exports.GetAllocationWithdrawContextResponseSchema = exports.ChoiceContextSchema;
exports.GetAllocationCancelContextResponseSchema = exports.ChoiceContextSchema;
exports.TransferFactoryWithChoiceContextSchema = zod_1.z.object({
factoryId: zod_1.z.string(),
transferKind: zod_1.z.enum(['self', 'direct', 'offer']),
choiceContext: exports.ChoiceContextSchema,
});
exports.GetTransferFactoryResponseSchema = exports.TransferFactoryWithChoiceContextSchema;
exports.GetTransferInstructionAcceptContextResponseSchema = exports.ChoiceContextSchema;
exports.GetTransferInstructionRejectContextResponseSchema = exports.ChoiceContextSchema;
exports.GetTransferInstructionWithdrawContextResponseSchema = exports.ChoiceContextSchema;
//# sourceMappingURL=scan-proxy.js.map