UNPKG

@fairmint/canton-node-sdk

Version:
84 lines 3.19 kB
import { z } from 'zod'; import { type BaseClient } from '../../../../../../core'; import type { paths } from '../../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi'; type GeneratedResponse = paths['/v2/parties/external/allocate']['post']['responses']['200']['content']['application/json']; export declare const AllocateExternalPartyParamsSchema: z.ZodObject<{ synchronizer: z.ZodString; onboardingTransactions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{ transaction: z.ZodString; signatures: z.ZodArray<z.ZodObject<{ format: z.ZodString; signature: z.ZodString; signedBy: z.ZodString; signingAlgorithmSpec: z.ZodString; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ transaction: z.ZodString; }, z.core.$strip>]>>>; multiHashSignatures: z.ZodOptional<z.ZodArray<z.ZodObject<{ format: z.ZodString; signature: z.ZodString; signedBy: z.ZodString; signingAlgorithmSpec: z.ZodString; }, z.core.$strip>>>; identityProviderId: z.ZodString; }, z.core.$strip>; export type AllocateExternalPartyParams = z.infer<typeof AllocateExternalPartyParamsSchema>; export type AllocateExternalPartyResponse = GeneratedResponse; /** * Allocate a new external party * * This endpoint completes the onboarding of an external party by submitting the signed topology transactions or * multi-hash signatures. The topology transactions and multi-hash should be obtained from the generate-topology * endpoint and signed with the external party's private key. * * @example * ```typescript * // Option 1: Using multi-hash signatures (recommended) * const result = await client.allocateExternalParty({ * synchronizer: 'global-synchronizer', * identityProviderId: 'default', * multiHashSignatures: [{ * format: 'SIGNATURE_FORMAT_RAW', * signature: 'base64-encoded-signature', * signedBy: 'public-key-fingerprint', * signingAlgorithmSpec: 'SIGNING_KEY_SPEC_EC_CURVE25519' * }] * }); * * // Option 2: Using signed transactions * const result = await client.allocateExternalParty({ * synchronizer: 'global-synchronizer', * identityProviderId: 'default', * onboardingTransactions: [{ * transaction: 'serialized-transaction', * signatures: [{ ... }] * }] * }); * ```; */ export declare const AllocateExternalParty: new (client: BaseClient) => import("../../../../../../core").ApiOperation<{ synchronizer: string; identityProviderId: string; onboardingTransactions?: ({ transaction: string; signatures: { format: string; signature: string; signedBy: string; signingAlgorithmSpec: string; }[]; } | { transaction: string; })[] | undefined; multiHashSignatures?: { format: string; signature: string; signedBy: string; signingAlgorithmSpec: string; }[] | undefined; }, { partyId: string; }>; export {}; //# sourceMappingURL=allocate-external-party.d.ts.map