Struct bitcoin::util::address::Address
[−]
[src]
pub struct Address { pub ty: Type, pub network: Network, pub hash: Hash160, }
A Bitcoin address
Fields
ty: Type
The type of the address
network: Network
The network on which this address is usable
hash: Hash160
The pubkeyhash that this address encodes
Methods
impl Address
[src]
fn from_key(network: Network, pk: &PublicKey, compressed: bool) -> Address
Creates an address from a public key
fn from_script(network: Network, script: &Script) -> Address
Creates a P2SH address from a script
fn script_pubkey(&self) -> Script
Generates a script pubkey spending to this address
Trait Implementations
impl Eq for Address
[src]
impl PartialEq for Address
[src]
fn eq(&self, __arg_0: &Address) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Address) -> bool
This method tests for !=
.
impl Clone for Address
[src]
fn clone(&self) -> Address
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl ToBase58 for Address
[src]
fn base58_layout(&self) -> Vec<u8>
The serialization to be converted into base58
fn to_base58(&self) -> String
Obtain a string with the base58 encoding of the object
fn to_base58check(&self) -> String
Obtain a string with the base58check encoding of the object (Tack the first 4 256-digits of the object's Bitcoin hash onto the end.) Read more
impl FromBase58 for Address
[src]
fn from_base58_layout(data: Vec<u8>) -> Result<Address, Error>
Constructs an object from the byte-encoding (base 256) representation of its base58 format Read more
fn from_base58(data: &str) -> Result<Self, Error>
Obtain an object from its base58 encoding
fn from_base58check(data: &str) -> Result<Self, Error>
Obtain an object from its base58check encoding