I have this:

        method: 'eth_sign', 
                from: account, //this is the address
                message: '0xfafa'
    }).then(data => {
        console.log("data ", data);

Seems like the error states: RPC Error: Invalid parameters: must provide an Ethereum address.

What's the right syntax to make it work ?

  • From eth.wiki/json-rpc/API#eth_sign it appears params should be an array. In any case you can inject any web3 version in your project, you shouldn't depend on Metamask copy. – Ismael Mar 10 at 2:52

Maybe try using web3.eth.personal.sign(message, account)

-> Returns a promise reference post

Usually this requires a third parameter password but here someone says without providing a pass it uses MetaMask to sign.


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.