Skip to content

Reference

getAmuletRules

GET scan-proxy amulet-rules — retrieve governance contracts underpinning Amulet economics plus canonical sync-domain identifiers.

getAmuletRules exposes serialized contracts powering downstream helpers—createBuyTrafficRequest introspects domain_id automatically via this method internally.

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.getAmuletRules.

Minimal example

const { amulet_rules } = await canton.validator.getAmuletRules();
console.log(amulet_rules.domain_id);

Parameters

None.

Returns

Structured wrapper referencing canonical governance artifact bindings:

  • amulet_rules.contract — Template identifiers plus ledger payloads plus created blobs mirroring ACS snapshots.
  • amulet_rules.domain_id — Sync-domain routing identifier leveraged elsewhere (domain_id).

Nested fields align with the SDK’s documented Amulet rules snapshot (amulet_rules.contract, amulet_rules.domain_id).

Errors and pitfalls

  • Failures usually imply validator ↔ scan-proxy bridging outages—retry after infra heals.

Auth and party

Authenticated bearer token—many validators expose read-only access broadly once OAuth handshake succeeds.

See also

Source

src/clients/validator-api/operations/v0/scan-proxy/get-amulet-rules.ts on GitHub.