BlockClient

class BlockClient(node: Node)

Block client

Author

Marcus Cvjeticanin

Since

0.1.0

Parameters

node

The node that the wallet service is connected to.

Constructors

Link copied to clipboard
constructor(node: Node)

Functions

Link copied to clipboard
suspend fun getBlock(blockRequest: BlockRequest): BlockResponse?

Get a block.

Link copied to clipboard
suspend fun getBlockCount(getBlockCountRequest: GetBlockCountRequest): GetBlockCountResponse?

Get block count.

Link copied to clipboard

Get block details by hash

Link copied to clipboard
suspend fun getBlockHash(getBlockHashRequest: GetBlockHashRequest): GetBlockHashResponse?

Get block hash.

Link copied to clipboard

Get block header by hash.

Link copied to clipboard

Get block header by height.

Link copied to clipboard

Get blocks details by hashes

Link copied to clipboard

Get blocks details by heights

Link copied to clipboard

Get blocks hashes by timestamps

Link copied to clipboard
suspend fun getBlocksList(blocksListRequest: BlocksListRequest): BlocksListResponse?

Get a list of blocks.

Link copied to clipboard
suspend fun getBlockTemplate(getBlockTemplateRequest: GetBlockTemplateRequest): GetBlockTemplateResponse?

Get block template.

Link copied to clipboard
suspend fun getCurrencyId(getCurrencyIdRequest: GetCurrencyIdRequest): GetCurrencyIdResponse?

Get the currency ID.

Link copied to clipboard

Get the block header of the last block.

Link copied to clipboard
suspend fun submitBlock(submitBlockRequest: SubmitBlockRequest): SubmitBlockResponse?

Submit block.