# Class: MoneroDaemonRpc

## MoneroDaemonRpc

Implements a MoneroDaemon as a client of monerod.

Implements:
  - MoneroDaemon
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 61

### Methods

#### (async) addListener(listener)

Register a listener to receive daemon notifications.

##### Parameters:

Name | Type | Description
--- | --- | ---
`listener` | MoneroDaemonListener | listener to receive daemon notifications

Implements:
  - MoneroDaemon#addListener
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 213

#### (async) checkForUpdate() → {MoneroDaemonUpdateCheckResult}

Check for update.

Implements:
  - MoneroDaemon#checkForUpdate
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 772

##### Returns:

the result

Type
  MoneroDaemonUpdateCheckResult

#### (async) downloadUpdate(path) → {MoneroDaemonUpdateDownloadResult}

Download an update.

##### Parameters:

Name | Type | Description
--- | --- | ---
`path` | string | path to download the update (optional)

Implements:
  - MoneroDaemon#downloadUpdate
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 778

##### Returns:

the result

Type
  MoneroDaemonUpdateDownloadResult

#### (async) flushTxPool(hashes)

Flush transactions from the tx pool.

##### Parameters:

Name | Type | Description
--- | --- | ---
`hashes` | string | Array.<string> | specific transactions to flush (defaults to all)

Implements:
  - MoneroDaemon#flushTxPool
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 512

#### (async) getAltBlockHashes() → {Array.<string>}

Get known block hashes which are not on the main chain.

Implements:
  - MoneroDaemon#getAltBlockHashes
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 620

##### Returns:

known block hashes which are not on the main chain

Type
  Array.<string>

#### (async) getAltChains() → {Array.<MoneroAltChain>}

Get alternative chains seen by the node.

Implements:
  - MoneroDaemon#getAltChains
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 597

##### Returns:

alternative chains

Type
  Array.<MoneroAltChain>

#### (async) getBlockByHash(blockHash) → {MoneroBlock}

Get a block by hash.

##### Parameters:

Name | Type | Description
--- | --- | ---
`blockHash` | string | hash of the block to get

Implements:
  - MoneroDaemon#getBlockByHash
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 313

##### Returns:

with the given hash

Type
  MoneroBlock

#### (async) getBlockByHeight(height) → {MoneroBlock}

Get a block by height.

##### Parameters:

Name | Type | Description
--- | --- | ---
`height` | int | height of the block to get

Implements:
  - MoneroDaemon#getBlockByHeight
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 319

##### Returns:

with the given height

Type
  MoneroBlock

#### (async) getBlockHash(height) → {string}

Get a block's hash by its height.

##### Parameters:

Name | Type | Description
--- | --- | ---
`height` | int | height of the block hash to get

Implements:
  - MoneroDaemon#getBlockHash
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 267

##### Returns:

the block's hash at the given height

Type
  string

#### (async) getBlockHeaderByHash(blockHash) → {MoneroBlockHeader}

Get a block header by its hash.

##### Parameters:

Name | Type | Description
--- | --- | ---
`blockHash` | string | hash of the block to get the header of

Implements:
  - MoneroDaemon#getBlockHeaderByHash
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 284

##### Returns:

block's header

Type
  MoneroBlockHeader

#### (async) getBlockHeaderByHeight(height) → {MoneroBlockHeader}

Get a block header by its height.

##### Parameters:

Name | Type | Description
--- | --- | ---
`height` | int | height of the block to get the header of

Implements:
  - MoneroDaemon#getBlockHeaderByHeight
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 290

##### Returns:

block's header

Type
  MoneroBlockHeader

#### (async) getBlockHeadersByRange(startHeight, endHeight) → {Array.<MoneroBlockHeader>}

Get block headers for the given range.

##### Parameters:

Name | Type | Description
--- | --- | ---
`startHeight` | int | start height lower bound inclusive (optional)
`endHeight` | int | end height upper bound inclusive (optional)

Implements:
  - MoneroDaemon#getBlockHeadersByRange
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 296

##### Returns:

for the given range

Type
  Array.<MoneroBlockHeader>

#### (async) getBlockTemplate(walletAddress, reserveSize) → {MoneroBlockTemplate}

Get a block template for mining a new block.

##### Parameters:

Name | Type | Description
--- | --- | ---
`walletAddress` | string | address of the wallet to receive miner transactions if block is successfully mined
`reserveSize` | int | reserve size (optional)

Implements:
  - MoneroDaemon#getBlockTemplate
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 271

##### Returns:

is a block template for mining a new block

Type
  MoneroBlockTemplate

#### (async) getBlocksByHeight(heights) → {Array.<MoneroBlock>}

Get blocks at the given heights.

##### Parameters:

Name | Type | Description
--- | --- | ---
`heights` | Array.<int> | heights of the blocks to get

Implements:
  - MoneroDaemon#getBlocksByHeight
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 325

##### Returns:

are blocks at the given heights

Type
  Array.<MoneroBlock>

#### (async) getBlocksByRange(startHeight, endHeight) → {Array.<MoneroBlock>}

Get blocks in the given height range.

##### Parameters:

Name | Type | Description
--- | --- | ---
`startHeight` | int | start height lower bound inclusive (optional)
`endHeight` | int | end height upper bound inclusive (optional)

Implements:
  - MoneroDaemon#getBlocksByRange
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 371

##### Returns:

are blocks in the given height range

Type
  Array.<MoneroBlock>

#### (async) getBlocksByRangeChunked(startHeight, endHeight, maxChunkSize) → {Array.<MoneroBlock>}

Get blocks in the given height range as chunked requests so that each request is not too big.

##### Parameters:

Name | Type | Description
--- | --- | ---
`startHeight` | int | start height lower bound inclusive (optional)
`endHeight` | int | end height upper bound inclusive (optional)
`maxChunkSize` | int | maximum chunk size in any one request (default 3,000,000 bytes)

Implements:
  - MoneroDaemon#getBlocksByRangeChunked
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 379

##### Returns:

blocks in the given height range

Type
  Array.<MoneroBlock>

#### (async) getDownloadLimit() → {int}

Get the download bandwidth limit.

Implements:
  - MoneroDaemon#getDownloadLimit
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 635

##### Returns:

download bandwidth limit

Type
  int

#### (async) getFeeEstimate(graceBlocks) → {MoneroFeeEstimate}

Get mining fee estimates per kB.

##### Parameters:

Name | Type | Description
--- | --- | ---
`graceBlocks` | number | TODO

Implements:
  - MoneroDaemon#getFeeEstimate
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 444

##### Returns:

mining fee estimates per kB

Type
  MoneroFeeEstimate

#### (async) getHardForkInfo() → {MoneroHardForkInfo}

Look up information regarding hard fork voting and readiness.

Implements:
  - MoneroDaemon#getHardForkInfo
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 591

##### Returns:

contains hard fork information

Type
  MoneroHardForkInfo

#### (async) getHeight() → {int}

Get the number of blocks in the longest chain known to the node.

Implements:
  - MoneroDaemon#getHeight
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 261

##### Returns:

the number of blocks

Type
  int

#### (async) getInfo() → {MoneroDaemonInfo}

Get general information about the state of the node and the network.

Implements:
  - MoneroDaemon#getInfo
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 579

##### Returns:

is general information about the node and network

Type
  MoneroDaemonInfo

#### (async) getKeyImageSpentStatus(keyImage) → {MoneroKeyImageSpentStatus}

Get the spent status of the given key image.

##### Parameters:

Name | Type | Description
--- | --- | ---
`keyImage` | string | key image hex to get the status of

Implements:
  - MoneroDaemon#getKeyImageSpentStatus
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 805

##### Returns:

status of the key image

Type
  MoneroKeyImageSpentStatus

#### (async) getKeyImageSpentStatuses(keyImages) → {Array.<MoneroKeyImageSpentStatus>}

Get the spent status of each given key image.

##### Parameters:

Name | Type | Description
--- | --- | ---
`keyImages` | Array.<string> | are hex key images to get the statuses of

Implements:
  - MoneroDaemon#getKeyImageSpentStatuses
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 518

##### Returns:

status for each key image

Type
  Array.<MoneroKeyImageSpentStatus>

#### (async) getKnownPeers() → {Array.<MoneroPeer>}

Get known peers including their last known online status.

Implements:
  - MoneroDaemon#getKnownPeers
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 674

##### Returns:

the daemon's known peers

Type
  Array.<MoneroPeer>

#### (async) getLastBlockHeader() → {MoneroBlockHeader}

Get the last block's header.

Implements:
  - MoneroDaemon#getLastBlockHeader
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 278

##### Returns:

last block's header

Type
  MoneroBlockHeader

#### getListeners() → {Array.<MoneroDaemonListener>}

Get the listeners registered with the daemon.

Implements:
  - MoneroDaemon#getListeners
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 227

##### Returns:

the registered listeners

Type
  Array.<MoneroDaemonListener>

#### (async) getMinerTxSum(height, numBlocks) → {MoneroMinerTxSum}

Gets the total emissions and fees from the genesis block to the current height.

##### Parameters:

Name | Type | Description
--- | --- | ---
`height` | int | height to start computing the miner sum
`numBlocks` | int | number of blocks to include in the sum

Implements:
  - MoneroDaemon#getMinerTxSum
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 431

##### Returns:

encapsulates the total emissions and fees since the genesis block

Type
  MoneroMinerTxSum

#### (async) getMiningStatus() → {MoneroMiningStatus}

Get the daemon's mining status.

Implements:
  - MoneroDaemon#getMiningStatus
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 751

##### Returns:

daemon's mining status

Type
  MoneroMiningStatus

#### (async) getOutputDistribution(amounts, cumulative, startHeight, endHeight) → {Array.<MoneroOutputDistributionEntry>}

Creates an output distribution.

##### Parameters:

Name | Type | Description
--- | --- | ---
`amounts` | Array.<BigInteger> | amounts of outputs to make the distribution with
`cumulative` | boolean | specifies if the results should be cumulative (defaults to TODO)
`startHeight` | int | start height lower bound inclusive (optional)
`endHeight` | int | end height upper bound inclusive (optional)

Implements:
  - MoneroDaemon#getOutputDistribution
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 546

##### Returns:

are entries meeting the parameters

Type
  Array.<MoneroOutputDistributionEntry>

#### (async) getOutputHistogram(amounts, minCount, maxCount, isUnlocked, recentCutoff) → {Array.<MoneroOutputHistogramEntry>}

Get a histogram of output amounts. For all amounts (possibly filtered by parameters), gives the number of outputs on the chain for that amount. RingCT outputs counts as 0 amount.

##### Parameters:

Name | Type | Description
--- | --- | ---
`amounts` | Array.<BigInteger> | amounts of outputs to make the histogram with
`minCount` | int | TODO
`maxCount` | int | TODO
`isUnlocked` | boolean | makes a histogram with outputs with the specified lock state
`recentCutoff` | int | TODO

Implements:
  - MoneroDaemon#getOutputHistogram
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 525

##### Returns:

are entries meeting the parameters

Type
  Array.<MoneroOutputHistogramEntry>

#### (async) getPeerBans() → {Array.<MoneroBan>}

Get peer bans.

Implements:
  - MoneroDaemon#getPeerBans
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 711

##### Returns:

entries about banned peers

Type
  Array.<MoneroBan>

#### (async) getPeers() → {Array.<MoneroPeer>}

Get peers with active incoming or outgoing connections to the node.

Implements:
  - MoneroDaemon#getPeers
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 663

##### Returns:

the daemon's peers

Type
  Array.<MoneroPeer>

#### getProcess()

Get the internal process running monerod.

Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 196

##### Returns:

the process running monerod, undefined if not created from new process

#### (async) getRpcConnection() → {MoneroRpcConnection}

Get the daemon's RPC connection.

Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 236

##### Returns:

the daemon's rpc connection

Type
  MoneroRpcConnection

#### (async) getSyncInfo() → {MoneroDaemonSyncInfo}

Get synchronization information.

Implements:
  - MoneroDaemon#getSyncInfo
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 585

##### Returns:

contains sync information

Type
  MoneroDaemonSyncInfo

#### (async) getTx(txHash, prune) → {MoneroTx}

Get a transaction by hash.

##### Parameters:

Name | Type | Default | Description
--- | --- | --- | ---
`txHash` | string |  | hash of the transaction to get
`prune` | boolean | false | specifies if the returned tx should be pruned (defaults to false)

Implements:
  - MoneroDaemon#getTx
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 803

##### Returns:

transaction with the given hash or undefined if not found

Type
  MoneroTx

#### (async) getTxHex(txHash, prune) → {string}

Get a transaction hex by hash.

##### Parameters:

Name | Type | Default | Description
--- | --- | --- | ---
`txHash` | string |  | hash of the transaction to get hex from
`prune` | boolean | false | specifies if the returned tx hex should be pruned (defaults to false)

Implements:
  - MoneroDaemon#getTxHex
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 804

##### Returns:

tx hex with the given hash

Type
  string

#### (async) getTxHexes(txHashes, prune) → {Array.<string>}

Get transaction hexes by hashes.

##### Parameters:

Name | Type | Default | Description
--- | --- | --- | ---
`txHashes` | Array.<string> |  | hashes of transactions to get hexes from
`prune` | boolean | false | specifies if the returned tx hexes should be pruned (defaults to false)

Implements:
  - MoneroDaemon#getTxHexes
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 425

##### Returns:

tx hexes

Type
  Array.<string>

#### (async) getTxPool() → {Array.<MoneroTx>}

Get valid transactions seen by the node but not yet mined into a block, as well as spent key image information for the tx pool.

Implements:
  - MoneroDaemon#getTxPool
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 475

##### Returns:

are transactions in the transaction pool

Type
  Array.<MoneroTx>

#### (async) getTxPoolBacklog() → {Array.<MoneroTxBacklogEntry>}

Get all transaction pool backlog.

Implements:
  - MoneroDaemon#getTxPoolBacklog
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 502

##### Returns:

backlog entries

Type
  Array.<MoneroTxBacklogEntry>

#### (async) getTxPoolHashes() → {Array.<string>}

Get hashes of transactions in the transaction pool.

Implements:
  - MoneroDaemon#getTxPoolHashes
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 498

##### Returns:

are hashes of transactions in the transaction pool

Type
  Array.<string>

#### (async) getTxPoolStats() → {MoneroTxPoolStats}

Get transaction pool statistics.

Implements:
  - MoneroDaemon#getTxPoolStats
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 506

##### Returns:

contains statistics about the transaction pool

Type
  MoneroTxPoolStats

#### (async) getTxs(txHashes, prune) → {Array.<MoneroTx>}

Get transactions by hashes.

##### Parameters:

Name | Type | Default | Description
--- | --- | --- | ---
`txHashes` | Array.<string> |  | hashes of transactions to get
`prune` | boolean | false | specifies if the returned txs should be pruned (defaults to false)

Implements:
  - MoneroDaemon#getTxs
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 393

##### Returns:

found transactions with the given hashes

Type
  Array.<MoneroTx>

#### (async) getUploadLimit() → {int}

Get the upload bandwidth limit.

Implements:
  - MoneroDaemon#getUploadLimit
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 649

##### Returns:

upload bandwidth limit

Type
  int

#### (async) getVersion() → {MoneroVersion}

Gets the version of the daemon.

Implements:
  - MoneroDaemon#getVersion
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 249

##### Returns:

the version of the daemon

Type
  MoneroVersion

#### (async) isConnected() → {boolean}

Indicates if the client is connected to the daemon via RPC.

Implements:
  - MoneroDaemon#isConnected
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 240

##### Returns:

true if the client is connected to the daemon, false otherwise

Type
  boolean

#### (async) isTrusted() → {boolean}

Indicates if the daemon is trusted xor untrusted.

Implements:
  - MoneroDaemon#isTrusted
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 255

##### Returns:

true if the daemon is trusted, false otherwise

Type
  boolean

#### (async) pruneBlockchain(check) → {MoneroPruneResult}

Prune the blockchain.

##### Parameters:

Name | Type | Description
--- | --- | ---
`check` | boolean | specifies to check the pruning (default false)

Implements:
  - MoneroDaemon#pruneBlockchain
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 763

##### Returns:

the prune result

Type
  MoneroPruneResult

#### (async) relayTxsByHash(txHashes)

Relays transactions by hash.

##### Parameters:

Name | Type | Description
--- | --- | ---
`txHashes` | Array.<string> | hashes of the transactinos to relay

Implements:
  - MoneroDaemon#relayTxsByHash
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 470

#### (async) removeListener(listener)

Unregister a listener to receive daemon notifications.

##### Parameters:

Name | Type | Description
--- | --- | ---
`listener` | MoneroDaemonListener | listener to unregister

Implements:
  - MoneroDaemon#removeListener
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 219

#### (async) resetDownloadLimit() → {int}

Reset the download bandwidth limit.

Implements:
  - MoneroDaemon#resetDownloadLimit
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 645

##### Returns:

download bandwidth limit after resetting

Type
  int

#### (async) resetUploadLimit() → {int}

Reset the upload bandwidth limit.

Implements:
  - MoneroDaemon#resetUploadLimit
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 659

##### Returns:

upload bandwidth limit after resetting

Type
  int

#### (async) setDownloadLimit(limit) → {int}

Set the download bandwidth limit.

##### Parameters:

Name | Type | Description
--- | --- | ---
`limit` | int | download limit to set (-1 to reset to default)

Implements:
  - MoneroDaemon#setDownloadLimit
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 639

##### Returns:

new download limit after setting

Type
  int

#### (async) setIncomingPeerLimit(limit)

Limit number of incoming peers.

##### Parameters:

Name | Type | Description
--- | --- | ---
`limit` | int | maximum number of incoming peers

Implements:
  - MoneroDaemon#setIncomingPeerLimit
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 705

#### (async) setOutgoingPeerLimit(limit)

Limit number of outgoing peers.

##### Parameters:

Name | Type | Description
--- | --- | ---
`limit` | int | maximum number of outgoing peers

Implements:
  - MoneroDaemon#setOutgoingPeerLimit
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 699

#### (async) setPeerBan(ban)

Ban a peer node.

##### Parameters:

Name | Type | Description
--- | --- | ---
`ban` | MoneroBan | contains information about a node to ban

Implements:
  - MoneroDaemon#setPeerBan
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 806

#### (async) setPeerBans(bans)

Ban peers nodes.

##### Parameters:

Name | Type | Description
--- | --- | ---
`bans` | Array.<MoneroBan> | specify which peers to ban

Implements:
  - MoneroDaemon#setPeerBans
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 725

#### (async) setUploadLimit(limit) → {int}

Set the upload bandwidth limit.

##### Parameters:

Name | Type | Description
--- | --- | ---
`limit` |  | upload limit to set (-1 to reset to default)

Implements:
  - MoneroDaemon#setUploadLimit
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 653

##### Returns:

new upload limit after setting

Type
  int

#### (async) startMining(address, numThreads, isBackground, ignoreBattery)

Start mining.

##### Parameters:

Name | Type | Description
--- | --- | ---
`address` | string | address given miner rewards if the daemon mines a block
`numThreads` | integer | number of mining threads to run
`isBackground` | boolean | specifies if the miner should run in the background or not
`ignoreBattery` | boolean | specifies if the battery state (e.g. on laptop) should be ignored or not

Implements:
  - MoneroDaemon#startMining
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 732

#### (async) stop()

Safely disconnect and shut down the daemon.

Implements:
  - MoneroDaemon#stop
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 784

#### (async) stopMining()

Stop mining.

Implements:
  - MoneroDaemon#stopMining
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 746

#### (async) stopProcess(force) → {Promise.<(number|undefined)>}

Stop the internal process running monerod, if applicable.

##### Parameters:

Name | Type | Description
--- | --- | ---
`force` | boolean | specifies if the process should be destroyed forcibly

Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 206

##### Returns:

the exit code from stopping the process

Type
  Promise.<(number|undefined)>

#### (async) submitBlock(blockBlob)

Submit a mined block to the network.

##### Parameters:

Name | Type | Description
--- | --- | ---
`blockBlob` | string | mined block to submit

Implements:
  - MoneroDaemon#submitBlock
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 807

#### (async) submitBlocks(blockBlobs)

Submit mined blocks to the network.

##### Parameters:

Name | Type | Description
--- | --- | ---
`blockBlobs` | Array.<string> | mined blocks to submit

Implements:
  - MoneroDaemon#submitBlocks
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 757

#### (async) submitTxHex(txHex, doNotRelay) → {MoneroSubmitTxResult}

Submits a transaction to the daemon's pool.

##### Parameters:

Name | Type | Description
--- | --- | ---
`txHex` | string | raw transaction hex to submit
`doNotRelay` | boolean | specifies if the tx should be relayed (optional)

Implements:
  - MoneroDaemon#submitTxHex
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 456

##### Returns:

contains submission results

Type
  MoneroSubmitTxResult

#### (async) waitForNextBlockHeader() → {MoneroBlockHeader}

Get the header of the next block added to the chain.

Implements:
  - MoneroDaemon#waitForNextBlockHeader
Source:
  - src/main/js/daemon/MoneroDaemonRpc.js, line 789

##### Returns:

header of the next block added to the chain

Type
  MoneroBlockHeader