(
source_network: Network,
destination_network: DestinationNetwork,
path_prefix: Option<&str>,
)
| 32 | |
| 33 | impl QueryCommand { |
| 34 | pub async fn new( |
| 35 | source_network: Network, |
| 36 | destination_network: DestinationNetwork, |
| 37 | path_prefix: Option<&str>, |
| 38 | ) -> Self { |
| 39 | let (_, verifier_0_public_key) = |
| 40 | generate_keys_from_secret(source_network, VERIFIER_0_SECRET); |
| 41 | |
| 42 | let n_of_n_public_keys: Vec<PublicKey> = vec![verifier_0_public_key]; |
| 43 | |
| 44 | let bitvm_client = BitVMClient::new( |
| 45 | Some(get_esplora_url(source_network)), |
| 46 | source_network, |
| 47 | destination_network, |
| 48 | Some(get_chain_adaptor(DestinationNetwork::Local, None, None)), // TODO: Update this according to the requirements for query command. |
| 49 | &n_of_n_public_keys, |
| 50 | Some(FAKE_SECRET), |
| 51 | Some(FAKE_SECRET), |
| 52 | Some(VERIFIER_0_SECRET), |
| 53 | Some(FAKE_SECRET), |
| 54 | path_prefix.or(Some(QUERY_COMMAND_PATH_PREFIX)), |
| 55 | None, |
| 56 | ) |
| 57 | .await; |
| 58 | |
| 59 | Self { |
| 60 | client: bitvm_client, |
| 61 | network: source_network, |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | async fn sync(&mut self) { |
| 66 | self.client.sync().await; |
nothing calls this directly
no test coverage detected