0

I would like to protect my dApp production keys. Is it possible to use Ledger to protect my private keys and deploy with cleos? I would like my private key to remain on the device.

1

It depends on your requirements, if you require a deterministic key that can be used outside of the device there are workarounds, however if you require the private keys remain on the device, the only way to do that is to have the device sign an unsigned transaction as one would a cold wallet.

If you can use the ledger to sign a JSON transaction, then perhaps you could use cleos to just broadcast the signed transaction.

Update: you can export your transaction by using the following syntax,

cleos push action -s -d -j contract action {} -p user@active

it will output a JSON block of code you can put into a file, and sign the transaction with your ledger, when you have your signatures you can then push the transaction using,

cleos push transaction "$(cat transaction.json)"
| improve this answer | |
  • How can I provide the signature to the cleos push transaction command? – poiuytrez May 23 '19 at 7:53
  • You need to copy and paste the signature into the transaction json, inserting it into the the part that reads "signature":[] in my example push code you are inserting a json file from the filesystem using cat – cryptosig May 23 '19 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.