Closed roleenboticario1 closed 2 years ago
Hello, How to generate testnet address? Thanks here's what i saw. is it okay? thanks
// $network = NetworkFactory::bitcoinTestnet(); // $keyFactory = new PrivateKeyFactory(); // $privateKey = $keyFactory->generateCompressed(new Random()); // $addressHash = new PayToPubKeyHashAddress($privateKey->getPublicKey()->getPubKeyHash()); // $privateKeyWif = $privateKey->toWif($network); // $testnet_address = $addressHash->getAddress($network); // return $testnet_address;
Hello, How to generate testnet address? Thanks here's what i saw. is it okay? thanks
// $network = NetworkFactory::bitcoinTestnet(); // $keyFactory = new PrivateKeyFactory(); // $privateKey = $keyFactory->generateCompressed(new Random()); // $addressHash = new PayToPubKeyHashAddress($privateKey->getPublicKey()->getPubKeyHash()); // $privateKeyWif = $privateKey->toWif($network); // $testnet_address = $addressHash->getAddress($network); // return $testnet_address;