PHP code example of m8b / ethbnd-keystore
1. Go to this page and download the library: Download m8b/ethbnd-keystore library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
m8b / ethbnd-keystore example snippets
$keystore = file_get_contents("path/to/key.json");
$wallet = \M8B\EtherBinder\Wallet\JSONKeystoreWallet::loadFromKeystore($keystore, "password");
$key = \M8B\EtherBinder\Crypto\Key::fromHex("0x....");
$wallet = \M8B\EtherBinder\Wallet\JSONKeystoreWallet::wrap($key);
file_put_contents($wallet->export("password"));
$wallet = \M8B\EtherBinder\Wallet\JSONKeystoreWallet::generate();