[Ethereum] Generate wallet public and private key using web3 PHP

private-keyweb3.php

I am using this to get public key:

https://github.com/sc0Vu/web3.php#assign-value-to-outside-scopefrom-callback-scope-to-outside-scope

I am in need of to get the public and private key using PHP web3 like this:

https://web3js.readthedocs.io/en/1.0/web3-eth-accounts.html#create

How can I do that?

Best Answer

The eth-accounts module in web3.js is in memory operation, the account was created in memory, and you can signed transaction by account.

If you want to create account in memory, web3.php doesn't support this now.

If you want to create account in your geth/parity node, you can use personal module.

Also I'm working on this ethereum-wallet (https://github.com/web3p/ethereum-wallet), it might help you when I finish.

Related Topic