Skip to content

Instantly share code, notes, and snippets.

@toknT
Created November 21, 2018 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toknT/b49824fabd8889a074e143d920a639f6 to your computer and use it in GitHub Desktop.
Save toknT/b49824fabd8889a074e143d920a639f6 to your computer and use it in GitHub Desktop.
php eth
<?php
/**
* example of package https://github.com/digitaldonkey/ethereum-php
*/
require __DIR__ . '/vendor/autoload.php';
use Ethereum\DataType\EthD;
use Ethereum\Ethereum;
// https://web3js.readthedocs.io/en/1.0/web3-eth-accounts.html#recover
$recoveredAddr = Ethereum::personalEcRecover('Some data', new EthD('0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a0291c'));
echo $recoveredAddr;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment