Skip to main content
added 161 characters in body
Source Link
Richard
  • 5.1k
  • 2
  • 10
  • 26

eth_sign always takes a string (a message to sign) and addresstwo parameters (see https://eth.wiki/json-rpc/API#eth_sign): an address (account that signes the message and a string (a message to sign). Some ethereum provider support eth_signTransaction (see https://eth.wiki/json-rpc/API#eth_signTransaction). Otherwise you need to use eth_sendTransaction.

Note: Most wallets prevent that you can sign raw transaction data by prepending the "Ethereum Message" prefix. In the past (and even now for MetaMask) you cancould rlp encode the transaction and use the rlp encoded transaction as the string input.

eth_sign always takes a string (a message to sign) and address (see https://eth.wiki/json-rpc/API#eth_sign). Some ethereum provider support eth_signTransaction (see https://eth.wiki/json-rpc/API#eth_signTransaction). Otherwise you need to use eth_sendTransaction.

Note: In the past (and even now for MetaMask) you can rlp encode the transaction and use the rlp encoded transaction as the string input.

eth_sign always takes two parameters (see https://eth.wiki/json-rpc/API#eth_sign): an address (account that signes the message and a string (a message to sign). Some ethereum provider support eth_signTransaction (see https://eth.wiki/json-rpc/API#eth_signTransaction). Otherwise you need to use eth_sendTransaction.

Note: Most wallets prevent that you can sign raw transaction data by prepending the "Ethereum Message" prefix. In the past (and even now for MetaMask) you could rlp encode the transaction and use the rlp encoded transaction as the string input.

Source Link
Richard
  • 5.1k
  • 2
  • 10
  • 26

eth_sign always takes a string (a message to sign) and address (see https://eth.wiki/json-rpc/API#eth_sign). Some ethereum provider support eth_signTransaction (see https://eth.wiki/json-rpc/API#eth_signTransaction). Otherwise you need to use eth_sendTransaction.

Note: In the past (and even now for MetaMask) you can rlp encode the transaction and use the rlp encoded transaction as the string input.