⚡ We welcome businesses to test our enterprise-grade service

Method: POST personal_importRawKey

dropdown

方法 GETH RPC personal_importRawKey 例如 Ethereum (ETH)

POST personal_importRawKey

Method not allowed

将给定的未加密的私钥(HEX字符串)导入到密钥存储中,并用密码将其加密。

返回新帐户的地址。

Parameters

keydata - 细绳

没有任何

passphrase - 细绳

没有任何

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_importRawKey",
"params": [null, null],
"id": "getblock.io"}'


Response

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