Wallet
ImportRawKey
Import an account by its private key, in hexadecimal format, and lock it with the passphrase.
const res = await fetch("http://127.0.0.1:8648", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
jsonrpc: "2.0",
method: "importRawKey",
params: ["keyData", "passphrase"],
id: 1
})
});
const data = await res.json();
Prop | Type / Default |
---|
keyData
| |
passphrase
| |
Prop | Type / Default |
---|
returnValue
| |