personal
manages private keys in the key store.personal.importRawKey(keydata, passphrase)
{"method": "personal_importRawKey", "params": [keydata, passphrase]}
personal.listAccounts
{"method": "personal_listAccounts", "params": []}
personal.listWallets
{"method": "personal_listWallets", "params": []}
personal.openWallet(url, passhrase)
{"method": "personal_openWallet", "params": [url, passphrase]}
personal.deriveAccount(url, path, pin)
{"method": "personal_deriveAccount", "params": [url, path, pin]}
newAccount
will prompt for a passphrase when it is not supplied as the argument.personal.newAccount(passphrase)
{"method": "personal_newAccount", "params": [passphrase]}
personal.lockAccount(address)
{"method": "personal_lockAccount", "params": [address]}
true
if the account was successfully locked, false
otherwise.klay_sign
and klay_sendTransaction
while it is unlocked.personal.unlockAccount(address, passphrase, duration)
{"method": "personal_unlockAccount", "params": [address, passphrase, duration]}
true
if unlocked, false
otherwisenull
as the passphrase.personal.replaceRawKey(keydata, oldPassphrase, newPassphrase)
{"method": "personal_replaceRawKey", "params": [keydata, oldPassphrase, newPassphrase]}
from
and key
. Other fields such as gas
, gasPrice
, and nonce
are se internally if unspecified. If the passphrase is able to decrypt the private key belonging to tx.from
and the transaction is verified, the transaction is signed and submitted onto the network. The account is not unlocked globally in the node and cannot be used in other RPC calls.personal.sendAccountUpdate(tx, passphrase)
{"method": "personal_sendAccountUpdate", "params": [tx, passphrase]}
from
and key
must be specified.tx.from
.klay.toPeb()
is not executable in HTTP RPC.from
and to
except the case of contract deployment. to
should be omitted if the transaction deploys a smart contract. If value
is not specified, it will be set to zero internally. Other fields such as gas
, gasPrice
, and nonce
are set to appropriate values internally if unspecified. If the passphrase is able to decrypt the private key belonging to tx.from
and the transaction is verified, the transaction is signed and submitted onto the network. The account is not unlocked globally in the node and cannot be used in other RPC calls.personal.sendTransaction(tx, passphrase)
{"method": "personal_sendTransaction", "params": [tx, passphrase]}
from
is a required field. to
, value
, gas
, gasPrice
and nonce
are optional fields.tx.from
.klay.toPeb()
is not executable in HTTP RPC.from
, to
, and value
. Other fields such as gas
, gasPrice
, and nonce
are set internally if unspecified. If the passphrase is able to decrypt the private key belonging to tx.from
and the transaction is verified, the transaction is signed and submitted onto the network. The account is not unlocked globally in the node and cannot be used in other RPC calls.personal.sendValueTransfer(tx, passphrase)
{"method": "personal_sendValueTransfer", "params": [tx, passphrase]}
from
, to
, and value
must be specified.tx.from
.klay.toPeb()
is not executable in HTTP RPC.sign
method calculates a Klaytn-specific signature with: sign(keccak256("\x19Klaytn Signed Message:\n" + len(message) + message)))
personal_ecRecover
to verify the signature.personal.sign(message, account, password)
{"method": "personal_sign", "params": [message, account, password]}
ecRecover
returns the address associated with the private key that was used to calculate the signature in personal_sign
.personal.ecRecover(message, signature)
{"method": "personal_ecRecover", "params": [message, signature]}