xmr-btc-swap icon indicating copy to clipboard operation
xmr-btc-swap copied to clipboard

rendezvous-point flag does not parse/allow /onion3/ multiaddr

Open sethforprivacy opened this issue 2 years ago • 1 comments

When setting up a rendezvous node, I realized that you cannot pass an /onion3/ multiaddr to the swap tool, as it does not get parsed and throws an error as seen below:

tiny in tiny in ~/asb took 2s ❯ ./swap list-sellers --rendezvous-point /onion3/yshgpjmwxcgsj7rxjdwruqyimlecao7esabh3tunjzrs5u5aoseozzyd.onion:8888/p2p/12D3KooWCULyZKuV9YEkb6BX8FuwajdvktSzmMg4U5ZX2uYZjHeu
Error: error: Invalid value for '--rendezvous-point <rendezvous-point>': invalid multiaddr

tiny in tiny in ~/asb ❯ ./swap list-sellers --rendezvous-point /onion3/yshgpjmwxcgsj7rxjdwruqyimlecao7esabh3tunjzrs5u5aoseozzyd.onion/p2p/12D3KooWCULyZKuV9YEkb6BX8FuwajdvktSzmMg4U5ZX2uYZjHeu
Error: error: Invalid value for '--rendezvous-point <rendezvous-point>': invalid multiaddr

As /onion3/ multiaddr is recognized in other parts of the tool, like for sellers, would be good to have this supported natively for onion-routed rendezvous nodes.

sethforprivacy avatar Aug 26 '21 12:08 sethforprivacy

This happens due to restraints on the multiaddr format (and rust crate), it requires a port number for an onion/onion3 multiaddr and the .onion extension should be left out.

So the following would work: ./swap list-sellers --rendezvous-point /onion3/yshgpjmwxcgsj7rxjdwruqyimlecao7esabh3tunjzrs5u5aoseozzyd:8888/p2p/12D3KooWCULyZKuV9YEkb6BX8FuwajdvktSzmMg4U5ZX2uYZjHeu

Most of the multiaddr implementations seem to require this.

refring avatar Apr 08 '22 04:04 refring