Skip to content

Reference

ledger.allocateParty

POST /v2/parties — allocate a new hosted party with synchronizer, identity provider, and user linkage.

Uses AllocatePartyParams stricter than relaxed schemas/operations/parties docs—operation AllocatePartyParamsSchema requires partyIdHint, identityProviderId, synchronizerId, userId, optional localMetadata (resourceVersion + annotations map).

Receiver: await canton.ledger.allocateParty

Setup

import { Canton } from '@fairmint/canton-node-sdk';

const canton = new Canton({
  network: 'devnet',
  provider: '5n',
  partyId: 'OWN_PARTY_ID',
});

Minimal example

const created = await canton.ledger.allocateParty({
  partyIdHint: 'alice-hosted',
  identityProviderId: 'default',
  synchronizerId: 'global-synchronizer',
  userId: 'alice-user',
});

Parameters — AllocatePartyParams

Fields enumerated inline AllocatePartyParamsSchema (operations/v2/parties/post.ts).

Returns — AllocatePartyResponse

Allocated party identifiers plus Canton bookkeeping references (party, hashed identifiers depending deployment).

Errors and pitfalls

Duplicate partyIdHint collisions rejected—coordinate deterministic retries referencing Canton duplicateParty semantics.

Auth and party

Participant ParticipantAdmin style privileges typically necessary besides bearer OAuth handshake.

See also

Source

operations/v2/parties/post.ts