pub struct Blockchain { /* private fields */ }Implementations§
Source§impl Blockchain
impl Blockchain
Sourcepub fn new(blocklog_loc: &Path, index_loc: &Path) -> Self
pub fn new(blocklog_loc: &Path, index_loc: &Path) -> Self
Creates a new Blockchain with an associated indexer and block log based on the
provided paths.
pub fn is_empty(&self) -> bool
pub fn indexer(&self) -> Arc<Indexer>
pub fn index_status(&self) -> IndexStatus
pub fn reindex(&self, opts: ReindexOpts)
pub fn get_properties(&self) -> Properties
pub fn get_owner(&self) -> TxVariant
pub fn get_chain_height(&self) -> u64
pub fn get_chain_head(&self) -> Arc<Block>
pub fn get_block(&self, height: u64) -> Option<Arc<Block>>
pub fn get_filtered_block( &self, height: u64, filter: &BlockFilter, ) -> Option<FilteredBlock>
pub fn get_address_info( &self, addr: &ScriptHash, additional_txs: &[TxVariant], ) -> Option<AddressInfo>
pub fn get_address_fee( &self, addr: &ScriptHash, additional_txs: &[TxVariant], ) -> Option<Asset>
pub fn get_network_fee(&self) -> Option<Asset>
pub fn get_balance( &self, addr: &ScriptHash, additional_txs: &[TxVariant], ) -> Option<Asset>
pub fn insert_block(&self, block: Block) -> Result<(), BlockErr>
pub fn verify_tx( &self, data: &TxPrecompData<'_>, additional_txs: &[TxVariant], skip_flags: SkipFlags, ) -> Result<(), TxErr>
pub fn create_genesis_block(&self, minter_key: KeyPair) -> GenesisBlockInfo
Auto Trait Implementations§
impl !Freeze for Blockchain
impl !RefUnwindSafe for Blockchain
impl Send for Blockchain
impl Sync for Blockchain
impl Unpin for Blockchain
impl UnwindSafe for Blockchain
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more