createAnsEntry registers a catalog row surfaced via validator-hosted discovery endpoints.
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.createAnsEntry.
Minimal example
const entry = await canton.validator.createAnsEntry({
name: 'my-app',
url: 'https://my-app.example',
description: 'Synthetic liquidity dashboard',
});
Parameters
name(required, string) — Canonical ANS string advertised publicly.url(required, string) — Landing URL wallets resolve when displaying entries.description(required, string) — Marketing blur shown beside listings.
Returns
ANS creation acknowledgement JSON returned by the validator entry-create route.
Errors and pitfalls
- Naming collisions: prior registrations guard uniqueness domain-wide.
Auth and party
Bearer credentials tied to an authorized registrar profile—typically validator-managed deployments enforce quotas.
See also
Source
src/clients/validator-api/operations/v0/ans/create-entry.ts on GitHub.