Create web3 signature

298 views Asked by At

I'm trying to connect metamask to third-party website using web3.js So I need to sign signature which containts address and nonce The problem is i can't get the same signature as by manual metamask with browser I think I can't understand how exactly the signature is built Any idead, how i can do that?

metamasak message

1

message = {
        address: '0xf82Fa3FC08087a1837d5374172F881C2bF74db36',
        nonce: '0xc1fb834b1bdb671d20df6fe6ca3e8fdde2a8d424acb1c69510e56d2ff9a56aee'
    }
    let signature = web3.eth.accounts.sign(message, privateKey).signature;
0

There are 0 answers