UNPKG

@fairmint/canton-node-sdk

Version:
33 lines 1.46 kB
import { ContractInfo } from '../contracts/disclosed-contracts'; import { ValidatorApiClient } from '../../clients/validator-api'; /** * Context information derived from open / issuing mining rounds. */ export interface MiningRoundContext { /** Contract ID of the open mining round to reference in commands */ openMiningRound: string; /** Contract information (for disclosed contracts) of the open mining round */ openMiningRoundContract: ContractInfo; /** Issuing mining rounds formatted for command arguments */ issuingMiningRounds: Array<{ round: number; contractId: string; }>; } /** * Finds the latest mining round that is currently open (\`opensAt\` is in the past) * and returns useful context information. * * @throws Error if no mining round satisfies the criteria */ export declare function getCurrentMiningRoundContext(validatorClient: ValidatorApiClient): Promise<MiningRoundContext>; /** * Gets the domain ID from the current mining round context. * This is useful for operations that need to automatically determine the domain ID. * * @param validatorClient - Validator API client for getting mining round information * @returns Promise resolving to the domain ID string * @throws Error if no mining round satisfies the criteria */ export declare function getCurrentMiningRoundDomainId(validatorClient: ValidatorApiClient): Promise<string>; //# sourceMappingURL=mining-rounds.d.ts.map