Skip to content

Error installing Taker App after "Unification" PR (#758) #76

@GitHappens2Me

Description

@GitHappens2Me

I want to test out the Taker App in addition to the CoinSwap CLI.

I followed the building instructions and have the following prerequisites installed on my system (Raspberry Pi OS (aarch64)):

  • Bitcoin Core (Mutinynet)
  • Tor
  • Node.js v20.20.1
  • Rust toolchain

Both makerd and taker run without any problems or errors.
When running npm install I run into 43 errors, which all show differences in the expected code and the found code. These are a few examples:

error[E0432]: unresolved import `coinswap::taker::api2`
  --> src/taproot_taker.rs:14:10
   |
14 |   taker::api2::{SwapParams as CoinswapSwapParams, Taker as CoinswapTaker},
   |          ^^^^ could not find `api2` in `taker`

error[E0432]: unresolved import `coinswap::protocol::messages`
  --> src/types.rs:12:13
   |
12 |   protocol::messages::{FidelityProof as csFidelityProof, Offer as csOffer},
   |             ^^^^^^^^ could not find `messages` in `protocol`

error[E0433]: failed to resolve: could not find `TakerBehavior` in `api`
    --> src/types.rs:71:54
     |
  71 |       TakerBehavior::Normal => coinswap::taker::api::TakerBehavior::Normal,
     |                                                      ^^^^^^^^^^^^^ could not find `TakerBehavior` in `api`
     |

Steps to Reproduce:

  1. Clone taker-app.
  2. Run npm install.
  3. Observe the napi build failure during the phase: Compiling coinswap v0.2.0 (https://github.com/citadel-tech/coinswap.git?branch=master#3c74bd87)

This seems to be related to the recent unification of the Legacy and Taproot protocol in Commit 3c74bd8 (#758), which seems to have changed a large part of the codebase. After pinning the core library to the previous commit (rev = "90c9a02"), the build process succeeds:

Workaround:

  • Change the following line in taker-app/coinswap-ffi/coinswap-js/Cargo.toml
  • coinswap = { git = "https://github.com/citadel-tech/coinswap.git", branch = "master" } -> coinswap = { git = "https://github.com/citadel-tech/coinswap.git", rev = "90c9a02" }

If you require more info, including the complete error message, I will provide it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions