diff --git a/src/communication.rs b/src/communication.rs index 3f12841..5960970 100644 --- a/src/communication.rs +++ b/src/communication.rs @@ -1,4 +1,3 @@ -// communication.rs use futures_util::{SinkExt, StreamExt}; use serde::{Deserialize, Serialize}; use std::error::Error; diff --git a/src/prover.rs b/src/prover.rs index 5e49f14..f11d73c 100644 --- a/src/prover.rs +++ b/src/prover.rs @@ -12,18 +12,18 @@ use bitcoin::{secp256k1::Secp256k1, Amount, Transaction, XOnlyPublicKey}; use bitcoin::{OutPoint, ScriptBuf, TapLeafHash, TxIn, TxOut, Witness}; use bitcoincore_rpc::{Auth, Client, RpcApi}; -use toy_bitvm::transactions::{ - generate_2_of_2_script, generate_equivoation_address_and_info, generate_gate_response_script, - generate_response_second_address_and_info, watch_transaction, -}; - -use toy_bitvm::circuit::wire::{HashTuple, HashValue, PreimageValue}; -use toy_bitvm::utils::number_to_bool_array; use toy_bitvm::{ actor::Actor, + circuit::wire::{HashTuple, HashValue, PreimageValue}, circuit::Circuit, communication::{receive_message, send_message}, + transactions::{ + generate_2_of_2_script, generate_equivoation_address_and_info, + generate_gate_response_script, generate_response_second_address_and_info, + watch_transaction, + }, transactions::{generate_challenge_address_and_info, generate_response_address_and_info}, + utils::number_to_bool_array, }; use tokio_tungstenite::connect_async; diff --git a/src/verifier.rs b/src/verifier.rs index e67f1b7..82e0c3a 100644 --- a/src/verifier.rs +++ b/src/verifier.rs @@ -10,21 +10,20 @@ use bitcoin::taproot::LeafVersion; use bitcoin::{secp256k1::Secp256k1, Transaction, Txid, XOnlyPublicKey}; use bitcoin::{Amount, OutPoint, ScriptBuf, TapLeafHash, TxIn, TxOut, Witness}; use bitcoincore_rpc::{Auth, Client, RpcApi}; -use toy_bitvm::circuit::wire::{HashTuple, HashValue, PreimageValue, Wire}; -use toy_bitvm::transactions::{ - generate_2_of_2_script, generate_anti_contradiction_script, generate_challenge_script, - generate_equivoation_address_and_info, generate_response_second_address_and_info, - watch_transaction, -}; -use toy_bitvm::utils::take_stdin; -// verifier.rs use tokio::net::{TcpListener, TcpStream}; use tokio_tungstenite::accept_async; use toy_bitvm::{ actor::Actor, + circuit::wire::{HashTuple, HashValue, PreimageValue, Wire}, circuit::Circuit, communication::{receive_message, send_message}, - transactions::{generate_challenge_address_and_info, generate_response_address_and_info}, + transactions::{ + generate_2_of_2_script, generate_anti_contradiction_script, + generate_challenge_address_and_info, generate_challenge_script, + generate_equivoation_address_and_info, generate_response_address_and_info, + generate_response_second_address_and_info, watch_transaction, + }, + utils::take_stdin, }; #[tokio::main]