SatoshiPortal / boltz-rust

Boltz client rust crate
https://docs.boltz.exchange
30 stars 19 forks source link

Cannot add repo as git dependency #28

Closed ok300 closed 6 months ago

ok300 commented 6 months ago

I see the last published version^1 is 0.1.2, but there have been many fixes and changes lately^2. Therefore I wanted to use the latest repo version in a new project.

If I try to reference this repo in Cargo.toml

[dependencies]
boltz-client = { git = "https://github.com/SatoshiPortal/boltz-rust", rev = "f3b7f4b6d544e5620547ff129b618f2f5dad2b29" }

it won't compile

error[E0432]: unresolved imports `elements::secp256k1_zkp::MusigAggNonce`, `elements::secp256k1_zkp::MusigKeyAggCache`, `elements::secp256k1_zkp::MusigPartialSignature`, `elements::secp256k1_zkp::MusigPubNonce`, `elements::secp256k1_zkp::MusigSession`, `elements::secp256k1_zkp::MusigSessionId`
  --> /home/x/.cargo/git/checkouts/boltz-rust-9b1ff639653b9442/f3b7f4b/src/swaps/boltzv2.rs:23:5
   |
23 |     MusigAggNonce, MusigKeyAggCache, MusigPartialSignature, MusigPubNonce, MusigSession,
   |     ^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^  ^^^^^^^^^^^^ no `MusigSession` in the root
   |     |              |                 |                      |
   |     |              |                 |                      no `MusigPubNonce` in the root
   |     |              |                 no `MusigPartialSignature` in the root
   |     |              no `MusigKeyAggCache` in the root
   |     no `MusigAggNonce` in the root
24 |     MusigSessionId,
   |     ^^^^^^^^^^^^^^ no `MusigSessionId` in the root

I get the same result if I add the secp256k1-zkp patch, as it was recommended elsewhere:

[dependencies]
boltz-client = { git = "https://github.com/SatoshiPortal/boltz-rust", rev = "f3b7f4b6d544e5620547ff129b618f2f5dad2b29" }

[patch.crates-io]
secp256k1-zkp = {git = "https://github.com/BlockstreamResearch/rust-secp256k1-zkp.git", rev = "60e631c24588a0c9e271badd61959294848c665d"}

What's the proper way to reference this repo in a new project? Thanks!

i5hi commented 6 months ago

Hey, try again now. Just got around to merging overdue PRs.

They issues you are facing must be resolved.

ok300 commented 6 months ago

Thanks, it's now working.