registerNewUser precedes normal authenticated usage when Canton deployments require an explicit registration event alongside OAuth issuance.
Setup
import { Canton } from '@fairmint/canton-node-sdk';
const canton = new Canton({
network: 'devnet',
provider: '5n',
partyId: 'OWN_PARTY_ID',
});
Import and receiver
import { Canton } from '@fairmint/canton-node-sdk';
Receiver: canton.validator.registerNewUser.
Minimal example
await canton.validator.registerNewUser();
Parameters
None.
Returns
JSON body from the validator register success response.
Errors and pitfalls
- Duplicate registration: Many validators forbid reruns—trap conflict responses.
Auth and party
Depends on validator bootstrap policy—often uses freshly minted OAuth credentials before wallet endpoints activate.
See also
Source
src/clients/validator-api/operations/v0/register.ts on GitHub.