xmr-btc-swap
xmr-btc-swap copied to clipboard
rendezvous-point flag does not parse/allow /onion3/ multiaddr
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.
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.