decred / atomicswap

On-chain atomic swaps for Decred and other cryptocurrencies.
https://blog.decred.org/2017/09/20/On-Chain-Atomic-Swaps/
ISC License
507 stars 232 forks source link

getrawchangeaddres: status code: 401, response: "" #123

Closed Oshirowanen closed 3 years ago

Oshirowanen commented 3 years ago

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?

jholdstock commented 3 years ago

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 3 years ago
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.