Filecoin.WalletImport
Filecoin.WalletImport将指定的私钥导入钱包。
参数
- keyInfo: KeyInfo对象
返回值
Filecoin.WalletImport调用返回导入私钥对应的地址。
示例代码
请求:
curl -X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc":"2.0",
"method":"Filecoin.WalletImport",
"params":[
{
"Type": "bls",
"PrivateKey": "Ynl0ZSBhcnJheQ=="
}
],
"id":7878
}' \
http://127.0.0.1:1234/rpc/v0
响应:
{
"id": 7878,
"jsonrpc": "2.0",
"result": "f01234"
}