spark_rust/common_types/
mod.rs

1//! This is the internal common_types to keep the types and functions consistent across the SDK. It is not meant to be used by the end user.
2
3pub(crate) mod types {
4    // bitcoin
5    pub use bitcoin::absolute::LockTime as AbsoluteLockTime;
6    pub use bitcoin::consensus::Encodable;
7    pub use bitcoin::key::Secp256k1;
8    pub use bitcoin::secp256k1::Message as Secp256k1Message;
9    pub use bitcoin::secp256k1::PublicKey;
10    pub use bitcoin::secp256k1::SecretKey;
11    pub use bitcoin::transaction::Version as TransactionVersion;
12    pub use bitcoin::Address;
13    pub use bitcoin::OutPoint;
14    pub use bitcoin::ScriptBuf;
15    pub use bitcoin::Transaction;
16    pub use bitcoin::TxIn;
17    pub use bitcoin::TxOut;
18    pub use bitcoin::Txid;
19    pub use bitcoin::Witness;
20
21    #[cfg(test)]
22    pub use sha2::Digest;
23    #[cfg(test)]
24    pub use sha2::Sha256;
25
26    // rng
27    pub use rand::rngs::OsRng as SparkRange;
28
29    // encoding/decoding
30    pub use hex::decode as hex_decode;
31    pub use hex::encode as hex_encode;
32
33    // misc
34    pub use hashbrown::HashMap as HashbrownMap;
35    pub use parking_lot::RwLock;
36    pub use uuid::Uuid;
37
38    // frost
39    pub(crate) mod frost {
40        pub use frost_core_unofficial::round1::Nonce as FrostNonce;
41        pub use frost_secp256k1_tr_unofficial::round1::NonceCommitment as FrostNonceCommitment;
42        pub use frost_secp256k1_tr_unofficial::round1::SigningCommitments as FrostSigningCommitments;
43        pub use frost_secp256k1_tr_unofficial::round1::SigningNonces as FrostSigningNonces;
44    }
45
46    pub(crate) mod certificates {
47        include!(concat!(env!("OUT_DIR"), "/certificates.rs"));
48    }
49}