2

For example, when I am using:

web3.currentProvider.sendAsync({
                method: "eth_signTypedData_v3",
                params: [customerAddress, data],
                from: customerAddress,
                id: new Date().getTime()
        }

I would like to know if eth_signTypedData_v3 is supported by the web3 provider before I invoke it.

1

As far as I know JSON RPC 2.0 has no introspection mechanisms and in Ethereum's JSON RPC specification is also no function for introspection available. Hence, the only solution that I see, is to make for every function that you want to check a request with an invalid (e.g. empty) params list.

If you get an error response with the message "Method xxxx is not supported" then you know it's not supported.

  • Pity, it looks like that's the case then! – Miao ZhiCheng Jan 21 at 22:14

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.