⚡ We welcome businesses to test our enterprise-grade service

Method: POST personal_sign

dropdown

方法 GETH RPC personal_sign 例如 Ethereum (ETH)

POST personal_sign

Method not allowed

符号方法通过以下方式计算以太坊特定的签名(keccak256(“ \ x19ethereum签名消息:\ n” + len(message) +消息)。

通过在消息中添加前缀,可以将计算出的签名识别为以太坊特定的签名。 这样可以防止恶意DAPP可以签署任意数据(例如交易)并使用签名来模仿受害者的情况。

请参阅EcRecover以验证签名。

Parameters

message - 信息

没有任何

account - 细绳

没有任何

passwords - 字符串数组

没有任何

Request

curl --location --request POST 'https://geth.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "personal_sign",
"params": [null, null, null],
"id": "getblock.io"}'


Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}