decred/atomicswap

getrawchangeaddres: status code: 401, response: ""

Oshirowanen opened this issue · 2 comments

Going through your readme file but instead of using btcatomicswap with dcratomicswap, I am using btcatomicswap with ltcatomicswap.

When I get to the command:

dcratomicswap --testnet redeem

Or in my case

ltcatomicswap --testnet redeem

I get the following error:

getrawchangeaddres: status code: 401, response: ""

Any idea why?

I'm not a maintainer of this repo so I cannot give you a definitive answer, but I can tell you that a 401 HTTP status typically means "Unauthorized". I guess this probably means you need to unlock your wallet.

jrick commented
Usage: ltcatomicswap [flags] cmd [cmd args]

Commands:
  initiate <participant address> <amount>
  participate <initiator address> <amount> <secret hash>
  redeem <contract> <contract transaction> <secret>
  refund <contract> <contract transaction>
  extractsecret <redemption transaction> <secret hash>
  auditcontract <contract> <contract transaction>

Flags:
  -rpcpass string
        password for wallet RPC authentication
  -rpcuser string
        username for wallet RPC authentication
  -s string
        host[:port] of Litecoin Core wallet RPC server (default "localhost")
  -testnet
        use testnet network

Similarly to btcatomicswap, for ltcatomicswap, you need to specify the -rpcuser and -rpcpass flags.