Closed gaurav-chandra closed 7 years ago
I'll take a look at it later today.
I did some tweaking and found:
public function getWif()
{
if(!isset($this->k))
{
throw new \Exception('No Private Key was defined');
}
$k = $this->k;
$secretKey = '80' . $k;
$secretKey .= substr($this->hash256(hex2bin($secretKey)), 0, 8);
//return strrev($this->base58_encode($secretKey));
// if I remove strrev, then the WIF generated is readable by Mycelium
return ($this->base58_encode($secretKey));
}
But the above change, changes the Bitcoin address from
13GZGS96Ui9CuudonrfuQ1CeCcSkHQkt2v
to Uncompressed Address
1HxrEkR2wpoyVVT9QgmkhjCihSCVYoWiPo
in mycelium app.
Here are the details of the wallet:
When I am entering or scanning the qr code for WIF, the mycelium wallet app is not detecting it as valid.
I imported the Private Key in blockchain.info wallet, it was a success. Then I generated the WIF from their interface, the WIF generated was different:
and mycelium could read this format successfully.
What am I missing? Thanks.