Daemon
Extends:
src/RPC.js~RPC → Daemon
Daemon class.
Constructor Summary
Public Constructor | ||
public |
constructor(hostname: string, port: uint) |
Method Summary
Public Methods | ||
public |
async getBlockCount(): Promise<GetBlockCountResponse> |
|
public |
async getBlockTemplate(walletAddress: string, reserveSize: uint): Promise<GetBlockTemplateResponse> |
|
public |
async onGetBlockHash(blockHeight: int): Promise<string> |
Public Constructors
public constructor(hostname: string, port: uint) source
Params:
Name | Type | Attribute | Description |
hostname | string | Daemon host address. |
|
port | uint | Daemon port. |
Public Methods
public async getBlockCount(): Promise<GetBlockCountResponse> source
public async getBlockTemplate(walletAddress: string, reserveSize: uint): Promise<GetBlockTemplateResponse> source
Params:
Name | Type | Attribute | Description |
walletAddress | string | Address of wallet to receive coinbase transactions if block is successfully mined. |
|
reserveSize | uint | Reserve size. |
public async onGetBlockHash(blockHeight: int): Promise<string> source
Params:
Name | Type | Attribute | Description |
blockHeight | int | Block Height. |
Return:
Promise<string> | block hash |