Properties
The Clarinet JS SDK provides properties that can be used to interact with simnet.
blockHeight
Returns the current block height of simnet.
Example
Getting the current block height:
const currentBlockHeight = simnet.blockHeight;
Response:
1
deployer
Returns the default deployer address as defined in the project file.
Examples
Getting the deployer address:
const currentDeployerAddress = simnet.deployer;
Response:
ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
Setting the deployer to a new address:
simnet.deployer = 'ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5';const newDeployer = simnet.deployer
Response:
ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5
currentEpoch
Returns the current epoch of simnet.
This represents the Stacks blockchain's progress through discrete time periods, cycles, or upgrades.
Example
Getting the current epoch of simnet:
const epoch = simnet.currentEpoch;
Response:
2.5