Package monero.daemon
Class MoneroDaemonDefault
java.lang.Object
monero.daemon.MoneroDaemonDefault
- All Implemented Interfaces:
MoneroDaemon
- Direct Known Subclasses:
MoneroDaemonRpc
Abstract default implementation of a Monero daemon.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDownload an update.getBlocksByRangeChunked
(Long startHeight, Long endHeight) Get blocks in the given height range as chunked requests so that each request is not too big.getBlockTemplate
(String walletAddress) Get a block template for mining a new block.Get mining fee estimates per kB.getKeyImageSpentStatus
(String keyImage) Get the spent status of the given key image.getOutputDistribution
(Collection<BigInteger> amounts) Creates an output distribution.Get a transaction by hash.Get a transaction by hash.Get a transaction hex by hash.Get a transaction hex by hash.getTxHexes
(Collection<String> txHashes) Get transaction hexes by hashes.getTxs
(Collection<String> txHashes) Get transactions by hashes.void
relayTxByHash
(String txHash) Relays a transaction by hash.void
setPeerBan
(MoneroBan ban) Ban a peer node.void
submitBlock
(String blockBlob) Submit a mined block to the network.submitTxHex
(String txHex) Submits a transaction to the daemon's pool.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface monero.daemon.MoneroDaemon
addListener, checkForUpdate, downloadUpdate, flushTxPool, flushTxPool, flushTxPool, getAltBlockHashes, getAltChains, getBlockByHash, getBlockByHeight, getBlockHash, getBlockHashes, getBlockHeaderByHash, getBlockHeaderByHeight, getBlockHeadersByRange, getBlocksByHash, getBlocksByHeight, getBlocksByRange, getBlocksByRangeChunked, getBlockTemplate, getDownloadLimit, getFeeEstimate, getHardForkInfo, getHeight, getInfo, getKeyImageSpentStatuses, getKnownPeers, getLastBlockHeader, getListeners, getMinerTxSum, getMiningStatus, getOutputDistribution, getOutputHistogram, getOutputs, getPeerBans, getPeers, getSyncInfo, getTxHexes, getTxPool, getTxPoolBacklog, getTxPoolHashes, getTxPoolStats, getTxs, getUploadLimit, getVersion, isTrusted, pruneBlockchain, relayTxsByHash, removeListener, resetDownloadLimit, resetUploadLimit, setDownloadLimit, setIncomingPeerLimit, setOutgoingPeerLimit, setPeerBans, setUploadLimit, startMining, stop, stopMining, submitBlocks, submitTxHex, waitForNextBlockHeader
-
Constructor Details
-
MoneroDaemonDefault
public MoneroDaemonDefault()
-
-
Method Details
-
getBlockTemplate
Description copied from interface:MoneroDaemon
Get a block template for mining a new block.- Specified by:
getBlockTemplate
in interfaceMoneroDaemon
- Parameters:
walletAddress
- is the address of the wallet to receive miner transactions if block is successfully mined- Returns:
- a block template for mining a new block
-
getBlocksByRangeChunked
Description copied from interface:MoneroDaemon
Get blocks in the given height range as chunked requests so that each request is not too big.- Specified by:
getBlocksByRangeChunked
in interfaceMoneroDaemon
- Parameters:
startHeight
- is the start height lower bound inclusive (optional)endHeight
- is the end height upper bound inclusive (optional)- Returns:
- blocks in the given height range
-
getTx
Description copied from interface:MoneroDaemon
Get a transaction by hash.- Specified by:
getTx
in interfaceMoneroDaemon
- Parameters:
txHash
- is the hash of the transaction to get- Returns:
- the transaction with the given hash or null if not found
-
getTx
Description copied from interface:MoneroDaemon
Get a transaction by hash.- Specified by:
getTx
in interfaceMoneroDaemon
- Parameters:
txHash
- is the hash of the transaction to getprune
- specifies if the returned tx should be pruned (defaults to false)- Returns:
- the transaction with the given hash or null if not found
-
getTxs
Description copied from interface:MoneroDaemon
Get transactions by hashes.- Specified by:
getTxs
in interfaceMoneroDaemon
- Parameters:
txHashes
- are hashes of transactions to get- Returns:
- found transactions with the given hashes
-
getTxHex
Description copied from interface:MoneroDaemon
Get a transaction hex by hash.- Specified by:
getTxHex
in interfaceMoneroDaemon
- Parameters:
txHash
- is the hash of the transaction to get hex from- Returns:
- the tx hex with the given hash
-
getTxHex
Description copied from interface:MoneroDaemon
Get a transaction hex by hash.- Specified by:
getTxHex
in interfaceMoneroDaemon
- Parameters:
txHash
- is the hash of the transaction to get hex fromprune
- specifies if the returned tx hex should be pruned (defaults to false)- Returns:
- the tx hex with the given hash
-
getTxHexes
Description copied from interface:MoneroDaemon
Get transaction hexes by hashes.- Specified by:
getTxHexes
in interfaceMoneroDaemon
- Parameters:
txHashes
- are hashes of transactions to get hexes from- Returns:
- are the tx hexes
-
getFeeEstimate
Description copied from interface:MoneroDaemon
Get mining fee estimates per kB.- Specified by:
getFeeEstimate
in interfaceMoneroDaemon
- Returns:
- mining fee estimates per kB
-
submitTxHex
Description copied from interface:MoneroDaemon
Submits a transaction to the daemon's pool.- Specified by:
submitTxHex
in interfaceMoneroDaemon
- Parameters:
txHex
- is the raw transaction hex to submit- Returns:
- the submission results
-
relayTxByHash
Description copied from interface:MoneroDaemon
Relays a transaction by hash.- Specified by:
relayTxByHash
in interfaceMoneroDaemon
- Parameters:
txHash
- identifies the transaction to relay
-
getKeyImageSpentStatus
Description copied from interface:MoneroDaemon
Get the spent status of the given key image.- Specified by:
getKeyImageSpentStatus
in interfaceMoneroDaemon
- Parameters:
keyImage
- is key image hex to get the status of- Returns:
- the status of the key image
-
getOutputDistribution
Description copied from interface:MoneroDaemon
Creates an output distribution.- Specified by:
getOutputDistribution
in interfaceMoneroDaemon
- Parameters:
amounts
- are amounts of outputs to make the distribution with- Returns:
- output distribution entries meeting the parameters
-
setPeerBan
Description copied from interface:MoneroDaemon
Ban a peer node.- Specified by:
setPeerBan
in interfaceMoneroDaemon
- Parameters:
ban
- contains information about a node to ban
-
submitBlock
Description copied from interface:MoneroDaemon
Submit a mined block to the network.- Specified by:
submitBlock
in interfaceMoneroDaemon
- Parameters:
blockBlob
- is the mined block to submit
-
downloadUpdate
Description copied from interface:MoneroDaemon
Download an update.- Specified by:
downloadUpdate
in interfaceMoneroDaemon
- Returns:
- the result of the update download
-