trait BlockchainRpc extends ChainApi
RPC calls related to querying the state of the blockchain
- Self Type
- BlockchainRpc with Client
- Alphabetic
- By Inheritance
- BlockchainRpc
- ChainApi
- ChainQueryApi
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- 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
- abstract def getBestBlockHeader(): Future[BlockHeaderDb]
Gets the best block header we have
Gets the best block header we have
- Definition Classes
- ChainApi
- 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
- 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
- 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
- abstract def getHeaders(hashes: Vector[DoubleSha256DigestBE]): Future[Vector[Option[BlockHeaderDb]]]
- Definition Classes
- ChainApi
- abstract def getHeadersAtHeight(height: Int): Future[Vector[BlockHeaderDb]]
Gets all org.bitcoins.core.api.chain.db.BlockHeaderDbs at a given height
Gets all org.bitcoins.core.api.chain.db.BlockHeaderDbs at a given height
- Definition Classes
- ChainApi
- 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
- 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
- ChainApi → ChainQueryApi
- abstract def getMedianTimePast(): Future[Long]
calculates the median time passed
calculates the median time passed
- Definition Classes
- ChainQueryApi
- 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
- abstract def isIBD(): Future[Boolean]
- Definition Classes
- ChainApi
- abstract def isSyncing(): Future[Boolean]
- Definition Classes
- ChainApi
- abstract def isTipStale(): Future[Boolean]
Checks if our chain tip is stale
Checks if our chain tip is stale
- 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
- 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
- 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
- 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
- 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
- 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
- abstract def setIBD(value: Boolean): Future[ChainApi]
- Definition Classes
- ChainApi
- abstract def setSyncing(value: Boolean): Future[ChainApi]
- Definition Classes
- ChainApi
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- 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
- BlockchainRpc → ChainQueryApi
- def getBestFilter(): Future[Option[CompactFilterDb]]
- Definition Classes
- BlockchainRpc → ChainApi
- 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
- BlockchainRpc → ChainApi
- def getBestHashBlockHeight()(implicit ec: ExecutionContext): Future[Int]
- Definition Classes
- ChainQueryApi
- def getBlock(headerHash: DoubleSha256Digest): Future[GetBlockResult]
- def getBlock(headerHash: DoubleSha256DigestBE): Future[GetBlockResult]
- def getBlockChainInfo: Future[GetBlockChainInfoResult]
- def getBlockCount(): Future[Int]
Gets the number of blocks in the database
Gets the number of blocks in the database
- Definition Classes
- BlockchainRpc → ChainApi
- def getBlockFilter(blockhash: DoubleSha256DigestBE, filtertype: FilterType): Future[GetBlockFilterResult]
- def getBlockHash(height: Int): Future[DoubleSha256DigestBE]
- def getBlockHeader(headerHash: DoubleSha256Digest): Future[GetBlockHeaderResult]
- def getBlockHeader(headerHash: DoubleSha256DigestBE): Future[GetBlockHeaderResult]
- def getBlockHeaderRaw(headerHash: DoubleSha256Digest): Future[BlockHeader]
- def getBlockHeaderRaw(headerHash: DoubleSha256DigestBE): Future[BlockHeader]
- def getBlockRaw(headerHash: DoubleSha256Digest): Future[Block]
- def getBlockRaw(headerHash: DoubleSha256DigestBE): Future[Block]
- def getBlockWithTransactions(headerHash: DoubleSha256Digest): Future[GetBlockWithTransactionsResult]
- def getBlockWithTransactions(headerHash: DoubleSha256DigestBE): Future[GetBlockWithTransactionsResultV22]
- def getChainStates(): Future[ChainStateResult]
- def getChainTips: Future[Vector[ChainTip]]
- def getChainTxStats(blocks: Int, blockHash: DoubleSha256Digest): Future[GetChainTxStatsResult]
- def getChainTxStats(blocks: Int, blockHash: DoubleSha256DigestBE): Future[GetChainTxStatsResult]
- def getChainTxStats(blocks: Int): Future[GetChainTxStatsResult]
- def getChainTxStats: Future[GetChainTxStatsResult]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getDifficulty: Future[BigDecimal]
- 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
- BlockchainRpc → ChainApi
- def getFilterCount(): Future[Int]
Gets the number of compact filters in the database
Gets the number of compact filters in the database
- Definition Classes
- BlockchainRpc → ChainApi → ChainQueryApi
- 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
- BlockchainRpc → ChainApi
- 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
- BlockchainRpc → ChainApi
- 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
- BlockchainRpc → ChainApi
- 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
- BlockchainRpc → ChainApi
- def getFiltersBetweenHeights(startHeight: Int, endHeight: Int): Future[Vector[FilterResponse]]
- Definition Classes
- BlockchainRpc → ChainQueryApi
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def invalidateBlock(blockHash: DoubleSha256Digest): Future[Unit]
- def invalidateBlock(blockHash: DoubleSha256DigestBE): Future[Unit]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def listSinceBlock(headerHash: DoubleSha256Digest, confirmations: Int, includeWatchOnly: Boolean): Future[ListSinceBlockResult]
- def listSinceBlock(headerHash: DoubleSha256Digest, includeWatchOnly: Boolean): Future[ListSinceBlockResult]
- def listSinceBlock(headerHash: DoubleSha256Digest, confirmations: Int): Future[ListSinceBlockResult]
- def listSinceBlock(headerHash: DoubleSha256Digest): Future[ListSinceBlockResult]
- def listSinceBlock(headerHash: DoubleSha256DigestBE, confirmations: Int, includeWatchOnly: Boolean): Future[ListSinceBlockResult]
- def listSinceBlock(headerHash: DoubleSha256DigestBE, includeWatchOnly: Boolean): Future[ListSinceBlockResult]
- def listSinceBlock(headerHash: DoubleSha256DigestBE, confirmations: Int): Future[ListSinceBlockResult]
- def listSinceBlock(headerHash: DoubleSha256DigestBE): Future[ListSinceBlockResult]
- def listSinceBlock(headerHash: Option[DoubleSha256DigestBE] = None, confirmations: Int = 1, includeWatchOnly: Boolean = false): Future[ListSinceBlockResult]
- def listSinceBlock: Future[ListSinceBlockResult]
- def listTransactions(account: String = "*", count: Int = 10, skip: Int = 0, includeWatchOnly: Boolean = false): Future[Vector[ListTransactionsResult]]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- 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
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def preciousBlock(headerHash: DoubleSha256Digest): Future[Unit]
- def preciousBlock(headerHash: DoubleSha256DigestBE): Future[Unit]
- 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
- 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
- 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
- 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
- def pruneBlockChain(height: Int): Future[Int]
- def rescanBlockChain(start: Int, stop: Int): Future[RescanBlockChainResult]
- def rescanBlockChain(start: Int): Future[RescanBlockChainResult]
- def rescanBlockChain(): Future[RescanBlockChainResult]
- def scanBlocks(request: ScanBlocksRequest): Future[ScanBlocksResult]
- 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
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def verifyChain(level: Int = 3, blocks: Int = 6): Future[Boolean]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()