Support Infura in `onboard.py`
Why?
There have been a number of issues () where people cannot use the account_signTypedData on geth nodes. This is an issue, since Infura runs on geth. This causes problems in the Stark key generation step, as client.onboarding.derive_stark_key() specifically throws this error.
What?
I have found that this problem can be circumvented by explicitly passing the ethereum private key into the dydx Client() constructor. I have modified the existing examples/onboard.py to reflect this change.
Testing
This ran fine locally after filling in values for ETHEREUM_PRIVATE_KEY and WEB_PROVIDER_URL and running python3 onboard.py.
Hi, I just wondering how safe it is by passing the eth private key directly to the dydx client?
All of the signing happens offline, so there's no risk introduced by the dydx client. It's precisely as secure as the machine it's running on.