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
Constructors -
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.voidrelayTxByHash(String txHash) Relays a transaction by hash.voidsetPeerBan(MoneroBan ban) Ban a peer node.voidsubmitBlock(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, waitMethods 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:MoneroDaemonGet a block template for mining a new block.- Specified by:
getBlockTemplatein 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:MoneroDaemonGet blocks in the given height range as chunked requests so that each request is not too big.- Specified by:
getBlocksByRangeChunkedin 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:MoneroDaemonGet a transaction by hash.- Specified by:
getTxin 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:MoneroDaemonGet a transaction by hash.- Specified by:
getTxin 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:MoneroDaemonGet transactions by hashes.- Specified by:
getTxsin interfaceMoneroDaemon- Parameters:
txHashes- are hashes of transactions to get- Returns:
- found transactions with the given hashes
-
getTxHex
Description copied from interface:MoneroDaemonGet a transaction hex by hash.- Specified by:
getTxHexin 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:MoneroDaemonGet a transaction hex by hash.- Specified by:
getTxHexin 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:MoneroDaemonGet transaction hexes by hashes.- Specified by:
getTxHexesin interfaceMoneroDaemon- Parameters:
txHashes- are hashes of transactions to get hexes from- Returns:
- are the tx hexes
-
getFeeEstimate
Description copied from interface:MoneroDaemonGet mining fee estimates per kB.- Specified by:
getFeeEstimatein interfaceMoneroDaemon- Returns:
- mining fee estimates per kB
-
submitTxHex
Description copied from interface:MoneroDaemonSubmits a transaction to the daemon's pool.- Specified by:
submitTxHexin interfaceMoneroDaemon- Parameters:
txHex- is the raw transaction hex to submit- Returns:
- the submission results
-
relayTxByHash
Description copied from interface:MoneroDaemonRelays a transaction by hash.- Specified by:
relayTxByHashin interfaceMoneroDaemon- Parameters:
txHash- identifies the transaction to relay
-
getKeyImageSpentStatus
Description copied from interface:MoneroDaemonGet the spent status of the given key image.- Specified by:
getKeyImageSpentStatusin interfaceMoneroDaemon- Parameters:
keyImage- is key image hex to get the status of- Returns:
- the status of the key image
-
getOutputDistribution
Description copied from interface:MoneroDaemonCreates an output distribution.- Specified by:
getOutputDistributionin interfaceMoneroDaemon- Parameters:
amounts- are amounts of outputs to make the distribution with- Returns:
- output distribution entries meeting the parameters
-
setPeerBan
Description copied from interface:MoneroDaemonBan a peer node.- Specified by:
setPeerBanin interfaceMoneroDaemon- Parameters:
ban- contains information about a node to ban
-
submitBlock
Description copied from interface:MoneroDaemonSubmit a mined block to the network.- Specified by:
submitBlockin interfaceMoneroDaemon- Parameters:
blockBlob- is the mined block to submit
-
downloadUpdate
Description copied from interface:MoneroDaemonDownload an update.- Specified by:
downloadUpdatein interfaceMoneroDaemon- Returns:
- the result of the update download
-