taproot_assets_core/verify/
mod.rs1pub mod group_key_reveal;
5pub mod proof;
7pub mod taproot_proof;
9pub mod tx;
11
12pub type Result<T> = core::result::Result<T, Error>;
14
15#[derive(Debug, Clone, Copy, PartialEq, Eq)]
17pub enum Error {
18 GroupKeyReveal(group_key_reveal::Error),
20 Proof(proof::Error),
22 TaprootProof(taproot_proof::Error),
24 Tx(tx::Error),
26}
27
28impl From<group_key_reveal::Error> for Error {
29 fn from(err: group_key_reveal::Error) -> Self {
31 Self::GroupKeyReveal(err)
32 }
33}
34
35impl From<proof::Error> for Error {
36 fn from(err: proof::Error) -> Self {
38 Self::Proof(err)
39 }
40}
41
42impl From<taproot_proof::Error> for Error {
43 fn from(err: taproot_proof::Error) -> Self {
45 Self::TaprootProof(err)
46 }
47}
48
49impl From<tx::Error> for Error {
50 fn from(err: tx::Error) -> Self {
52 Self::Tx(err)
53 }
54}
55
56impl core::fmt::Display for Error {
57 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
59 match self {
60 Error::GroupKeyReveal(err) => core::fmt::Display::fmt(err, f),
61 Error::Proof(err) => core::fmt::Display::fmt(err, f),
62 Error::TaprootProof(err) => core::fmt::Display::fmt(err, f),
63 Error::Tx(err) => core::fmt::Display::fmt(err, f),
64 }
65 }
66}