I'm running a geth node on a digitalocean droplet with:
geth --light --rpc --rpcaddr "0.0.0.0" --rpcapi personal,web3,net,eth --rpccorsdomain "*" --rpcport "8545" console
I'm trying to import a private key remotely with web3.js. Here's what I have :
var web3= new Web3(new Web3.providers.HttpProvider('http://my.node.ip:8545'));
var personal = new Personal(Personal.providers.HttpProvider('http://my.node.ip:8545'));
web3.eth.personal.importRawKey('0x3f91d8d53d7b25580cbf6b839213e20419cefb52bcdbf74c535d081c7006baba', "AssCheeks").then(console.log);
This returns: "Error: Returned error: invalid hex string"
How do I get this to work and where will it store the private key and address?
keythereum
to create a wallet from a private key.bitcoin-core
and there is no need for any "import" private key software, because private key is just a number. Just a simple number like 1,000,000 , but very big and generated according to some mathematical rules to be random enough. You don't need to import it, because its format is simple bytes. Just transfer it and you have it "imported"