Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple providers to use signTypedData with geth #105

Open
roshkins opened this issue Dec 29, 2021 · 1 comment
Open

Allow multiple providers to use signTypedData with geth #105

roshkins opened this issue Dec 29, 2021 · 1 comment

Comments

@roshkins
Copy link

Annoyingly I get a not implemented error when using dydx's client saying that eth_signTypedData is not implemented. After some searching I found that geth doesn't support that method, but it's sibling project Clef support it (called account_signTypedData) https://geth.ethereum.org/docs/clef/apis#account_signtypeddata, but not other APIs. Web3.py only supports one provider per instance, so it would be helpful to be able to create web3 clients as appropriate for the different services.

@maxholloway
Copy link

I personally ran into this error when trying to use client.onboarding.derive_stark_key() as seen in the onboarding here. However, I noticed that when I pass my ethereum private key, this error vanishes. The following worked for me.

dydx_client = Client(
    network_id=network_id,
    host=host,
    eth_private_key=eth_private_key,
    web3=Web3(Web3.HTTPProvider(infura_api_endpoint)),
)

stark_private_key = dydx_client.onboarding.derive_stark_key()
dydx_client.stark_private_key = stark_private_key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants