depolymerization

wire gateway for Bitcoin/Ethereum
Log | Files | Refs | Submodules | README | LICENSE

commit 9361da39e566a5054398bbd853da762f20bfc473
parent 3da9b515a57a88c0af10819ce5323bcfb9eb19a5
Author: Antoine A <>
Date:   Fri, 10 Jul 2026 14:37:29 +0200

common: clean clippy and documentation

Diffstat:
MREADME.md | 7-------
Adepolymerizer-bitcoin/README.md | 22++++++++++++++++++++++
Mdepolymerizer-bitcoin/src/bin/btc-harness.rs | 9++++++---
Mdepolymerizer-bitcoin/src/lib.rs | 1+
Mdepolymerizer-bitcoin/src/rpc.rs | 1+
Muri-pack/src/lib.rs | 1+
6 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/README.md b/README.md @@ -3,13 +3,6 @@ Depolymerization is a GNU Taler project to create blockchain adapters (depolymerizer) for the Taler ecosystem. -## Depolymerizer - -### depolymerizer-bitcoin - -Depolymerizer for the bitcoin blockchain using bitcoind v31. Supports the -[Taler Wire Gateway API](https://docs.taler.net/core/api-bank-wire.html). - ## Project structure - **depolymerizer-bitcoin**: Bitcoin Depolymerizer diff --git a/depolymerizer-bitcoin/README.md b/depolymerizer-bitcoin/README.md @@ -0,0 +1,21 @@ +# depolymerizer-bitcoin + +GNU Taler Bitcoin adapter for using bitcoind v31 implementing the [Taler Adapter API](https://docs.taler.net/core/api-adapter.html). + +## Documentation + +See [https://docs.taler.net/]([https://docs.taler.net/) for the documentation and the [setup manual](https://docs.taler.net/depolymerization/bitcoin-manual.html). + +## Test harness + +Some logic tests require a local development environment. You must run them manually. + +```sh +cargo run --bin btc-harness logic +``` + +I you want to run long term test on the online signet, you can run: + +```sh +cargo run --bin btc-harness online test +``` +\ No newline at end of file diff --git a/depolymerizer-bitcoin/src/bin/btc-harness.rs b/depolymerizer-bitcoin/src/bin/btc-harness.rs @@ -1312,8 +1312,11 @@ async fn online_harness(network: Network, reset: bool) -> PanicRes<()> { fn main() { let args = Args::parse(); - taler_main(CONFIG_SOURCE, args.common, async |_| match args.cmd { - Command::Logic { reset } => Ok(logic_harness(reset).await.unwrap()), - Command::Online { reset, network } => Ok(online_harness(network, reset).await.unwrap()), + taler_main(CONFIG_SOURCE, args.common, async |_| { + match args.cmd { + Command::Logic { reset } => logic_harness(reset).await.unwrap(), + Command::Online { reset, network } => online_harness(network, reset).await.unwrap(), + } + Ok(()) }); } diff --git a/depolymerizer-bitcoin/src/lib.rs b/depolymerizer-bitcoin/src/lib.rs @@ -47,6 +47,7 @@ pub enum GetOpReturnErr { } /// An extended bitcoincore JSON-RPC api client who can send and retrieve metadata with their transaction +#[allow(async_fn_in_trait)] pub trait RpcApiExtended: RpcApi { /// Send a transaction with a 32B key as metadata encoded using fake segwit addresses async fn send_segwit_key( diff --git a/depolymerizer-bitcoin/src/rpc.rs b/depolymerizer-bitcoin/src/rpc.rs @@ -295,6 +295,7 @@ impl<'a> RpcApi for WalletRpc<'a> { } } +#[allow(async_fn_in_trait)] pub trait RpcApi { async fn call< T: serde::de::DeserializeOwned + Debug + Send, diff --git a/uri-pack/src/lib.rs b/uri-pack/src/lib.rs @@ -52,6 +52,7 @@ fn pack_ascii(c: u8) -> u8 { /// Unpack an URI ascii char /// Panic if char not supported fn unpack_ascii(c: u8) -> u8 { + #[allow(clippy::byte_char_slices)] [ b'a', b'b', b'c', b'd', b'e', b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', b'.', b'/', b'-', b'%',