1

I have a program running on a remote server which occasionally needs to send an Ethereum transaction. That transaction will need to be signed with my private key which I keep on a Trezor wallet on my desk.

What would be the easiest way to construct a transaction locally, get it signed by a local Trezor device, save the signed transaction on the server and then at a later point get the remote program send it to the network once it's required?

My question primarily is about choice of languages/packages/software on the client side (Windows) and server side (Linux).

At the moment my program is in perl which apparently has limited support of Ethereum, in particular I haven't yet found a way in Perl to get a transaction signed using Trezor.

I am happy to implement this function in a different language and then integrate with my perl program, just looking to find out which language/module/library would get me there faster.

My initial idea is creating a web page on the remote host that would connect via Trezor/connect on my local host in a Metamask fashion. This should allow me to create a raw transaction signed by Trezor. What would be the easiest method to create a linux executable that sends a raw transaction to the Ethereum network?

Thanks in advance!

2 Answers 2

2

Interactive hardware wallets are not designed for that. Trezor or ledger are expecting a human to validate. That's the whole point.

What you would like to do is possible with a signing proxy and either a Vault or an HSM. Search for Ethsigner.

It will require that you provision an new account on this Vault or HSM from your current Trezor one. But then you will be able to send transactions automatically while signing then in a secure way.

2
  • In my original plan I will sign the required transaction interactively in advance. Then the software sends the signed transaction at a given point. The logic of the process is such that the transaction can be formed in advance - all data required for the transaction is known in advance, with the only exception of gas price. Why would this not be feasible with Trezor? Aug 5, 2021 at 12:40
  • You can try to create a dapp that will ask trezor to sign the tx and the dapp displays the payload. With that, you only need to access your browser ethereum API and connect Trezor for instance using Metamask. The displayed hexadecimal signed transaction can then be saved and sent to the network later as soon as you make sure nonces are in the correct order and no other transaction is made in between. Aug 5, 2021 at 17:28
1

How about the following setup? Haven't tested yet, will take time. Simply on the face of it this looks feasible:

  • MyEtherwallet + Trezor to sign a raw transaction (this will not include gas data), save to the server.
  • At a given time send it via Infura ITX service - it's where Infura pay for your gas

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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