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