Learn R Programming

gethr (version 0.1.0)

eth_sign: Ethereum specific signature

Description

eth_sign returns an Ethereum specific signature with Keccak256.

Usage

eth_sign(address, message)

Arguments

address

Address - Address of the user.

message

String - Message to sign.

Value

Data - Signature.

Details

By adding a prefix to the message makes the calculated signature recognisable as an Ethereum specific signature. This prevents misuse where a malicious DApp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim. Note the address to sign with must be unlocked.

See Also

Other eth functions: eth_accounts, eth_blockNumber, eth_call, eth_coinbase, eth_estimateGas, eth_gasPrice, eth_getBalance, eth_getBlockByHash, eth_getBlockByNumber, eth_getBlockTransactionCountByHash, eth_getBlockTransactionCountByNumber, eth_getCode, eth_getFilterChanges, eth_getFilterLogs, eth_getLogs, eth_getProof, eth_getStorageAt, eth_getTransactionByBlockHashAndIndex, eth_getTransactionByBlockNumberAndIndex, eth_getTransactionByHash, eth_getTransactionCount, eth_getTransactionReceipt, eth_getUncleByBlockHashAndIndex, eth_getUncleByBlockNumberAndIndex, eth_getUncleCountByBlockHash, eth_getUncleCountByBlockNumber, eth_getWork, eth_hashrate, eth_mining, eth_newBlockFilter, eth_newFilter, eth_newPendingTransactionFilter, eth_protocolVersion, eth_sendRawTransaction, eth_sendTransaction, eth_submitHashrate, eth_submitWork, eth_syncing, eth_uninstallFilter, gethr, personal_sendTransaction

Examples

Run this code
# NOT RUN {
eth_sign('0xb117a8bc3ecf2c3f006b89da6826e49b4193977a', 'hello world')
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab