Module bitcoin_explorer::api[][src]

Expand description

Crates APIs, essential structs, functions, methods are all here!

To quickly understand how to use this crate, have a look at the documentation for bitcoin_explorer::api::BitcoinDB!!.

Example

use bitcoin_explorer::api::BitcoinDB;
use std::path::Path;

let path = Path::new("/Users/me/bitcoin").unwrap();

// launch without reading txindex
let db = BitcoinDB::new(path, false).unwrap();

// launch attempting to read txindex
let db = BitcoinDB::new(path, true).unwrap();

Re-exports

pub use crate::api::connected::ConnectedBlockIteratorFull;
pub use crate::api::connected::ConnectedBlockIteratorSimple;
pub use crate::parser::block_index::BlockIndex;
pub use crate::parser::block_index::BlockIndexRecord;
pub use crate::parser::proto::connected_proto::TxConnectable;
pub use crate::parser::proto::connected_proto::FConnectedBlock;
pub use crate::parser::proto::connected_proto::FConnectedTransaction;
pub use crate::parser::proto::connected_proto::SConnectedBlock;
pub use crate::parser::proto::connected_proto::SConnectedTransaction;
pub use crate::parser::proto::full_proto::FBlock;
pub use crate::parser::proto::full_proto::FBlockHeader;
pub use crate::parser::proto::full_proto::FTransaction;
pub use crate::parser::proto::full_proto::FTxOut;
pub use crate::parser::proto::simple_proto::SBlock;
pub use crate::parser::proto::simple_proto::SBlockHeader;
pub use crate::parser::proto::simple_proto::STransaction;
pub use crate::parser::proto::simple_proto::STxOut;

Modules

implementation of methods that retrieve block info with outpoints connected

Structs

A Bitcoin address

This is the main struct of this crate!! Click and read the doc.

A Bitcoin block, which is a collection of transactions with an attached proof of work.

A bitcoin block hash.

A block header, which contains all the block’s information except the actual transactions

iterate through blocks according to array index.

iterate through blocks, and connecting outpoints.

A Bitcoin script

A Bitcoin transaction, which describes an authenticated movement of coins.

A bitcoin transaction hash/transaction ID.

Enums

The cryptocurrency to act on

Traits

Trait for objects that can be deserialized from hex strings

Trait for objects that can be serialized as hex strings

Functions

Extract addresses from a script public key.