vacuumlabs / cardano-hw-cli

Cardano CLI tool for hardware wallets
72 stars 24 forks source link

Reward withdrawal error #162

Closed dmitrystas closed 1 year ago

dmitrystas commented 1 year ago

When I try to make payment key witness for the reward withdrawal transaction

cardano-hw-cli transaction witness \
--tx-file tx.transformed \
--hw-signing-file payment.hwsfile \
--mainnet \
--out-file payment.witness

cardano-hw-cli gives an error

Error: The requested operation failed. Check that your Ledger device is connected, unlocked and with Cardano app running.
Details: Error: Missing signing file for certificate

This only works in case I use the following syntax

cardano-hw-cli transaction witness \
--tx-file tx.transformed \
--hw-signing-file payment.hwsfile \
--hw-signing-file stake.hwsfile \
--mainnet \
--out-file payment.witness \
--out-file stake.witness

i.e. when I use both payment and stake keys at the same time.

The transaction witness command also works properly for stake key only, without payment key. But for payment key only it does not works at all.

Is this a bug or a feature?

gitmachtl commented 1 year ago

Hey, what rewards do you wanna withdrawal. External ones or the ones on the hw ledger? The security options only allow the withdrawal from hw ledger rewards if you also pay for the transaction fees with the hw ledger. I have made a little chart a while ago (https://github.com/gitmachtl/scripts/tree/master/cardano/mainnet#limitations-to-the-pooloperation-when-using-hardware-wallets) whats possible with hw wallets and what is not possible. Is this helpful to you? Best regards, Martin

dmitrystas commented 1 year ago

Hey, yeah, thanks, I know about this limitation, and I'm on the right side :)

withdrawal from hw ledger rewards if you also pay for the transaction fees with the hw ledger

Yep, that's exactly what I'm doing. Everything works correctly when I use both payment and stake keys at the same time. The error appears only when I try to run cardano-hw-cli transaction witness first with one key (payment), and then with another one (stake)

gitmachtl commented 1 year ago

Because the hw ledger checks the base address and if it belongs to the same hw wallet. For that it needs both keys, so it can't be done in two steps.

dmitrystas commented 1 year ago

I see, thanks for the clarification Martin. So, since it's not the bug we can close the issue I guess.