pub struct Address {
pub hash160: Hash160,
pub kind: KeyAddressKind,
}Expand description
A Bitcoin Address is a destination for a Bitcoin payment, using the P2PKH script template.
The address is the 160-bit hash of the public key, encoded in base58check format, with a single byte prefix depending on the blockchain.
Fields§
§hash160: Hash160§kind: KeyAddressKindImplementations§
Source§impl Address
impl Address
Sourcepub fn from_pv_chain(pv: &PrivateKey, blockchain: BlockchainId) -> Address
pub fn from_pv_chain(pv: &PrivateKey, blockchain: BlockchainId) -> Address
Get the address from a PrivateKey for a particular BlockchainId.
Sourcepub fn from_pv(pv: &PrivateKey, kind: KeyAddressKind) -> Address
pub fn from_pv(pv: &PrivateKey, kind: KeyAddressKind) -> Address
Get the address from a PrivateKey and KeyAddressKind.
Sourcepub fn from_pubkey(pubkey: &PublicKey, kind: KeyAddressKind) -> Address
pub fn from_pubkey(pubkey: &PublicKey, kind: KeyAddressKind) -> Address
Get the address from a PublicKey and KeyAddressKind.
Trait Implementations§
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