Skip to content

Reference

ledger.createUser

POST /v2/users — create a ledger user with optional rights grants.

Calls POST /v2/users. CreateUserParams: user (id, primaryParty, isDeactivated, optional metadata) plus optional rights unions (CanActAs, CanReadAs, admins…).

Receiver: await canton.ledger.createUser

Setup

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

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

Minimal example

await canton.ledger.createUser({
  user: {
    id: 'alice',
    isDeactivated: false,
  },
});

Parameters — CreateUserParams

See CreateUserParamsSchema (schemas/operations/users.ts).

Returns — CreateUserResponse

Created User record OpenAPI typing.

Auth and party

Participant ParticipantAdmin (typical) via bearer token.

Source

operations/v2/users/create-user.ts