Chain module

This is very simple module, where we get block hash of block by its number:

interface ChainModule {
    suspend fun getBlockHash(number: Int): String?
}

To get block's hash write next code:

val blockNumber: Int
val client: SubstrateClient

val blockHash: String? = client.moduels.chain.getBlockHash(blockNumber)

Last updated