dlc-manager 0.4.0

Creation and handling of Discrete Log Contracts (DLC).
Documentation
// use std::collections::HashMap;
// use std::rc::Rc;

// use mocks::mock_oracle_provider::MockOracle;
// use mocks::mock_time::MockTime;
// use mocks::{
//     memory_storage_provider::MemoryStorage, mock_blockchain::MockBlockchain,
//     mock_wallet::MockWallet,
// };

// use mocks::dlc_manager::manager::Manager;
// use secp256k1_zkp::rand::rngs::mock::StepRng;
// use secp256k1_zkp::{KeyPair, SecretKey, XOnlyPublicKey};

// #[test]
// fn contract_create_settle_does_not_panic() {
//     let blockchain = Rc::new(MockBlockchain::new());
//     let alice_store = Rc::new(MemoryStorage::new());
//     let alice_wallet = MockWallet::new(&blockchain, 100);

//     let oracle_list = (0..5).map(|_| MockOracle::new()).collect::<Vec<_>>();
//     let oracles: HashMap<bitcoin::XOnlyPublicKey, _> = oracle_list
//         .iter()
//         .map(|x| (x.get_public_key(), x))
//         .collect();
//     let time = MockTime {};

//     mocks::mock_time::set_time(0);

//     let alice_manager = Manager::new(
//         &alice_wallet,
//         blockchain.clone(),
//         alice_store.clone(),
//         oracles,
//         time,
//         fee_estimator,
//     );
// }

// pub fn get_x_only_public_key() -> secp256k1_zkp::XOnlyPublicKey {
//     let mut rng = StepRng::new(1, 1);
//     let sk = SecretKey::new(&mut rng);
//     let kp = KeyP
//     XOnlyPublicKey::from_keypair(keypair)
// }