UNPKG

@fairmint/canton-node-sdk

Version:
29 lines 905 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CreateAnsEntry = void 0; const zod_1 = require("zod"); const core_1 = require("../../../../../core"); const CreateAnsEntryParamsSchema = zod_1.z.object({ name: zod_1.z.string(), url: zod_1.z.string(), description: zod_1.z.string(), }); /** * @description Create a new ANS entry * @example * ```typescript * const entry = await client.createAnsEntry({ * name: 'my-app', * url: 'https://my-app.com', * description: 'My application' * }); * console.log(`Entry created: ${entry.entryContextCid}`); * ``` */ exports.CreateAnsEntry = (0, core_1.createApiOperation)({ paramsSchema: CreateAnsEntryParamsSchema, method: 'POST', buildUrl: (_params, apiUrl) => `${apiUrl}/api/validator/v0/entry/create`, buildRequestData: (params) => params, }); //# sourceMappingURL=create-entry.js.map