1

This works fine:

const provider = new Web3.providers.HttpProvider('http://localhost:8545');
const web3 = new Web3(provider);

await web3.eth.sign(message, address);

But when I switch to this provider:

const provider = new HDWalletProvider(mnemonic, "https://rinkeby.infura.io/<key>", 0 )

I get this error:

TypeError: self.signMessage is not a function

Anyone know what might be the issue?

Thanks!

edit I guess it's not implemented. Anyone know an alternative way to sign something using Infura?

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.