Skip to main content

Generate wallet public and private key using Web3.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?