Home Reference Source
import Daemon from 'moneyro/src/Daemon.mjs'
public class | source

Daemon

Extends:

src/RPC.js~RPC → Daemon

Daemon class.

Constructor Summary

Public Constructor
public

constructor(hostname: string, port: uint)

Method Summary

Public Methods
public
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:

NameTypeAttributeDescription
hostname string

Daemon host address.

port uint

Daemon port.

Public Methods

public async getBlockCount(): Promise<GetBlockCountResponse> source

Return:

Promise<GetBlockCountResponse>

public async getBlockTemplate(walletAddress: string, reserveSize: uint): Promise<GetBlockTemplateResponse> source

Params:

NameTypeAttributeDescription
walletAddress string

Address of wallet to receive coinbase transactions if block is successfully mined.

reserveSize uint

Reserve size.

Return:

Promise<GetBlockTemplateResponse>

public async onGetBlockHash(blockHeight: int): Promise<string> source

Params:

NameTypeAttributeDescription
blockHeight int

Block Height.

Return:

Promise<string>

block hash