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::ecdsa::Signature as EcdsaSignature;
9    pub use bitcoin::secp256k1::Message as Secp256k1Message;
10    pub use bitcoin::secp256k1::PublicKey;
11    pub use bitcoin::secp256k1::SecretKey;
12    pub use bitcoin::transaction::Version as TransactionVersion;
13    pub use bitcoin::Address;
14    pub use bitcoin::OutPoint;
15    pub use bitcoin::ScriptBuf;
16    pub use bitcoin::Transaction;
17    pub use bitcoin::TxIn;
18    pub use bitcoin::TxOut;
19    pub use bitcoin::Txid;
20    pub use bitcoin::Witness;
21
22    // crypto
23    pub use k256::U256;
24
25    #[cfg(test)]
26    pub use sha2::Digest;
27    #[cfg(test)]
28    pub use sha2::Sha256;
29
30    // rng
31    pub use rand::rngs::OsRng as SparkRange;
32
33    // encoding/decoding
34    pub use hex::decode as hex_decode;
35    pub use hex::encode as hex_encode;
36
37    // misc
38    pub use hashbrown::HashMap as HashbrownMap;
39    pub use parking_lot::RwLock;
40    pub use uuid::Uuid;
41
42    // frost
43    pub(crate) mod frost {
44        pub use frost_core_unofficial::round1::Nonce as FrostNonce;
45        pub use frost_secp256k1_tr_unofficial::round1::NonceCommitment as FrostNonceCommitment;
46        pub use frost_secp256k1_tr_unofficial::round1::SigningCommitments as FrostSigningCommitments;
47        pub use frost_secp256k1_tr_unofficial::round1::SigningNonces as FrostSigningNonces;
48    }
49
50    pub(crate) mod certificates {
51        include!(concat!(env!("OUT_DIR"), "/certificates.rs"));
52    }
53}