Package zephyr.daemon
Class ZephyrDaemonDefault
java.lang.Object
zephyr.daemon.ZephyrDaemonDefault
- All Implemented Interfaces:
ZephyrDaemon
- Direct Known Subclasses:
ZephyrDaemonRpc
Abstract default implementation of a Zephyr 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(ZephyrBan 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface zephyr.daemon.ZephyrDaemon
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
-
ZephyrDaemonDefault
public ZephyrDaemonDefault()
-
-
Method Details
-
getBlockTemplate
Description copied from interface:ZephyrDaemonGet a block template for mining a new block.- Specified by:
getBlockTemplatein interfaceZephyrDaemon- 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:ZephyrDaemonGet blocks in the given height range as chunked requests so that each request is not too big.- Specified by:
getBlocksByRangeChunkedin interfaceZephyrDaemon- 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:ZephyrDaemonGet a transaction by hash.- Specified by:
getTxin interfaceZephyrDaemon- 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:ZephyrDaemonGet a transaction by hash.- Specified by:
getTxin interfaceZephyrDaemon- 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:ZephyrDaemonGet transactions by hashes.- Specified by:
getTxsin interfaceZephyrDaemon- Parameters:
txHashes- are hashes of transactions to get- Returns:
- found transactions with the given hashes
-
getTxHex
Description copied from interface:ZephyrDaemonGet a transaction hex by hash.- Specified by:
getTxHexin interfaceZephyrDaemon- 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:ZephyrDaemonGet a transaction hex by hash.- Specified by:
getTxHexin interfaceZephyrDaemon- 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:ZephyrDaemonGet transaction hexes by hashes.- Specified by:
getTxHexesin interfaceZephyrDaemon- Parameters:
txHashes- are hashes of transactions to get hexes from- Returns:
- are the tx hexes
-
getFeeEstimate
Description copied from interface:ZephyrDaemonGet mining fee estimates per kB.- Specified by:
getFeeEstimatein interfaceZephyrDaemon- Returns:
- mining fee estimates per kB
-
submitTxHex
Description copied from interface:ZephyrDaemonSubmits a transaction to the daemon's pool.- Specified by:
submitTxHexin interfaceZephyrDaemon- Parameters:
txHex- is the raw transaction hex to submit- Returns:
- the submission results
-
relayTxByHash
Description copied from interface:ZephyrDaemonRelays a transaction by hash.- Specified by:
relayTxByHashin interfaceZephyrDaemon- Parameters:
txHash- identifies the transaction to relay
-
getKeyImageSpentStatus
Description copied from interface:ZephyrDaemonGet the spent status of the given key image.- Specified by:
getKeyImageSpentStatusin interfaceZephyrDaemon- Parameters:
keyImage- is key image hex to get the status of- Returns:
- the status of the key image
-
getOutputDistribution
Description copied from interface:ZephyrDaemonCreates an output distribution.- Specified by:
getOutputDistributionin interfaceZephyrDaemon- Parameters:
amounts- are amounts of outputs to make the distribution with- Returns:
- output distribution entries meeting the parameters
-
setPeerBan
Description copied from interface:ZephyrDaemonBan a peer node.- Specified by:
setPeerBanin interfaceZephyrDaemon- Parameters:
ban- contains information about a node to ban
-
submitBlock
Description copied from interface:ZephyrDaemonSubmit a mined block to the network.- Specified by:
submitBlockin interfaceZephyrDaemon- Parameters:
blockBlob- is the mined block to submit
-
downloadUpdate
Description copied from interface:ZephyrDaemonDownload an update.- Specified by:
downloadUpdatein interfaceZephyrDaemon- Returns:
- the result of the update download
-