Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
chore: lints, fmt, fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
steph-rs committed Jul 22, 2024
1 parent b7ab0f1 commit 721bb3a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fork Code Conventions !!IMPORTANT!!
# Fork Code Conventions !!IMPORTANT

The original repository of this fork is still in Alpha, so many breaking changes are expected. With that in mind, we've
developed a strategy to minimize synchronization conflicts as much as possible, employing the following heuristics:
Expand Down
24 changes: 12 additions & 12 deletions core/lib/via_btc_client/dev.md → core/lib/via_btc_client/DEV.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
this library contains multiple modules that provide different functionalities for the sequencer/verifier node.
This library contains multiple modules that provide different functionalities for the sequencer/verifier node.

## Modules

Expand All @@ -10,7 +10,7 @@ this library contains multiple modules that provide different functionalities fo
4. **transaction_builder**: provides tools for creating unsigned transaction for withdrawal (UTXO selection).
5. **signer**: provides tools for signing transactions.

## responsibilities of shared files
## Responsibilities of shared files

- **traits.rs**:
- contains traits.
Expand Down Expand Up @@ -41,31 +41,31 @@ this library contains multiple modules that provide different functionalities fo

## Usage

check [readme.md](./readme.md) for usage examples.
Check [README.md](./README.md) for usage examples.

## Testing

unit tests should be implemented for each module in their own file.
Unit tests should be implemented for each module in their own file.

for checking the integration and seeing the result of the whole system, we can use the `tests` directory. this directory
For checking the integration and seeing the result of the whole system, we can use the `tests` directory. This directory
is binary and we can import the library and use it in the main function to see the result of the functions.

for running the example, use the following command:
For running the example, use the following command:

`cargo run --bin via_btc_test`

## Development

before starting implementation of every module, we should define or modify the module's trait in the `traits.rs` file.
and also define or modify the types that are shared between modules in the `types.rs` file.
Before starting implementation of every module, we should define or modify the module's trait in the `traits.rs` file.
And also define or modify the types that are shared between modules in the `types.rs` file.

it's possible that these two file contain trait or type that they are not accurate or needed, don't hesitate to modify
It's possible that these two file contain trait or type that they are not accurate or needed, don't hesitate to modify
or remove them.

write unit tests for each module in their own file.
Write unit tests for each module in their own file.

write integration tests in the `examples` directory.
Write integration tests in the `examples` directory.

**Note:**

- only make methods public that are needed by external users.
- Only make methods public that are needed by external users.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Via Network Bitcoin Client Library

this library is responsible for the communication between the sequencer/verifier and the bitcoin network.
This library is responsible for the communication between the sequencer/verifier and the bitcoin network.

this library doesn't contain any logic for the sequencer/verifier, it only provides the communication tools with the
This library doesn't contain any logic for the sequencer/verifier, it only provides the communication tools with the
bitcoin network.

**features:**

- create different type of inscriptions transactions
- sign inscriptions transactions
- broadcast inscriptions transactions
- check for inscriptions transactions confirmation
- fetch and parse Bitcoin blocks
- filter Inscriptions transactions from Bitcoin blocks
- help verifier network participants to create unsigned transaction for withdrawal (UTXO selection)
- provide helper functions for syncing sequencer/verifier node with the Bitcoin network
- Create different type of inscriptions transactions
- Sign inscriptions transactions
- Broadcast inscriptions transactions
- Check for inscriptions transactions confirmation
- Fetch and parse Bitcoin blocks
- Filter Inscriptions transactions from Bitcoin blocks
- Help verifier network participants to create unsigned transaction for withdrawal (UTXO selection)
- Provide helper functions for syncing sequencer/verifier node with the Bitcoin network
(`indexer::get_inscription_messages`)

## Usage
Expand Down
2 changes: 0 additions & 2 deletions core/lib/via_btc_client/src/client/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ impl BitcoinRpc for BitcoinRpcClient {
mod tests {
use std::str::FromStr;

use tokio;

use super::*;
use crate::{regtest::TestContext, traits::BitcoinRpc};

Expand Down
4 changes: 2 additions & 2 deletions core/lib/via_btc_client/src/regtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl BitcoinRegtest {
self.generate_compose_file()?;

Command::new("docker")
.args(&[
.args([
"compose",
"-f",
self.compose_file.to_str().unwrap(),
Expand All @@ -61,7 +61,7 @@ impl BitcoinRegtest {

fn stop(&self) -> std::io::Result<()> {
Command::new("docker")
.args(&[
.args([
"compose",
"-f",
self.compose_file.to_str().unwrap(),
Expand Down

0 comments on commit 721bb3a

Please sign in to comment.