Skip to content

Reference

ledger.getParties

Legacy alias paginating GET /v2/parties until exhaustion — identical semantics to listParties.

GetParties wraps fetchAllParties identical to listParties: PartiesAggregationParams (optional pageToken seeding pagination) aggregates partyDetails arrays across Canton paging boundaries (DEFAULT_PAGE_SIZE 5000 loops).

Receiver: await canton.ledger.getParties

Setup

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

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

Minimal example

const roster = await canton.ledger.getParties({});

Optional pageToken seeds continuation when Canton exposes arbitrary restart semantics though aggregator resets nextPageToken empty upon finishing local merges.

Parameters — GetPartiesParams

Identical to PartiesAggregationParams: optional pageToken trimming inbound trim() bridging aggregator loops.

Returns — GetPartiesResponse

Final aggregated partyDetails entire participant roster merged arrays plus cleared nextPageToken string sentinel '' post-pagination completion.

Errors and pitfalls

Halts throwing Error('ListParties pagination did not advance…') when Canton repeats nextPageToken indefinitely protecting infinite loops.

Auth and party

Bearer tokens exposing GET /v2/parties enumerations—participant admins frequently only callers succeeding network-wide.

See also

Source

operations/v2/parties/get.ts