Packages

trait BlockchainRpc extends ChainApi

RPC calls related to querying the state of the blockchain

Self Type
BlockchainRpc with Client
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BlockchainRpc
  2. ChainApi
  3. ChainQueryApi
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def epochSecondToBlockHeight(time: Long): Future[Int]

    Gets the block height of the closest block to the given time

    Gets the block height of the closest block to the given time

    Definition Classes
    ChainQueryApi
  2. abstract def getBestBlockHeader(): Future[BlockHeaderDb]

    Gets the best block header we have

    Gets the best block header we have

    Definition Classes
    ChainApi
  3. abstract def getBestChainTips(): Future[Vector[BlockHeaderDb]]

    Gets all chain tips with the heaviest work

    Gets all chain tips with the heaviest work

    Definition Classes
    ChainApi
  4. abstract def getBlockHeight(blockHash: DoubleSha256DigestBE): Future[Option[Int]]

    Gets the height of the given block

    Gets the height of the given block

    Definition Classes
    ChainQueryApi
  5. abstract def getHeader(hash: DoubleSha256DigestBE): Future[Option[BlockHeaderDb]]

    Gets a org.bitcoins.core.api.chain.db.BlockHeaderDb from the chain's database

    Gets a org.bitcoins.core.api.chain.db.BlockHeaderDb from the chain's database

    Definition Classes
    ChainApi
  6. abstract def getHeaders(hashes: Vector[DoubleSha256DigestBE]): Future[Vector[Option[BlockHeaderDb]]]
    Definition Classes
    ChainApi
  7. abstract def getHeadersAtHeight(height: Int): Future[Vector[BlockHeaderDb]]

    Gets all org.bitcoins.core.api.chain.db.BlockHeaderDbs at a given height

    Definition Classes
    ChainApi
  8. abstract def getHeadersBetween(from: BlockHeaderDb, to: BlockHeaderDb): Future[Vector[BlockHeaderDb]]

    Fetchs the block headers between from and to (inclusive).

    Fetchs the block headers between from and to (inclusive).

    Definition Classes
    ChainApi
  9. abstract def getHeightByBlockStamp(blockStamp: BlockStamp): Future[Int]

    Returns the block height of the given block stamp

    Returns the block height of the given block stamp

    Definition Classes
    ChainApiChainQueryApi
  10. abstract def getMedianTimePast(): Future[Long]

    calculates the median time passed

    calculates the median time passed

    Definition Classes
    ChainQueryApi
  11. abstract def getNumberOfConfirmations(blockHash: DoubleSha256DigestBE): Future[Option[Int]]

    Gets number of confirmations for the given block hash

    Gets number of confirmations for the given block hash

    Definition Classes
    ChainQueryApi
  12. abstract def isIBD(): Future[Boolean]
    Definition Classes
    ChainApi
  13. abstract def isSyncing(): Future[Boolean]
    Definition Classes
    ChainApi
  14. abstract def isTipStale(): Future[Boolean]

    Checks if our chain tip is stale

  15. abstract def nextBlockHeaderBatchRange(prevStopHash: DoubleSha256DigestBE, stopHash: DoubleSha256DigestBE, batchSize: Int): Future[Option[FilterSyncMarker]]

    Generates a block range in form of (startHeight, stopHash) by the given stop hash.

    Generates a block range in form of (startHeight, stopHash) by the given stop hash. Returns None if we are synced

    prevStopHash

    our previous block hash where filter header sync stopped

    stopHash

    the block hash we want to sync the new batch of filters to

    batchSize

    the batch size of filter headers

    Definition Classes
    ChainApi
  16. abstract def nextFilterHeaderBatchRange(stopBlockHash: DoubleSha256DigestBE, batchSize: Int, startHeightOpt: Option[Int]): Future[Option[FilterSyncMarker]]

    Generates a query for a range of compact filters

    Generates a query for a range of compact filters

    stopBlockHash

    the block hash to stop receiving filters at

    startHeightOpt

    the block height to start syncing filters from. If None, we query our chainstate for the last filter we've seen

    Definition Classes
    ChainApi
  17. abstract def processCheckpoints(checkpoints: Vector[DoubleSha256DigestBE], blockHash: DoubleSha256DigestBE): Future[ChainApi]

    Process all compact filter header check points.

    Process all compact filter header check points.

    Definition Classes
    ChainApi
  18. abstract def processFilterHeaders(filterHeaders: Vector[FilterHeader], stopHash: DoubleSha256DigestBE): Future[ChainApi]

    Process all of the given compact filter headers and returns a new chain api that contains these headers.

    Process all of the given compact filter headers and returns a new chain api that contains these headers.

    Definition Classes
    ChainApi
  19. abstract def processFilters(message: Vector[CompactFilterMessage]): Future[ChainApi]

    Process all of the given compact filters and returns a new chain api that contains these headers.

    Process all of the given compact filters and returns a new chain api that contains these headers.

    Definition Classes
    ChainApi
  20. abstract def processHeaders(headers: Vector[BlockHeader]): Future[ChainApi]

    Process all of the given headers and returns a new chain api that contains these headers.

    Process all of the given headers and returns a new chain api that contains these headers. This method processes headers in the order that they are given. If the headers are out of order, this method will fail.

    This method will also fail when there are zero headers given that are valid.

    Definition Classes
    ChainApi
  21. abstract def setIBD(value: Boolean): Future[ChainApi]
    Definition Classes
    ChainApi
  22. abstract def setSyncing(value: Boolean): Future[ChainApi]
    Definition Classes
    ChainApi

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. def getBestBlockHash(): Future[DoubleSha256DigestBE]

    Gets the hash of the block that is what we consider "best"

    Gets the hash of the block that is what we consider "best"

    Definition Classes
    BlockchainRpcChainQueryApi
  10. def getBestFilter(): Future[Option[CompactFilterDb]]
    Definition Classes
    BlockchainRpcChainApi
  11. def getBestFilterHeader(): Future[Option[CompactFilterHeaderDb]]

    Finds the "best" filter header we have stored in our database What this means in practice is the latest filter header we have received from our peer.

    Finds the "best" filter header we have stored in our database What this means in practice is the latest filter header we have received from our peer. Returns none if we have no filters in the database

    Definition Classes
    BlockchainRpcChainApi
  12. def getBestHashBlockHeight()(implicit ec: ExecutionContext): Future[Int]
    Definition Classes
    ChainQueryApi
  13. def getBlock(headerHash: DoubleSha256Digest): Future[GetBlockResult]
  14. def getBlock(headerHash: DoubleSha256DigestBE): Future[GetBlockResult]
  15. def getBlockChainInfo: Future[GetBlockChainInfoResult]
  16. def getBlockCount(): Future[Int]

    Gets the number of blocks in the database

    Gets the number of blocks in the database

    Definition Classes
    BlockchainRpcChainApi
  17. def getBlockFilter(blockhash: DoubleSha256DigestBE, filtertype: FilterType): Future[GetBlockFilterResult]
  18. def getBlockHash(height: Int): Future[DoubleSha256DigestBE]
  19. def getBlockHeader(headerHash: DoubleSha256Digest): Future[GetBlockHeaderResult]
  20. def getBlockHeader(headerHash: DoubleSha256DigestBE): Future[GetBlockHeaderResult]
  21. def getBlockHeaderRaw(headerHash: DoubleSha256Digest): Future[BlockHeader]
  22. def getBlockHeaderRaw(headerHash: DoubleSha256DigestBE): Future[BlockHeader]
  23. def getBlockRaw(headerHash: DoubleSha256Digest): Future[Block]
  24. def getBlockRaw(headerHash: DoubleSha256DigestBE): Future[Block]
  25. def getBlockWithTransactions(headerHash: DoubleSha256Digest): Future[GetBlockWithTransactionsResult]
  26. def getBlockWithTransactions(headerHash: DoubleSha256DigestBE): Future[GetBlockWithTransactionsResultV22]
  27. def getChainStates(): Future[ChainStateResult]
  28. def getChainTips: Future[Vector[ChainTip]]
  29. def getChainTxStats(blocks: Int, blockHash: DoubleSha256Digest): Future[GetChainTxStatsResult]
  30. def getChainTxStats(blocks: Int, blockHash: DoubleSha256DigestBE): Future[GetChainTxStatsResult]
  31. def getChainTxStats(blocks: Int): Future[GetChainTxStatsResult]
  32. def getChainTxStats: Future[GetChainTxStatsResult]
  33. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  34. def getDifficulty: Future[BigDecimal]
  35. def getFilter(hash: DoubleSha256DigestBE): Future[Option[CompactFilterDb]]

    Looks up a compact filter by its hash.

    Looks up a compact filter by its hash.

    Definition Classes
    BlockchainRpcChainApi
  36. def getFilterCount(): Future[Int]

    Gets the number of compact filters in the database

    Gets the number of compact filters in the database

    Definition Classes
    BlockchainRpcChainApiChainQueryApi
  37. def getFilterHeader(blockHash: DoubleSha256DigestBE): Future[Option[CompactFilterHeaderDb]]

    Looks up a compact filter header by its hash.

    Looks up a compact filter header by its hash.

    Definition Classes
    BlockchainRpcChainApi
  38. def getFilterHeaderCount(): Future[Int]

    Gets the number of compact filter headers in the database

    Gets the number of compact filter headers in the database

    Definition Classes
    BlockchainRpcChainApi
  39. def getFilterHeadersAtHeight(height: Int): Future[Vector[CompactFilterHeaderDb]]

    Looks up a compact filter header by its height.

    Looks up a compact filter header by its height.

    Definition Classes
    BlockchainRpcChainApi
  40. def getFiltersAtHeight(height: Int): Future[Vector[CompactFilterDb]]

    Looks up a compact filter by its height.

    Looks up a compact filter by its height.

    Definition Classes
    BlockchainRpcChainApi
  41. def getFiltersBetweenHeights(startHeight: Int, endHeight: Int): Future[Vector[FilterResponse]]
    Definition Classes
    BlockchainRpcChainQueryApi
  42. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  43. def invalidateBlock(blockHash: DoubleSha256Digest): Future[Unit]
  44. def invalidateBlock(blockHash: DoubleSha256DigestBE): Future[Unit]
  45. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  46. def listSinceBlock(headerHash: DoubleSha256Digest, confirmations: Int, includeWatchOnly: Boolean): Future[ListSinceBlockResult]
  47. def listSinceBlock(headerHash: DoubleSha256Digest, includeWatchOnly: Boolean): Future[ListSinceBlockResult]
  48. def listSinceBlock(headerHash: DoubleSha256Digest, confirmations: Int): Future[ListSinceBlockResult]
  49. def listSinceBlock(headerHash: DoubleSha256Digest): Future[ListSinceBlockResult]
  50. def listSinceBlock(headerHash: DoubleSha256DigestBE, confirmations: Int, includeWatchOnly: Boolean): Future[ListSinceBlockResult]
  51. def listSinceBlock(headerHash: DoubleSha256DigestBE, includeWatchOnly: Boolean): Future[ListSinceBlockResult]
  52. def listSinceBlock(headerHash: DoubleSha256DigestBE, confirmations: Int): Future[ListSinceBlockResult]
  53. def listSinceBlock(headerHash: DoubleSha256DigestBE): Future[ListSinceBlockResult]
  54. def listSinceBlock(headerHash: Option[DoubleSha256DigestBE] = None, confirmations: Int = 1, includeWatchOnly: Boolean = false): Future[ListSinceBlockResult]
  55. def listSinceBlock: Future[ListSinceBlockResult]
  56. def listTransactions(account: String = "*", count: Int = 10, skip: Int = 0, includeWatchOnly: Boolean = false): Future[Vector[ListTransactionsResult]]
  57. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  58. final def nextFilterHeaderBatchRange(stopBlockHash: DoubleSha256DigestBE, batchSize: Int): Future[Option[FilterSyncMarker]]

    Generates a filter header range in form of (startHeight, stopHash) by the given stop hash.

    Generates a filter header range in form of (startHeight, stopHash) by the given stop hash.

    Definition Classes
    ChainApi
  59. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  60. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  61. def preciousBlock(headerHash: DoubleSha256Digest): Future[Unit]
  62. def preciousBlock(headerHash: DoubleSha256DigestBE): Future[Unit]
  63. def processCheckpoint(filterHeaderHash: DoubleSha256DigestBE, blockHash: DoubleSha256DigestBE): Future[ChainApi]

    Adds a compact filter header check point into the list of check points.

    Adds a compact filter header check point into the list of check points.

    Definition Classes
    ChainApi
  64. def processFilter(message: CompactFilterMessage): Future[ChainApi]

    Adds a compact filter into the filter database.

    Adds a compact filter into the filter database.

    Definition Classes
    ChainApi
  65. def processFilterHeader(filterHeader: FilterHeader, blockHash: DoubleSha256DigestBE): Future[ChainApi]

    Adds a compact filter header into the filter header chain and returns a new chain api that contains this header

    Adds a compact filter header into the filter header chain and returns a new chain api that contains this header

    Definition Classes
    ChainApi
  66. def processHeader(header: BlockHeader): Future[ChainApi]

    Adds a block header to our chain project.

    Adds a block header to our chain project. This will return a failed future when the given header is invalid.

    Definition Classes
    ChainApi
  67. def pruneBlockChain(height: Int): Future[Int]
  68. def rescanBlockChain(start: Int, stop: Int): Future[RescanBlockChainResult]
  69. def rescanBlockChain(start: Int): Future[RescanBlockChainResult]
  70. def rescanBlockChain(): Future[RescanBlockChainResult]
  71. def scanBlocks(request: ScanBlocksRequest): Future[ScanBlocksResult]
  72. def syncWithValidationInterfaceQueue(): Future[Unit]

    Waits for the validation interface queue to catch up on everything that was there when we entered this function

    Waits for the validation interface queue to catch up on everything that was there when we entered this function

    See also

    https://github.com/bitcoin/bitcoin/issues/27085

  73. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  74. def toString(): String
    Definition Classes
    AnyRef → Any
  75. def verifyChain(level: Int = 3, blocks: Int = 6): Future[Boolean]
  76. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  77. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  78. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from ChainApi

Inherited from ChainQueryApi

Inherited from AnyRef

Inherited from Any

Ungrouped