pub struct AddressContent {
pub address_id: AddressId,
pub addr_attributes: AddrAttributes,
pub addr_type: ByronAddrType,
}
Fields§
§address_id: AddressId
§addr_attributes: AddrAttributes
§addr_type: ByronAddrType
Implementations§
Source§impl AddressContent
impl AddressContent
pub fn hash_and_create( addr_type: ByronAddrType, spending_data: &SpendingData, attributes: AddrAttributes, ) -> AddressContent
pub fn new_redeem( pubkey: PublicKey, protocol_magic: Option<ProtocolMagic>, ) -> Self
pub fn new_simple( xpub: Bip32PublicKey, protocol_magic: Option<ProtocolMagic>, ) -> Self
Sourcepub fn to_address(&self) -> ByronAddress
pub fn to_address(&self) -> ByronAddress
Do we want to remove this or keep it for people who were using old Byron code?
Sourcepub fn byron_protocol_magic(&self) -> ProtocolMagic
pub fn byron_protocol_magic(&self) -> ProtocolMagic
returns the byron protocol magic embedded in the address, or mainnet id if none is present note: for bech32 addresses, you need to use network_id instead
pub fn network_id(&self) -> Result<u8, ByronAddressError>
pub fn icarus_from_key( key: Bip32PublicKey, protocol_magic: ProtocolMagic, ) -> AddressContent
Sourcepub fn identical_with_pubkey(&self, xpub: Bip32PublicKey) -> bool
pub fn identical_with_pubkey(&self, xpub: Bip32PublicKey) -> bool
Check if the Addr can be reconstructed with a specific xpub
Source§impl AddressContent
impl AddressContent
pub fn new( address_id: AddressId, addr_attributes: AddrAttributes, addr_type: ByronAddrType, ) -> Self
Trait Implementations§
Source§impl Clone for AddressContent
impl Clone for AddressContent
Source§fn clone(&self) -> AddressContent
fn clone(&self) -> AddressContent
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 AddressContent
impl Debug for AddressContent
Source§impl<'de> Deserialize<'de> for AddressContent
impl<'de> Deserialize<'de> for AddressContent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Deserialize for AddressContent
impl Deserialize for AddressContent
fn deserialize<R: BufRead + Seek>( raw: &mut Deserializer<R>, ) -> Result<Self, DeserializeError>
Source§fn from_cbor_bytes(data: &[u8]) -> Result<Self, DeserializeError>where
Self: Sized,
fn from_cbor_bytes(data: &[u8]) -> Result<Self, DeserializeError>where
Self: Sized,
from-bytes using the exact CBOR format specified in the CDDL binary spec.
For hashes/addresses/etc this will include the CBOR bytes type/len/etc.
Source§impl From<AddressContent> for ByronAddress
impl From<AddressContent> for ByronAddress
Source§fn from(content: AddressContent) -> Self
fn from(content: AddressContent) -> Self
Converts to this type from the input type.
Source§impl Hash for AddressContent
impl Hash for AddressContent
Source§impl JsonSchema for AddressContent
impl JsonSchema for AddressContent
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl Ord for AddressContent
impl Ord for AddressContent
Source§fn cmp(&self, other: &AddressContent) -> Ordering
fn cmp(&self, other: &AddressContent) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AddressContent
impl PartialEq for AddressContent
Source§impl PartialOrd for AddressContent
impl PartialOrd for AddressContent
Source§impl Serialize for AddressContent
impl Serialize for AddressContent
fn serialize<'se, W: Write>( &self, serializer: &'se mut Serializer<W>, ) -> Result<&'se mut Serializer<W>>
Source§impl Serialize for AddressContent
impl Serialize for AddressContent
Source§impl TryFrom<BootstrapWitness> for AddressContent
impl TryFrom<BootstrapWitness> for AddressContent
Source§type Error = CryptoError
type Error = CryptoError
The type returned in the event of a conversion error.
impl Eq for AddressContent
impl StructuralPartialEq for AddressContent
Auto Trait Implementations§
impl Freeze for AddressContent
impl RefUnwindSafe for AddressContent
impl Send for AddressContent
impl Sync for AddressContent
impl Unpin for AddressContent
impl UnwindSafe for AddressContent
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> FromBytes for Twhere
T: Deserialize,
impl<T> FromBytes for Twhere
T: Deserialize,
fn from_bytes(data: Vec<u8>) -> Result<T, DeserializeError>
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