snaps icon indicating copy to clipboard operation
snaps copied to clipboard

`eth_sendTransaction` listed in `BLOCKED_RPC_METHODS`

Open radleylewis opened this issue 2 years ago • 0 comments

Issue

Currently we are looking to implement DIDComm messaging with our Snap being an interface for users to interface and invoke DIDComm messages using the Veramo project. I am using the ethr:sepolia network for testing. ethr DIDs do not have the correct key type (X25519/Ed25519) for DIDComm when they are first created. So in order to proceed its necessary to generate a new key with the appropriate algorithm and add this key to the DIDDoc.

When attempting to add the newly generated key as outlined above, the following error is encountered:

Error#1: could not coalesce error (error={ "code": -32601, "data": { "method": "eth_sendTransaction" }, "message": "The method does not exist / is not available." }, payload={ "id": 7, "jsonrpc": "2.0", "method": "eth_sendTransaction", "params": [ { "data": "0x7ad4b0a4000000000000000000000000ab0207f2084bafd9814fd0cf9a3736adf03f117b6469642f7075622f456432353531392f766572694b65792f686578000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000015180000000000000000000000000000000000000000000000000000000000000002007cf5bc93cc16d1559ac91b05e444bc59b554cb39d9f7cc6d1f7f2c6ddde2bd9", "from": "0xab0207f2084bafd9814fd0cf9a3736adf03f117b", "gas": "0x186a0", "to": "0x03d5003bf0e79c5f5223588f347eba39afbc3818" } ] }, code=UNKNOWN_ERROR, version=6.10.0)

This is consistent with the expected behaviour as the eth_sendTransaction is listed in the BLOCKED_RPC_METHODS as per the below and in this file:

export const BLOCKED_RPC_METHODS = Object.freeze([
  'wallet_requestSnaps',
  'wallet_requestPermissions',
  'wallet_revokePermissions',
  // We disallow all of these confirmations for now, since the screens are not ready for Snaps.
  'eth_sendRawTransaction',
  'eth_sendTransaction',
  'eth_sign',
  'eth_signTypedData',
  'eth_signTypedData_v1',
  'eth_signTypedData_v3',
  'eth_signTypedData_v4',
  'eth_decrypt',
  'eth_getEncryptionPublicKey',
  'wallet_addEthereumChain',
  'wallet_switchEthereumChain',
  'wallet_watchAsset',
  'wallet_registerOnboarding',
  'wallet_scanQRCode',
]);

Question

As per the note in the linked code block pertaining to BLOCKED_RPC_METHODS it is mentioned that this is disable in v1 and to be revisited later.

Is there an approximate timeframe with respect to this being address? I appreciate this may be far off, in which case any insights on possible workarounds or other approaches are greatly appreciated.

Thanks in advance for your feedback and keep up the great work team!

radleylewis avatar Feb 05 '24 08:02 radleylewis