Skip to content

Reference

getCurrentMiningRoundDomainId

Convenience accessor returning synchronizer/domain ID inferred from getCurrentMiningRoundContext.

Delegates to getCurrentMiningRoundContext then returns openMiningRoundContract.synchronizerId.

Use when submit / interactive commands must target the currently open round’s domain.

Setup

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

const canton = new Canton({
  network: 'NETWORK_NAME',
  partyId: 'PARTY_ID',
});

Minimal example

const domainId = await getCurrentMiningRoundDomainId(canton.validator);
console.log(domainId);

Parameters

  • validatorClient — Implements MiningRoundClient.

Returns

Promise<string> — Domain / synchronizer identifier string.

Errors

Inherits MINING_ROUND_NOT_FOUND failures from getCurrentMiningRoundContext.

Source

src/utils/mining/mining-rounds.ts