pub struct BitcoinParser { /* private fields */ }Expand description
Bitcoin transaction parser.
Parses raw Bitcoin transactions into the common ParsedTx format
for policy evaluation.
§Network Configuration
The parser must be configured with the appropriate Bitcoin network to correctly decode addresses:
BitcoinParser::mainnet()- Bitcoin MainnetBitcoinParser::testnet()- Bitcoin TestnetBitcoinParser::signet()- Bitcoin SignetBitcoinParser::regtest()- Bitcoin Regtest
§Thread Safety
BitcoinParser is Send + Sync and can be safely shared across threads.
Implementations§
Source§impl BitcoinParser
impl BitcoinParser
Trait Implementations§
Source§impl Chain for BitcoinParser
impl Chain for BitcoinParser
Source§fn id(&self) -> &'static str
fn id(&self) -> &'static str
Returns the chain identifier (e.g., “ethereum”, “bitcoin”, “solana”). Read more
Source§fn supports_version(&self, version: u8) -> bool
fn supports_version(&self, version: u8) -> bool
Check if this parser supports a specific transaction version/type. Read more
Source§fn assemble_signed(
&self,
raw: &[u8],
signature: &[u8],
) -> Result<Vec<u8>, ParseError>
fn assemble_signed( &self, raw: &[u8], signature: &[u8], ) -> Result<Vec<u8>, ParseError>
Assemble a signed transaction from raw bytes and a signature. Read more
Source§impl Clone for BitcoinParser
impl Clone for BitcoinParser
Source§fn clone(&self) -> BitcoinParser
fn clone(&self) -> BitcoinParser
Returns a duplicate 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 Debug for BitcoinParser
impl Debug for BitcoinParser
Source§impl Default for BitcoinParser
impl Default for BitcoinParser
impl Copy for BitcoinParser
Auto Trait Implementations§
impl Freeze for BitcoinParser
impl RefUnwindSafe for BitcoinParser
impl Send for BitcoinParser
impl Sync for BitcoinParser
impl Unpin for BitcoinParser
impl UnwindSafe for BitcoinParser
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more