global: big snapshot

This commit is contained in:
nym21
2026-03-13 12:47:01 +01:00
parent c83955eea7
commit 2b31c7f6b7
158 changed files with 4961 additions and 6939 deletions

View File

@@ -61,6 +61,19 @@ impl<T> ByAddressType<T> {
})
}
pub fn map_with_name<U>(&self, f: impl Fn(&'static str, &T) -> U) -> ByAddressType<U> {
ByAddressType {
p2pk65: f(P2PK65, &self.p2pk65),
p2pk33: f(P2PK33, &self.p2pk33),
p2pkh: f(P2PKH, &self.p2pkh),
p2sh: f(P2SH, &self.p2sh),
p2wpkh: f(P2WPKH, &self.p2wpkh),
p2wsh: f(P2WSH, &self.p2wsh),
p2tr: f(P2TR, &self.p2tr),
p2a: f(P2A, &self.p2a),
}
}
pub fn new_with_index<F>(f: F) -> Result<Self>
where
F: Fn(usize) -> Result<T>,