pub struct TlvSection {
pub use_site_path_overrides: Option<Vec<(u8, UseSitePath)>>,
pub fingerprints: Option<Vec<(u8, [u8; 4])>>,
pub pubkeys: Option<Vec<(u8, [u8; 65])>>,
pub origin_path_overrides: Option<Vec<(u8, OriginPath)>>,
pub unknown: Vec<(u8, Vec<u8>, usize)>,
}Expand description
Decoded TLV section. Fields are populated from per-tag readers; unknown tags are preserved verbatim per D6 forward-compat.
Fields§
§use_site_path_overrides: Option<Vec<(u8, UseSitePath)>>Per-@N use-site path overrides, if present.
fingerprints: Option<Vec<(u8, [u8; 4])>>Per-@N xpub fingerprints (4 bytes each), if present.
pubkeys: Option<Vec<(u8, [u8; 65])>>Per-@N xpub bytes (32-byte chain code || 33-byte compressed pubkey),
if present. Wallet-policy mode predicate is pubkeys.is_some() && !pubkeys.unwrap().is_empty().
origin_path_overrides: Option<Vec<(u8, OriginPath)>>Per-@N origin-path overrides for wrappers whose canonical path is
either undefined or has been overridden, if present.
unknown: Vec<(u8, Vec<u8>, usize)>Raw payload of unknown TLVs, keyed by tag, for forward-compat round-trip. Decoders preserve unknown TLVs verbatim through re-encoding.
Implementations§
Source§impl TlvSection
impl TlvSection
Sourcepub fn write(&self, w: &mut BitWriter, key_index_width: u8) -> Result<(), Error>
pub fn write(&self, w: &mut BitWriter, key_index_width: u8) -> Result<(), Error>
Encode this TLV section onto w. Entries are emitted in ascending tag order.
key_index_width is the bit-width of the per-@N placeholder index field.
§Errors
Error::EmptyTlvEntryif any ofuse_site_path_overrides,fingerprints,pubkeys, ororigin_path_overridesisSome(vec![]). Empty TLVs violate the §7.5 omission discipline and are rejected at the encoder boundary.Error::OverrideOrderViolationif any entry vector is not strictly ascending inidx.- Encoding errors from contained values (
OriginPath::write, etc.).
Trait Implementations§
Source§impl Clone for TlvSection
impl Clone for TlvSection
Source§fn clone(&self) -> TlvSection
fn clone(&self) -> TlvSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TlvSection
impl Debug for TlvSection
Source§impl PartialEq for TlvSection
impl PartialEq for TlvSection
Source§fn eq(&self, other: &TlvSection) -> bool
fn eq(&self, other: &TlvSection) -> bool
self and other values to be equal, and is used by ==.