TitanClient

Struct TitanClient 

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

Implementations§

Source§

impl AsyncClient

Source

pub fn new(base_url: &str) -> Self

Creates a new AsyncClient for the given base_url.

Trait Implementations§

Source§

impl Clone for AsyncClient

Source§

fn clone(&self) -> AsyncClient

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl TitanApiAsync for AsyncClient

Source§

fn get_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Status, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the node’s status (e.g., network info, block height).
Source§

fn get_tip<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<BlockTip, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the current best block tip (height + hash).
Source§

fn get_block<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 Block, ) -> Pin<Box<dyn Future<Output = Result<Block, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetches a block (by height or hash) using query::Block.
Source§

fn get_block_hash_by_height<'life0, 'async_trait>( &'life0 self, height: u64, ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Given a block height, returns the block hash.
Source§

fn get_block_txids<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 Block, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns a list of transaction IDs in a particular block.
Source§

fn get_address<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<AddressData, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetches address data (balance, transactions, etc.).
Source§

fn get_transaction<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 Txid, ) -> Pin<Box<dyn Future<Output = Result<Transaction, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns a higher-level transaction object (including Runes info) by txid.
Source§

fn get_transaction_raw<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 Txid, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns raw transaction bytes (binary).
Source§

fn get_transaction_hex<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 Txid, ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns raw transaction hex.
Source§

fn get_transaction_status<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 Txid, ) -> Pin<Box<dyn Future<Output = Result<TransactionStatus, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns the status of a transaction by txid.
Source§

fn send_transaction<'life0, 'async_trait>( &'life0 self, tx_hex: String, ) -> Pin<Box<dyn Future<Output = Result<Txid, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Broadcasts a transaction (raw hex) to the network and returns the resulting Txid.
Source§

fn get_output<'life0, 'life1, 'async_trait>( &'life0 self, outpoint: &'life1 OutPoint, ) -> Pin<Box<dyn Future<Output = Result<TxOut, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetches a specific output by outpoint (<txid>:<vout>).
Source§

fn get_inscription<'life0, 'life1, 'async_trait>( &'life0 self, inscription_id: &'life1 InscriptionId, ) -> Pin<Box<dyn Future<Output = Result<(HeaderMap, Vec<u8>), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns (HTTP Headers, Bytes) for an inscription by its inscription_id.
Source§

fn get_runes<'life0, 'async_trait>( &'life0 self, pagination: Option<Pagination>, ) -> Pin<Box<dyn Future<Output = Result<PaginationResponse<RuneResponse>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lists existing runes, supporting pagination.
Source§

fn get_rune<'life0, 'life1, 'async_trait>( &'life0 self, rune: &'life1 Rune, ) -> Pin<Box<dyn Future<Output = Result<RuneResponse, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetches data about a specific rune.
Source§

fn get_rune_transactions<'life0, 'life1, 'async_trait>( &'life0 self, rune: &'life1 Rune, pagination: Option<Pagination>, ) -> Pin<Box<dyn Future<Output = Result<PaginationResponse<Txid>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns a paginated list of Txid for all transactions involving a given rune.
Source§

fn get_mempool_txids<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Txid>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a list of all txids currently in the mempool.
Source§

fn get_mempool_entry<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 Txid, ) -> Pin<Box<dyn Future<Output = Result<MempoolEntry, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns a single mempool entry by txid.
Source§

fn get_mempool_entries<'life0, 'life1, 'async_trait>( &'life0 self, txids: &'life1 [Txid], ) -> Pin<Box<dyn Future<Output = Result<HashMap<Txid, Option<MempoolEntry>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns multiple mempool entries by their txids.
Source§

fn get_all_mempool_entries<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HashMap<Txid, MempoolEntry>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns all mempool entries.
Source§

fn get_mempool_entries_with_ancestors<'life0, 'life1, 'async_trait>( &'life0 self, txids: &'life1 [Txid], ) -> Pin<Box<dyn Future<Output = Result<HashMap<Txid, MempoolEntry>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns the specified mempool entries along with all their ancestors.
Source§

fn get_subscription<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Subscription, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetches a single subscription by id.
Source§

fn list_subscriptions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Subscription>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lists all subscriptions currently known.
Source§

fn add_subscription<'life0, 'life1, 'async_trait>( &'life0 self, subscription: &'life1 Subscription, ) -> Pin<Box<dyn Future<Output = Result<Subscription, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Adds (creates) a subscription.
Source§

fn delete_subscription<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Deletes a subscription by id.

Auto Trait Implementations§

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<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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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