pub struct DefaultTransactionDependencyProvider { /* private fields */ }Expand description
A transaction dependency provider use ckb rpc client as backend, and with LRU cache supported
Implementations§
source§impl DefaultTransactionDependencyProvider
impl DefaultTransactionDependencyProvider
sourcepub fn new(
url: &str,
cache_capacity: usize
) -> DefaultTransactionDependencyProvider
pub fn new(
url: &str,
cache_capacity: usize
) -> DefaultTransactionDependencyProvider
Arguments:
urlis the ckb http jsonrpc server url- When
cache_capacityis 0 for not using cache.
pub fn get_cell_with_data(
&self,
out_point: &OutPoint
) -> Result<(CellOutput, Bytes), TransactionDependencyError>
Trait Implementations§
source§impl Clone for DefaultTransactionDependencyProvider
impl Clone for DefaultTransactionDependencyProvider
source§fn clone(&self) -> DefaultTransactionDependencyProvider
fn clone(&self) -> DefaultTransactionDependencyProvider
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl TransactionDependencyProvider for DefaultTransactionDependencyProvider
impl TransactionDependencyProvider for DefaultTransactionDependencyProvider
source§fn get_transaction(
&self,
tx_hash: &Byte32
) -> Result<TransactionView, TransactionDependencyError>
fn get_transaction(
&self,
tx_hash: &Byte32
) -> Result<TransactionView, TransactionDependencyError>
For verify certain cell belong to certain transaction
source§fn get_cell(
&self,
out_point: &OutPoint
) -> Result<CellOutput, TransactionDependencyError>
fn get_cell(
&self,
out_point: &OutPoint
) -> Result<CellOutput, TransactionDependencyError>
For get the output information of inputs or cell_deps, those cell should be live cell
source§fn get_cell_data(
&self,
out_point: &OutPoint
) -> Result<Bytes, TransactionDependencyError>
fn get_cell_data(
&self,
out_point: &OutPoint
) -> Result<Bytes, TransactionDependencyError>
For get the output data information of inputs or cell_deps
source§fn get_header(
&self,
block_hash: &Byte32
) -> Result<HeaderView, TransactionDependencyError>
fn get_header(
&self,
block_hash: &Byte32
) -> Result<HeaderView, TransactionDependencyError>
For get the header information of header_deps