Properties

The Clarinet SDK provides a couple properties that can be used to interact with the simnet.

blockHeight

Returns the current block height of the simnet.

import { initSimnet } from '@hirosystems/clarinet-sdk';
const simnet = await initSimnet();

const blockHeight = simnet.blockHeight;

console.log(blockHeight);

deployer

Returns the default deployer address as defined in the project file.

import { initSimnet } from '@hirosystems/clarinet-sdk';
const simnet = await initSimnet();

const deployer = simnet.deployer;

console.log(deployer);

currentEpoch

Returns the current epoch of the simnet.

This represents the Stacks blockchain's progress through discrete time periods, cycles, or upgrades.

import { initSimnet } from '@hirosystems/clarinet-sdk';
const simnet = await initSimnet();

const epoch = simnet.currentEpoch;

console.log(epoch);

Last updated on