Index

Struct Index 

Source
pub struct Index { /* private fields */ }

Implementations§

Source§

impl Index

Source

pub fn open(settings: &Settings) -> Result<Self, Error>

Source

pub fn open_with_event_sender( settings: &Settings, event_sender: Option<Sender<Event>>, ) -> Result<Self, Error>

Source

pub fn have_full_utxo_index(&self) -> bool

Source

pub fn is_special_outpoint(outpoint: OutPoint) -> bool

Unlike normal outpoints, which are added to index on creation and removed when spent, the UTXO entry for special outpoints may be updated.

The special outpoints are the null outpoint, which receives lost sats, and the unbound outpoint, which receives unbound inscriptions.

Source

pub fn contains_output(&self, output: &OutPoint) -> Result<bool, Error>

Source

pub fn has_address_index(&self) -> bool

Source

pub fn has_inscription_index(&self) -> bool

Source

pub fn has_rune_index(&self) -> bool

Source

pub fn has_sat_index(&self) -> bool

Source

pub fn status(&self, json_api: bool) -> Result<StatusHtml, Error>

Source

pub fn info(&self) -> Result<Info, Error>

Source

pub fn update(&self) -> Result<(), Error>

Source

pub fn export( &self, filename: &String, include_addresses: bool, ) -> Result<(), Error>

Source

pub fn block_count(&self) -> Result<u32, Error>

Source

pub fn block_height(&self) -> Result<Option<Height>, Error>

Source

pub fn block_hash( &self, height: Option<u32>, ) -> Result<Option<BlockHash>, Error>

Source

pub fn blocks(&self, take: usize) -> Result<Vec<(u32, BlockHash)>, Error>

Source

pub fn rare_sat_satpoints(&self) -> Result<Vec<(Sat, SatPoint)>, Error>

Source

pub fn rare_sat_satpoint(&self, sat: Sat) -> Result<Option<SatPoint>, Error>

Source

pub fn get_rune_by_id(&self, id: RuneId) -> Result<Option<Rune>, Error>

Source

pub fn get_rune_by_number(&self, number: usize) -> Result<Option<Rune>, Error>

Source

pub fn rune( &self, rune: Rune, ) -> Result<Option<(RuneId, RuneEntry, Option<InscriptionId>)>, Error>

Source

pub fn runes(&self) -> Result<Vec<(RuneId, RuneEntry)>, Error>

Source

pub fn runes_paginated( &self, page_size: usize, page_index: usize, ) -> Result<(Vec<(RuneId, RuneEntry)>, bool), Error>

Source

pub fn encode_rune_balance(id: RuneId, balance: u128, buffer: &mut Vec<u8>)

Source

pub fn decode_rune_balance( buffer: &[u8], ) -> Result<((RuneId, u128), usize), Error>

Source

pub fn get_rune_balances_for_output( &self, outpoint: OutPoint, ) -> Result<Option<BTreeMap<SpacedRune, Pile>>, Error>

Source

pub fn get_rune_balance_map( &self, ) -> Result<BTreeMap<SpacedRune, BTreeMap<OutPoint, Pile>>, Error>

Source

pub fn get_rune_balances( &self, ) -> Result<Vec<(OutPoint, Vec<(RuneId, u128)>)>, Error>

Source

pub fn block_header(&self, hash: BlockHash) -> Result<Option<Header>, Error>

Source

pub fn block_header_info( &self, hash: BlockHash, ) -> Result<Option<GetBlockHeaderResult>, Error>

Source

pub fn block_stats( &self, height: u64, ) -> Result<Option<GetBlockStatsResult>, Error>

Source

pub fn get_block_by_height(&self, height: u32) -> Result<Option<Block>, Error>

Source

pub fn get_block_by_hash(&self, hash: BlockHash) -> Result<Option<Block>, Error>

Source

pub fn get_collections_paginated( &self, page_size: usize, page_index: usize, ) -> Result<(Vec<InscriptionId>, bool), Error>

Source

pub fn get_children_by_sequence_number_paginated( &self, sequence_number: u32, page_size: usize, page_index: usize, ) -> Result<(Vec<InscriptionId>, bool), Error>

Source

pub fn get_parents_by_sequence_number_paginated( &self, parent_sequence_numbers: Vec<u32>, page_size: usize, page_index: usize, ) -> Result<(Vec<InscriptionId>, bool), Error>

Source

pub fn get_etching(&self, txid: Txid) -> Result<Option<SpacedRune>, Error>

Source

pub fn get_inscription_ids_by_sat( &self, sat: Sat, ) -> Result<Vec<InscriptionId>, Error>

Source

pub fn get_inscription_ids_by_sat_paginated( &self, sat: Sat, page_size: u64, page_index: u64, ) -> Result<(Vec<InscriptionId>, bool), Error>

Source

pub fn get_inscription_id_by_sat_indexed( &self, sat: Sat, inscription_index: isize, ) -> Result<Option<InscriptionId>, Error>

Source

pub fn get_inscription_satpoint_by_id( &self, inscription_id: InscriptionId, ) -> Result<Option<SatPoint>, Error>

Source

pub fn get_inscription_by_id( &self, inscription_id: InscriptionId, ) -> Result<Option<Inscription>, Error>

Source

pub fn inscription_count(&self, txid: Txid) -> Result<u32, Error>

Source

pub fn inscription_exists( &self, inscription_id: InscriptionId, ) -> Result<bool, Error>

Source

pub fn get_inscriptions_on_output_with_satpoints( &self, outpoint: OutPoint, ) -> Result<Option<Vec<(SatPoint, InscriptionId)>>, Error>

Source

pub fn get_inscriptions_for_output( &self, outpoint: OutPoint, ) -> Result<Option<Vec<InscriptionId>>, Error>

Source

pub fn get_inscriptions_for_outputs( &self, outpoints: &Vec<OutPoint>, ) -> Result<Option<Vec<InscriptionId>>, Error>

Source

pub fn get_unspent_or_unconfirmed_output( &self, txid: &Txid, vout: u32, ) -> Result<Option<GetTxOutResult>, Error>

Source

pub fn get_transaction_info( &self, txid: &Txid, ) -> Result<Option<GetRawTransactionResult>, Error>

Source

pub fn get_transaction(&self, txid: Txid) -> Result<Option<Transaction>, Error>

Source

pub fn get_transaction_hex_recursive( &self, txid: Txid, ) -> Result<Option<String>, Error>

Source

pub fn find(&self, sat: Sat) -> Result<Option<SatPoint>, Error>

Source

pub fn find_range( &self, range_start: Sat, range_end: Sat, ) -> Result<Option<Vec<FindRangeOutput>>, Error>

Source

pub fn list(&self, outpoint: OutPoint) -> Result<Option<Vec<(u64, u64)>>, Error>

Source

pub fn is_output_spent(&self, outpoint: OutPoint) -> Result<bool, Error>

Source

pub fn is_output_in_active_chain( &self, outpoint: OutPoint, ) -> Result<bool, Error>

Source

pub fn block_time(&self, height: Height) -> Result<Blocktime, Error>

Source

pub fn get_inscriptions_paginated( &self, page_size: u32, page_index: u32, ) -> Result<(Vec<InscriptionId>, bool), Error>

Source

pub fn get_inscriptions_in_block( &self, block_height: u32, ) -> Result<Vec<InscriptionId>, Error>

Source

pub fn get_runes_in_block( &self, block_height: u64, ) -> Result<Vec<SpacedRune>, Error>

Source

pub fn get_highest_paying_inscriptions_in_block( &self, block_height: u32, n: usize, ) -> Result<(Vec<InscriptionId>, usize), Error>

Source

pub fn get_home_inscriptions(&self) -> Result<Vec<InscriptionId>, Error>

Source

pub fn get_feed_inscriptions( &self, n: usize, ) -> Result<Vec<(u32, InscriptionId)>, Error>

Source

pub fn get_inscription_entry( &self, inscription_id: InscriptionId, ) -> Result<Option<InscriptionEntry>, Error>

Source

pub fn get_address_info( &self, address: &Address, ) -> Result<Vec<OutPoint>, Error>

Auto Trait Implementations§

§

impl !Freeze for Index

§

impl !RefUnwindSafe for Index

§

impl Send for Index

§

impl Sync for Index

§

impl Unpin for Index

§

impl !UnwindSafe for Index

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more