Crate bitcoin

source ·

Re-exports

  • pub use light::BitcoinLight;
  • pub use bitcoincore_rpc::bitcoin as bitcoin_primitives;
  • pub use bitcoincore_rpc::bitcoin::hashes;
  • pub use bitcoincore_rpc::bitcoin::secp256k1;
  • pub use bitcoincore_rpc::json;
  • pub use bitcoincore_rpc::jsonrpc;

Modules

  • Bitcoin addresses.
  • Bitcoin consensus.
  • Bitcoin keys.
  • Enables wildcard imports to bring into scope all opcodes and nothing else.
  • Partially Signed Bitcoin Transactions.
  • SHA256 implementation.
  • Utility functions.

Structs

Enums

Constants

  • the bitcoin core version. See https://github.com/bitcoin/bitcoin/blob/833add0f48b0fad84d7b8cf9373a349e7aef20b4/src/rpc/net.cpp#L627 and https://github.com/bitcoin/bitcoin/blob/833add0f48b0fad84d7b8cf9373a349e7aef20b4/src/clientversion.h#L33-L37
  • Average time to mine a Bitcoin block.
  • The size (in bytes) of a serialized public key.
  • timeout on the jsonrpc transport. jsonrpc default is 15 seconds.

Traits

  • Trait for objects that can be deserialized from hex strings.
  • Trait which applies to hashes of all types.
  • Extension trait for transaction, adding methods to help to match the Transaction to Replace/Redeem requests

Functions

  • Deserializes an object from a vector, will error if said deserialization doesn’t consume the entire vector.
  • Stream over transactions, starting with this in the mempool and continuing with transactions from previous in-chain block. The stream ends after the block at stop_height has been returned.
  • Encodes an object into a vector.
  • Stream blocks continuously from_height awaiting the production of new blocks as reported by Bitcoin core. The stream never ends.
  • Stream all transactions in blocks produced by Bitcoin Core.