post https://api.uniblock.dev/uni/v1/json-rpc#51
Get the private key that controls a given address.
Not recommended for use on Mainnet.
Description
Get the private key that controls a given address. The returned private key can be added to a user with avax.importKey.
Signature:
avax.exportKey({
username: string,
password:string,
address:string
}) -> {privateKey: string}
Request:
username
must controladdress
.address
is the address for which you want to export the corresponding private key. It should be in hex format.
Response:
privateKey
is the CB58 encoded string representation of the private key that controlsaddress
. It has aPrivateKey-
prefix and can be used to import a key viaavax.importKey
.privateKeyHex
is the hex string representation of the private key that controlsaddress
. It can be used to import an account into Core or other wallets, like MetaMask.