Currently, restricted methods defined directly in the restrictedMethods file are called using wallet.send({ method, params }), while internal MetaMask methods are calling using wallet.methodName(...). This is not documented very well, and we should perhaps consider using the RPC API for everything except special methods like registerRpcMessageHandler.
Currently, restricted methods defined directly in the
restrictedMethods
file are called usingwallet.send({ method, params })
, while internal MetaMask methods are calling usingwallet.methodName(...)
. This is not documented very well, and we should perhaps consider using the RPC API for everything except special methods likeregisterRpcMessageHandler
.