2 require_once 'jsonrpcphp/includes/jsonRPCClient.php';
5 echo "This page demonstrates the generation of new addresses by a neutralized Electrum wallet.\n\n";
6 echo "A neutralized wallet does not contain the seed that allows to generate private keys.\nIt contains a master public key that allows to create new addresses.\n\n";
7 echo "An attacker getting access to the neutralized wallet cannot steal the bitcoins.\n";
8 echo "The full wallet (with seed) is not stored on the webserver.\n\n";
9 echo "<form action=\"\" method=\"post\"><input type=\"submit\" name=\"submit\" value=\"Get new address\"/></form> ";
11 if($_POST['submit']) {
12 $daemon = new jsonRPCClient('http://foo:bar@ecdsa.org:8444/');
14 $r = $daemon->getnewaddress();
17 echo "<a href='bitcoin:$r'>bitcoin:$r</a>\n\n";
19 } catch(Exception $e) {
20 echo "error: cannot reach wallet daemon";