pub struct Address {
pub value: &'static str,
pub chain: Chain,
pub kind: &'static str,
pub hash160: Option<&'static str>,
pub witness_program: Option<&'static str>,
pub redeem_script: Option<RedeemScript>,
}Expand description
Crypto address with chain-specific type information.
Fields§
§value: &'static strThe address string (e.g., “1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH”)
chain: ChainBlockchain network
kind: &'static strAddress type/kind (e.g., “p2pkh”, “p2sh”, “p2wpkh”, “p2wsh”, “p2tr”, “standard”)
hash160: Option<&'static str>HASH160 of the public key or script (P2PKH, P2SH, P2WPKH)
witness_program: Option<&'static str>Witness program for SegWit/Taproot addresses (P2WSH: 32-byte SHA256, P2TR: 32-byte x-only pubkey)
redeem_script: Option<RedeemScript>P2SH redeem script (only for p2sh addresses)
Trait Implementations§
impl Copy for Address
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
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