Package monero.daemon

Class MoneroDaemonDefault

java.lang.Object
monero.daemon.MoneroDaemonDefault
All Implemented Interfaces:
MoneroDaemon
Direct Known Subclasses:
MoneroDaemonRpc

public abstract class MoneroDaemonDefault extends Object implements MoneroDaemon
Abstract default implementation of a Monero daemon.
  • Constructor Details

    • MoneroDaemonDefault

      public MoneroDaemonDefault()
  • Method Details

    • getBlockTemplate

      public MoneroBlockTemplate getBlockTemplate(String walletAddress)
      Description copied from interface: MoneroDaemon
      Get a block template for mining a new block.
      Specified by:
      getBlockTemplate in interface MoneroDaemon
      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

      public List<MoneroBlock> getBlocksByRangeChunked(Long startHeight, Long endHeight)
      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 interface MoneroDaemon
      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

      public MoneroTx getTx(String txHash)
      Description copied from interface: MoneroDaemon
      Get a transaction by hash.
      Specified by:
      getTx in interface MoneroDaemon
      Parameters:
      txHash - is the hash of the transaction to get
      Returns:
      the transaction with the given hash or null if not found
    • getTx

      public MoneroTx getTx(String txHash, Boolean prune)
      Description copied from interface: MoneroDaemon
      Get a transaction by hash.
      Specified by:
      getTx in interface MoneroDaemon
      Parameters:
      txHash - is the hash of the transaction to get
      prune - specifies if the returned tx should be pruned (defaults to false)
      Returns:
      the transaction with the given hash or null if not found
    • getTxs

      public List<MoneroTx> getTxs(Collection<String> txHashes)
      Description copied from interface: MoneroDaemon
      Get transactions by hashes.
      Specified by:
      getTxs in interface MoneroDaemon
      Parameters:
      txHashes - are hashes of transactions to get
      Returns:
      found transactions with the given hashes
    • getTxHex

      public String getTxHex(String txHash)
      Description copied from interface: MoneroDaemon
      Get a transaction hex by hash.
      Specified by:
      getTxHex in interface MoneroDaemon
      Parameters:
      txHash - is the hash of the transaction to get hex from
      Returns:
      the tx hex with the given hash
    • getTxHex

      public String getTxHex(String txHash, Boolean prune)
      Description copied from interface: MoneroDaemon
      Get a transaction hex by hash.
      Specified by:
      getTxHex in interface MoneroDaemon
      Parameters:
      txHash - is the hash of the transaction to get hex from
      prune - specifies if the returned tx hex should be pruned (defaults to false)
      Returns:
      the tx hex with the given hash
    • getTxHexes

      public List<String> getTxHexes(Collection<String> txHashes)
      Description copied from interface: MoneroDaemon
      Get transaction hexes by hashes.
      Specified by:
      getTxHexes in interface MoneroDaemon
      Parameters:
      txHashes - are hashes of transactions to get hexes from
      Returns:
      are the tx hexes
    • getFeeEstimate

      public MoneroFeeEstimate getFeeEstimate()
      Description copied from interface: MoneroDaemon
      Get mining fee estimates per kB.
      Specified by:
      getFeeEstimate in interface MoneroDaemon
      Returns:
      mining fee estimates per kB
    • submitTxHex

      public MoneroSubmitTxResult submitTxHex(String txHex)
      Description copied from interface: MoneroDaemon
      Submits a transaction to the daemon's pool.
      Specified by:
      submitTxHex in interface MoneroDaemon
      Parameters:
      txHex - is the raw transaction hex to submit
      Returns:
      the submission results
    • relayTxByHash

      public void relayTxByHash(String txHash)
      Description copied from interface: MoneroDaemon
      Relays a transaction by hash.
      Specified by:
      relayTxByHash in interface MoneroDaemon
      Parameters:
      txHash - identifies the transaction to relay
    • getKeyImageSpentStatus

      public MoneroKeyImageSpentStatus getKeyImageSpentStatus(String keyImage)
      Description copied from interface: MoneroDaemon
      Get the spent status of the given key image.
      Specified by:
      getKeyImageSpentStatus in interface MoneroDaemon
      Parameters:
      keyImage - is key image hex to get the status of
      Returns:
      the status of the key image
    • getOutputDistribution

      public List<MoneroOutputDistributionEntry> getOutputDistribution(Collection<BigInteger> amounts)
      Description copied from interface: MoneroDaemon
      Creates an output distribution.
      Specified by:
      getOutputDistribution in interface MoneroDaemon
      Parameters:
      amounts - are amounts of outputs to make the distribution with
      Returns:
      output distribution entries meeting the parameters
    • setPeerBan

      public void setPeerBan(MoneroBan ban)
      Description copied from interface: MoneroDaemon
      Ban a peer node.
      Specified by:
      setPeerBan in interface MoneroDaemon
      Parameters:
      ban - contains information about a node to ban
    • submitBlock

      public void submitBlock(String blockBlob)
      Description copied from interface: MoneroDaemon
      Submit a mined block to the network.
      Specified by:
      submitBlock in interface MoneroDaemon
      Parameters:
      blockBlob - is the mined block to submit
    • downloadUpdate

      public MoneroDaemonUpdateDownloadResult downloadUpdate()
      Description copied from interface: MoneroDaemon
      Download an update.
      Specified by:
      downloadUpdate in interface MoneroDaemon
      Returns:
      the result of the update download